Static maps | Rijwind docs
Static maps
A static map is a map rendered to an image — a PNG, WebP, or JPEG you
request with a plain URL and drop straight into an <img> tag, an email,
a PDF, or a social card. No JavaScript, no interactive map, just a picture
of exactly the view you ask for.
Code
Cost: 1 unit per image, or 2 units for a High-DPI (@2x) image — drawn
from the same monthly pool as every other endpoint.
URL anatomy
Code
| Part | Values |
|---|---|
{style} | light, dark, grayscale, white, or black. |
{position} | {lon},{lat},{zoom} — optionally ,{bearing},{pitch}. Or a bounding box [{minLon},{minLat},{maxLon},{maxLat}]. Or auto. |
{size} | {width}x{height} — optionally @2x for High-DPI, optionally .png, .webp, or .jpg (default png). Max 1280 per side. |
The API key rides the query string as ?key= (an <img> tag can't send
an Authorization header).
Choosing the view
You have three ways to frame the map:
-
Center + zoom —
4.9041,52.3676,12. The classic way. -
Bounding box — give the box to fit as
[{minLon},{minLat},{maxLon},{maxLat}]and we pick the center and zoom that frame it:Code -
Auto — use the literal
autofor the position and we frame the map around your overlays:Code
Add ,{bearing} (rotation, degrees) and ,{pitch} (tilt, 0–60°) after the
zoom to rotate or tilt the camera: 4.9041,52.3676,12,30,45.
Overlays
Overlays ride the query string.
Markers
Code
color is a hex color without the #; size is s, m, or l; label
is optional. Repeat marker= for more than one. All fields after the
coordinate are optional.
Code
Paths
Code
The style fields are named (key:value), all optional, in any order.
{geometry} is either an encoded polyline (enc:…, precision 5) or a
lon,lat;lon,lat;… list. Adding a fill turns the path into a filled shape.
Code
Circle
Draw a circle of a given radius (metres) around the center — its fields are
named too, with radius required:
Code
Code
Padding & attribution
When fitting a bounding box or auto, add inner padding (px) so overlays
don't touch the edges — one value for all sides, or 1–4 CSS-order values
(top,right,bottom,left):
Code
The OpenStreetMap credit is drawn in the bottom-right by default. Move it with
attribution=bottomleft|topleft|topright, or set attribution=false to omit
it — in which case you must credit OpenStreetMap somewhere else in your product
(the data licence requires it).
Language
Labels show local/native names by default (Den Haag, Bruxelles,
Köln). Add lang to render them in a specific language instead — names
without that language fall back to the local name:
Code
Supported codes: ar, bg, cs, da, de, el, en, es, et, fa, fi, fr, ga, he, hi, hr, hu, id, it, ja, ko, lt, lv, mr, mt, ne, nl, no, pl, pt, ro, ru, sk, sl, sv, tr, uk, ur, vi, zh-Hans, zh-Hant. Use lang=local (the default) for native
names.
Hiding labels
Basemap labels — place names, road labels, road shields, and POI icons — are
drawn by default. Set labels=false to hide all of them for a clean,
label-free map, handy as a backdrop for your own overlays:
Code
Markers you add keep their own labels — labels=false only strips the
basemap, not your overlays.
With the SDK
@rijwind/sdk builds the URL
for you — pure string building, so it works in Node and the browser:
Code
Limits
| Limit | Value |
|---|---|
| Image size | 1280 px per side (2560 with @2x) |
| Markers | 50 per image |
| Path vertices | 500 total per image |
| Pitch | 0–60° |
| Circle radius | up to 5,000,000 m |
For overlay sets too large to fit in a URL, POST the same parameters as
a JSON body to /styles/v1/{style}/static (this returns the image, so it
can't be used directly in an <img> tag).
Keep your key in mind. A static-map URL contains your key, so anyone who can see the image can reuse the URL. For keys used in public
<img>tags, leave the project's allowed-origins list empty and rely on your monthly quota — see Authentication.