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
I'm using L.esri.dynamicMapLayers and when the map is panned or zoomed quickly, the map flashes as it loads each frame. Just wondering if its possible to cancel pending map service requests when the map is panned or zoomed while the layer is loading, so that this doesn't occur.
To reproduce, just zoom and pan around rapidly. It loads each frame quickly, but on a slower server, the frames take much longer to load and the map may continue loading for several seconds after the user stops panning.
The text was updated successfully, but these errors were encountered:
There is some odd flashing. The behavior right now loads all images at 0% opacity and then turns the opacity up to the correct amount if its the right images to show. I feel like the conditional on https://github.com/Esri/esri-leaflet/blob/master/src/Layers/RasterLayer.js#L155 should read newImage._bounds.equals(bounds) && newImage._bounds.equals(map.getBounds) which would make only images that fill the current view of the map show up.
Canceling the requests will be difficult since they aren't real requests by default just <img> tags which can't be canceled but you can also enable JSON requests (for proxying and auth) which in some cases CAN be canceled.
That said I want to revist canceling requests for some other parts of the API. I've tried before but it cased to many problems with the tests.
@roemhildtg I got it working with the above fix. If the map is panned and zoomed rapidly each intermediary frame is not shown only the final frame that fills the current view of the map.
I'm using L.esri.dynamicMapLayers and when the map is panned or zoomed quickly, the map flashes as it loads each frame. Just wondering if its possible to cancel pending map service requests when the map is panned or zoomed while the layer is loading, so that this doesn't occur.
Its difficult to reproduce on the samples, probably because the esri services are much faster, but here is the dynamic example: http://esri.github.io/esri-leaflet/examples/simple-dynamic-map-layer.html
To reproduce, just zoom and pan around rapidly. It loads each frame quickly, but on a slower server, the frames take much longer to load and the map may continue loading for several seconds after the user stops panning.
The text was updated successfully, but these errors were encountered: