英文:
Adding FlutterMap in a application
问题
我正在尝试使用FlutterMap包显示地图。到目前为止,我已经显示如下:
FlutterMap(
mapController: mapController,
options: MapOptions(
center: LatLng(xx, yy),
zoom: 14.4746,
),
children: [
TileLayer(
urlTemplate: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
userAgentPackageName: 'com.example.app',
),
],
)
但我想改变FlutterMap的UI,GoogleMap包中我们可以使用地图类型来改变它。据我所知,在FlutterMap中使用urlTemplate: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png'
来改变UI,是否有其他免费的Web地图,以便我可以改变地图的UI呢?
英文:
i am trying to show a map using FlutterMap package. So far I have shown like this:
FlutterMap(
mapController: mapController,
options: MapOptions(
center: LatLng(xx, yy),
zoom: 14.4746,
),
children: [
TileLayer(
urlTemplate: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
userAgentPackageName: 'com.example.app',
),
],
)
but I would like to change ui of FlutterMap, in GoogleMap package we can change it using map type. As I know, in FlutterMap using urlTemplate: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png', to change the ui, is there another free web map so that I can change the ui map
答案1
得分: 1
如您所说,flutter_map无法为您设置瓷砖样式,请参阅https://docs.fleaflet.dev/frequently-asked-questions#how-can-i-use-a-custom-map-style-how-can-i-prevent-poi-labels-rotating-when-the-map-rotates-how-can。这是该技术的限制。
免费地图很难找到,但您可以在此处找到一些:https://wiki.openstreetmap.org/wiki/Raster_tile_providers。请始终阅读其服务条款 - 免费地图很可能对请求数量有严格限制或不允许在某些情况下使用(例如商业用途)。它们在成本方面是免费的,但在责任方面不是免费的。
如果您需要更多支持,请通过Discord服务器与我们联系,我们将更快地找到您的问题并提供更好的支持:https://docs.fleaflet.dev/#get-help。
附注:请从您的问题中移除“google-maps”标签,因为那是一个无关的包,可能会吸引无关的答案。
英文:
As you've said, flutter_map cannot style the tiles for you, see https://docs.fleaflet.dev/frequently-asked-questions#how-can-i-use-a-custom-map-style-how-can-i-prevent-poi-labels-rotating-when-the-map-rotates-how-can. This is a limitation of this technology.
Free maps are hard to come across, but you can find some here: https://wiki.openstreetmap.org/wiki/Raster_tile_providers. Always read their Terms of Service - the free ones will likely have harsh limits on number of requests or disallow usage in certain (eg. commercial) situations. They are free in terms of cost, but not free in terms of responsibility.
> If you need more support, please get in touch via the Discord server where we will find your question quicker and be able to give better support: https://docs.fleaflet.dev/#get-help.
PS. Please remove the 'google-maps' tag from your question, as that is an unrelated package and may attract unrelated answers.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论