[OpenLayers-Users] Performance question, or any tricks toconsolidate WMS requests?

Cicconetti, Bob BCicconetti at dnr.state.md.us
Fri Apr 13 12:31:08 EDT 2007


> -----Original Message-----
> From: Schuyler Erle [mailto:sderle at metacarta.com]
> Sent: Friday, April 13, 2007 12:10 PM
> To: Cicconetti, Bob
> 
> On Fri, 2007-04-13 at 11:21 -0400, Cicconetti, Bob wrote:
> 
> > Is there a simple way to get Mapserver to do the compositing, short
of
> > a bunch of combination/permutation layers that I would turn on and
off
> > on demand? Perhaps extend LayerSwitcher to turn on and off WMS
layers?
> > Or am I better off using WFS as much as possible?
> >
> > I was also thinking that if the overlay were done at the WMS server,
> > much of my printing trouble will go away.
> 
> I assume that you are doing something like:
> 
>   var layer1 = new OpenLayers.Layer.WMS( "Foo", url, {layers: "foo"});
>   var layer2 = new OpenLayers.Layer.WMS( "Bar", url, {layers: "bar"});

Right.

> If so you can in fact combine them on the server side by merging the
> declarations on the client side:
> 
>   var layer = new OpenLayers.Layer.WMS(
>                   "Foo+Bar", url, {layers: "foo,bar"});

I've done this, and it works fairly well, but as I have at least nine
layers that need to be individually switchable, building a set of
combination layers that includes all possible combinations would be a
pain. :)

> This assumes, of course, that they are on the same server. If the
layers
> are on different servers, you can configure MapServer to proxy one of
> them and still combine them this way, but that's outside the scope of
> this list, I think.

Looks like I'll look into extending LayerSwitcher, then. I'll have to
talk to HR about the copyright form before I generate any patches,
though.

R C



More information about the Users mailing list