Skip to content

About

Save, load and share map state (viewpoint, layers, filters, basemap, time, graphics) in ArcGIS Experience Builder, stored locally in the browser.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

Save Instance (accessible build)

License Release Issues

Save, load and share the current state of an ArcGIS Experience Builder web map: viewpoint (center, scale, rotation and 3D camera), layer visibility and opacity, feature-layer definition expressions and labels, basemap, time extent, and graphics. Saved instances are stored locally in the browser. Instances can be downloaded to a .txt file and imported on another machine.

Credit and provenance

This is a modified version of the Save Instance Widget by Sven Jensen. Original project: https://github.com/svenweb/saveInstanceWidget (MIT). All credit for the original widget goes to Sven (https://jensengis.com).

This build, by Brian McLeer (City of Grand Junction, CO), adds an accessibility rewrite to WCAG 2.1 AA, fixes the toolbar icon scaling, and broadens the captured map state. It remains MIT licensed and retains Sven's copyright. See CHANGES.md for the full list and LICENSE for terms.

Features

  • Save and restore viewpoint, layers, definition expressions and labels, basemap, time extent, and graphics (including Esri Draw/Sketch graphics).
  • Rename, delete, and clear-graphics actions per instance.
  • Filter and sort the saved list; optional startup instance.
  • Download a single instance or all instances; import from .txt.
  • WCAG 2.1 AA: themed (light and dark), keyboard operable, screen-reader labeled, accessible dialogs and status messages. See CHANGES.md.

Requirements

  • ArcGIS Experience Builder Developer Edition 1.19 or 1.20 (React 19).
  • EB 1.18 and earlier (React 18) are not supported.

Install

  1. Copy the saveInstance folder into your Experience Builder install at: client/your-extensions/widgets/saveInstance/ manifest.json must sit directly inside your-extensions/widgets/saveInstance/. Do not nest it a second level deep (for example widgets/saveInstance/saveInstance/). Nesting is the most common reason a widget does not register.
  2. From the client folder, run npm install. Experience Builder installs this widget's dependencies automatically from its package.json, so there are no per-dependency commands to run.
  3. Restart the EB client (npm start), then add the widget in the builder and select a map in the widget settings.

The release zip and the editor shims

The zip is the widget only. The Visual Studio type shims in the repo (saveInstance/src/exb-editor-shims.d.ts, saveInstance/src/vendor-shims.d.ts) are left out on purpose: their ambient declare module blocks are not file-scoped and would rewrite the react, jimu and esri types for every other widget in your your-extensions folder.

If you clone the repository instead of using the zip, delete saveInstance/src/exb-editor-shims.d.ts and the other shim files listed above before building; nothing else depends on them.

Troubleshooting: "saveInstance is duplicated"

This means the widget name is registered more than once. A single, correctly placed copy cannot duplicate itself, so a second copy exists somewhere. Check, in order: a nested folder (widgets/saveInstance/saveInstance/); a leftover or renamed copy (including any -copy folder); or a stale compiled build under client/dist/widgets. Stop the client, remove the extra copy or clear the matching dist/widgets folder, then start again. If removing one copy makes the widget disappear from the Entrypoint list, the remaining copy is nested too deep; move it so manifest.json sits directly inside the widget folder.

Feedback

Languages

The widget follows the Experience Builder app language: the ArcGIS profile language, the browser, ?locale=xx in the URL, or the Language Switcher widget. Interface text lives in src/runtime/translations/default.ts (and src/setting/translations/default.ts for the settings panel), with language files for all 39 Experience Builder locales made by exb-i18n-kit.

  • Esri's own Experience Builder translations are used first, so shared words match the out-of-the-box widgets.
  • Other strings come from the kit's shared translation memory. Machine translations are marked for review.
  • Anything not translated yet shows in English.
  • Coverage per language: saveInstance/i18n/STATUS.md.
  • To fix a translation for every widget that uses it, open a pull request on memory/<locale>.json in exb-i18n-kit.

License

MIT. Copyright (c) 2025 Sven Jensen. Modifications copyright (c) 2025 City of Grand Junction, CO. The original copyright notice and MIT permission text are retained in LICENSE.

About

Save, load and share map state (viewpoint, layers, filters, basemap, time, graphics) in ArcGIS Experience Builder, stored locally in the browser.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages