Color countries by level
set_levelsGeo maps: color countries from 0 (faint) to 4 (the full accent), like a heat map, and show a legend under the title. Or rate them on a labeled scale: pass steps ("live" for where I'd live, "been", "visit", "tier", or your own labels and colors) and give each place a step label. levels is an object of country (code or name) to level, null takes the color off. On a map of one country (region us, de, fr...), the keys are its states, provinces or regions, by name or code ("California", "US-CA", "Bavaria"). legend sets its label and end labels and turns it on ({on: false} hides it). With the legend on, clicking a country on the page steps through the levels.
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": {
"mapId": "<mapId>",
"token": "<token>"
},
"name": "set_levels"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mapId | Yes | The map id from create_map. | |
| steps | No | Geo maps: rate mode, a labeled color scale such as Never to Absolutely. "live" (Never, Probably not, Maybe, Yes, Absolutely), "been" (Never been to Lived there), "visit" (No interest to Top of my list), "tier" (F to S), or your own list of 2 to 10 labels or {label, color} (lowest first; colors are hex). With steps, a level is a step number (0 is the first step) or a step label, and the legend lists the labels. Use it for "where I'd live", "states I've been to", a tier list of countries, or a categorical choropleth. | |
| token | Yes | The editToken from create_map. Required for every change. | |
| legend | No | ||
| levels | No | For example {"DE": 4, "FR": 2, "Spain": 1, "IT": null}. With steps, a step number (0 is the first) or a step label: {"Texas": "Absolutely", "Ohio": "Maybe"}. |