Hi all, I've got a custom web map that has a side table of the features available on the map. When the user hovers on one of the rows in the side table it highlights the related feature (or multiple) on the map. It's following the logic of https://developers.arcgis.com/javascript/latest/sample-code/highlight-point-features/index.html, just modified to fit my use case.
My question is there a more efficient way to remove all of the highlights every time than loop through and use highlight.remove(); ex is there a clear all highlights argument or something that I can pass into remove all highlights out of the layer.
Just looking for the cleanest way possible.
Thanks
Solved! Go to Solution.
Sean,
If multiple features are highlighted at the same time using some code like:
highlightSelect = layerView.highlight(
result.features
);
then
highlightSelect.remove();
will remove the highlight from all the features
Sean,
If multiple features are highlighted at the same time using some code like:
highlightSelect = layerView.highlight(
result.features
);
then
highlightSelect.remove();
will remove the highlight from all the features