Maps API
Maps API reference
Maps
List maps
Lists maps from maps directory. It can be paginated with offset and limit parameters, otherwise first 50 items are returned.
- Type: integeroffset
The starting position of returned list of items.
- Type: integerlimit
Maximum number of items which will be returned.
- application/json
- application/json
curl http://localhost:3650/api/v1/admin/maps \
--header 'Authorization: Basic username:password'
{
"items": [
{
"id": "streets",
"name": "streets",
"title": "Streets",
"published": true,
"format": "jpeg"
}
]
}OK
Detail of the map
Gets information about the given map.
- Type: stringidrequired
Identifier of the map.
- application/json
- application/json
- application/json
curl http://localhost:3650/api/v1/admin/maps/streets \
--header 'Authorization: Basic username:password'
{
"id": "streets",
"name": "streets",
"title": "Streets",
"published": true,
"format": "jpeg",
"quality": 92,
"urls": {
"embeddable": "http://localhost:3650/api/maps/streets",
"ogcTiles": "http://localhost:3650/api/maps/streets/tiles",
"stylejson": "http://localhost:3650/api/maps/streets/style.json",
"tilejson": "http://localhost:3650/api/maps/streets/tiles.json",
"tilejson256": "http://localhost:3650/api/maps/streets/256/tiles.json",
"wms": "http://localhost:3650/api/maps/streets/wms?service=WMS&request=GetCapabilities",
"wmts": "http://localhost:3650/api/maps/streets/WMTSCapabilities.xml",
"xyz": "http://localhost:3650/api/maps/streets/{z}/{x}/{y}.jpg",
"xyz256": "http://localhost:3650/api/maps/streets/256/{z}/{x}/{y}.jpg"
}
}OK
Change metadata of the map
Changes metadata (format, quality, published) of the given map.
- Type: stringidrequired
Identifier of the map.
A JSON object containing metadata information
- Type: string enumformat
New format
values- jpeg
- png
- webp
- Type: booleanpublished
New state of the map serving
- Type: integerqualitymin:0max:100
New quality in percent
- application/json
- application/json
- application/json
curl http://localhost:3650/api/v1/admin/maps/streets \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic username:password' \
--data '{
"format": "jpeg",
"quality": 92,
"published": true
}'
{
"id": "streets",
"name": "streets",
"title": "Streets",
"published": true,
"format": "jpeg",
"quality": 92,
"urls": {
"embeddable": "http://localhost:3650/api/maps/streets",
"ogcTiles": "http://localhost:3650/api/maps/streets/tiles",
"stylejson": "http://localhost:3650/api/maps/streets/style.json",
"tilejson": "http://localhost:3650/api/maps/streets/tiles.json",
"tilejson256": "http://localhost:3650/api/maps/streets/256/tiles.json",
"wms": "http://localhost:3650/api/maps/streets/wms?service=WMS&request=GetCapabilities",
"wmts": "http://localhost:3650/api/maps/streets/WMTSCapabilities.xml",
"xyz": "http://localhost:3650/api/maps/streets/{z}/{x}/{y}.jpg",
"xyz256": "http://localhost:3650/api/maps/streets/256/{z}/{x}/{y}.jpg"
}
}OK
Delete the map
Deletes the given map. Before deleting, it is automatically unpublished and cannot be served anymore.
- Type: stringidrequired
Identifier of the map.
- application/json
- application/json
- application/json
curl http://localhost:3650/api/v1/admin/maps/streets \
--request DELETE \
--header 'Authorization: Basic username:password'
{
"removed": [
"streets"
]
}OK
Publish the map
Publishes the given map. Does nothing, if the map is already published.
- Type: stringidrequired
Identifier of the map.
- application/json
- application/json
- application/json
curl http://localhost:3650/api/v1/admin/maps/streets/publish \
--request POST \
--header 'Authorization: Basic username:password'
{
"id": "streets",
"name": "streets",
"title": "Streets",
"published": true,
"format": "jpeg",
"quality": 92,
"urls": {
"embeddable": "http://localhost:3650/api/maps/streets",
"ogcTiles": "http://localhost:3650/api/maps/streets/tiles",
"stylejson": "http://localhost:3650/api/maps/streets/style.json",
"tilejson": "http://localhost:3650/api/maps/streets/tiles.json",
"tilejson256": "http://localhost:3650/api/maps/streets/256/tiles.json",
"wms": "http://localhost:3650/api/maps/streets/wms?service=WMS&request=GetCapabilities",
"wmts": "http://localhost:3650/api/maps/streets/WMTSCapabilities.xml",
"xyz": "http://localhost:3650/api/maps/streets/{z}/{x}/{y}.jpg",
"xyz256": "http://localhost:3650/api/maps/streets/256/{z}/{x}/{y}.jpg"
}
}OK
Unpublish the map
Unpublishes the given map. Does nothing, if the map is already unpublished.
- Type: stringidrequired
Identifier of the map.
- application/json
- application/json
- application/json
curl http://localhost:3650/api/v1/admin/maps/streets/unpublish \
--request POST \
--header 'Authorization: Basic username:password'
{
"id": "streets",
"name": "streets",
"title": "Streets",
"published": true,
"format": "jpeg",
"quality": 92,
"urls": {
"embeddable": "http://localhost:3650/api/maps/streets",
"ogcTiles": "http://localhost:3650/api/maps/streets/tiles",
"stylejson": "http://localhost:3650/api/maps/streets/style.json",
"tilejson": "http://localhost:3650/api/maps/streets/tiles.json",
"tilejson256": "http://localhost:3650/api/maps/streets/256/tiles.json",
"wms": "http://localhost:3650/api/maps/streets/wms?service=WMS&request=GetCapabilities",
"wmts": "http://localhost:3650/api/maps/streets/WMTSCapabilities.xml",
"xyz": "http://localhost:3650/api/maps/streets/{z}/{x}/{y}.jpg",
"xyz256": "http://localhost:3650/api/maps/streets/256/{z}/{x}/{y}.jpg"
}
}OK