[OpenLayers-Users] Question on having multiple layers

Ali Khan akhan at unfpa.org
Wed Aug 8 15:12:03 EDT 2007


I'm planning to use the layers param, is there any way to switch the 
click event to go to a specific url for a specific layer doing this though?

Eric Lemoine wrote:
> Hi Ali,
>
> On 8/8/07, Ali Khan <akhan at unfpa.org> wrote:
>   
>> Hey, presently we're developing a system that will have MANY layers
>> we're talking 20-50.
>>
>> I know in OpenLayers you need to setup a name etc for each layer. I was
>> thinking using a loop to output each layer (the basic data ie layer name
>> etc is stored in a backend database). Still when somoene opens up the
>> navigation tab though it can become quite long.
>>     
>
> Don't use one OpenLayers layer per server layer, it'll result in a
> performance disaster! Group your layers into as few OpenLayer layers
> as possible. For example, if you use WMS, group your layers using
> OpenLayers.Layer.WMS's 'layers' param, and switch from one layer to
> another using the mergeNewParams() method.
>
> Hope this helps...
>
> --
> Eric
>   




More information about the Users mailing list