Chatbot · no code · readable link

A styled map in one link, written by a chatbot

The whole map is one JSON object after #map=json: in the address. A model that can only write text can produce it; GISMap Online validates it, opens whatever is valid and lists anything it skipped. Two details make the map honest: -1 means "Not Disclosed" in this data, so it is excluded, and "method": "auto" lets the app choose class breaks that suit the skewed values.

What it shows off

  • A readable #map=json: link that a chat-only model can write by hand
  • "exclude": [-1]: the publisher's "Not Disclosed" code is drawn as No data instead of distorting the classes
  • "method": "auto": the app picks quantile classes because corn sales are heavily skewed

Ask a chatbot

This works in any chatbot, with or without tools:

Make a GISMap Online link for U.S. corn sales by county. The layer is https://services.arcgis.com/P3ePLMYs2RVChkJx/ArcGIS/rest/services/Corn/FeatureServer/0; look at its fields with ?f=pjson and use CORN_SALES_IN_DOLLARS. Write a map-v1 spec (https://gismap.online/schemas/map-v1.schema.json) with a choropleth renderer, ramp "greens", method "auto" and a gray basemap. The publisher codes undisclosed counties as -1, so exclude -1. URI-encode the JSON and put it after https://gismap.online/#map=json: and give me the link.

For a code-running agent

An agent can find the -1 code itself instead of being told: sources.inspect reads the publisher's own style and reports it as a sentinel.

import { sources, mapSpec } from "https://gismap.online/js/gismap-core.js";

const url = "https://services.arcgis.com/P3ePLMYs2RVChkJx/ArcGIS/rest/services/Corn/FeatureServer/0";
const meta = await sources.inspect(url);
const exclude = meta.sentinels.filter((code) => code.field === "CORN_SALES_IN_DOLLARS" && code.source !== "heuristic").map((code) => code.value); // [-1]
const spec = { version: 1, basemap: "gray-vector", layers: [{ url, renderer: { type: "choropleth", field: "CORN_SALES_IN_DOLLARS", method: "auto", ramp: "greens", exclude } }] };
const { valid } = mapSpec.validate(spec);
const { url: link } = await mapSpec.createLink(spec, { compress: false }); // the readable #map=json: form

The result

QR code that opens the U.S. corn sales by county
Scan to open the map on a phone. Download the QR code

Open the U.S. corn sales by county in GISMap Online. The map configuration is in the link (427 characters); the referenced public data and basemap still load from their publishers. No GISMap Online account or separate hosting project is required.

Map spec (JSON)

Show the full link

Check before you share

  • 546 of 3,074 counties are "Not Disclosed" (-1); they appear grey, as No data.
  • Corn sales data last edited in August 2022.
  • The layer hides itself when zoomed in past 1:144,447; add "ignoreServiceScaleRange": true to draw it at every zoom.

Data

Make your own. The guide for AI agents and llms.txt explain the link formats, the map and briefing schemas, and the in-page API, for chatbots and agents alike.