[OpenLayers-Dev] order of loading layers

Tim Schaub tschaub at opengeo.org
Tue Mar 29 14:54:01 EDT 2011


On 3/25/11 4:02 AM, Slawomir Messner wrote:
> Hi,
> I know you're about to finish 2.11 but I have an other question. Could
> OL load layers top-down? In the map class it would change only one line
> in the moveTo:
> for (var i=0, len=this.layers.length; i<len; i++) {
> to
> for (var i=this.layers.length-1;i>=0;i--) {

This sounds very reasonable.  It's hard to know if it affects anything 
else without seeing a patch and running some tests.

http://trac.osgeo.org/openlayers/wiki/HowToContribute

If you are able, please create a ticket at least (if you haven't already).

Tim

> Why this request?
> Our users have often "many" (up to 8 ) WMS layers and since the abortion
> of loading layers works well it would be a better user experience if top
> layer is ready first. I know requests are parallel and for-loop order is
> not necessarily the order of finishing loading, but approximately. The
> top layer is likely the one which is visible. So the advantage is when
> the user zooms he can navigate earlier and on presentations the
> application seems to be faster(I know it's a trick but it's javascript
> it's all a trick).
> A second aspect is that the new code is shorter and you save the
> functionally unnecessary len variable.
> Regards,
> Slawomir
>
> _______________________________________________
> Dev mailing list
> Dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-dev


-- 
Tim Schaub
OpenGeo - http://opengeo.org
Expert service straight from the developers.


More information about the Dev mailing list