maps.gurudocs
Documentation

Static Maps

Generate static PNG images of maps for use in emails, documents, social media previews, and anywhere you need a map without JavaScript.

API Endpoint

GET /v1/styles/{slug}/static?key=YOUR_API_KEY&center={lng},{lat}&zoom={z}&width={w}&height={h}

Parameters

ParameterTypeRequiredDefaultDescription
centerstringYesMap center as lng,lat
zoomnumberYesZoom level (0-18)
widthnumberNo600Image width in pixels (max: 1280)
heightnumberNo400Image height in pixels (max: 1280)
scalenumberNo1Pixel ratio (1 or 2 for retina)

Example

curl "https://api.maps.guru/v1/styles/basic/static?center=2.3522,48.8566&zoom=13&width=800&height=400&key=YOUR_KEY" \
  --output paris-map.png

Usage in HTML

<img
  src="https://api.maps.guru/v1/styles/basic/static?center=2.3522,48.8566&zoom=13&width=800&height=400&key=YOUR_KEY"
  alt="Map of Paris"
  width="800"
  height="400"
/>

Usage in Emails

Static maps are useful in transactional emails where JavaScript isn't available:

<a href="https://maps.guru/embed/your-style?key=YOUR_KEY">
  <img
    src="https://api.maps.guru/v1/styles/basic/static?center=77.5946,12.9716&zoom=14&width=600&height=300&key=YOUR_KEY"
    alt="View location on map"
  />
</a>
Tip

Use scale=2 for retina displays. The image dimensions stay the same but the resolution doubles.

Rate Limits

Static map generation counts toward your maps quota. Each image request counts as one map request.