showMyLocation method
是否显示我的位置
Implementation
Future<void> showMyLocation(bool show) async {
return platform(
android: (pool) async {
final map = await _androidController.getMap();
final locationStyle = await ObjectFactory_Android
.createcom_amap_api_maps_model_MyLocationStyle__();
await locationStyle?.showMyLocation(show);
await map.setMyLocationStyle(locationStyle);
await map.setMyLocationEnabled(show);
pool..add(map)..add(locationStyle);
},
ios: (pool) async {
await _iosController.set_showsUserLocation(show);
if (show) {
await _iosController.setUserTrackingModeAnimated(
MAUserTrackingMode.MAUserTrackingModeFollow, true);
}
},
);
}