Draws a map of real places as an image: countries, states, counties or ZIP codes colored by data (a choropleth or heat map) or by category, with a legend, a title and pins.
Borders come from real geographic data, not from an image model, and region names are matched for you. It draws only real places, never fictional or invented ones. The map is returned as an image in the conversation.
Maps cover the world, continents, countries, their states, provinces and counties, and US ZIP code areas.
Color regions with ONE of these (choropleth and categories are mutually exclusive):
- `choropleth`: a number per region, e.g. {"values": {"California": 39.5, "Texas": 30.5}}. Classes, breaks and palette are picked from the data unless you set them. Say what the numbers are with `kind` (and `midpoint` when they have a meaningful center, `unit` for a short label unit): that is what gets percents, currencies, years and diverging scales right. When the data does not cover every region of the map, add `noData: true` so the legend explains the uncolored ones.
- `categories`: a label per region, e.g. {"values": {"France": "Euro", "Poland": "Złoty"}}. Colors are assigned automatically unless you set `colors`.
- `regions`: explicit hex colors, e.g. {"Texas": "#1D4ED8"}. Also works on top of either mode as an override.
Region keys can be names, ISO/FIPS-style codes or common aliases. Typos are auto-corrected, and every correction or unmatched key is reported with suggestions, so there is no need to call get_map_regions first. Get `mapId` from list_maps if you don't know it.
Also available: pins (`locations` with lat/lon), `title`, `legend` (position, `title`, `subtitle`), `style` (theme, borders, region labels; `style.labels.content: "value"` prints each region's value instead of its name and `"name_value"` stacks the name above the value, both needing `choropleth` or `categories`; `style.labels.fit` (default "auto") shortens labels that don't fit or overlap and never hides one; any still overlapping are reported in a `labels_overlap` warning with their keys), extra `layers`, and `output` size.
A data legend needs a `legend.title`: what is measured, its unit and the year ("Median household income (US$, 2023)"). An untitled legend leaves the reader guessing. Short units ("%", "°C", "t") go in `choropleth.unit`, long ones ("litres per person") in the legend title.
`dryRun: true` validates and previews region matching and the color plan without rendering.
Without an API key: 30 renders per hour and 5 per minute per conversation (dry runs count), PNG up to 1600 px wide, with Ultimaps attribution on the image. The default 1200 px width is right for viewing in chat, and larger images are returned only as a link. Formats: png. SVG and PDF export are in Ultimaps Studio, from the edit link in the result.
Every result includes an image link that works for 30 days, for chat apps that do not display images returned by tools.
The result reports corrections, warnings, the resolved color plan, and an edit link that opens the map in Ultimaps Studio, where it can be edited, exported, or published as an interactive, clickable map to embed on a website (free account).