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