Skip to content

Style editor ​

For a whole style (roads, names, colours, any layer), open dock Studio: Maputnik with dock's style, saved to dock as a style id the same way.

Restyle the map with your brand: background, buildings, building outline, buildings extruded by height or flat. Saving gives a style id (st_ and 10 characters). Pass it to createMap in the JS SDK as styleId. Any key with tiles:read works. A style is visible only to the org that saved it.

  • A saved style never changes. To change colors, save a new one and swap the id in your code. So a key that leaks from a web page cannot change your style.
  • Door dot colors show confidence (PLAN 5) and do not change. Grey means unknown.
  • Up to 100 styles per org.
js
const map = createMap(maplibregl, dock, { container: 'map', styleId: 'st_7m4xq2b9kd' });
sh
curl -X POST -H "Authorization: Bearer $DOCK_KEY" -H "Content-Type: application/json" \
  -d '{"name":"Sansar","building":"#1f5c8f"}' https://geo.dock.mn/v1/styles
curl -H "Authorization: Bearer $DOCK_KEY" https://geo.dock.mn/v1/styles/st_7m4xq2b9kd

The key stays in this page only. Not stored, not put in the URL. A saved style never changes: to change colors, save a new one. Entrance colors show confidence and are the same on every map.