I'm having an issue with popups in the new 4.0 API. Specifically, popups are showing up on a graphic layer that consists of multiple polylines created dynamically from the results of a query on a point feature layer. I don't define a popupTemplate on either the graphic or the graphic layer itself, yet a popup is still showing up on click. What am I doing wrong? Is there a way to force disable popups on a graphic layer in 4.0?
Solved! Go to Solution.
Finally figured it out after setting a thousand different popup disabled booleans in different places!
This line did it for me:
app.view.popupManager.enabled = false;
You have to use the popupManager to disable it apparently.
Hope this helps!
Luke Pint
Senior Software Engineer
DataCapable
Finally figured it out after setting a thousand different popup disabled booleans in different places!
This line did it for me:
app.view.popupManager.enabled = false;
You have to use the popupManager to disable it apparently.
Hope this helps!
Luke Pint
Senior Software Engineer
DataCapable
Thank you so much Luke. This one was driving me nuts!
You're welcome, Sam. It was driving me crazy too!
Based on what I see in the 4.0 documentation, popups should be able to be disabled via a few different popupEnabled options.
I'm wondering if this is a defect in the popup functionality of the new version.
The popupManager isn't available in any documentation or anything so I'm not sure it's the best option. Although it seems to be the only option. I haven't noticed any adverse effects yet doing it this way.
Luke Pint
Senior Software Engineer
DataCapable
I couldn't find anything either. Unfortunately disabling the popup manager disables the popups for all graphic layers. I simply wanted to disable it for one of them which wasn't supposed to have a popup.
However, by disabling all of the popups, I was able to create the popups through click events, which solved the problem completely. It definitely feels like a defect in the popup functionality, so hopefully Esri is aware.