Issue: "Zoom-to" button on Popup hung after switch to a different feature layer
I am working on a lightweight map viewer prototype which is configurable through a XML file. The map viewer uses HTML multi-level Select to switch between different feature layers. The XML file includes feature layer information, URLs, as well as popup contents. The main goal is to allow non-GIS web designers to embed this map viewer on their webpages.
Anyway, most functions seem to work on the prototype. There is one big issue - "Zoom-to" button on Popup hung after I switch to a different feature layer.
The code is on CodePen (https://codepen.io/ohiochuang/pen/OJMEWXr).
Here is how to reproduce the problem.
My guess is the viewer get confused about the map extents of the second feature layer. I'm not really sure what to do. Any suggestion will be greatly appreciated. Thank you.
Luke
Solved! Go to Solution.
Figured out what was the problem - every time I changed the feature layer, a new map is created. That was the issue. "Zoom to" on the popup window is working now. I got some hints from a Rice Kinder dashboard page. Thanks.
Figured out what was the problem - every time I changed the feature layer, a new map is created. That was the issue. "Zoom to" on the popup window is working now. I got some hints from a Rice Kinder dashboard page. Thanks.