Disable automatic layer reload on move / zoom? #93

tyrauber opened this Issue Aug 15, 2011 · 3 comments


None yet
2 participants

I am currently loading a lot of data into the map, doing some calculations and then rendering based on the results. The process takes a while to complete and once it's done I would like the user to be able to zoom in and out and move around the map, without the layers automatically reloading. It would give the user the ability to examine the data more thoroughly without having to wait each time while it recalculates the layers.

How do I disable this functionality so that the layers don't automatically reload on move or zoom?

Does a layer need to be reloaded on move or zoom? When a layer is loaded, the feature's latitude and longitude coordinates are converted to x,y pixel representations, which are then rendered on the map. When the user moves or zooms, the pixels change and therefore the layer has to be reloaded to accurately represent the position / placement of the feature. Is this understanding correct?

What about redrawing the feature based on Attributes stored on the feature element, as opposed to reloading from a url? By storing center lat/lng and boundary coordinates as element attributes, couldn't one recalculate and adjust feature position based on the attribute, as opposed to wholly reloading the object from url?

Thanks for your consideration. Any ideas, suggestions or pointers would be greatly appreciated.

kueda commented Sep 24, 2011

+1. I thought tile(false) would take care of this for layers that are't tiled, but that doesn't seem to be what I'm experiencing.

Thanks for confirming the issue. It's definitely a bit frustrating. If you have a non-tile layer loaded, and the user repeatedly moves or zooms, the browser ends up requesting the same file many times - (the number of zoom or move changes since the layer loaded). I have not figured out a solution to this yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment