[mapserver-users] cascading WMS

Jeff McKenna jmckenna at gatewaygeomatics.com
Thu Aug 7 04:52:02 PDT 2014


On 2014-08-06 11:30 AM, Stefan Carl wrote:
> Dear list,
> I try to build a cascading WMS, which uses layers from a remote WMS.
> This was easy to build in a mapfile by specify a Layer in the Layer section.
> The remote WMS has over 400 layers and many goup layers in a layer tree.
> My Question is: Is it possible to build a cascading WMS which loads all
> Layers of a remote WMS (the complete Layer tree) without specify the
> layers one by one.
> Thank you for your help
> Best Regards
> Stefan
>
>
>

If the remote WMS service is run by MapServer, you can actually call the 
mapfile MAP object's NAME parameter, and MapServer will send a map image 
containing all of its layers.

For example:

- WMS Service: http://demo.mapserver.org/cgi-bin/wms?

- has a MAP object with a NAME of "WMS_server"

- in the GetCapabilities response, this is shown as the first <LAYER>, 
and in its <NAME> parameter

- so in the GetMap request, you can request all the layers with just 
"&LAYERS=WMS_server"

A handy trick.

-jeff

-- 
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/






More information about the mapserver-users mailing list