Get Map API Reference

Estimated reading time: 2 minutes

Map API

The Maps API allows you to retrieve vector or raster tiles generated by the lab. You can use some libraries like Leaflet or Mapbox GL JS to add a map to your website.

Endpoint to use

If you need tile URL, you should use this endpoint. We are supporting both raster png and vector pbf tiles.

https://{s}.tile.jawg.io/your-style-id/{z}/{x}/{y}{@2x}.{format}?access-token=your-jawg-access-token&lang={lang}
\___/   \_/ \__________/\_____________/\_________/\___/  \____/               \____________________/      \____/
  |      |       \         /              /           \       \                          |                   |
scheme subdomain  domain  style ID  tiles coordinates  retina  tile format      authentication token      language
  • subdomain: available subdomains are a, b, c and d. Browser-based applications can thus request multiple tiles from multiple subdomains faster than from one subdomain.
  • style ID: your style ID or one of our default styles for raster tiles or streets-v1, landcover-v1 for vector tiles.
  • retina: only for raster tiles, this generate 512x512 tiles instead of 256x256.
  • tile format: available formats are png and pbf.
  • authentication token: create your access token on the lab.
  • language: for raster tiles (png) you will get tiles in your language, but you can force the desired one via query parameter. Valid values are de, en, es, fr, it, nl, zh.

If you want your style (as json for Mapbox GL or for a preview)

https://api.jawg.io/styles/your-style-id.{format}?access-token=your-jawg-access-token&lang={lang}&raster=true
\___/   \_________/        \___________/  \____/               \____________________/      \____/        \__/
  |          |                  |            |                            |                  |            /
scheme     domain            style ID      format                authentication token     language      preview
  • style ID: your style ID or one of our default styles for raster tiles or streets-v1, landcover-v1 for vector tiles.
  • format: available formats are json for Mapbox GL and html for preview.
  • authentication token: create your access token on the lab.
  • language: for raster tiles (png) you will get tiles in your language, but you can force the desired one via query parameter. Valid values are de, en, es, fr, it, nl, zh.
  • preview: choose your preview in raster or vector.

Jawg default styles

We have some default styles which can be used by anyone with an access token. Here is our list (click on the image for a preview):

jawg-streets

jawg-sunny

jawg-terrain

jawg-dark

jawg-light

jawg-matrix

jawg-silver