Exporting results

May 20, 2026 ยท View on GitHub

The plugin adds a small Export control to the top-right of the map (toggle via options.exportControl, default true). It writes the currently displayed features to a downloaded file in one of three formats.

FormatFilenameNotes
GeoJSONresults.geojsonVerbatim copy of the in-memory feature collection.
CopyclipboardCopies formatted GeoJSON to the clipboard for paste into issues, notebooks or editors.
PNGmap.pngCaptures the current map viewport as an image. Browser tile CORS rules can affect third-party basemap pixels.
KMLresults.kmlSupports Point, LineString, Polygon (incl. holes). Uses wktLabel or name as placemark name.
CSVresults.csvOne row per feature, one column per binding variable + a synthesized wkt column.

Features from every visible geometry column are merged. Hidden layers (toggled off in the layers control) are still exported, because export operates on the parsed result set, not on what is currently rendered.

CSV escaping

Values containing commas, quotes or newlines are wrapped in double quotes and internal quotes are doubled, per RFC 4180.

Disabling the control

new Yasgui(el, {
  yasr: { plugins: { geo: { exportControl: false } } },
});