Select to view content in your preferred language

How to remove the highlight geometry after close the popup

529
4
09-26-2022 05:34 AM
happygis
New Contributor II
I have a popuptemplate defined on a featurelayer, I Click a feature,then display the popup with a highlighted feature, I close the popup by code "view.popup.close()",But,the highlight selected feature remaind in map,how to remove the highlighted feature?
0 Kudos
4 Replies
BlakeTerhune
MVP Regular Contributor
0 Kudos
happygis
New Contributor II

I didn't highlight any feature,so highlight must be null. the highlight is automatically by popup's behavior.

0 Kudos
JeffreyWilkerson
Occasional Contributor III

Not sure why the highlight problem is occuring if your code didn't set it, but the highlight is attached to the layerview, maybe if after you close the popup you set the view.layerview.highlight.remove()?

0 Kudos
ReneRubalcava
Frequent Contributor II

If you have a sample repro in codepen or github, would be helpful to track down the issue.

This sample works as expected when the popup closes via view.popup.close()

https://codepen.io/odoe/pen/LYmOwvY?editors=100

0 Kudos