Skip to content
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

Open
Lanhaoo opened this issue May 21, 2020 · 4 comments
Open

获取不到定位信息 #45

Lanhaoo opened this issue May 21, 2020 · 4 comments

Comments

@Lanhaoo
Copy link

Lanhaoo commented May 21, 2020

安卓控制台打印:定位获取结果: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:'暂无');
}

@553559555
Copy link

你的问题解决了吗?我也遇到同样的问题

@niyangup
Copy link

动态权限拿到之后别忘了开GPS

@kakaoracle
Copy link

你的问题解决了吗?我也遇到同样的问题

你的问题解决了吗?我也遇到同样的问题

@kakaoracle
Copy link

安卓控制台打印:定位获取结果: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:'暂无');
}

你的问题解决了吗?我也遇到同样的问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants