Aug 31, 2018 · 1 min read
Hey David, thanks for sending the video. I ran it past one of our developers, and here’s what she had to say:
The tpl-ready fires in Map Series after the first section’s main stage loads. If that’s a map, the story-loaded-map event for it will have already fired by the time tpl-ready fires.
Two potential solutions:
1. Put the custom code outside the tpl-ready block
2. Keep the code inside tpl-ready, but first check to see if the map ID exists in app.maps before adding a listener for story-loaded-map. That would look something like this:
if (app.maps && app.maps[WEBMAP_ID] && app.maps[WEBMAP_ID].response && app.maps[WEBMAP_ID].response.map && app.maps[WEBMAP_ID].response.map.loaded) {
// custom code here
}I hope this helps. Let me know if it works. If you have any questions, just holler, and I’ll do my best to answer—or at least point you toward someone who can!
