Skip to content
Maps

Maps

mapx delivers maps as ready-made styles and as tiles. Use a style to get a complete map in one line; use tilesets when you build your own style.

Before you start: a page with MapLibre GL JS, see First map. You need a free token (Access and limits); the snippets show YOUR_TOKEN only where it matters. The map options below assume the transformRequest from First map, which adds the token to every request to mapx.at.

Use a style

StyleLook
streetsBase map, roads, places, buildings
streets-dawn, streets-dusk, streets-nightThe same map in other light
satelliteOrthophoto
satellite-streetsOrthophoto with roads and labels
outdoorsContours, hillshade, trails
const map = new maplibregl.Map({
  container: "map",
  style: "https://api.mapx.at/v1/styles/outdoors",
  transformRequest: withToken, // from First map: adds the token to every mapx.at request
  center: [12.694, 47.074], zoom: 12, // Grossglockner
});

Switching style at runtime replaces layers and sources: call map.setStyle(url). See Switch the basemap.

Add tilesets to your own style

Every tileset has a TileJSON address https://tiles.mapx.at/v1/tiles/{tileset}.json. MapLibre reads zoom range, bounds and attribution from it.

TilesetTypeContent
streetsvectorRoads, rail, water, boundaries, places, buildings
cadastrevectorParcel boundaries (z16)
contoursvectorContour lines
terrain-rgb, dsmraster-demTerrain and surface height
orthophotorasterAerial photo, up to z18
map.on("load", () => {
  map.addSource("cadastre", { type: "vector", url: "https://tiles.mapx.at/v1/tiles/cadastre.json" });
  map.addLayer({ id: "parcels", type: "line", source: "cadastre", "source-layer": "parcel_l",
                 paint: { "line-color": "#e11d48", "line-width": 1 } });
});

Layer names and fields: Tilesets. Add your own data the same way with a geojson source.

Weather and traffic overlays

Raster weather tiles have a time dimension; the TileJSON of temperature, precipitation, wind, humidity, cloud or pressure lists the available times. The same URL scheme serves the air quality layers aqi (daily index), no2, o3, pm10, pm25 and dust (Saharan dust), see Air Quality API. Official weather warnings are GeoJSON (/v1/weather/warnings, add it as a geojson source and colour by level).

map.addSource("temp", { type: "raster", url: "https://api.mapx.at/v1/weather/tiles/temperature.json", tileSize: 256 });
map.addLayer({ id: "temp", type: "raster", source: "temp", paint: { "raster-opacity": 0.6 } });

The traffic layer is a vector source, see Traffic. Example: Weather overlay.

Other clients

The style and TileJSON formats work in MapLibre, Mapbox GL JS clients that accept custom URLs, Leaflet with a vector plugin, OpenLayers and QGIS. For clients without vector support, Static Tiles deliver the rendered style as raster tiles:

https://api.mapx.at/v1/styles/streets/tiles/512/{z}/{x}/{y}?access_token=YOUR_TOKEN

Offline and bulk use

Each tileset is also one PMTiles file. Download it once instead of fetching tiles: Self-host PMTiles.

Show the data source on the map. MapLibre does this automatically when you load a style or TileJSON, see Attribution.

Next