Stop a hitTest on layer removal

05-20-2021 05:59 AM
New Contributor II

Is there a way to turn off a hit test when a layer is removed from a view?

Example: I have a parcel layer that parcels get highlighted on pointer-move event, but when I remove the layer the hitTest continues to run and I receive the connection closed error. So I am assuming that the hitTest is still running and the error is telling me there is no layer to hitTest.

0 Kudos
1 Reply
Esri Regular Contributor

Hard to tell what is going on from the description alone; do you have a very simple CodePen showing the issue?  Hopefully being able to experience the issue will allow the community to suggest solutions or workarounds.

0 Kudos