Map features
Print & export
Create a map sheet with a title, legend, scale bar, attribution and date. The browser renders the output at up to 300 dpi.
Try it: click the printer button at the top left. Choose A4 landscape and 300 dpi, then download a PDF or PNG, or open the browser’s print dialog.
How it works
The viewer creates a hidden copy of the map at the chosen size and resolution, using the current style and visible overlays. Once rendered, it combines the map image with the legend, scale bar and attribution in the page layout.
- Paper: current view, A4 or A3, landscape or portrait
- Resolution: 96, 150 or 300 dpi, applied to the whole layout
- Legend images and swatches are drawn into the sheet, not screenshotted
- PDF pages are real paper sizes: an A4 export measures 297 × 210 mm and prints without "fit to page"
- The browser creates the export locally
The PDF centres the map sheet with a 10 mm margin. It embeds the sheet as a PNG to preserve fine lines and small text. jsPDF loads when PDF output is first requested.
Configuration
Print is on by default. The meta.title becomes the pre-filled sheet title,
and layer legends flow into the sheet automatically:
{
"$schema": "https://map0.net/schema/v1.json",
"version": 1,
"meta": { "title": "Zoning plan Vienna, Inner City" },
"map": { "center": [16.3725, 48.2083], "zoom": 14 },
"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": "ortho",
"title": "Aerial",
"type": "raster",
"url": "https://mapsneu.wien.gv.at/basemap/bmaporthofoto30cm/normal/google3857/{z}/{y}/{x}.jpeg",
"maxZoom": 19,
"attribution": "© basemap.at"
}
],
"layers": [
{
"id": "widmung",
"type": "wms",
"title": "Zoning plan",
"url": "https://data.wien.gv.at/daten/geo",
"layers": "GENFLWIDMUNGOGD",
"opacity": 0.6,
"legend": "auto",
"attribution": "Stadt Wien, data.wien.gv.at"
},
{
"id": "areas",
"type": "geojson",
"title": "Project areas",
"data": "/data/demo-areas.geojson",
"style": {
"fill-color": "#dc2626",
"fill-opacity": 0.2,
"line-color": "#dc2626",
"line-width": 2.5
},
"legend": [{ "label": "Project area", "color": "#dc2626" }]
}
],
"controls": { "print": true }
}Narrowing the choices
A top-level print block controls the formats, paper sizes and resolutions
available in the dialog:
"print": { "formats": ["pdf"], "sizes": ["A4-landscape"], "dpi": [300], "elements": ["title", "legend", "scalebar", "attribution", "date"] }
All settings are optional. Defaults include PNG and PDF, the current view and A4 in both
orientations, 96/150/300 dpi and all sheet elements. Remove an entry from
elements to omit it from the output.