[mapserver-users] Re: handling multiple styles for WMS layers
Jörg Thomsen
jt at mapmedia.de
Tue Apr 12 07:07:16 PDT 2011
hi,
as you only request one layer in getlegendgraphic, it should be only one
'style=red', not 'styleS=red' within the request.
Jörg
Am 12.04.2011 15:33, schrieb aznan:
> Sorry to resurrect an old thread. I'm trying to accomplish the same thing,
> but I can't get the styles URL parameter to "stick". I modified the OGC
> workshop slightly:
>
> LAYER
> NAME rivers
> GROUP "Vectors"
>
> CLASSGROUP "blue"
>
> PROJECTION
> "init=epsg:4326"
> END
>
> TYPE LINE
> STATUS ON
> DATA ../data/rivers
>
> # how will this data look?
> CLASS
> NAME "Rivers-blue"
> GROUP "blue"
> COLOR 0 0 255
> END
>
> CLASS
> NAME "Rivers-red"
> GROUP "red"
> COLOR 255 0 0
> END
> END
>
> When I do a GetLegendGraphic using the following URL I still get a blue
> river:
> http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/ms_ogc_workshop/service/config.map&version=1.1.1&service=WMS&request=GetLegendGraphic&layer=rivers&format=image/png&styles=red
>
> Likewise, if I set CLASSGROUP to "red" I only get the red river even though
> I specify "&styles=blue" in the URL.
> What gives? Thanks!
>
>
> Stephan Holl wrote:
>>
>> Hello Verena,
>>
>> Verena Diewald<verena.diewald at wheregroup.com>, [20100119 -
>> 14:27:49]
>>
>>> Hi list,
>>>
>>> I have one question concerning style handling in MapServer. Is it
>>> possible to define multiple layer styles for my WMS and request the
>>> single styles in the styles parameter in the GetMap request? And how
>>> are the single styles defined in the layer section of the mapfile?
>>
>> Have a look at GROUP[1] and CLASSGROUP[2].
>>
>> This should should give what you want.
>>
>> Best
>>
>> Stephan
>>
>> [1] http://mapserver.org/mapfile/class.html
>> [2] http://mapserver.org/mapfile/layer.html
>>
>
>
> --
> View this message in context: http://osgeo-org.1803224.n2.nabble.com/handling-multiple-styles-for-WMS-layers-tp4419989p6265124.html
> Sent from the Mapserver - User mailing list archive at Nabble.com.
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Aufwind durch Wissen!
Qualifizierte Open Source Schulungen bei der
http://www.foss-akademie.de/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_________________________________________________
MapMedia
Kartographie und raumbezogene Informationssysteme
Gillweg 3, 14193 Berlin
fon: +49 30 89 06 82-70
fax: +49 30 89 09 53-21
mail: jt at mapmedia.de
net: www.mapmedia.de
_________________________________________________
Geschäftsführer: G. v. Tschirnhaus, J. Thomsen, P. Stamm
Registergericht, Berlin - Amtsgericht Charlottenburg,
HRB 89625, Umsatzsteuer-Identnummer: DE 813794062
More information about the MapServer-users
mailing list