---
title: "Save Map State"
canonical: "https://help.cartinuum.com/space/WC/4559274044/Save%20Map%20State"
format: markdown
---
[The Save Map State widget](https://extensions.cartinuum.com/product/save-map-state/) lets users save and restore map views, layer settings, graphics, and optional added data references in an ArcGIS Experience Builder app.

Use this widget when users need to return to a previous map setup or share map-state files between sessions.

## What this widget does

Save Map State captures selected parts of the current map state and stores them in the browser. Users can reload saved states, delete them, export them to JSON files, and import previously exported state files.

## When to use it

Use Save Map State when users need to:

- Save the current map extent and zoom.
- Restore layer visibility and layer display settings.
- Save graphics or markup.
- Preserve Add Data references.
- Export map states to files.
- Import saved states later.
- Transfer map-state setups between apps or devices.

## Key features

- Save and restore map position.
- Save and restore layer visibility.
- Save and restore graphics.
- Optional Add Data references.
- Export states to file for sharing.
- Import from file.
- English, French, and Spanish translations.

## Requirements

- [ArcGIS Experience Builder 1.14 or later.](https://developers.arcgis.com/experience-builder/guide/release-versions/)
- A Map widget in the Experience Builder app.
- Browser local storage.
- A valid Cartinuum widget license.

## Before you begin

Before configuring Save Map State:

1. Add a Map widget to your Experience Builder app.
2. Decide where users should save and restore map states from the app layout.
3. Decide whether an Add Data workflow is part of the app.
4. Install or enable the widget using the standard widget installation process.

For installation and licensing steps, see [Widget Installation](https://help.cartinuum.com/space/WC/4255481886/Widget+Installation).

## Add Save Map State to an app

1. Open your app in ArcGIS Experience Builder.
2. Add the Save Map State widget to the page.
3. Open the widget settings.
4. Add the widget license.
5. Select the Map widget.
6. Save and publish the Experience Builder app.

## Configure the widget

| Setting | What it controls |
| --- | --- |
| License Settings | The widget license. |
| Select Map Widget | The map whose state will be saved and restored. |

The choices for what to save are made at runtime, not in the builder settings.

At runtime, users can choose:

| Save option | What it captures |
| --- | --- |
| Extent | The current map position and zoom. |
| Layers | Layer visibility and supported layer display state, including opacity, labels, pop-ups, visibility ranges, draw order, and legend toggle state where supported. |
| Graphics | Graphics and markup from graphics layers, including Draw widget graphics where supported. |

Add Data references are not shown as a separate runtime checkbox in the current implementation. If an Add Data widget is present in the experience, Save Map State tracks Add Data changes automatically. When the user saves layer state, the saved state can include references to layers added through Add Data, such as portal item IDs or service URLs. The widget stores references only, not copies of the underlying data.

## Use the widget

### Save a map state

1. Open the Experience Builder app.
2. Set up the map view, layers, graphics, and added data as needed.
3. Open Save Map State.
4. Enter a name for the map state.
5. Choose the state components to save.
6. Save the state.

### Restore a map state

1. Open Save Map State.
2. Select a saved state.
3. The map updates to restore the saved components.

### Export and import states

- Use Save to File to export an individual state.
- Use Save All to File to export all states.
- Use Load from File to import a saved JSON state file.

## Troubleshooting

### Saved states are missing

Saved states are stored in the browser's local storage. They may not appear in another browser, another device, or after browser data has been cleared.

### A state does not fully restore

Restore is best effort. Some layers or sources may not restore if permissions have changed, a service is unavailable, or an added data reference can no longer be reached.

### Add Data is not available

The Add Data option is only shown when an Add Data widget is present in the experience.

### Import fails

Only import JSON files exported from Save Map State.