[mapserver-users] Cascading Legend with selected Style

Berger, Cora cora.berger at bezreg-koeln.nrw.de
Thu Dec 3 23:44:26 PST 2015


Hello everybody,
I'm using a WMS as a layer with Mapserver 7. The source WMS is available in 3 different styles. I want my WMS to display the style called "SW", so I add  	 "wms_style"  "SW" 	to my layers METADATA, which works fine. 
If I try to add a legend to this layer I get problems. 

I tried this
  
"wms_style"              "SW"
  "wms_style__legendurl_href" "example-url"
  "wms_style__legendurl_width" "531"
  "wms_style__legendurl_height" "769"
  "wms_style__legendurl_format" "image/png" 
  "wms_feature_info_mime_type" "text/html"

And this

  "wms_style"              "SW"
  "wms_style_SW_legendurl_href" "example-url"
  "wms_style_SW_legendurl_width" "531"
  "wms_style_SW_legendurl_height" "769"
  "wms_style_SW_legendurl_format" "image/png" 
  "wms_feature_info_mime_type" "text/html"

Nothing works. The legend gets displayed, if I leave the "wms_style"-tag empty:

"wms_style"              ""
  "wms_style__legendurl_href" "example-url"
  "wms_style__legendurl_width" "531"
  "wms_style__legendurl_height" "769"
  "wms_style__legendurl_format" "image/png" 
  "wms_feature_info_mime_type" "text/html"

But now the mapimage gets displayed with the default-style, which is in color and not in black and white (SW), as I want it to be. 

The error-message for the 2 examples above is: msWMSLoadGetMapParams(): WMS server error. Style (SW) not defined on layer.


Any ideas?

Thanks!

                
Cora Berger
                           
- -
Bezirksregierung Köln
Dezernat 74 -  Geodatenzentrum / Geodateninfrastruktur
50606 Köln 
Internet: www.bezreg-koeln.nrw.de

Dienstgebäude: Muffendorfer Str. 19-21, 53177 Bonn
Telefon:   +49 (0) 221 - 147 - 4847
Telefax:   +49 (0) 228 - 180 - 33360 und (digital) 0221 - 147 - 4874
mailto: cora.berger at bezreg-koeln.nrw.de
Internet: www.geobasis.nrw.de 
eShop:  www.geoportal.nrw.de

Folgen Sie uns auf Twitter: https://twitter.com/BezRegKoeln





More information about the MapServer-users mailing list