Back to all examples
Map styling playground
Restyle the map from panels built off the knob catalogues of each module drawing it: sizes, the label typeface, road markings, hillshade, POI and traffic colours, map presets, and whole layer groups
Every control restyles the map live: sizes, the label typeface, road markings, base-map groups, hillshade, and POI, traffic and map colours.
- The panel is generated from the knob catalogues of the modules that draw the map:
stylingFoundationsKnobCataloguefor the foundations (sizes, typeface, map colours, projection, sky and light), and the look knobs ofBaseMapModule(road markings),POIsModule, the traffic modules andTerrainModule(hillshade). Each control starts fromgetKnoband sets its value withsetKnob, so no layer or paint property is yours to find. - The Labels section sets the map’s typeface, from ten open-source families or the style’s own serif and italic faces. A route, museums and a district follow it, until you give each a typeface of its own.
- The View light section sets the light on the 3D buildings.
To see it, turn on
buildings3Damong the layer groups, zoom in past 15 and tilt the map with a right-drag. - Each section folds away, so open only the ones you’re tuning.
- Map presets come from
mapPresetCatalogue, andapplyMapPresetsets each one across those modules. - Whole layer groups (water, railways, 3D buildings, road shields…) are
BaseMapModule’s, so their toggles come frombaseMapKnobCatalogue, through the same control builder. - The knobs survive a
setStyle, and so do the two layer edits made throughstyling.layers.query. A reset keeps those edits because they are not settings. A query’sgroupnames base-map layers or another module’s, here the traffic flow lines.
Related examples
Map Chat Agent
Ask a chat beside the map for places, routes or traffic, and watch the map search, draw and frame the answer
Playground
AI
Search and Geocoding
Places and POIs
Map Style
Base Map
Geometry
Traffic
Routing
Plugins
Web
React
Map Chat Agent State Playground
A map chat whose every result lands in a side panel, where you can show, hide or drop it yourself
Playground
AI
Search and Geocoding
Places and POIs
Map Style
Base Map
Geometry
Traffic
Routing
Bring Your Own Data
Plugins
Web
React
Config playground
Interactive controls for map styling and layer management
Playground
Map Style
Base Map
Traffic
Web
Site Selection Agent
A site selection agent on the TomTom Maps SDK Agent Toolkit: hand-picked default tools, custom analysis tools, its own persona and state slice
Playground
AI
Search and Geocoding
Places and POIs
Routing
Traffic
Map Style
Base Map
Plugins
Web
React