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

FieldTypeRequiredNotes
titlestringYesThe title of the map
latitudenumberYesLatitude of the map centre (decimal degrees, e.g. 41.9028)
longitudenumberYesLongitude of the map centre (decimal degrees, e.g. 12.4964)
zoomnumberYesZoom 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 typeGeometryUse for
Point[longitude, latitude]Individual locations, markers, cities
LineStringArray of [longitude, latitude] pairsRoutes, paths, rivers, borders
PolygonArray of rings, each an array of [longitude, latitude] pairsCountries, regions, areas of interest

Each feature requires a properties object with:

FieldTypeNotes
namestringThe label shown for this feature on the map
descriptionstringA 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

ZoomTypical view
0–1Whole Earth
3Continent
4–5Large country
6–7Region / large river
10City district
12–13City
15Neighbourhood / building
22Maximum 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.