Map style in url

Hi folks,

We are looking to migrate to TomTom map in out Flutter based application. We have been able to successfully display the map using SfMaps with urlTemplate

urlTemplate: ‘http://api.tomtom.com/map/1/tile/basic/main/{z}/{x}/{y}.png?key=API_KEY

However we need to do some styling custumisations. I wonder if it is possible to include the styling in the url or maybe any suggestions how to do styling when using FlutterMap

Thanks!

This url is from raster tiles, which are prerendered.
They allow to use “main” or “night” styles.
Docs: https://developer.tomtom.com/map-display-api/documentation/raster/tile

Vector tiles allow more customization, but from what I can see they are not supported by default.
There is a plugin: vector_map_tiles | Flutter Package
but I didn’t find how to set custom style

1 Like

@maloleps did you found a way to set custom style ?

from what I can see it uses https://github.com/greensopinion/dart-vector-tile-renderer and the default style is here: https://github.com/greensopinion/dart-vector-tile-renderer/blob/main/lib/src/themes/light_theme.dart
you could try to replace it with the style from Map Styler but I don’t guarantee that it will work in 100%