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¢er={lng},{lat}&zoom={z}&width={w}&height={h}
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
center | string | Yes | — | Map center as lng,lat |
zoom | number | Yes | — | Zoom level (0-18) |
width | number | No | 600 | Image width in pixels (max: 1280) |
height | number | No | 400 | Image height in pixels (max: 1280) |
scale | number | No | 1 | Pixel 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.