Skip to content

Vector Tiles

This service delivers vector map tiles and styles through a RESTful API, implementing the Mapbox Vector Tiles specification.

TIP

The corresponding page on geo.admin.ch lists the available datasets and styles.

GetStyle

To get the style of certain layer:

https://vectortiles.geo.admin.ch/styles/{layerName}/style.json
ParameterDescription
layerNameLayer to perform the request

A GetStyle request for the Light Base Map dataset:

Request
Response
sh
curl https://vectortiles.geo.admin.ch/styles/ch.swisstopo.lightbasemap.vt/style.json

GetTile

A tile request is in the following form:

https://vectortiles.geo.admin.ch/tiles/{layerName}/{version}/{zoomLevel}/{x}/{y}.pbf
ParameterExampleDescription
layerNamech.swisstopo.base.vtThe technical name of the vector tile layer
versionv1.0.0Version of the tileset
zoomLevel7Zoom level (integer)
x67Tile column (X coordinate in the tile grid)
y44Tile row (Y coordinate in the tile grid)

A GetTile request for one .pbf tile in the Relief dataset:

http
curl -o demo.pbf https://vectortiles.geo.admin.ch/tiles/ch.swisstopo.relief.vt/v1.0.0/7/67/44.pbf

GetTileSets

MBTiles for storing tiled map data in SQLite databases for immediate or offline usage and for efficient transfer. A MBtileSet request is in the following form:

https://vectortiles.geo.admin.ch/tiles/{layerName}/{version}/{layerName}.mbtiles
ParameterExampleDescription
layerNamech.swisstopo.base.vtThe technical name of the vector tile layer
versionv1.0.0Version of the tileset

A GetTileSet request for a .mbtiles file in the Base Map dataset:

http
curl -o demo.mbtiles https://vectortiles.geo.admin.ch/tiles/ch.swisstopo.base.vt/v1.0.0/ch.swisstopo.base.vt.mbtiles

Metadata

Each tileset has a corresponding metadata json file that describes the available set of tiles. The URL of the metadata file is:

https://vectortiles.geo.admin.ch/tiles/{layerName}/{version}/tiles.json
ParameterExampleDescription
layerNamech.swisstopo.base.vtThe technical name of the vector tile layer
versionv1.0.0Version of the tileset

A Metadata request for the Base Map dataset:

Request
Response
sh
curl https://vectortiles.geo.admin.ch/tiles/ch.swisstopo.base.vt/v1.0.0/tiles.json

Example: MapLibre

An example using MapLibre to display the Light Base Map: