Data sources
WMS
The workhorse of every spatial data infrastructure: a raster map service, queried on click and explained by a legend the server draws for us.
Try it: click the zoning plan to query the service, adjust opacity in the layer panel, then enable the tree cadastre. Trees appear from zoom level 15; the panel shows when a layer is outside its zoom range.
What this demo shows
-
WMS layers requested as tiles in
EPSG:3857, the CRS required for raster rendering in map0 -
infoturns a layer into a queryable one: clicks become GetFeatureInfo requests -
legend: "auto"pulls a GetLegendGraphic image into the legend panel -
minZoomkeeps a heavy layer off small scales, and the layer panel explains the gap metadata.urllinks a layer to its catalogue entry
map0 builds the GetMap URL for you, including the axis-order-safe CRS
parameter for WMS 1.3.0, and keeps any vendor parameters your base URL already carries
(a MapServer map= path, for example).
Direct browser access. Capabilities, tiles and GetFeatureInfo responses
are loaded directly from the service. Its CORS headers must allow access from the page.
Configuration
This is the actual file the map above is running on:
{
"$schema": "https://map0.net/schema/v1.json",
"version": 1,
"meta": { "title": "Vienna zoning and tree register (WMS)" },
"map": { "center": [16.3725, 48.2083], "zoom": 13, "minZoom": 8 },
"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"
}
],
"layers": [
{
"id": "widmung",
"type": "wms",
"title": "Zoning plan (generalised)",
"url": "https://data.wien.gv.at/daten/geo",
"layers": "GENFLWIDMUNGOGD",
"opacity": 0.55,
"info": { "format": "application/json" },
"legend": "auto",
"metadata": {
"url": "https://www.data.gv.at/katalog/dataset?q=Fl%C3%A4chenwidmung+Wien",
"title": "Dataset on data.gv.at"
},
"attribution": "Stadt Wien, data.wien.gv.at"
},
{
"id": "baumkataster",
"type": "wms",
"title": "Tree register",
"url": "https://data.wien.gv.at/daten/geo",
"layers": "BAUMKATOGD",
"visible": false,
"minZoom": 15,
"info": { "format": "application/json" },
"attribution": "Stadt Wien, data.wien.gv.at"
}
],
"controls": { "legend": { "open": true } }
}Embedding
<script type="module" src="/map0.js"></script> <map0-viewer config-src="/configs/wms.map0.json" style="height:520px"></map0-viewer>