[Mapserver-users] WMS style elements and SLD

Yewondwossen Assefa assefa at dmsolutions.ca
Thu Apr 15 10:21:52 PDT 2004


Rene,

  You should use  the wms_sld_url metadata. So in your case you would 
have "wms_sld_url" "http://10.2.185.9/wms/basewms_sld.xml".
  Note also that there is the wms_sld_body metedata that can be set to 
the actual contect of the sld document.

Best Regards,

Rene Teniere wrote:

> Hi all,
> 
> I am curious about the proper usage of wms_stylelist and the NamedStyle
> in SLD. Is this the proper reference? The docs are a little unclear.
> 
> Rene
> 
> basewms_sld.xml file:
> 
> <StyledLayerDescriptor version="1.0.0">
>   <NamedLayer>
>     <Name>Roads</Name>
>     <NamedStyle>
>       <Name>HighwayStyle</Name>
>     </NamedStyle>
>   </NamedLayer>
> </StyledLayerDescriptor>
> 
> Map file:
> 
>  LAYER
>     NAME "Roads"
>     STATUS OFF
>     TYPE LINE
>     TILEINDEX "coindex/coindex"
>     TILEITEM "lonetlin"
>     GROUP "Base Data"
>     CLASSITEM "fcode"
>     METADATA
>       "wms_title"            "Roads"
>       "wms_srs"              "EPSG:2038"
>       "wms_group_title"      "Base Data"
>       "wms_stylelist"       
> "HighwayStyle,TrunkStyle,SecondaryStyle,TracksStyle,RailroadStyle"
>       "wms_HighwayStyle_sld" "http://10.2.185.9/wms/basewms_sld.xml"
>     END 
>     CLASS
>       NAME "100 Series Highway"
>       EXPRESSION "210"
>       STYLE
>         NAME "HighwayStyle"
>         COLOR 255 00 00
>         SYMBOL 2
>         SIZE 2
>         MINSIZE 1
>         MAXSIZE 100
>       END
>     END
>     CLASS
>       NAME "Trunk Roads"
>       EXPRESSION "211"
>       STYLE
>         NAME "TrunkStyle"
>         SYMBOL 2
>         COLOR 145 85 0
>         SIZE 1
>         MINSIZE 1
>         MAXSIZE 100
>       END
>     END
>     CLASS
>       NAME "Secondary Roads"
>       EXPRESSION "212"
>       STYLE
>         NAME "SecondaryStyle"
>         SYMBOL 2
>         COLOR 0 0 0
>         SIZE 1
>         MINSIZE 1
>         MAXSIZE 100
>       END
>     END
>     CLASS
>       NAME "Tracks and Trails"
>       EXPRESSION "213"
>       STYLE
>         NAME "TracksStyle"
>         SYMBOL 5
>         COLOR 0 0 0
>         SIZE 1
>         MINSIZE 1
>         MAXSIZE 100
>       END
>     END
>     CLASS
>       NAME "Railroad"
>       EXPRESSION "220"
>       STYLE
>         NAME "RailroadStyle"
>         COLOR 180 0 0
>         SYMBOL 4
>         SIZE 1
>         MINSIZE 1
>         MAXSIZE 100
>       END
>     END
>   END
> 
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> 


-- 
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst

Email: assefa at dmsolutions.ca
http://www.dmsolutions.ca/

Phone: (613) 565-5056 (ext 14)
Fax:   (613) 565-0925
----------------------------------------------------------------





More information about the MapServer-users mailing list