Select to view content in your preferred language

Save Instance Widget

417
9
a week ago
Status: Open
Labels (1)
SvenJensen
Emerging Contributor

Hello everyone, my name is Sven. I’m a university student based in Vancouver, BC, currently pursuing a degree in Computer Science with a minor in Geographic Information Science (GIS).

Inspired by the Save Session Widget for WebAppBuilder I have created the Save Instance Widget for Experience Builder.

Visit my website JensenGIS to download the compiled widget, view the demo video and Github repository. I would really appreciate anyones feedback on the Save Instance Widget. Thanks!




Here is more information about the widget:

The Save Instance Widget lets you save and share the current state of your web map in Experience Builder — including extent, visible layers, basemap, graphics, and more. It's inspired by the classic Save Session Widget from Web AppBuilder, but built specifically for ArcGIS Experience Builder.

Installation

You can download the latest compiled version of the Save Instance Widget from JensenGIS.


Setup

Once downloaded, follow Esri’s guide on how to add custom widgets to your Experience Builder installation.

  1. Place the widget inside your /widgets directory.
  2. In Experience Builder, go to the Insert Widget tab and scroll down to the Custom Widgets section.
  3. Drag the Save Instance Widget onto your toolbar.
  4. Configure the widget by selecting a map for it to interact with.

That’s it — you’re ready to go.


Usage

Save an Instance

Enter a name for the instance and click the Save Instance button.
instanceName.png

 



 



 

Load an Instance

Click the Load Instance button to apply a previously saved map state.
instanceLoad.png

 

 

 

 

Rename an Instance

Click the Edit Instance Name button and enter a new name when prompted.
instanceRename.png

 

 

 

 

 
Download an Instance

Click Download Instance to export a .txt file containing that instance.
instanceDownload.png

You can also download all saved instances using the Download Instances button at the bottom right of the widget.

 

Clear Instance Graphics

Click Clear Instance Graphics to remove any graphics associated with the instance from the map.
instanceClearGraphics.png

 

 

 


I'd love to get instance-loaded graphics working with the Esri Draw Widget at some point. It’ll take a bit of setup, but if it’s something people are asking for, I’m happy to start looking into it — just let me know!

 

Delete an Instance

Click Delete Instance to permanently remove it from your saved list.
instanceDelete.png

 

 

 


Sharing Instances

To share a saved instance, simply send the .txt file to another user. They can import it using the Upload Instances button in the bottom-left corner of the widget.

In the future, I’d love to add support for cloud storage of instances — let me know if that’s something you’d use!

Bugs & Feature Requests

Have a bug to report or a feature idea?
Please open an issue on this GitHub repo or leave a comment on this post.

I’m also happy to hear requests for:

  • Migrating existing Web AppBuilder widgets to Experience Builder
  • Building new custom widgets for open-source release or for private use.

Stay tuned — more tools are coming soon!

9 Comments
JeffreyThompson2

Looks neat. For the record, this board isn't really the place to post this. The Ideas Boards are designed to request new features from the ESRI build team. We would love for you to come join us in the Custom Widgets Group, which is all about sharing custom widgets and helping each other build them.

JoelEdgar

Hi Sven,

This widget is very helpful! In testing with our own ExB apps we notice that it does not hold the last state value for for sub groups within the map layer list. For example, it will remember the external group is checked in this case Utilities, but when reloading the instance to the map it will not remember cell tower, gas pipelines, or easements are check and will revert to the apps default state for sub layers. Could the widget be modified to accommodate subgroups? 

JoelEdgar_0-1746208406646.png

 

SvenJensen

Hi @JoelEdgar ,

Thank you for checking out the widget I am glad you like it!

The Widget should be configure to save the state of sublayers within group layers. This widget was developed in Experience Builder Developer edition 1.17.0

Here is a video of the sublayers working on my localhost experience builder developer edition 1.17.0:



1. Are you running the widget in ArcGIS Enterprise? If so what version?
2. What version of Experience Builder are you using? (The Map Layers UI looks different then in mine)
    - I can download your version of ExB and test it again.
3. Are there any error logs if you open up the console (inspect element -> console)?

Feel free to send me an email through the form on my website anytime.
Thank you!


MarkHoyland2

This looks great. 
When you save an instance where does it get saved? Are the saved instance seen by other users?
Can 'Viewer' users use this to save an instance?

SvenJensen

Hi @MarkHoyland2,

Thanks for your question!

Currently, saved instances are stored in the user’s browser local storage. This means that instances are only accessible on the same device and browser where they were created. If a user clears their browser data, their saved instances will also be cleared.

Yes, users with the 'Viewer' role can use the widget to save, download, and share their own instances. Downloads are saved as .txt files, which can be shared and re-uploaded.

I'm also exploring the development of a hosted version of the Save Instance Widget. This would allow users to store instances in the cloud, making them accessible across devices and browsers. It would also support sharing via short links instead of file downloads. This version would be compatible with 'Viewer' users as well, since it would include its own sign-in system within the widget.

If a hosted version sounds useful to you, feel free to leave a comment or share your thoughts — I’d love to hear your feedback and ideas.

Thanks again for your interest and support!

— Sven




SvenJensen

Hi @JeffreyThompson2,

Thank you for the heads-up — I wasn’t aware of the Custom Widgets Group, but I’ve had a look and there are some great projects and discussions there! I’ll be sure to share all future custom widgets within that group moving forward.

Appreciate the guidance!

Cheers,
Sven

BrettMartin1

@SvenJensen this is super cool. We are at ArcGIS Enterprise 11.1 and I was able to get the custom widget added to EXB, but when I pointed it to the map I get this below. 

BrettMartin1_0-1746722603147.png

 

SvenJensen

@BrettMartin1, thanks for the feedback!

The Save Instance Widget was developed using Experience Builder Developer Edition v1.17.

If you're not planning to update your Enterprise environment in the near future, I’d be happy to work on a version compatible with ArcGIS Enterprise 11.1. Which uses Experience Builder Dev Edition v1.10 
according to the Esri release version guide.

Just let me know if that would be helpful!

Thanks again,
Sven

BrettMartin1

@SvenJensen , we are moving to 11.4 in the next few months. I will keep you posted. Thanks for your help!