Flutter:如何获得高精度定位?

标签 flutter google-maps dart geolocation

Future<Position> mylocation() async{
  Position position = await Geolocator().getCurrentPosition(desiredAccuracy:LocationAccuracy.bestForNavigation);

  return position;
}

我想获取我的位置。但有时 mylocation 会得到错误的位置。如何获得高精度的位置?

最佳答案

试试这个

Position position = await Geolocator.getCurrentPosition(desiredAccuracy: LocationAccuracy.best);

关于Flutter:如何获得高精度定位?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64714745/

相关文章:

android - 让 Flutter 应用程序接受传入的 Intent

flutter - 流转换和听振颤之间有什么区别?什么时候实现它们?

json - 如何在Dart Server中设置request.response的内容类型?

android - 如何在flutter中使用rewarded video listener?

flutter - 如何随机生成列表元素?

dart - 如何在小部件的子级中使用 "for"循环?

flutter - 使用共享首选项列表抖动保存和检索通知

javascript - 在 Svg 中添加谷歌地图

php - 从 Google map 获取当前缩放级别

google-maps - Polymer,如何打开/关闭 google-map-marker InfoWindow?