Agent recipe · Available · tested on 0.53.0

Interactive map with filtering, symbology and sharing

Can an AI agent turn a public dataset into a filtered, styled map I can share?

Yes. The agent inspects the source, writes one map-v1 JSON object with the filter, renderer, basemap and camera, validates it, and returns a #map=json: link that opens the finished map. No account or server call is needed.

Ask for it like this

  • “Map this data and color it by population”
  • “Filter these counties and make a choropleth I can share”
  • “Make one map colored by year and another by acreage, and give me two links”

Inputs

Accepts: ArcGIS FeatureServer/MapServer layer, GeoJSON, WMS, WFS, KML. Engines: maplibre, arcgis.

  • source: HTTPS URL of a public layer (or a sublayer index).

Optional:

  • where: Read-only SQL attribute filter on real field names.
  • renderer: RendererSpec: simple, categories, choropleth, graduated-symbols, heatmap, or auto.
  • basemap: One of the map-v1 basemap ids.
  • camera: Center, zoom, tilt, heading, or fit to layers.
  • outputs: Link, QR card, Smart Map PNG, PDF.

Steps

Discover → inspect → plan → validate → execute → verify → share. Each step names where it runs; none is a hosted REST endpoint.

  1. discover: Read llms.txt, this recipe and api/capabilities.json; note the engine and execution environment you actually have. (Declarative URL; https://gismap.online/llms.txt, https://gismap.online/api/capabilities.json, https://gismap.online/api/manifest.json)
  2. inspect: Read the source metadata: geometry type, field names and types, spatial reference, extent, sentinels and query support. Query real values before filtering; never invent fields. (Declarative URL, Standalone JavaScript, In-browser API; <layer URL>?f=pjson, sources.inspect, sources.detectSentinels, layers.metadata)
  3. plan: Choose the simplest level that can express the request: a ?layer= URL for one layer with a basic style; a map-v1 spec for categories, class breaks, colors, camera or several layers; the in-page API only to change a map already open. Keep attribute filters (where) separate from spatial ones. (Declarative URL, Standalone JavaScript, In-browser API; https://gismap.online/schemas/map-v1.schema.json, https://gismap.online/api/url-parameters.json, renderers.suggest, layers.suggestStyles)
  4. validate: Validate the spec and renderer against the real fields. Treat warnings as unfinished work. (Standalone JavaScript, In-browser API; mapSpec.validate, renderers.validate, mapSpec.prepareVerification)
  5. execute: Write the link: https://gismap.online/#map=json:<URI-encoded map-v1>. For follow-ups, decode the existing link (mapSpec.decode or mapSpec.fromShareParameters), clone it, change only what was asked, and write a new link per variant. (Declarative URL, Standalone JavaScript, In-browser API; mapSpec.createLink, mapSpec.decode, mapSpec.fromShareParameters, mapSpec.load)
  6. verify: Open the link, wait for gisMapOnline.ready and the layers, then check describe().state.issues, layers.list() (loaded, feature count, renderer, where) and mapSpec.fromCurrent(). (In-browser API; ready, describe, layers.list, mapSpec.fromCurrent, mapSpec.issues)
  7. share: Return the actual link. Optional: a Smart Map PNG (smartImages.downloadCurrent) or the app's Map PDF and QR card (Share & export, in the UI). (Declarative URL, In-browser API; mapSpec.createLink, smartImages.createShareLink, smartImages.downloadCurrent)

Result

One map-v1 object: layers (url, where, renderer, opacity), basemap, skin, camera, legend. Schema: /schemas/map-v1.schema.json.

  • Interactive map link (#map=json: or compressed #map=) · Declarative URL
  • Smart Map PNG (image with the project embedded) · In-browser API · static. Keep the original file: image services and messengers can strip the embedded data. Remote layers are referenced, not embedded.
  • Map PDF and QR card · Outside GISMap Online · static. Made in the app with Share & export (no in-page method yet). A PDF is a static picture of the map.

Verify before reporting success

  • Source loaded with a nonzero feature count
  • Filter applied (layer where matches)
  • Renderer type and field applied; legend shown
  • Camera and basemap as requested
  • Share link reopens to the same spec (mapSpec.fromCurrent)
  • Each requested export exists

Report prepared, validated, loaded, rendered and verified separately, and partial or failed when they apply. A generated link alone is only prepared.

Limitations

  • Readable #map=json: links are limited to 8,192 characters; use mapSpec.createLink for compressed links.
  • A year slider is not part of map-v1; use a timeline briefing for year-by-year playback.
  • Map PDF and map QR card have no in-page API; briefing.exportPdf and briefing.exportQrCard cover briefings.

If something goes wrong

  • If a field is missing, re-read ?f=pjson and use the exact name and case.
  • If validation warns about a renderer, the service style is used; fix the renderer rather than shipping the warning.
  • If a compressed link cannot be decoded in your environment, ask for the original JSON or a #map=json: link.

Examples

Example · rendered · checked 2026-10-21

California grape production (purple choropleth)

Prompt: “Create a California grape production map, counties over 1,000 acres, with a purple choropleth, and give me a link.”

Data: USDA Census of Agriculture 2022 grape production (Esri)

Open the result

map-v1 JSON
{
  "version": 1,
  "title": "California grape production, counties over 1,000 acres",
  "basemap": "gray-vector",
  "camera": {
    "center": [
      -120.2,
      37.4
    ],
    "zoom": 5.4
  },
  "legend": true,
  "layers": [
    {
      "url": "https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/USDA_Census_of_Agriculture_2022_Grape_Production/FeatureServer/0",
      "type": "feature",
      "title": "California grape acreage (USDA 2022)",
      "where": "STATE_ABBR = 'CA' AND GRAPES_ACRES_BEAR_NON_BEAR_TOT > 1000",
      "opacity": 0.85,
      "renderer": {
        "type": "choropleth",
        "field": "GRAPES_ACRES_BEAR_NON_BEAR_TOT",
        "classes": 5,
        "method": "quantile",
        "ramp": "purples"
      }
    }
  ]
}

What was checked:

  • Opened headless on the branch preview: 26 counties loaded, filter and choropleth on GRAPES_ACRES_BEAR_NON_BEAR_TOT applied, camera and basemap as specified, screenshot inspected.
  • PDF, QR card and Smart Map PNG were not generated for this example.
Example · loaded · checked 2026-10-21

Fires by year (follow-up refinement, map A)

Prompt: “Make one map colored by fire year and another showing fire acreage with graduated colors. Keep the 2000–2010 filter and give me two links.”

Data: California historic fire perimeters (CAL FIRE)

Open the result Worked example

map-v1 JSON
{
  "version": 1,
  "title": "Fires by year 2000–2010",
  "basemap": "gray-vector",
  "camera": {
    "center": [
      -120,
      37.5
    ],
    "zoom": 5
  },
  "legend": true,
  "layers": [
    {
      "url": "https://services1.arcgis.com/jUJYIo9tSA7EHvfZ/ArcGIS/rest/services/California_Historic_Fire_Perimeters/FeatureServer/0",
      "type": "feature",
      "title": "California historical fire perimeters",
      "where": "YEAR_ >= 2000 AND YEAR_ <= 2010",
      "opacity": 0.8,
      "renderer": {
        "type": "categories",
        "field": "YEAR_",
        "maxCategories": 11,
        "colors": {
          "2000": "#8e0152",
          "2001": "#d73027",
          "2002": "#f46d43",
          "2003": "#fdae61",
          "2004": "#fee08b",
          "2005": "#66a61e",
          "2006": "#1b9e77",
          "2007": "#1f78b4",
          "2008": "#6a3d9a",
          "2009": "#a6761d",
          "2010": "#4d4d4d"
        }
      }
    }
  ]
}

What was checked:

  • Opened headless: 3,112 features loaded with the 2000–2010 filter; categories on YEAR_ applied; camera and basemap preserved (read from map state, no screenshot).
  • Opening the legend threw an exception on MapLibre; fixed on this branch.
Example · loaded · checked 2026-10-21

Fires by acreage (follow-up refinement, map B)

Prompt: “Same request, second link.”

Data: California historic fire perimeters (CAL FIRE)

Open the result Worked example

map-v1 JSON
{
  "version": 1,
  "title": "Fire acreage 2000–2010",
  "basemap": "gray-vector",
  "camera": {
    "center": [
      -120,
      37.5
    ],
    "zoom": 5
  },
  "legend": true,
  "layers": [
    {
      "url": "https://services1.arcgis.com/jUJYIo9tSA7EHvfZ/ArcGIS/rest/services/California_Historic_Fire_Perimeters/FeatureServer/0",
      "type": "feature",
      "title": "California historical fire perimeters",
      "where": "YEAR_ >= 2000 AND YEAR_ <= 2010",
      "opacity": 0.8,
      "renderer": {
        "type": "choropleth",
        "field": "GIS_ACRES",
        "classes": 5,
        "method": "quantile",
        "classColors": [
          "#ffffb2",
          "#fecc5c",
          "#fd8d3c",
          "#f03b20",
          "#bd0026"
        ]
      }
    }
  ]
}

What was checked:

  • Opened headless: 3,112 features loaded; quantile choropleth on GIS_ACRES applied; filter, camera and basemap preserved (read from map state, no screenshot).