You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this got me, i had expected eachFeature to be _currentSnapshot. My quick fix was to expose a method called getCurrentSnapshot that just returned this._currentSnaphot and then i filtered the eachFeature results within my app code. this might expose the internals more then you'd want. so probably best to introduce a new eachActiveFeature() method, i don't like the idea of breaking someones code by changing eachFeature.
or should we leave that method alone and add
eachActiveFeature()
?more info:
patrickarlt [Feb 13]
@jgravois @reames Looks like
eachFeature
is looping over each layer in the_layer
cache which will be all layers. https://github.com/Esri/esri-leaflet/blob/master/src/Layers/FeatureLayer/FeatureLayer.js#L246-L251GitHub
Esri/esri-leaflet
esri-leaflet - A lightweight set of tools for working with ArcGIS services in Leaflet.
jgravois [Feb 13]
i see then. so if the where filter is added later...
jgravois [Feb 13]
might be worth adding a programmatic option to clear the local cache
patrickarlt [Feb 13]
@jgravois the other option would be to have an "each active layer" that used
this._currentSnapshot
patrickarlt [Feb 13]
eachFeature
is "do this for every feature the layer knows about ever."patrickarlt [Feb 13]
might be easier to make a new method that is "do this for every feature that is currently shown on the map"
jgravois [Feb 13]
i know its bad to break things, but i bet everyone expects eachFeature to be
_currentSnapshot
jgravois [Feb 13]
i wonder if itd be better to map it that way and add a new
eachFeatureEver()
The text was updated successfully, but these errors were encountered: