In my app:
I can't figure out the correct code to show the popup. I've tried the advice from https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryFea... and https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#querying but I don't think I'm making the correct function.
Any advice? Thank you.
Solved! Go to Solution.
Hi @DavinShokes1 -
You could try passing in the graphic that is added to the feature layer to the features property in the MapView's openPopup() method after the query/external API call completes. Here's a simple example showing how to use that property: https://codepen.io/laurenb14/pen/ZEPNpXG?editors=1000
You'll have to make sure the MapView popupEnabled property is set to false to manually open the popup as well.
Hope this helps!
Hi @DavinShokes1 -
You could try passing in the graphic that is added to the feature layer to the features property in the MapView's openPopup() method after the query/external API call completes. Here's a simple example showing how to use that property: https://codepen.io/laurenb14/pen/ZEPNpXG?editors=1000
You'll have to make sure the MapView popupEnabled property is set to false to manually open the popup as well.
Hope this helps!
Thanks, that got me on the right path and my misunderstanding of the popupTemplate.