Thanks Jeff!<br>
Could you show me how combine my 2 layers?<br><br>Stella<br><br><div class="gmail_quote">2010/1/6 Jeff McKenna <span dir="ltr"><<a href="mailto:jmckenna@gatewaygeomatics.com">jmckenna@gatewaygeomatics.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">stela anders wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Guys, other problem now ;(<br>
I have 2 layers with same name ... One with LINE and other with ANNOTATION ... It works fine in mapscript environment... But now, with WMS I got a error when I use both layers with same name:<br>
<br>
msWMSLoadGetMapParams(): /WMS server error/. /Invalid layer/(s) given in the /LAYERS/ parameter<br>
<br>
Both layer works separately...<br>
<br>
My 2 layers<br>
<br>
LAYER<br>
NAME Road<br>
METADATA<br>
"wms_title" "Road" END<br>
GROUP "Transport"<br>
TYPE LINE<br>
STATUS ON<br>
INCLUDE "Connection.map"<br>
DATA ...<br>
PROJECTION<br>
"+init=epsg:4326"<br>
END<br>
CLASS<br>
TEMPLATE "dummy" NAME "Rod x"<br>
STYLE<br>
SYMBOL "road"<br>
COLOR 0 0 0<br>
ANTIALIAS TRUE<br>
END<br>
END END<br>
LAYER<br>
NAME Road<br>
METADATA<br>
"wms_title" "Road" END<br>
GROUP "Transport"<br>
TYPE ANNOTATION<br>
STATUS ON<br>
INCLUDE "Connection.map"<br>
DATA ...<br>
PROJECTION<br>
"+init=epsg:4326"<br>
END<br>
LABELITEM 'rod'<br>
CLASS<br>
TEMPLATE "dummy"<br>
STYLE<br>
SYMBOL 'roadsymbol'<br>
END<br>
LABEL<br>
TYPE TRUETYPE<br>
FONT Arial<br>
SIZE 7<br>
COLOR 70 70 70<br>
MINDISTANCE 100<br>
MINFEATURESIZE 10<br>
PARTIALS FALSE<br>
BUFFER 10<br>
END<br>
END END<br>
<br>
<br>
Why?<br>
</blockquote>
<br></div></div>
Hello Stella,<br>
<br>
Check your GetCapabilities response of your WMS service - your 2 layers of the same name were probably renamed by MapServer with unique names (such as "Road_01" and "Road_02"), so you should request the layers with those names.<br>
<br>
To avoid this you could:<br>
<br>
- use different names in your mapfile<br>
- combine your 2 layers into one layer<br>
- since you already have the layers in a group, add a group metadata tag in the layers, and then use the group name in your WMS LAYERS request (but first verify names through a GetCapabilities request), such as:<br>
<br>
LAYER<br>
NAME "Road"<br>
GROUP "Transport"<br>
METADATA<br>
"wms_title" "Road"<br>
"wms_group_title" "groupname"<br>
END<br>
...<br>
END<br>
<br>
<br>
<a href="http://localhost/cgi-bin-last/mapserv.exe?MAP=C:/inetpub/wwwroot/Openlayer/Mapserver/Mapfile/Map.map&LAYERS=Transport&............." target="_blank">http://localhost/cgi-bin-last/mapserv.exe?MAP=C:/inetpub/wwwroot/Openlayer/Mapserver/Mapfile/Map.map&LAYERS=Transport&.............</a>..<br>
<br>
-jeff<br><font color="#888888">
<br>
<br>
-- <br>
Jeff McKenna<br>
FOSS4G Consulting and Training Services<br>
<a href="http://www.gatewaygeomatics.com/" target="_blank">http://www.gatewaygeomatics.com/</a></font><div><div></div><div class="h5"><br>
<br>
<br>
_______________________________________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
</div></div></blockquote></div><br>