OptionaljsonDirect style specification as JSON.
Provide the complete MapLibre Style Specification object.
Mutually exclusive with the url property.
OptionallightWhether the style draws a light or a dark map.
Overlays that are drawn on top of the style — places, routes, waypoint labels, the pin sprite — pick their colours from this, so that their text stays legible on the canvas underneath. TomTomMap.styleLightDarkTheme reports the value in effect.
Leave it out and the SDK reads the theme off the loaded style, from the colour its
background layer paints the canvas with. Set it when that guess is wrong or when you
would rather not depend on a guess: a style whose canvas is hidden behind full-coverage
imagery, or one whose background colour does not represent what the map ends up looking
like.
OptionalurlURL to a MapLibre/Mapbox style JSON.
The URL should not include the API key - it will be automatically added.
Mutually exclusive with the json property.
Configuration for a custom map style.
Allows using your own map style either via URL or direct JSON specification.
Remarks
Use custom styles for:
Example