Refresh static map image

https://maphub.net/api/1/map/refresh_image

Refresh the static image of a map.

Static map images are used by embeds and the Download / Image dialog.

If the map is using a premium basemap, you need to add the basemap's API key first.

Note: This endpoint is very resource intensive, please limit it to max. 1 call every 5 minutes.

Arguments

  • map_id (required): the id of the map. To find out a map's id, please use the list maps endpoint.

Response

The response returns the following keys:

  • id: id of the map
  • url: URL of the map
  • owner: map owner's username
  • short_name: short name of the map, used in the URL
  • title: title of the map
  • visibility: visibility mode of the map. One of public, unlisted, private, select.

Code example

curl

curl https://maphub.net/api/1/map/refresh_image \
    --header 'Authorization: Token <api_key>' \
    --data-raw '{"map_id": 12345}'

Python

import requests

url = 'https://maphub.net/api/1/map/refresh_image'

api_key = '<api_key>'

args = {
    'map_id': 12345,
}

headers = {'Authorization': 'Token ' + api_key}
r = requests.post(url, json=args, headers=headers)

print(r.json())