|
...
|
...
|
@@ -98,7 +98,7 @@ class _MapChoicePointPageState extends State<MapChoicePointPage> { |
|
|
|
// }
|
|
|
|
|
|
|
|
/// 获取定位权限
|
|
|
|
_requestLocationPermission() async {
|
|
|
|
_requestLocationPermission({bool forceCenter = false}) async {
|
|
|
|
await AmapLocation.instance.updatePrivacyShow(true);
|
|
|
|
await AmapLocation.instance.updatePrivacyAgree(true);
|
|
|
|
bool canLocation = false;
|
|
...
|
...
|
@@ -128,7 +128,8 @@ class _MapChoicePointPageState extends State<MapChoicePointPage> { |
|
|
|
// App.sp.setString("lat", "39.684670899");
|
|
|
|
// App.sp.setString("lng", "118.17630045");
|
|
|
|
} else {
|
|
|
|
if (widget.long == null ||
|
|
|
|
if (forceCenter ||
|
|
|
|
widget.long == null ||
|
|
|
|
widget.long == '' ||
|
|
|
|
widget.long == 'null') {
|
|
|
|
latitude = location.latLng!.latitude;
|
|
...
|
...
|
@@ -288,8 +289,7 @@ class _MapChoicePointPageState extends State<MapChoicePointPage> { |
|
|
|
bottom: w(10),
|
|
|
|
child: InkWell(
|
|
|
|
onTap: () {
|
|
|
|
_controller!.setCenterCoordinate(
|
|
|
|
LatLng(latitudeLocation, longitudeLocation));
|
|
|
|
_requestLocationPermission(forceCenter: true);
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
decoration: BoxDecoration(
|
...
|
...
|
|