Agent recipe · Experimental · tested on 0.53.0

Print-ready PDF and branded Smart Image

Can an AI agent make a branded PDF, poster or Smart Map Image?

Yes, from a running GISMap Online page. gisMapOnline.print renders the Print Editor's templates and returns the file. Exports wait for the map and fail rather than return a blank or partial page. Agents never draw their own Smart Image.

Ask for it like this

  • “Make a printable map of this data”
  • “Make a poster of this map”
  • “Make a Smart Map Image”

Inputs

Accepts: A map open in GISMap Online, A map-v1 link. Engines: maplibre, arcgis.

  • map: A running GISMap Online page with the map loaded.

Optional:

  • template: An id from print.templates().
  • title: The page title; the project title by default.
  • pages: current-view, or bookmarks for a PDF with one page per bookmark.

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. execute: Open the map in a browser with WebGL, await gisMapOnline.ready, then call print.exportPdf or print.exportSmartImage with a template from print.templates(). (In-browser API; print.templates, print.exportPdf, print.exportSmartImage)
  3. verify: Open the file and check the title, legend and QR target. Pass on any warnings. (In-browser API; https://gismap.online/skills/gismap/references/print.md)
  4. share: Return the file with the live share link. If export fails, report the error code and return the link alone. (In-browser API; smartImages.createShareLink)

Result

A static page of the current map; a Smart Image also embeds the project. Schema: /schemas/map-v1.schema.json.

  • Map PDF · In-browser API · static
  • Smart Image (PNG) · In-browser API · static. Importing the PNG restores the project.

Verify before reporting success

  • The page shows the requested map, title and legend
  • The QR opens the live map
  • smartImages.read restores the project and reports renderedBy: app

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

Limitations

  • Needs a browser with WebGL; there is no hosted rendering.
  • Wall maps are capped at about 6000 pixels on the long side.
  • Static outputs keep no live GIS interaction.

If something goes wrong

  • In headless Chromium without WebGL, launch with --use-gl=angle --use-angle=swiftshader.
  • If a layer does not load, report it; use allowPartial only if the user agrees.
  • If export fails, return the live share link and the error code.

Examples