[OpenLayers-Users] How to add an overlay to the map, but not select it by default

Arnd Wippermann arnd.wippermann at web.de
Fri Jun 26 17:40:48 EDT 2009


Hi,

I use an own layer control to change the layers parameter for OL WMS and WFS
layers. It's a handy way to limit the layers on load and nevertheless have
access to the other layers of the wms/wfs.

I'm thinking of a similar way to change the visibility of features by
attribut.

http://gis.ibbeck.de/ginfo/apps/OL27Client/OL27ClientGis.asp?WMC=./data/WMC/
!WorldC.wmc.xml
http://gis.ibbeck.de/ginfo/apps/OL27Client/OL27ClientGis.asp?WMC=./data/WMC/
!LayerNRW.wmc.xml

Arnd 

-----Ursprüngliche Nachricht-----
Von: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org] Im
Auftrag von Alexandre Dube
Gesendet: Freitag, 26. Juni 2009 17:28
An: Adrian Popa
Cc: users at openlayers.org
Betreff: Re: [OpenLayers-Users] How to add an overlay to the map, but not
select it by default

Hi,

Adrian Popa wrote:
> Thanks for the tips,
>
> I'm using mapserver because I managed to migrate my setup from an 
> existing mapserver installation (using a different frontend), and I 
> didn't have the time to dig into enabling (and troubleshooting WMS).
> When the time comes, all Mapserver objects will become WMS.
>
> I am already using the server side layer separation/generation trick 
> to include yahoo/google/openstreetmaps. This reduces page load time 
> significantly (because it doesn't have to load all the support js). My 
> question is: is this true also for overlay layers which are not 
> enabled - meaning would I get a moderate/significant boost in load 
> time if I don't add the overlays on page load, but on some user action?
>
> Thanks,
> Adrian
>
>

In my opinion, having all layers added in the beginning but not visibles VS
adding them as the user wants them should not make that much of a difference
in performance.  How many overlays do you have ?  Are they all from the same
mapfile ?  If not, you could even have one mapfile that would only have WMS
layers that connects to your other mapfiles or simply include them and then
have only one overlay for all your 'server-side' layers.

That brings me a question for the list : in MapFish/GeoExt, there's a way to
select 'server-side' layers in their LayerTree widgets.  That way, you only
have one OpenLayer.Layer but many nodes/checkboxes in the tree to
select/unselect 'server-side' layers.  Is there something like that in
OpenLayers ?  Did someone already do it ?

-- 
Alexandre Dubé
Mapgears
www.mapgears.com

_______________________________________________
Users mailing list
Users at openlayers.org
http://openlayers.org/mailman/listinfo/users




More information about the Users mailing list