Modifying the the Find Task in ESRI-Leaflet?

المشرف العام

Administrator
طاقم الإدارة
I'm trying to figure out how to modify the Find Task in ESRI-leaflet so that when the user types in a new text for search, the old selection is cleared.

Currently, when you "find" one feature (For example, search for any state name here: http://esri.github.io/esri-leaflet/examples/finding-features.html), the only way to clear the highlighting is reload the entire page. If you perform another search, the second selection is added to the first, instead of replacing the first.

I have examined the documentation here: http://esri.github.io/esri-leaflet/api-reference/tasks/find.html, but can't find any indication of how to clear highlighting. I'm also pretty new to Javascript and Leaflet, and I'm wondering if there is some Leaflet methods I should be incorporating here. Thanks in advance.



أكثر...
 
أعلى