I would like to add a map view to my Flutter app and was considering between google maps and flutter_map with Mapbox. Since custom markers seem to be a problem with Google Map and Flutter I decided to use flutter_map. I have integrated it and it works. The problem is that the labels rotate when I rotate the map. They should actually stay in place and always be readable, as with Google Maps. I have the same problem when I use the standard OSM implementation from the docs. How can I adjust this, I can't find a solution. I also have the impression that flutter_map in combination with Mapbox is quite slow compared to Google Maps and takes a long time to load. When scrolling around I often see the gray loading state.
return FlutterMap(
mapController: mapController,
options: MapOptions(
initialCenter: LatLng(52.372347, 9.710798),
initialZoom: 15,
maxZoom: 22,
),
children: [
TileLayer(
urlTemplate: 'AppConstants.mapBoxLightUrlTemplate',
//userAgentPackageName: 'com.example.app',
additionalOptions: {
'accessToken': AppConstants.mapBoxAccessToken,
},
),
],
);
Please check the first FAQ box on the documentation home page: https://docs.fleaflet.dev/#how-can-i-use-a-custom-map-style-how-can-i-prevent-poi-labels-rotating-when-the-map-rotates-how-can.
We support a completely different mapping technology than other libraries (https://docs.fleaflet.dev/getting-started/explanation/raster-vs-vector-tiles) meaning we CANNOT support rotating text and other map features from the source.
Mapbox is a relatively slow tile server, and does like to rate limit fairly quickly. However, again, there's nothing that flutter_map can do about this: we use a standardized HTTP endpoint, like as with all tile servers.