Map styles
| Name | Look |
|---|---|
survey |
MapRouter’s house style: map-paper ground, soft parks and water, slate main roads |
survey-dark |
Survey for dark interfaces |
outdoors, outdoors-dark |
Survey with hillshaded mountains and valleys, for hiking, ski and travel maps |
light, dark |
The Protomaps basemap’s general-purpose styles |
white, grayscale, black |
Quiet backgrounds for data visualisation |
Load one in MapLibre GL JS:
new maplibregl.Map({
container: 'map',
style: 'https://api.maprouter.dev/v1/styles/survey.json?key=mr_pk_YOUR_KEY',
});
Add &lang=de (or another language) for labels in that language where OpenStreetMap has them.
Fonts and icons are served by MapRouter and don’t cost credits. Styles are built from the open
source Protomaps basemap; you can edit a copy in
Maputnik and host it yourself, pointing its source at
https://api.maprouter.dev/v1/tiles.json?key=….
Mountains in 3D, and contour lines
The outdoors styles include an elevation source called terrain. Turn on 3D with one line:
map.on('load', () => map.setTerrain({ source: 'terrain', exaggeration: 1.4 }));
map.setPitch(60);
Elevation tiles cost 1 credit each, like map tiles. For labelled contour lines, add the open
source maplibre-contour plugin and point it
at https://api.maprouter.dev/v1/terrain/{z}/{x}/{y}.png?key=… with encoding: "terrarium".