MapTiler Cloud API (1.0)

API reference for the MapTiler Cloud services.

Create a free account at https://cloud.maptiler.com/.

You need an API key to use the services (passed as a query parameter).

Authentication

key

Your own API key from https://cloud.maptiler.com/

Security Scheme Type API Key
Query parameter name: key

Maps

Embeddable HTML viewer

Authorizations:
path Parameters
mapId
required
string
Example: streets

Identifier of the map. See MapTiler Cloud Maps.

Responses

Style JSON of the map

Style JSON describing the map cartography. Can be used with various libraries to display a vector map (e.g. Mapbox GL JS, OpenLayers, ...).

Authorizations:
path Parameters
mapId
required
string
Example: streets

Identifier of the map. See MapTiler Cloud Maps.

Responses

Response samples

Content type
application/json
{ }

Map symbols (sprites)

Map symbols (sprites) required to display the vector map.

path Parameters
mapId
required
string
Example: streets

Identifier of the map. See MapTiler Cloud Maps.

scale
required
string
Enum: "" "@2x"
format
required
string
Enum: "png" "json"

Responses

Response samples

Content type
application/json
{ }

Raster XYZ tiles

Rasterized tiles (XYZ) of the map. Can be used with various libraries to display a raster map (e.g. Leaflet, OpenLayers, ...). It's usually better (if possible) to use the TileJSON rather than using the tile URL directly.

Authorizations:
path Parameters
mapId
required
string
Example: streets

Identifier of the map. See MapTiler Cloud Maps.

tileSize/
required
string
Enum: "" "256/"
z
required
integer
x
required
integer
y
required
integer
scale
required
string
Enum: "" "@2x"

Use "@2x" to get "retina"/HiDPI image.

format
required
string
Enum: "png" "jpg" "webp"

The value depends on the Map settings.

TileJSON

TileJSON describing the metadata of the map as well as link to the XYZ tiles. Can be used with various libraries to display a raster map (e.g. Leaflet, OpenLayers, ...).

Authorizations:
path Parameters
mapId
required
string
Example: streets

Identifier of the map. See MapTiler Cloud Maps.

tileSize/
required
string
Enum: "" "256/"

Responses

Response samples

Content type
application/json
{ }

WMTS Capabilities

WMTS Capabilities XML document describing the metadata of the map as well as link to the XYZ tiles. Can be used with various GIS software (e.g. QGIS) to display the map.

Authorizations:
path Parameters
mapId
required
string
Example: streets

Identifier of the map. See MapTiler Cloud Maps.

Responses

Static maps

Center-based image

Generates a raster image based on the specified center and zoom level.

Authorizations:
path Parameters
mapId
required
string
Example: streets

Identifier of the map. See MapTiler Cloud Maps.

lon
required
number

Longitude of the center of the image.

lat
required
number

Latitude of the center of the image.

zoom
required
integer

Zoom level of the resulting image (integer). (In the tile pyramid based on 512x512 tiles.)

width
required
integer

Width of the image in pixels.

height
required
integer

Height of the image in pixels.

scale
required
string
Enum: "" "@2x"

Use "@2x" to get "retina"/HiDPI image.

format
required
string
Enum: "png" "jpg" "webp"

The value depends on the Map settings.

query Parameters
path
string((fill|stroke|width)\:[^\|]+\|)*((enc:.+)|((-...

Define path(s) to be drawn on top of the map. Can be used multiple times. See https://support.maptiler.com/i26-static-maps-for-your-web.

markers
string((icon|anchor|scale)\:[^\|]+\|)*((-?\d+\.?\d*...

Define marker(s) to be drawn on top of the map. Can be used multiple times. See https://support.maptiler.com/i26-static-maps-for-your-web.

latlng
boolean

Use [latitude, longitude] order for coordinates instead of [longitude, latitude].

attribution
string
Enum: "bottomright" "bottomleft" "topleft" "topright" "false"

Changes the position of map attribution. If you disable the attribution make sure to display it in your application yourself (visibly).

fill
string
Deprecated

Color to use as a fill when drawing polygons. Deprecated, use "path" instead.

stroke
string
Deprecated

Color to use as a stroke when drawing polygons. Deprecated, use "path" instead.

width
number
Deprecated

Width of the stroke line when drawing polygons (in pixels). Deprecated, use "path" instead.

encodedpath
string
Deprecated

Path in Google Encoded Polyline Format. Deprecated, use "path" instead.

Responses

Bounds-based image

Generates a raster image based on the given bounds. The resulting zoom level is chosen so that the whole bounds are always visible (the zoom level is integer, so a little more than the bounds is usually visible).

Authorizations:
path Parameters
mapId
required
string
Example: streets

Identifier of the map. See MapTiler Cloud Maps.

minx
required
number

Longitude of the left (west) edge.

miny
required
number

Latitude of the bottom (south) edge.

maxx
required
number

Longitude of the right (east) edge.

maxy
required
number

Latitude of the top (north) edge.

width
required
integer

Width of the image in pixels.

height
required
integer

Height of the image in pixels.

scale
required
string
Enum: "" "@2x"

Use "@2x" to get "retina"/HiDPI image.

format
required
string
Enum: "png" "jpg" "webp"

The value depends on the Map settings.

query Parameters
padding
number

Ensures the autofitted bounds or features are comfortably visible in the resulting area. E.g. use 0.1 to add 10% margin (at least) of the size to each side.

path
string((fill|stroke|width)\:[^\|]+\|)*((enc:.+)|((-...

Define path(s) to be drawn on top of the map. Can be used multiple times. See https://support.maptiler.com/i26-static-maps-for-your-web.

markers
string((icon|anchor|scale)\:[^\|]+\|)*((-?\d+\.?\d*...

Define marker(s) to be drawn on top of the map. Can be used multiple times. See https://support.maptiler.com/i26-static-maps-for-your-web.

latlng
boolean

Use [latitude, longitude] order for coordinates instead of [longitude, latitude].

attribution
string
Enum: "bottomright" "bottomleft" "topleft" "topright" "false"

Changes the position of map attribution. If you disable the attribution make sure to display it in your application yourself (visibly).

fill
string
Deprecated

Color to use as a fill when drawing polygons. Deprecated, use "path" instead.

stroke
string
Deprecated

Color to use as a stroke when drawing polygons. Deprecated, use "path" instead.

width
number
Deprecated

Width of the stroke line when drawing polygons (in pixels). Deprecated, use "path" instead.

encodedpath
string
Deprecated

Path in Google Encoded Polyline Format. Deprecated, use "path" instead.

Responses

Auto-fitted image

Generates a raster image based on the given features. The area is calculated so that all the paths and markers given in query are visible.

Authorizations:
path Parameters
mapId
required
string
Example: streets

Identifier of the map. See MapTiler Cloud Maps.

height
required
integer

Height of the image in pixels.

height
required
integer

Height of the image in pixels.

scale
required
string
Enum: "" "@2x"

Use "@2x" to get "retina"/HiDPI image.

format
required
string
Enum: "png" "jpg" "webp"

The value depends on the Map settings.

query Parameters
padding
number

Ensures the autofitted bounds or features are comfortably visible in the resulting area. E.g. use 0.1 to add 10% margin (at least) of the size to each side.

path
string((fill|stroke|width)\:[^\|]+\|)*((enc:.+)|((-...

Define path(s) to be drawn on top of the map. Can be used multiple times. See https://support.maptiler.com/i26-static-maps-for-your-web.

markers
string((icon|anchor|scale)\:[^\|]+\|)*((-?\d+\.?\d*...

Define marker(s) to be drawn on top of the map. Can be used multiple times. See https://support.maptiler.com/i26-static-maps-for-your-web.

latlng
boolean

Use [latitude, longitude] order for coordinates instead of [longitude, latitude].

attribution
string
Enum: "bottomright&qu