map0

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.

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.

Map view export. The scale bar is calculated for the exported view. The output does not guarantee a specified print scale; labels and symbols scale with pixel density. Printing at an exact map scale is planned separately.

Configuration

Print is on by default. The meta.title becomes the pre-filled sheet title, and layer legends flow into the sheet automatically:

print.map0.json
{
  "$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:

excerpt
"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.