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

Add check for layer visibility when cellEnter is called. #924

Merged
merged 3 commits into from
Feb 18, 2017

Conversation

keithpower
Copy link
Contributor

If you have a layer that is visible at say zoom 16 - 20 and then zoom out to 15 the layer will not be visible (as expected). If you then pan out of the current virtual grid bounds and then pan back to your original position the layer becomes visible even though you are still at zoom 15.

This is fixed by checking for visibleZoom within cellEnter so features are only added to the map if in a visible zoom.

@jgravois
Copy link
Contributor

jgravois commented Feb 9, 2017

very cool!

it looks like either the email or username in your local git config doesn't match what you're using for your github account. its not crucial, but if you want to take the time to clean it up the commit in the PR will be associated correctly.

screenshot 2017-02-09 11 18 12

https://help.github.com/articles/setting-your-email-in-git/

@keithpower
Copy link
Contributor Author

Ok, thanks. I figured I was bound to mess something up. I think I fixed it. Let me know if it looks good on your end.

@jgravois
Copy link
Contributor

Let me know if it looks good on your end.

i'm just making sure the avatar in the thread matches the avatar for the commit. looks great!

as for the code fix, i'm in the middle of something at the moment, but i'll be able to review more fully (and hopefully write a few tests) soon. thanks for the contribution!

@keithpower
Copy link
Contributor Author

Great, thanks.

@jgravois
Copy link
Contributor

thanks again for the contribution!

@jgravois jgravois merged commit 6e0b8f0 into Esri:master Feb 18, 2017
jgravois added a commit to jgravois/esri-leaflet that referenced this pull request Feb 18, 2017
* upstream/master:
  dont check for _map, nullify the variable
  dont query outside FeatureLayer visible scale (Esri#928)
  Add check for layer visibility when cellEnter is called. (Esri#924)
  not sure i'll ever stop doing that
  make sure 1 means more simplified
  bindPopup should simplify output geometry slightly this patch applies a simplification factor of 0.5 to output geometries in bindPopup using the current scale of the map to ensure that no more vertices than necessary are retrieved from the server.
jgravois pushed a commit to jgravois/esri-leaflet that referenced this pull request Apr 23, 2022
* Add check for layer visibility when cellEnter is called.

* Add check for layer visibility when cellEnter is called.
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.

2 participants