How to clear popup user storage

12-06-2019 02:58 PM
Occasional Contributor

I have a custom popup for when a map is not available in ArcGIS. Each time the map is loaded in this situation, the popup opens. The popup is closed on"visible", function (newVal). As part of the customization, I am removing the popup pointer class since there is nothing to point at. I handle this by adding a class "map-not-found-popup" and look for it in the watched event.

The trouble I am having is that each time the popup opens, a new user storage is added. How do I stop or clear it?

"visible"function (newVal) {
            var nomap = $('.map-not-found-popup');
            if(newVal) {    // open
              // remove popup pointer if map not found
              if(nomap && nomap.length>0) {
              // other handling
            } else {    // closed
              // remove popup from dom when closed
              if(nomap && nomap.length>0) {
              // reset popup properties
          }); // end

0 Kudos
0 Replies