forked from CaiJingLong/amap_base_flutter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
no message
- Loading branch information
Showing
84 changed files
with
65 additions
and
1,742 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
## [0.0.1] - TODO: Add release date. | ||
## 0.0.3 | ||
* 加入log, misc, permissions | ||
|
||
* TODO: Describe initial release. | ||
## 0.0.2 | ||
* 抽取`AMap` | ||
|
||
## 0.0.1 | ||
* 抽取LatLng |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
name: amap_base_core | ||
description: Fully Functional AMap Flutter Plugin. Based on AndroidView/UiKitView. | ||
version: 0.0.1 | ||
version: 0.0.3+1 | ||
author: yohom <[email protected]> | ||
homepage: https://github.com/yohom/amap_base_flutter | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,7 @@ | ||
library amap_base_location; | ||
|
||
import 'dart:async'; | ||
import 'dart:convert'; | ||
|
||
import 'package:flutter/foundation.dart'; | ||
import 'package:flutter/services.dart'; | ||
|
||
import 'src/location/amap_location.dart'; | ||
|
||
export 'package:amap_base_core/amap_base_core.dart'; | ||
|
||
export 'src/common/permissions.dart'; | ||
export 'src/location/amap_location.dart'; | ||
export 'src/location/model/location.dart'; | ||
export 'src/location/model/location_client_options.dart'; | ||
|
||
class AMap { | ||
static final _channel = MethodChannel('me.yohom/amap_base'); | ||
|
||
static Map<String, List<String>> assetManifest; | ||
|
||
static Future init(String key) async { | ||
await _channel.invokeMethod('setKey', {'key': key}); | ||
|
||
// 加载asset相关信息, 供区分图片分辨率用, 因为native端的加载asset方法无法区分分辨率, 这是一个变通方法 | ||
assetManifest = | ||
await rootBundle.loadStructuredData<Map<String, List<String>>>( | ||
'AssetManifest.json', | ||
(String jsonData) { | ||
if (jsonData == null) | ||
return SynchronousFuture<Map<String, List<String>>>(null); | ||
|
||
final Map<String, dynamic> parsedJson = json.decode(jsonData); | ||
final Iterable<String> keys = parsedJson.keys; | ||
final Map parsedManifest = Map<String, List<String>>.fromIterables( | ||
keys, | ||
keys.map<List<String>>((key) => List<String>.from(parsedJson[key])), | ||
); | ||
return SynchronousFuture<Map<String, List<String>>>(parsedManifest); | ||
}, | ||
); | ||
|
||
await AMapLocation().init(); | ||
} | ||
|
||
@Deprecated('使用init方法初始化的时候设置key') | ||
static Future setKey(String key) { | ||
return _channel.invokeMethod('setKey', {'key': key}); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
map/example/lib/map/tools/coordinate_transformation_screen.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.