在地图上显示定位 second commit
parent
ee11c80e9f
commit
ab3b79c5aa
|
@ -85,12 +85,8 @@ class _MapWidgetState extends State<MapWidget> {
|
|||
_locationResult = result;
|
||||
});
|
||||
print("location=$_locationResult");
|
||||
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
|
||||
_moveCamera(_locationResult);
|
||||
});
|
||||
});
|
||||
_locationPlugin.startLocation();
|
||||
|
||||
}
|
||||
|
||||
@override
|
||||
|
@ -112,6 +108,7 @@ class _MapWidgetState extends State<MapWidget> {
|
|||
_mapController = controller;
|
||||
getApprovalNumber();
|
||||
});
|
||||
_mapController.moveCamera(CameraUpdate.newCameraPosition(CameraPosition(target: LatLng(29.52,121.31))));
|
||||
},
|
||||
);
|
||||
return Expanded(
|
||||
|
|
Loading…
Reference in New Issue