-
Notifications
You must be signed in to change notification settings - Fork 798
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
L.esri.featureLayer's maxZoom/minZoom #1399
Comments
Thanks for logging this @shawnmgoulet. I am seeing the issue in your example Codepen, but I created a simple sample with the USA Cities service, and I cannot get the issue to happen here: https://jsbin.com/gimaxag/1/edit?html,output I'll do some more research to try to see what specifically is causing this issue. |
I have validated that this issue happens even without the image symbol or the popups. Here's the simplest replication case I can find: https://jsbin.com/wotodul/1/edit?html,output
This seems to happen with feature services with lots of points, and does not happen on feature services with few points. Because of this, my current hypothesis is that if you zoom out so Esri Leaflet tries to hide the layer as they layer is still loading, sometimes the layer will not get hidden properly. Services with lots of data take longer to load so it's easier to get into this situation in situations with lots of data. I need to jump into the code to try to validate this. |
If I remove this code: esri-leaflet/src/Layers/FeatureLayer/FeatureManager.js Lines 531 to 537 in e827880
... the issue does not happen. I am not saying this is the solution to the bug since removing that code probably causes issues with other things, but it's a good data point on the root cause. |
Describe the bug
In this sample, a
maxZoom
andminZoom
are set on aL.esri.featureLayer
. The issue is that, after the initial zoom into and out of themaxZoom
/minZoom
range, theL.icon
s do not disappear and remain on the map.Reproduction
A repro Codepen is available here: https://codepen.io/shawnmgoulet/pen/xbKNwrM.
esri-leaflet
via CDNL.esri.featureLayer
using a point feature service, withmaxZoom
andminZoom
properties and apointToLayer
function that returns anL.marker
using aL.icon
to represent point features.maxZoom
andminZoom
zoom levels, back out of the range, then back into the range and back out again. At this point, you will seeL.icon
s still visible on the map.Logs
System Info
Leaflet version: 1.9.4 | Esri Leaflet version: 3.0.13
Additional Information
No response
The text was updated successfully, but these errors were encountered: