Configuration
Config inheritance
Share common settings across several maps with a base config. Each map can override the settings that differ.
What you see: three basemaps, the home button, the legend position and the share link all come from the organisation base file. This map itself only declares one layer, a view and its own accent colour.
The map config
Short, because it inherits:
{
"$schema": "https://map0.net/schema/v1.json",
"version": 1,
"extends": "/configs/_base.map0.json",
"meta": { "title": "Noise map, inherits the organisation defaults" },
"map": { "center": [16.3725, 48.2083], "zoom": 13 },
"theme": { "primary": "#b45309" },
"layers": [
{
"id": "areas",
"type": "geojson",
"title": "Study areas",
"data": "/data/demo-areas.geojson",
"style": {
"fill-color": "#b45309",
"fill-opacity": 0.28,
"line-color": "#b45309",
"line-width": 2
},
"popup": { "title": "{{name}}" }
}
]
}The shared base
Maintained once, centrally, and reused by every map in the organisation:
{
"basemaps": [
{
"id": "grau",
"title": "Grey",
"type": "raster",
"url": "https://mapsneu.wien.gv.at/basemap/bmapgrau/normal/google3857/{z}/{y}/{x}.png",
"attribution": "© basemap.at",
"default": true
},
{
"id": "bmapv",
"title": "basemap.at",
"type": "style",
"url": "https://mapsneu.wien.gv.at/basemapv/bmapv/3857/resources/styles/root.json"
},
{
"id": "ortho",
"title": "Aerial",
"type": "raster",
"url": "https://mapsneu.wien.gv.at/basemap/bmaporthofoto30cm/normal/google3857/{z}/{y}/{x}.jpeg",
"maxZoom": 19,
"attribution": "© basemap.at"
}
],
"theme": { "primary": "#0e7490", "radius": "md" },
"controls": { "legend": { "position": "bottom-right" }, "home": true },
"permalink": true
}Merge rules
-
Objects are merged recursively: a child’s
theme.primaryoverrides the base value while the base’stheme.radiusis retained - Arrays are replaced in full, preserving the order specified in the child config
- Chains up to three levels deep (global → department → map), with cycle detection
-
Relative
extendsURLs resolve against the config file that declares them
Replacing arrays. To change an inherited layer list, provide the complete
list in the child config. This explicitly defines which layers appear and in what order.
Settings omitted from the child continue to come from the base.