[OpenLayers-Users] Delaying Layer Initialization

Arnd Wippermann arnd.wippermann at web.de
Sat May 26 04:28:39 EDT 2007


Hello Christopher,

I have the same problem (therefor I'm still using Openlayers 1.0).

The initialization of the map cause to load all servers, not only the
visible ones.

This is the part, where I add my layers to the map:

//set the visibility of the layer
OLLayers[i].setVisibility(mapObj.OL[i].Visibility);

//add the layer to the map
map.addLayer(OLLayers[i]);

OpenLayers should only load tiles for the baselayer from gis.ibbeck.de and
wms.jpl.nasa.gov for the world image. If you use firebug, you could see,
that the tiles for the other servers are also loaded.

After the first load of the map, pan and zoom loads only the tiles for the
visible servers.

http://gis.ibbeck.de/ginfo/ibbOLClient/OLC2.3%20RC1.html?MAPNR=10000&LAYERS=
11200,12700,11500,11500,10600,10700,10900,11000,10000&ZOOM=3&CENTER=10.1745,
50.819 

I'm using OpenLayers 2.3. 

It's the same with 2.4. I have localy tested with Version 2.4. I believe
Revision 3142 (after svn), but in the OpenLayers.js is defined:
OpenLayers.VERSION_NUMBER="$Revision: 2942 $". 

(If I load the newest version from
http://svn.openlayers.org/branches/openlayers/2.4/, Revision 3188 says the
html-page and my svn-program, the OpenLayers.VERSION_NUMBER is still
"$Revision: 2942 $". Miss I something or is this a bug).

Is it possible with the number of the revision also deliver a variable with
the plain text for the OpenLayers Version(example: 2.4 RC4).

Mit freundlichen Grüssen

Arnd Wippermann
http://gis.ibbeck.de/ginfo/



-----Ursprüngliche Nachricht-----
Von: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org] Im
Auftrag von Christopher Schmidt
Gesendet: Samstag, 26. Mai 2007 01:36
An: Jeremy Nix
Cc: users at openlayers.org
Betreff: Re: [OpenLayers-Users] Delaying Layer Initialization

On Fri, May 25, 2007 at 11:35:13AM -0400, Jeremy Nix wrote:
> Is there a way to delay a layer's initialization process? Here's the 
> situation that we're running into. We have around ten layers that we 
> want to make available, but the screen's initial loading time is 
> immense as these layers are mostly tile layers and some servers are 
> better than others at feeding up the images. We figure that in a given 
> view, the user is most likely only going to use a handful (2-3) of the 
> given layers. Maybe a property could be added to a layer to denote 
> whether to initialize before set to visible. Does anybody else find 
> that to be useful? Or have you found workarounds of your own to deal 
> with similar loading time issues?

Layers shouldn't be loading tiles if they're not visible. If they are, it's
a bug. Example HTML would help debug it. (Visibility is controlled via
setVisibility.) 

Regards,
--
Christopher Schmidt
MetaCarta
_______________________________________________
Users mailing list
Users at openlayers.org
http://openlayers.org/mailman/listinfo/users




More information about the Users mailing list