-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
获取不到定位信息 #45
Comments
你的问题解决了吗?我也遇到同样的问题 |
动态权限拿到之后别忘了开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:'暂无');
}
The text was updated successfully, but these errors were encountered: