Last updated:
0 purchases
location amap
amaplocation #
高德地图Flutter插件包,使用Java和OC开发.
Getting Started #
1 设置各平台定位Key
Amaplocation.setApiKey("xxxx1", "xxx2");
copied to clipboard
2 配置相关权限
Android参考
iOS参考
3 使用
Amaplocation amaplocation = Amaplocation();
// 定位参数:是否连续定位
AMapLocationOption option = AMapLocationOption(onceLocation: false);
// 监听定位回调
amaplocation.onLocationChanged().listen((event) {
debugPrint('$event');
});
// 启动定位
amaplocation.startLocation();
// 设置定位参数
amaplocation.setLocationOption(option);
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.