Zum Inhalt springen
Styles API

Styles API

Fertige Styles für MapLibre GL JS und kompatible Clients, dazu Schriften und Sprites. Static Tiles rendern einen Style als Rasterkacheln für Clients ohne Vektorunterstützung.

Basis-URL: https://api.mapx.at · Rate-Limit-Zone: search (10/s), tiles (100/s), static (5/s) · Guide: Karten

List styles

GET /v1/styles

Available style ids: streets, streets-dawn, streets-dusk, streets-night, traffic-day, satellite, satellite-streets, outdoors.

Beispiel

curl -s -H "Authorization: Bearer YOUR_TOKEN" "https://api.mapx.at/v1/styles" | jq

Beispielantwort

[
  {
    "id": "streets",
    "url": "https://api.mapx.at/v1/styles/streets"
  }
]

Fehler (Details: Fehlerkatalog)

StatusBedeutung
401Token fehlt oder ungültig (missing-token, invalid-token, token-expired)
403Token nicht erlaubt (origin-not-allowed, origin-missing, pk-not-allowed, app-not-allowed, token-blocked, ip-not-allowed)
429Rate-Limit überschritten, Retry-After abwarten

MapLibre / Mapbox style

GET /v1/styles/{id}

Style JSON (version 8), generated from the style generator. Old ids (karte, karte-morgen, karte-abend, karte-nacht, karte-verkehr, luftbild, hybrid, gelaende) are aliases until 2027-05-31 (Deprecation, Sunset, Link rel=successor-version).

Mehr

Fonts and sprites point to this API, vector sources to PMTiles on tiles.mapx.at. ETag/Last-Modified; If-None-Match gives 304. With sources=tilejson the PMTiles vector/raster sources are replaced by https TileJSON URLs (https://tiles.mapx.at/v1/tiles/<tileset>.json), for clients without PMTiles support such as the MapLibre Native offline manager.

Parameter

NameOrtTypPflichtStandardBeschreibung
idpathstringja–Style id, optionally with .json
sourcesquerytilejson–tilejson: replace pmtiles:// sources by https TileJSON URLs

Beispiel

curl -s -H "Authorization: Bearer YOUR_TOKEN" "https://api.mapx.at/v1/styles/streets" | jq

Beispielantwort

{
  "version": 8,
  "name": "streets",
  "sources": {},
  "layers": []
}

Fehler (Details: Fehlerkatalog)

StatusBedeutung
401Token fehlt oder ungültig (missing-token, invalid-token, token-expired)
403Token nicht erlaubt (origin-not-allowed, origin-missing, pk-not-allowed, app-not-allowed, token-blocked, ip-not-allowed)
404Nicht gefunden (Name, Pfad oder Position)
429Rate-Limit überschritten, Retry-After abwarten

Sprite of a style

GET /v1/styles/{id}/{file}

file: sprite[@2x].json|png for standard icons, sprite-sdf[@2x].json|png for SDF icons. Styles reference this URL.

Parameter

NameOrtTypPflichtStandardBeschreibung
idpathstringja–Style id
filepathstringja–sprite[-sdf][@2x].json|png

Beispiel

curl -s -H "Authorization: Bearer YOUR_TOKEN" "https://api.mapx.at/v1/styles/streets/sprite.json" | jq

Beispielantwort: application/json · Sprite index (JSON) or atlas (PNG)

Fehler (Details: Fehlerkatalog)

StatusBedeutung
401Token fehlt oder ungültig (missing-token, invalid-token, token-expired)
403Token nicht erlaubt (origin-not-allowed, origin-missing, pk-not-allowed, app-not-allowed, token-blocked, ip-not-allowed)
404Nicht gefunden (Name, Pfad oder Position)
429Rate-Limit überschritten, Retry-After abwarten

Static Tiles: rendered raster tiles of a style

GET /v1/styles/{id}/tiles/{tilesize}/{z}/{x}/{y}

Styles streets*, satellite, satellite-streets, outdoors (old ids as alias). tilesize 256 (standard XYZ, map zoom z-1) or 512 (map zoom z). y with optional @2x and .png (default) or .webp. Labels are rendered with a margin and clipped. No data or below minimum zoom: 404.

Mehr

Zone static. ETag, Cache-Control.

Parameter

NameOrtTypPflichtStandardBeschreibung
idpathstringja–Style id
tilesizepathstringja–256 or 512
zpathintegerja–Zoom
xpathintegerja–Column
ypathstringja–Row[@2x][.png|.webp]

Beispiel

curl -s -H "Authorization: Bearer YOUR_TOKEN" "https://api.mapx.at/v1/styles/streets/tiles/512/12/2234/1420" -o result.png

Beispielantwort: image/png, image/webp · Image

Fehler (Details: Fehlerkatalog)

StatusBedeutung
304Nicht geändert (mit If-None-Match)
400Parameter fehlt oder ist ungültig
401Token fehlt oder ungültig (missing-token, invalid-token, token-expired)
403Token nicht erlaubt (origin-not-allowed, origin-missing, pk-not-allowed, app-not-allowed, token-blocked, ip-not-allowed)
404Nicht gefunden (Name, Pfad oder Position)
429Rate-Limit überschritten, Retry-After abwarten
503Daten vorübergehend nicht verfügbar

List fonts

GET /v1/fonts

Available font names.

Beispiel

curl -s -H "Authorization: Bearer YOUR_TOKEN" "https://api.mapx.at/v1/fonts" | jq

Beispielantwort

[
  {
    "name": "Noto Sans Regular"
  }
]

Fehler (Details: Fehlerkatalog)

StatusBedeutung
401Token fehlt oder ungültig (missing-token, invalid-token, token-expired)
403Token nicht erlaubt (origin-not-allowed, origin-missing, pk-not-allowed, app-not-allowed, token-blocked, ip-not-allowed)
429Rate-Limit überschritten, Retry-After abwarten

Glyph range

GET /v1/fonts/{fontstack}/{range}.pbf

fontstack: one or more fonts, comma-separated (e.g. Noto Sans Regular,Open Sans Regular); the first font containing a character wins. range: {start}-{start+255}, start divisible by 256 (0-255, 256-511, …). Response application/x-protobuf; ETag, Cache-Control.

Parameter

NameOrtTypPflichtStandardBeschreibung
fontstackpathstringja–Font name(s), comma-separated
rangepathstringja–e.g. 0-255

Beispiel

curl -s -H "Authorization: Bearer YOUR_TOKEN" "https://api.mapx.at/v1/fonts/Noto%20Sans%20Regular/0-255.pbf" -o result.bin

Beispielantwort: application/x-protobuf · Glyph PBF

Fehler (Details: Fehlerkatalog)

StatusBedeutung
400Parameter fehlt oder ist ungültig
401Token fehlt oder ungültig (missing-token, invalid-token, token-expired)
403Token nicht erlaubt (origin-not-allowed, origin-missing, pk-not-allowed, app-not-allowed, token-blocked, ip-not-allowed)
404Nicht gefunden (Name, Pfad oder Position)
429Rate-Limit überschritten, Retry-After abwarten

List sprites

GET /v1/sprites

sprite (standard icons) and sprite-sdf (SDF icons, recolorable).

Beispiel

curl -s -H "Authorization: Bearer YOUR_TOKEN" "https://api.mapx.at/v1/sprites" | jq

Beispielantwort: application/json · Sprite list

Fehler (Details: Fehlerkatalog)

StatusBedeutung
401Token fehlt oder ungültig (missing-token, invalid-token, token-expired)
403Token nicht erlaubt (origin-not-allowed, origin-missing, pk-not-allowed, app-not-allowed, token-blocked, ip-not-allowed)
429Rate-Limit überschritten, Retry-After abwarten

Sprite file without style

GET /v1/sprites/{file}

Parameter

NameOrtTypPflichtStandardBeschreibung
filepathstringja–sprite[-sdf][@2x].json|png

Beispiel

curl -s -H "Authorization: Bearer YOUR_TOKEN" "https://api.mapx.at/v1/sprites/sprite.json" | jq

Beispielantwort: application/json · Sprite index (JSON) or atlas (PNG)

Fehler (Details: Fehlerkatalog)

StatusBedeutung
401Token fehlt oder ungültig (missing-token, invalid-token, token-expired)
403Token nicht erlaubt (origin-not-allowed, origin-missing, pk-not-allowed, app-not-allowed, token-blocked, ip-not-allowed)
404Nicht gefunden (Name, Pfad oder Position)
429Rate-Limit überschritten, Retry-After abwarten

Playground

Playground
curl
Antwort erscheint hier.