|
@@ -232,6 +232,7 @@ class _MapChoicePointState extends State<MyHomePage>
|
|
|
print(coord.latitude);
|
|
|
print(coord.longitude);
|
|
|
String address;
|
|
|
+ String addressM;
|
|
|
|
|
|
/// 逆地理编码(坐标转地址)
|
|
|
ReGeocode reGeocodeList = await AmapSearch.searchReGeocode(
|
|
@@ -239,6 +240,13 @@ class _MapChoicePointState extends State<MyHomePage>
|
|
|
);
|
|
|
|
|
|
print(await reGeocodeList.toFutureString());
|
|
|
+ print(await reGeocodeList.provinceName);
|
|
|
+
|
|
|
+ print(await reGeocodeList.cityName);
|
|
|
+ print(await reGeocodeList.districtName);
|
|
|
+
|
|
|
+ print("reGeocodeList.provinceName=================");
|
|
|
+ addressM = (await reGeocodeList.provinceName) + (await reGeocodeList.cityName) + (await reGeocodeList.districtName);
|
|
|
address = await reGeocodeList.formatAddress;
|
|
|
print(address);
|
|
|
print(address +
|
|
@@ -277,11 +285,7 @@ class _MapChoicePointState extends State<MyHomePage>
|
|
|
coord.latitude.toString() +
|
|
|
"," +
|
|
|
coord.longitude.toString();
|
|
|
- String setAddressMaster = address +
|
|
|
- "," +
|
|
|
- coord.latitude.toString() +
|
|
|
- "," +
|
|
|
- coord.longitude.toString();
|
|
|
+ String setAddressMaster = addressM;
|
|
|
if(widget.type == "1"){
|
|
|
FastNotification.push("set_address", setAddress);
|
|
|
}else if (widget.type == "2"){
|