Skip to main content

Quick start

The fastest path from zero to a rendered map is an HTML <img> tag.

1. Embed a world choropleth

<img
src="https://api.maproll.io/map.svg?scope=world&data=US:200,CN:150,DE:95&theme=dark"
alt="World choropleth"
/>
World choropleth

That's the whole API surface for the common case. Three parameters:

  • scope — the geography (world, RO, …).
  • dataid:value pairs separated by commas. IDs are ISO 3166-1 alpha-2 for countries.
  • theme — one of six palettes.

2. Or fetch it with curl

curl -o sample.svg \
'https://api.maproll.io/map.svg?scope=world&data=US:200,CN:150,DE:95&theme=dark'

The response includes immutable cache headers:

Content-Type: image/svg+xml
Cache-Control: public, max-age=31536000, immutable
ETag: "<sha1>"

The ETag is content-addressed, so re-rendering the same URL is free for clients.

3. POST when the URL grows too long

For more than a few dozen regions, switch to POST /render/map with a JSON or CSV body. See POST /render/map.

4. Add styling

Mix in any combination of themes, projections, classifications, markers, routes, overlays — see the categories in the sidebar. Every feature is independent and additive.

World choropleth with title, north arrow and scale bar