Static Maps API
Center-based image
Added in v4.2.0
GET http://localhost:3650/api/maps/{mapId}/static/{lon},{lat},{zoom}/{width}x{height}{scale}.{format}
Generates a raster image based on the specified center and zoom level.
Request
Path Parameters
Parameters | Type | Description |
---|---|---|
mapId | string |
Identifier of the map. See MapTiler Server Maps.
Example: streets Added in v4.2.0 |
lon | number |
Longitude of the center of the image.
Added in v4.2.0 |
lat | number |
Latitude of the center of the image.
Added in v4.2.0 |
zoom | number |
Zoom level of the resulting image (can be fractional). (In the tile pyramid based on 512x512 tiles.)
Added in v4.2.0 |
width | integer |
Width of the image in pixels.
Added in v4.2.0 |
height | integer |
Height of the image in pixels.
Added in v4.2.0 |
scale | string |
Use “@2x” to get “retina”/HiDPI image.
Allowed values:
@2x Added in v4.2.0 |
format | string |
The value depends on the Map settings.
Allowed values:
png
jpg
webp Added in v4.2.0 |
Request example
http://localhost:3650/api/maps/streets/static/6.0288,44.3408,3/400x300.png
Responses
Code | Content | Description |
---|---|---|
200 | image/* | |
400 | Out of bounds / Invalid format | |
404 | The item does not exist | |
414 | URI Too Long. Maximum allowed length is 8192 bytes. |
Bounds-based image
Added in v4.2.0
GET http://localhost:3650/api/maps/{mapId}/static/{minx},{miny},{maxx},{maxy}/{width}x{height}{scale}.{format}
Generates a raster image based on the given bounds.
Request
Path Parameters
Parameters | Type | Description |
---|---|---|
mapId | string |
Identifier of the map. See MapTiler Server Maps.
Example: streets Added in v4.2.0 |
minx | number |
Longitude of the left (west) edge.
Added in v4.2.0 |
miny | number |
Latitude of the bottom (south) edge.
Added in v4.2.0 |
maxx | number |
Longitude of the right (east) edge.
Added in v4.2.0 |
maxy | number |
Latitude of the top (north) edge.
Added in v4.2.0 |
width | integer |
Width of the image in pixels.
Added in v4.2.0 |
height | integer |
Height of the image in pixels.
Added in v4.2.0 |
scale | string |
Use “@2x” to get “retina”/HiDPI image.
Allowed values:
@2x Added in v4.2.0 |
format | string |
The value depends on the Map settings.
Allowed values:
png
jpg
webp Added in v4.2.0 |
Request example
http://localhost:3650/api/maps/streets/static/-11.54,34.1,23.6,52.96/400x300.png
Responses
Code | Content | Description |
---|---|---|
200 | image/* | |
400 | Out of bounds / Invalid format | |
404 | The item does not exist | |
414 | URI Too Long. Maximum allowed length is 8192 bytes. |