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

Alexandre Dube adube at mapgears.com
Fri Jun 26 11:28:08 EDT 2009


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




More information about the Users mailing list