How to save and read feature layer(s) from localstorage?

478
2
Jump to solution
09-21-2020 06:46 AM
MichaelLev
Occasional Contributor III

I'm using Web AppBuilder (Developer Edition) version 2.17 upon ESRI Javascript API 4.16

When the user is adding feature layers from zipped shapefiles into his 3D scene map,

I need to save them automatically into localstorage in order that when the user reenters the browser in a 2nd session,

they will be read and inserted into the map automatically.

I'm trying to use localstorage correctly by pure javascript (not by dojo libs) but I'm not succeeding. I assume there is a more correct way to do this.

I'll appreciate explanation/code_example how to do it.

Michael

0 Kudos
1 Solution

Accepted Solutions
MichaelLev
Occasional Contributor III

I found a way to do it...

So, if you have something "out of your sleeve" without investing significant time, I'd like to know in order to learn if there are other ways than mine, otherwise, your time is precious also for helping othe rpeople.

With appreciation for the many times you helped me,

Michael

View solution in original post

0 Kudos
2 Replies
MichaelLev
Occasional Contributor III

I found a way to do it...

So, if you have something "out of your sleeve" without investing significant time, I'd like to know in order to learn if there are other ways than mine, otherwise, your time is precious also for helping othe rpeople.

With appreciation for the many times you helped me,

Michael

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Michael,

  Glad you figured it out. This is not something I would have had a suggestion for this time.