<分区>
我们可以在 Flutter 中使用 Openstreetmap 还是只能使用 Google map ?我想获得另一种显示 map 的方式。因为在使用 googlemaps api key 时,他们需要知道一张信用卡,而我没有。
<分区>
我们可以在 Flutter 中使用 Openstreetmap 还是只能使用 Google map ?我想获得另一种显示 map 的方式。因为在使用 googlemaps api key 时,他们需要知道一张信用卡,而我没有。
最佳答案
你可以安装这个包flutter_maps使用 OpenStreetMaps
举个例子
new FlutterMap(
options: new MapOptions(
center: new LatLng(51.5, -0.09),
zoom: 5.0,
maxZoom: 5.0,
minZoom: 3.0),
layers: [
new TileLayerOptions(
urlTemplate:
"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
subdomains: ['a', 'b', 'c']),
],
),
关于flutter - 如何在 Flutter 上使用 OpenStreetMaps,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54985422/
相关文章:
android - Flutter 有没有办法制作一个动态时间戳,打印出 10 分钟前、1 小时前或 2 个月前的内容
python - 导入错误 : No module named mapnik (Ubuntu 10. 10)
Flutter 设置状态不更新 bottomsheet 函数中的变量值
dart - Flutter - 如何在继承的小部件内的定义函数中使用参数
flutter - 在CustomScrollView中检测项目退出 View
algorithm - 如何使用 OSRM 计算单源最短路径?
google-maps - 从谷歌地图或其他 map 提供商获取移动应用程序中给定路线的收费数据
flutter - 如何在Dart中初始化嵌套对象。 NoSuchMethodError:无效成员为null: 'user'