jyj 4 年之前
父节点
当前提交
1692d58f6e
共有 1 个文件被更改,包括 9 次插入5 次删除
  1. 9 5
      lib/internal/bbs/page/map_choicePoint.dart

+ 9 - 5
lib/internal/bbs/page/map_choicePoint.dart

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