-
Notifications
You must be signed in to change notification settings - Fork 796
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FeatureLayer 'load' is sometimes called before individual features are available #545
Comments
Fixed in 1e336d3 |
just did a quick check and the |
@jgravois can you give me a reproduction of this issue? Its working properly in http://esri.github.io/esri-leaflet/examples/spatial-queries.html |
good news. i can't reproduce the error anymore. |
nevermind. if i add this feature service to debug/sample.html on var fl = L.esri.featureLayer('http://services.arcgis.com/uCXeTVveQzP4IIcx/arcgis/rest/services/VaquitaProtection/FeatureServer/0').addTo(map);
fl.on('load', function(){
console.log('please fire');
}); |
Fixed this. Should be in the next release. |
confirmed. awesome! |
i had an expectation that it would always be safe to write something like below before realizing that the 'load' event can be fired before we've stepped into createLayers()
it'd be pretty trivial to emit an entirely new event (Iike the JSAPI's 'update') in the second location i mentioned and it seems essential that we have a dependable hook for developers to do X with the features that are retrieved but i'm curious whether anyone else has any better ideas
my use case was writing a blog to show how to zoom to the extent of a collection which doesn't support calling bounds() on page load.
The text was updated successfully, but these errors were encountered: