Location editor
The Location editor lets you configure a map centred on a specific point, with an optional set of GeoJSON features — markers, routes, or area polygons — drawn on top. The AI drafts the coordinates and features based on your request; you can pan, zoom, and adjust data in the widget before saving.
How to invoke it
Ask the AI to create a map in natural language:
- “Add a map showing the main cities of ancient Greece”
- “Show the route of the Silk Road on a map”
- “Create a map centred on the Amazon basin”
- “Add a map with markers for the Battle of the Bulge key locations”
The AI calls edit_location with a pre-filled draft and opens the widget.
Data fields
Map view
| Field | Type | Required | Notes |
|---|---|---|---|
title | string | Yes | The title of the map |
latitude | number | Yes | Latitude of the map centre (decimal degrees, e.g. 41.9028) |
longitude | number | Yes | Longitude of the map centre (decimal degrees, e.g. 12.4964) |
zoom | number | Yes | Zoom level from 0 to 22 — see Zoom reference |
GeoJSON features (optional)
The geojson field is a standard GeoJSON FeatureCollection. Include it when you want markers, routes, or areas displayed on the map.
| Feature type | Geometry | Use for |
|---|---|---|
| Point | [longitude, latitude] | Individual locations, markers, cities |
| LineString | Array of [longitude, latitude] pairs | Routes, paths, rivers, borders |
| Polygon | Array of rings, each an array of [longitude, latitude] pairs | Countries, regions, areas of interest |
Each feature requires a properties object with:
| Field | Type | Notes |
|---|---|---|
name | string | The label shown for this feature on the map |
description | string | A short description of the feature |
When GeoJSON features are present, the AI automatically calculates latitude, longitude, and zoom to fit all features in the viewport.
Zoom reference
| Zoom | Typical view |
|---|---|
| 0–1 | Whole Earth |
| 3 | Continent |
| 4–5 | Large country |
| 6–7 | Region / large river |
| 10 | City district |
| 12–13 | City |
| 15 | Neighbourhood / building |
| 22 | Maximum detail |
Example GeoJSON (two cities)
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": { "type": "Point", "coordinates": [12.4964, 41.9028] },
"properties": { "name": "Rome", "description": "Capital of Italy" }
},
{
"type": "Feature",
"geometry": { "type": "Point", "coordinates": [2.3522, 48.8566] },
"properties": { "name": "Paris", "description": "Capital of France" }
}
]
} Tips
- GeoJSON coordinates are
[longitude, latitude], not the other way around — this matches the GeoJSON spec but is easy to mix up. - Let the AI calculate the centre. When you provide named locations (“the capitals of Western Europe”), the AI will look up coordinates and fit the map to show all of them.
- Use the widget to fine-tune. You can pan and zoom the map in the widget and save the adjusted view before the markup is generated.