Static map image

POST https://api.trailsplits.com/static-map/render

Checked by a live probe Key optional · 500 credits a day without one

A PNG of the outdoor map for a box, with an optional GeoJSON line or features drawn on it: for cards, emails and print. Attribution is drawn into the image; keep it visible.

Example

Static map image (curl)
# Without a key, leave out the Authorization line (500 credits a day per address).
curl --fail-with-body 'https://api.trailsplits.com/static-map/render' \
  -H "Authorization: Bearer $TRAILSPLITS_API_KEY" \
  -H 'Content-Type: application/json' \
  --data '{"bbox":[12.13,46.535,12.137,46.538],"width":320,"height":200}' \
  -o map.png

Sends a real request, with your key or the keyless allowance.

Request body

FieldTypeDescription
bboxrequiredarray[minLon, minLat, maxLon, maxLat]
widthinteger
heightinteger
geojsonobject
paddingnumber

Response

A PNG image (image/png).

Errors

400, 503, plus the gateway's 401, 429 and 503 (error conventions). A refused request costs no credits.