Skip to content
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

Fix bugs with feature layer setWhere #1211

Merged
merged 2 commits into from
Jul 9, 2020
Merged

Fix bugs with feature layer setWhere #1211

merged 2 commits into from
Jul 9, 2020

Conversation

patrickarlt
Copy link
Contributor

@patrickarlt patrickarlt commented Jul 8, 2020

This PR fixes the following issues with FeatureLayer.setWhere()

#1196 is happening because the internal layer cache was not cleared when setWhere() was called. #875 was caused by race conditions in calling setWhere in quick succession. Given that we cannot cancel requests we now simply ignore then if the where in the request doesn't match the current where of the layer.

This means that callback to setWhere won't be run if they get interrupted by another setWhere() which I think is better behavior.

Adding @gavinr and @jwasilgeo for review.

Copy link
Contributor

@gavinr gavinr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once that's changed to var, I tested it on the Examples in the Docs and it looks good!

@gavinr gavinr merged commit 1fc6192 into master Jul 9, 2020
@gavinr
Copy link
Contributor

gavinr commented Aug 6, 2020

This was released in v2.5.0.

@gavinr gavinr deleted the fix-875-1196 branch September 24, 2021 13:08
jgravois pushed a commit to jgravois/esri-leaflet that referenced this pull request Apr 23, 2022
Fix bugs with feature layer setWhere
jgravois pushed a commit to jgravois/esri-leaflet that referenced this pull request Apr 23, 2022
Fix bugs with feature layer setWhere
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

L.esri.FeatureLayer where clause is not always persisting setWhere callback is not called
2 participants