[mapserver-users] Error configuring WMS app : Projection library error. Invalid argument...
stela anders
stelaanders at gmail.com
Wed Jan 6 07:39:23 PST 2010
Thanks Jeff!
Could you show me how combine my 2 layers?
Stella
2010/1/6 Jeff McKenna <jmckenna at gatewaygeomatics.com>
> stela anders wrote:
>
>> Guys, other problem now ;(
>> 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:
>>
>> msWMSLoadGetMapParams(): /WMS server error/. /Invalid layer/(s) given in
>> the /LAYERS/ parameter
>>
>> Both layer works separately...
>>
>> My 2 layers
>>
>> LAYER
>> NAME Road
>> METADATA
>> "wms_title" "Road" END
>> GROUP "Transport"
>> TYPE LINE
>> STATUS ON
>> INCLUDE "Connection.map"
>> DATA ...
>> PROJECTION
>> "+init=epsg:4326"
>> END
>> CLASS
>> TEMPLATE "dummy" NAME "Rod x"
>> STYLE
>> SYMBOL "road"
>> COLOR 0 0 0
>> ANTIALIAS TRUE
>> END
>> END END
>> LAYER
>> NAME Road
>> METADATA
>> "wms_title" "Road" END
>> GROUP "Transport"
>> TYPE ANNOTATION
>> STATUS ON
>> INCLUDE "Connection.map"
>> DATA ...
>> PROJECTION
>> "+init=epsg:4326"
>> END
>> LABELITEM 'rod'
>> CLASS
>> TEMPLATE "dummy"
>> STYLE
>> SYMBOL 'roadsymbol'
>> END
>> LABEL
>> TYPE TRUETYPE
>> FONT Arial
>> SIZE 7
>> COLOR 70 70 70
>> MINDISTANCE 100
>> MINFEATURESIZE 10
>> PARTIALS FALSE
>> BUFFER 10
>> END
>> END END
>>
>>
>> Why?
>>
>
> Hello Stella,
>
> 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.
>
> To avoid this you could:
>
> - use different names in your mapfile
> - combine your 2 layers into one layer
> - 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:
>
> LAYER
> NAME "Road"
> GROUP "Transport"
> METADATA
> "wms_title" "Road"
> "wms_group_title" "groupname"
> END
> ...
> END
>
>
>
> http://localhost/cgi-bin-last/mapserv.exe?MAP=C:/inetpub/wwwroot/Openlayer/Mapserver/Mapfile/Map.map&LAYERS=Transport&.............
> ..
>
> -jeff
>
>
> --
> Jeff McKenna
> FOSS4G Consulting and Training Services
> http://www.gatewaygeomatics.com/
>
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20100106/3fad1553/attachment.htm>
More information about the MapServer-users
mailing list