PopupExtended
PopupExtended copied to clipboard
How to best toggle all popups for a layer
I don't want to use the extendedPopup for the entire map, just one layer that I created a PopupTemplate for which has the extended:{} property added in the constructor. I'd like to toggle all of the popups for a layer. I am currently looping through the featureLayer.graphics, and to display them, I use:
extendedPopup.setFeatures([graphic]);
extendedPopup.show(graphic.geometry);
and then to hide: extendedPopup.hide(graphic);
Is there a better way to do this? When I close one of the popups when using this approach, and then click the feature again, its dragged position is reset and it isn't draggable anymore. I'm guessing that is just the normal popup that is shown. Maybe I need to have an event handler for the graphic click to call extendedPopup.setFeatures and show methods again?
Ok no worries, I'm not sure I've tried mixing popup implementations before. Are you to post a demo in plunkr or some other sandpit site that demonstrates the problem?