Esri / storymap-series

The Story Map Series lets you present a series of maps via tabs, numbered bullets, or a side accordion.
Apache License 2.0
63 stars 59 forks source link

How to find the actual webmap ID in the Story Map Series #41

Open blazeon3 opened 6 years ago

blazeon3 commented 6 years ago

Hi,

I need to find the ID of the current web map that is displayed in the app. I need to save the ID in the new variable and work with it. I need an application that changes the legend according to what the web map ID is.

Thanks for the anwers

ecmanghi commented 5 years ago

You can get at the ID in a couple different ways. You can look directly at global app variable (app.data.getStoryEntries() will return a list of the contents and you can find the ID via the media property). You can also listen to topic.subscribe("story-loaded-map"). This will fire each time a map is loaded and the returned result holds the webmap ID. The developer guide lays out some other options as well.