[OpenLayers-Dev] order of loading layers
Slawomir Messner
slawomir.messner at staff.uni-marburg.de
Fri Mar 25 06:02:05 EDT 2011
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--) {
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
More information about the Dev
mailing list