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

Schuyler Erle sderle at metacarta.com
Fri Apr 13 12:09:30 EDT 2007

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"});

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"});

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.


More information about the Users mailing list