-
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
获取定位返回接口为空 #47
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
`
void initState() {
super.initState();
setState(() {
this.isLoading = true;
});
}
Future requestPermission() async {
final permissions = await PermissionHandler()
.requestPermissions([PermissionGroup.location]);
}
Future getCurrentLocation() async {
if (await requestPermission()) {
AMapLocation loc = await AMapLocationClient.getLocation(true);
log('123123123' + loc.latitude.toString() + loc.longitude.toString());
setState(() {
this._location = loc;
});
}
}`
D/AmapLocationPugin( 4608): 定位获取结果:0.0 code:7 省:
D/AmapLocationPugin( 4608): 定位获取结果:0.0 code:7 省:
The text was updated successfully, but these errors were encountered: