update_layer_style
Restyle a map layer or set clicked-feature popup columns using single colors, category or class color ramps, or selected fields.
Instructions
Restyle a layer or change its popup fields. Give style,
popup_fields or both.
style is one of:
{"type": "single", "color": "#3388ff"}{"type": "categories", "column", "colors"}: a colour per distinct value of a text, boolean or integer column (at most 100 values).{"type": "classes", "column", "method", "count", "colors"}: a colour per range of a numeric column.methodis equal_interval (default), quantile (always five classes, nocount), jenks or std_dev;countis 3-9 (default 5). Or give"breaks": [10, 50, 100]instead ofmethodandcount.colorsis optional: a ramp name (Set2 for categories and YlOrRd for classes by default; also Blues, Viridis, RdBu, Paired and the other ColorBrewer names) or a list of hex colours, one per value or class.popup_fieldsare column names shown, in order, when a feature is clicked. Needs amap_authorAPI key, which can change only the maps it created; a 401 or 403 means the server runs without one.
Args: map_id: A map this key created. layer_id: Layer id (from add_layer or get_map). style: New style, described above. popup_fields: New popup columns; [] shows none.
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": {
"map_id": "<map_id>",
"layer_id": "<layer_id>"
},
"name": "update_layer_style"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| style | No | ||
| map_id | Yes | ||
| layer_id | Yes | ||
| popup_fields | No |