Select to view content in your preferred language

LayerView feature highlight is not disappering from view

82
0
Monday
IlliasAndgeron
New Contributor

Hi, esri community!

I’m experiencing an issue with removing highlights from features. After selecting and highlighting a feature (or multiple features) using the Popup or SketchViewModel in one area of the map, I pan to a different location where the previously highlighted feature is no longer visible. When I highlight a new feature and call highlightHandle.remove() on its highlight, the highlight does not disappear immediately — it only disappears after I zoom or pan the map again which is invoking rerender.

However, if I select and highlight a feature in an area where the previously highlighted feature is currently visible, the highlight is removed without any issues.

I’m not sure if this is expected behavior or a rendering bug.

Oh, and its also happens with Popup highlight. After closing it - highlight stays visible.

I have 7 feature layers, custom highlight options and store remove handlers in separate service.

[
    { name: "feature-selected", color: "green" },
    { name: "feature-highlighted", color: "orange" },
    { name: "default", color: "cyan" },
]
const layerView = await mapView.whenLayerView(mapLayer);
const highlightHandle = layerView.highlight(objectId, { name: "feature-highlighted" });

 

0 Kudos
0 Replies