Getting started
A map is one URL. No account, no SDK.
The first map: GET in an <img>#
/v1/map.pngGET /v1/map.png?area=Czechia&poi=place:Chřiby|marker:triangle&w=468&h=280
Put that URL (with your host in front) into an image tag:
<img src="https://YOUR-HOST/v1/map.png?…the query above…" width="468" height="280" alt="Czechia, Chřiby highlighted">What happened: area was looked up by name and framed, everything outside it faded, inner borders were drawn, and poi put a labeled marker on a named place. w and h are the size in CSS pixels. Commas, pipes and non-ASCII characters can stay as they are in a browser; use + or %20 for spaces and %23 for #.
Every parameter is listed in the query parameter reference. The area, poi and w/h parameters used above are area, poi, w and h.
The same map as a POST#
GET is convenient and cacheable, but URLs are limited in length and cannot carry some things (custom fonts, GeoJSON areas, more than one route, labels containing |). For those, send the same description as JSON to POST /v1/map with Content-Type: application/json:
/v1/map{
"area": "Czechia",
"pois": [{ "place": "Chřiby", "marker": { "shape": "triangle" } }],
"width": 468,
"height": 280
}
The response is the image itself. Add ?response=json to the POST URL to get {url, key, meta, …} instead, where url points at the cached image (/v1/images/{key}, immutable, safe to store). The body fields are listed in the request body reference.
GET and POST describe the same thing; every example in these guides is labeled with the method it uses, and the GET ones can be turned into JSON and back.
Retina#
scale multiplies the pixel density without changing the layout: the image is w × scale pixels wide, and markers, labels and line widths grow with it.
/v1/map.pngGET /v1/map.png?area=Czechia&poi=place:Chřiby|marker:triangle&w=360&h=220&scale=2
Use it with an <img> that has width="360" and let the browser downscale. See scale.
Formats#
Pick the format with the path extension (.png, .jpg, .webp) or with the format parameter. PNG is lossless and the default; JPEG and WebP take a quality.
/v1/map.webpGET /v1/map.webp?area=Czechia&w=468&h=280&quality=85
What to read next#
- Frame a country or region: Locator maps
- Add points: Points and labels
- Draw a route: Routes
- Something returned an error: Errors and limits