Create a map
create_mapMake a production-ready static map and return its URL plus a rendered preview.
The map is a URL: the returned svg_url renders the same image forever, embeds in an tag with no JavaScript, and is the handle the other maproll tools accept.
Use it for choropleths (numeric values per region), flat colour paints, qualitative category maps, and plain highlight maps. Region ids are ISO 3166-1 alpha-2 at the "world" scope ("US", "DE", "BR") and ISO 3166-2 inside a country scope ("RO-B", "RO-CJ").
Numeric values and text categories cannot appear in the same map — pick one.
Do not use it for interactive or zoomable maps, driving directions, or street-level detail; maproll renders static statistical maps, not a slippy map.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"scope": "<scope>"
},
"name": "create_map"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bbox | No | Crop to "minLon,minLat,maxLon,maxLat"; the projection refits to the rectangle. | |
| extra | No | Escape hatch for documented parameters without a field here (patterns, annotations, proportional, labelMinArea, ...). Passed through verbatim. | |
| scope | Yes | Geography to draw. "world", a group ("EU", "NATO", "G20", "ASEAN", "AFRICA"), or a country code for its subnational regions ("RO"). Read maproll://catalog/scopes, or call describe_options with kind "scopes", for the full list. | |
| theme | No | Colour theme. Defaults to dark. | |
| title | No | Headline above the map. | |
| width | No | Pixel width. Defaults to 1200. | |
| breaks | No | Bin upper bounds. Required when classification is custom. | |
| detail | No | Geometry detail. Defaults to "low" on world and group scopes, "medium" elsewhere. Set "medium" when `bbox` zooms into the world, or coastlines look coarse. "high" is slow and makes a multi-MB SVG; use it only for a PNG. | |
| height | No | Pixel height. Defaults to the projection's aspect ratio. | |
| labels | No | "ISO" labels every region above the size threshold; an array labels only those ids. | |
| legend | No | Show the legend. Defaults true; set false for flat colour paints, which have no scale to show. | |
| values | No | Per-region data. Give `value` for a choropleth, `color` to paint a region flat, or `category` for qualitative buckets. | |
| borders | No | Shared borders to draw as heavy lines: region-id pairs joined by "-", e.g. ["IN-PK", "AF-PK"] (subnational: "US-CA-US-NV"). Both regions must be in the scope and actually touch. Do not list a pair twice or reversed. | |
| disputed | No | World and group scopes only (a country scope is rejected). Hatches disputed or occupied areas on top of the map, with transparent stripes so the controlling country's colour shows through. "all", or a list of ids. KASHMIR-PK and KASHMIR-IN are the two sides of the Line of Control; give both to stay neutral. | |
| scaleBar | No | Kilometre scale bar, bottom left. | |
| subtitle | No | Smaller line under the title. | |
| graticule | No | Draw a 10-degree lat/lon grid. | |
| highlight | No | Region ids to highlight with no data behind them. Use instead of `values` when the point is which regions, not how much. | |
| colorScale | No | Sequential for magnitudes, diverging for values around a midpoint, categorical for buckets. | |
| northArrow | No | Compass arrow, top right. | |
| projection | No | Map projection. Each scope has a sensible default; override only with a reason. | |
| attribution | No | OpenStreetMap credit. On by default and should stay on. | |
| borderColor | No | Hex colour of the `borders` lines ("#22d3ee"). Defaults to the theme's text colour. | |
| borderWidth | No | Width of the `borders` lines in px. Defaults to 2.5, clamped to 0.5-12. | |
| legendItems | No | Your own legend, for maps whose colours you chose with `color` instead of letting the scale pick them: `;`-separated `color:label` pairs, drawn in that order, e.g. "#1d4ed8:Democrat by 15 or more;#93c5fd:Democrat by under 5;#b91c1c:Republican by 15 or more". Up to 20 entries, 40 characters per label. Replaces the computed legend; works in every theme. | |
| legendTitle | No | Caption above the legend. | |
| legendLayout | No | ||
| legendNoData | No | Label for an extra legend swatch, in the map's land colour, covering the regions with no value — so a reader can tell the lowest band from absent data. Pass the label itself, and make it say what blank means on THIS map: "No data" when the regions are simply missing from the dataset, "None recorded" when blank is a real zero (a banana-production map). Omit it for no swatch. | |
| classification | No | How numeric values are binned. Ignored for diverging and categorical scales. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| embed | Yes | Ready-to-paste <img> tag. | |
| png_url | Yes | The same map as PNG, 900 px wide unless you set width. The SVG has no such default and renders at 1200, so pass width when the two must match exactly. | |
| svg_url | Yes | Embeddable SVG. This is also the handle other tools take. | |
| warnings | Yes | Non-fatal problems, e.g. region ids the renderer did not recognise. | |
| editor_url | Yes | Open in the maproll editor. |