获取不到定位信息
Lanhaoo opened this issue · 4 comments
安卓控制台打印:定位获取结果:0.0 code:12 省:
iOS 没有任何响应
代码如下:
PermissionStatus permission1 = await LocationPermissions().requestPermissions(); //请求许可
if(permission1 != PermissionStatus.granted){
await LocationPermissions().openAppSettings();
return;
}
await AMapLocationClient.startup(new AMapLocationOption(desiredAccuracy:CLLocationAccuracy.kCLLocationAccuracyHundredMeters ));
AMapLocation location = await AMapLocationClient.getLocation(true);
if(location.success){
print('获取位置信息结果:'+location.city != null?location.city:'暂无');
}
你的问题解决了吗?我也遇到同样的问题
动态权限拿到之后别忘了开GPS
你的问题解决了吗?我也遇到同样的问题
你的问题解决了吗?我也遇到同样的问题
安卓控制台打印:定位获取结果:0.0 code:12 省:
iOS 没有任何响应
代码如下:
PermissionStatus permission1 = await LocationPermissions().requestPermissions(); //请求许可
if(permission1 != PermissionStatus.granted){
await LocationPermissions().openAppSettings();
return;
}
await AMapLocationClient.startup(new AMapLocationOption(desiredAccuracy:CLLocationAccuracy.kCLLocationAccuracyHundredMeters ));
AMapLocation location = await AMapLocationClient.getLocation(true);
if(location.success){
print('获取位置信息结果:'+location.city != null?location.city:'暂无');
}
你的问题解决了吗?我也遇到同样的问题