<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.12">
<TITLE>WMS default STYLE handled in an odd manner</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P><FONT SIZE=2 FACE="Arial">Hi List,</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">I have experienced a problem with the handling of the STYLE parameter in WMS requests to MapServer.</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Default STYLE can be specified in several ways: </FONT>
<BR><FONT SIZE=2 FACE="Arial">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".</FONT></P>
<P><FONT SIZE=2 FACE="Arial">In my experience, the following examples all work fine on MapServer 6.0.1:</FONT>
<BR><FONT SIZE=2 FACE="Arial">"LAYERS=<layer1>,<layer2>,<layer3>&STYLES="<BR>
"LAYERS=<layer1>,<layer2>,<layer3>&STYLES=,," </FONT>
<BR><FONT SIZE=2 FACE="Arial">"LAYERS=<layer1>,<layer2>,<layer3>&STYLES=default,default,default" </FONT>
<BR><FONT SIZE=2 FACE="Arial">"LAYERS=<layer1>,<layer2>,<layer3>&STYLES=<some_style>,default,default" </FONT>
<BR><FONT SIZE=2 FACE="Arial">"LAYERS=<layer1>,<layer2>,<layer3>&STYLES=<some_style>,default," (this is the really interesting one...)</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">…but these do not, although I would expect them to:</FONT>
<BR><FONT SIZE=2 FACE="Arial">"LAYERS=<layer1>,<layer2>,<layer3>&STYLES=<some_style>,," </FONT>
<BR><FONT SIZE=2 FACE="Arial">"LAYERS=<layer1>,<layer2>,<layer3>&STYLES=<some_style>,,default" (in comparison with the last listed working example, this is also very interesting...)</FONT></P>
<P><FONT SIZE=2 FACE="Arial">The error message that I get:</FONT>
<BR><FONT COLOR="#000000" SIZE=2 FACE="Arial">"</FONT><FONT COLOR="#000000" SIZE=2 FACE="Arial">msWMSLoadGetMapParams(): WMS server error. Invalid style (</FONT><FONT COLOR="#000000" SIZE=2 FACE="Arial"><some_style></FONT><FONT COLOR="#000000" SIZE=2 FACE="Arial">,,). Mapserver is expecting an empty string for the STYLES : STYLES= or STYLES=,,, or using keyword default STYLES=default,default, …</FONT><FONT COLOR="#000000" SIZE=2 FACE="Arial">"</FONT></P>
<P><FONT COLOR="#000000" SIZE=2 FACE="Arial">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?</FONT></P>
<P><FONT COLOR="#000000" SIZE=2 FACE="Arial">Regards</FONT>
<BR><FONT COLOR="#000000" SIZE=2 FACE="Arial">Jonas Nielsen</FONT>
</P>
<BR>
</BODY>
</HTML>