Select to view content in your preferred language

Runtime Feature Layers Not Detected by fetchPopupFeatures() in 5.1

33
0
3 hours ago
JeffreyThompson2
MVP Frequent Contributor

I have been trying to build an application that can work even if the Enterprise Portal goes down. Because of this limitation, layers must be added at runtime. I cannot depend on a Webmap.

I have not been able to find a non-deprecated way to get a Popup, Feature, or Features Component to detect a Feature or Map Image Layer that has been loaded at runtime. I've tried the new fetchPopupFeatures() function, the standard Popup and even directly calling hitTest(). 

I have created a sample in CodePen. The sample has both a standard Popup enabled and a Features Component. The data that is pre-loaded in the Webmap is detected by both. I has added a layer of bigfoot sighting, symbolized by orange balls. This layer is not being found by either.

https://codepen.io/editor/jeffrey-thompson/pen/019fd25d-36cf-71a1-95fa-388574bc8f31

I was able get my application working by using the deprecated fetchFeatures() function. These lines are commented out in my CodePen, but do not appear to work in the sample either.

 

GIS Developer
City of Arlington, Texas
0 Kudos
0 Replies