Skip to content
Vector Tiles

Vector Tiles

Vector tiles give you a fully interactive, styleable map in MapLibre GL or Mapbox GL. The map renders on the client side, so you can change styles, add layers, and rotate the map without loading new images.

Use vector tiles when you need smooth zooming, 3D terrain, or custom map styles.

To display Maptoolkit vector tiles, pick a style URL and pass it to your map library - the style defines the visual appearance and the tiles are fetched automatically.

Standard Map Styles


Style Name:
maptoolkit-maptoolkit.summer
Topographic outdoor map with terrain shading (default)
Style URL:
https://styles.maptoolkit.net/maptoolkit/maptoolkit.summer.json?api_key=YOUR_API_KEY
Preview maptoolkit-maptoolkit.summer
Style Name:
maptoolkit-maptoolkit.winter
Topographic outdoor map with a winter look
Style URL:
https://styles.maptoolkit.net/maptoolkit/maptoolkit.winter.json?api_key=YOUR_API_KEY
Preview maptoolkit-maptoolkit.winter
Style Name:
maptoolkit-maptoolkit.hiking
Hiking-focused outdoor map
Style URL:
https://styles.maptoolkit.net/maptoolkit/maptoolkit.hiking.json?api_key=YOUR_API_KEY
Preview maptoolkit-maptoolkit.hiking
Style Name:
maptoolkit-maptoolkit.cycling
Cycling-focused outdoor map
Style URL:
https://styles.maptoolkit.net/maptoolkit/maptoolkit.cycling.json?api_key=YOUR_API_KEY
Preview maptoolkit-maptoolkit.cycling
Style Name:
maptoolkit-maptoolkit.street
Detailed street map
Style URL:
https://styles.maptoolkit.net/maptoolkit/maptoolkit.street.json?api_key=YOUR_API_KEY
Preview maptoolkit-maptoolkit.street
Style Name:
maptoolkit-maptoolkit.light
Minimal light theme
Style URL:
https://styles.maptoolkit.net/maptoolkit/maptoolkit.light.json?api_key=YOUR_API_KEY
Preview maptoolkit-maptoolkit.light
Style Name:
maptoolkit-maptoolkit.dark
Dark theme with high contrast
Style URL:
https://styles.maptoolkit.net/maptoolkit/maptoolkit.dark.json?api_key=YOUR_API_KEY
Preview maptoolkit-maptoolkit.dark

You can preview all styles at maptoolkit.com/map.

Tile sources

A style references sources by a short ID. Each one has its own TileJSON document at https://tiles.maptoolkit.net/{id}.json, and that is the URL to put in a style’s url field.

SourceIDFormatZoomContents
BasemapmtkMVT0 to 15Roads, water, landcover, buildings, labels and POIs
ContourscontoursMVT11 to 14Contour lines derived from the Mapterhorn terrain data
BathymetrybathymetryMVT1 to 12Water depth contours from GEBCO
TerrainterrainrgbWebPto 16Elevation as a raster DEM, Terrarium encoded
Natural EarthnaturalearthWebP0 to 6Low-zoom raster backdrop

Point at the TileJSON, not at a tile URL

map.addSource("mtk", {
  type: "vector",
  url: "https://tiles.maptoolkit.net/mtk.json?api_key=YOUR_API_KEY"
});

The tile URLs behind each source carry a build identifier that changes when the tiles are rebuilt. The TileJSON always resolves to the current build; a tile template copied out of it and pasted into a style will keep pointing at an older one until it is removed. Use the url form and the client reads the current template on load.

Vector tiles are .mvt

The extension for a vector source is .mvt. Requesting the same tile as .pbf returns a 400.

Vector tiles are 512px

Leave tileSize unset on a vector source, or set it to 512. Setting 256, which is the default in some older examples and in most Leaflet-era documentation, misaligns label placement and line widths against the tile grid.

Terrain and hillshading

Terrain is a raster-dem source using Terrarium encoding. It is not Mapbox’s terrain-rgb, and MapLibre defaults to the Mapbox formula, so the encoding has to be stated or the terrain decodes into noise without erroring.

map.addSource("terrain", {
  type: "raster-dem",
  url: "https://tiles.maptoolkit.net/terrainrgb.json?api_key=YOUR_API_KEY",
  encoding: "terrarium"
});
map.setTerrain({ source: "terrain", exaggeration: 1.5 });

See Terrain Tiles for hillshading and the full source options.

Fonts

MapLibre fetches glyph ranges rather than font files, from https://fonts.maptoolkit.net/{fontstack}/{range}.pbf. A style’s glyphs property already points there, so this only matters if you are writing a style from scratch. A fontstack may list several fonts comma-separated, and they are tried in order, so a stack ending in a font with wide script coverage is what keeps non-Latin labels from falling back to boxes.

How often the tiles change

The basemap is rebuilt from OpenStreetMap weekly, on Sundays at 13:00 CET. An edit made in OSM appears in the tiles after the next rebuild, not immediately.

Tiles are served with Cache-Control: public, max-age=604800, so a client that has already fetched a tile keeps it for a week, and a CDN sits in front of that. If you need to see a rebuild immediately during development, bypass the cache rather than expecting a hard reload to be enough.

Contours and bathymetry change only when their upstream datasets are reprocessed, which is rare and unscheduled.

Authentication

Add your API key as ?api_key=YOUR_API_KEY to every request. See Authentication for details.

Use Vector Tiles with MapLibre GL

Use the Style URL from the Standard Map Styles above to set the style of your map.

const map = new maplibregl.Map({
      container: 'map',
      // this is the Style URL:
      style: 'https://styles.maptoolkit.net/maptoolkit/maptoolkit.summer.json?api_key=YOUR_API_KEY',
      center: [11.400, 47.268],
      zoom: 12
    });
<!DOCTYPE html>
<html>
<head>
  <link href="https://cdn.jsdelivr.net/npm/maplibre-gl@5.6.1/dist/maplibre-gl.css" rel="stylesheet" />
  <style>
    body { margin: 0; }
    #map { width: 100%; height: 400px; }  
  </style>
</head>
<body>
  <div id="map"></div>
  <script src="https://cdn.jsdelivr.net/npm/maplibre-gl@5.6.1/dist/maplibre-gl.js"></script>
  <script>
    const map = new maplibregl.Map({
      container: 'map',
      // this is the Style URL:
      style: 'https://styles.maptoolkit.net/maptoolkit/maptoolkit.summer.json?api_key=YOUR_API_KEY',
      center: [11.400, 47.268],
      zoom: 12
    });
  </script>
</body>
</html>

Layers and Fields

The vector tiles contain layers such as water, road, building, and poi_label, each with its own set of fields. When you write a style, you reference these layer and field names. See the Schema Reference for the full list of layers, fields, and the values each field can hold.

Terrain & Hillshading

For 3D terrain and hillshading overlays, see Terrain Tiles.

Custom Styles

Custom map styles are available on request. Contact us for details.

Examples

Working examples for this API, each with copyable source:

Errors

Errors return the HTTP status code with a plain-text message in the body.

StatusMeaning
403The API key is missing (Access denied!), not recognized (Api-key not found!), or has no access to this service (Api-key not authorized!). See First Steps.
404Tile source not found. The style or tileset name in the URL does not exist.
500Internal server error.

A tile outside the source’s zoom range returns 404 with the body Tile not found, not an empty tile. Treat a 404 as a zoom or URL problem rather than as a gap in the data, and check the source’s zoom range in the table above before assuming the data is missing.

Rate limits

Limits are monthly request quotas tied to your plan rather than a per-second rate: the service returns no RateLimit-* or Retry-After headers. Current allowances are on the pricing page.

The free Basic plan has a hard limit, so requests are refused once it is reached. On Pro and Ultra, requests past the allowance are billed rather than refused. Enterprise plans use a flexible limit.

Tile requests are metered separately from API requests and at a lower rate, so a map-heavy application is budgeted differently from one making API calls.

Pricing

Self-service plans (Basic, Pro, and Ultra) are billed through RapidAPI; see RapidAPI for how to subscribe and authenticate. Plan limits and prices are listed on the Maptoolkit pricing page. Enterprise customers call the native hosts directly with a Maptoolkit API key.