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">&lt;<a href="mailto:jmckenna@gatewaygeomatics.com">jmckenna@gatewaygeomatics.com</a>&gt;</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>
            &quot;wms_title&quot;    &quot;Road&quot;          END<br>
        GROUP &quot;Transport&quot;<br>
        TYPE LINE<br>
        STATUS ON<br>
        INCLUDE &quot;Connection.map&quot;<br>
        DATA ...<br>
        PROJECTION<br>
            &quot;+init=epsg:4326&quot;<br>
        END<br>
        CLASS<br>
            TEMPLATE &quot;dummy&quot;                       NAME &quot;Rod x&quot;<br>
            STYLE<br>
                SYMBOL &quot;road&quot;<br>
                COLOR 0 0 0<br>
                ANTIALIAS TRUE<br>
            END<br>
        END           END<br>
       LAYER<br>
        NAME Road<br>
        METADATA<br>
            &quot;wms_title&quot;    &quot;Road&quot;          END<br>
        GROUP &quot;Transport&quot;<br>
        TYPE ANNOTATION<br>
        STATUS ON<br>
        INCLUDE &quot;Connection.map&quot;<br>
        DATA ...<br>
        PROJECTION<br>
            &quot;+init=epsg:4326&quot;<br>
        END<br>
        LABELITEM &#39;rod&#39;<br>
        CLASS<br>
            TEMPLATE &quot;dummy&quot;<br>
            STYLE<br>
                SYMBOL &#39;roadsymbol&#39;<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 &quot;Road_01&quot; and &quot;Road_02&quot;), 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 &quot;Road&quot;<br>
  GROUP &quot;Transport&quot;<br>
  METADATA<br>
    &quot;wms_title&quot; &quot;Road&quot;<br>
    &quot;wms_group_title&quot; &quot;groupname&quot;<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&amp;LAYERS=Transport&amp;............." target="_blank">http://localhost/cgi-bin-last/mapserv.exe?MAP=C:/inetpub/wwwroot/Openlayer/Mapserver/Mapfile/Map.map&amp;LAYERS=Transport&amp;.............</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>