[OpenLayers-Users] multiple layers... best performance?
Alexandre Dube
adube at mapgears.com
Fri May 8 08:44:49 EDT 2009
Hi,
It's faster to get one big getMap request than 10 small ones. I'm no
GeoServer user, but I'm pretty sure you can set minscale/maxscale values
to your server-side layers to display your layers only when necessary.
That would be a gain of performance.
Regards,
Alexandre
pere roca ristol wrote:
> hi all,
> on my webapp I have distributed legends where you can switch on/off
> different layers. All of these layers refer to the same GeoServer.
> As far as I know, I can design my webapp in two ways:
> 1) Just an Openlayers layer and I add/remove layers from layers
> parameter when user switch on/off a layer
>
> layer = new OpenLayers.Layer( "OpenLayers
> WMS","http://myGeoServer/wms",{layers: layer1,layer2...}
>
> 2) create "on-the-fly" a new OpenLayers.Layer with a function when
> user selects a still not visible layer:
> var add_lay=function(layerName,lay)
> {
> var new_lay="edit_"+layerName+" =new
> OpenLayers.Layer.WMS( 'my WMS','http://myGeoserver'
> <http://myGeoserver%27>,{layers:'topp:"+lay+"'} );";
> eval(new_lay);
> eval("map.addLayer(edit_"+layerName+")");
> }
>
> The problem of the first is that each time a layer is switched on/off
> or zoom in/out, a big GetMap request (what about 10 layers?) must be
> done and takes more time than usual.
> The problem of the second one is that the more layer we add on the top
> of an openlayer application, the more the application slow down.
>
> In terms of performance, which is the best option?
>
> thanks!
> Pere Roca
>
> --
> Pere Roca Ristol
> Biòleg i especialista GIS
> Museo Nacional de Ciencias Naturales (CSIC)
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
--
Alexandre Dubé
Mapgears
www.mapgears.com
More information about the Users
mailing list