[mapserver-users] WMS default STYLE handled in an odd manner
Nielsen, Jonas Lund
jolni at KMS.dk
Tue Nov 22 07:51:06 PST 2011
Hi List,
I have experienced a problem with the handling of the STYLE parameter in
WMS requests to MapServer.
Default STYLE can be specified in several ways:
Either you can specify nothing, or "empty commas" which should be
expanded to "default" for all layers. Or you can explicitly declare
"default". It seems MapServer has a problem when you want this automatic
expansion to "default", when at the same time you are asking for another
STYLE different from "default".
In my experience, the following examples all work fine on MapServer
6.0.1:
"LAYERS=<layer1>,<layer2>,<layer3>&STYLES="
"LAYERS=<layer1>,<layer2>,<layer3>&STYLES=,,"
"LAYERS=<layer1>,<layer2>,<layer3>&STYLES=default,default,default"
"LAYERS=<layer1>,<layer2>,<layer3>&STYLES=<some_style>,default,default"
"LAYERS=<layer1>,<layer2>,<layer3>&STYLES=<some_style>,default," (this
is the really interesting one...)
...but these do not, although I would expect them to:
"LAYERS=<layer1>,<layer2>,<layer3>&STYLES=<some_style>,,"
"LAYERS=<layer1>,<layer2>,<layer3>&STYLES=<some_style>,,default" (in
comparison with the last listed working example, this is also very
interesting...)
The error message that I get:
"msWMSLoadGetMapParams(): WMS server error. Invalid style
(<some_style>,,). Mapserver is expecting an empty string for the STYLES
: STYLES= or STYLES=,,, or using keyword default
STYLES=default,default, ..."
So it seems that you cannot declare a style different from "default" for
one layer and at the same time expect MapServer to automatically expand
empty commas for the rest?
Regards
Jonas Nielsen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20111122/20686788/attachment.htm>
More information about the MapServer-users
mailing list