AnsweredAssumed Answered

Identifying an existing Basemap, to avoid needless replacing.

Question asked by on Jan 9, 2019
Latest reply on Jan 10, 2019 by


I am writing an app that can load different sets of user-preferences, and that can programatically change the basemap.

I have a function who's job it is to detect the changes needed for the map, and this is called whenever a user changes their layers, basemap, or when user-preferences are loaded.  (the point i'm making is that there's no 'user has changed the basemap' event from the basemap widget when my alternate user-preferences are loaded).


I'm trying to detect that the basemap is not the same as the one in the preferences, and only change the basemap attribute when a difference is detected.


I'm storing a basemap.toJSON() in my user-preferences.

What can I use in that, to correlate to a basemap (that was created from basemap.fromJSON() ) ??