[Mapserver-users] WMS style elements and SLD

Yewondwossen Assefa assefa at dmsolutions.ca
Thu Apr 15 15:44:18 EDT 2004


The NamedStyle is not supported in mapserver currently. (Only User 
defined styles are supported) It refers to a possiblity to draw a layer 
using a predfined name. For example the same road data can be drawn 
using a style called "theamtic" for tourist maps or "Regular" for 
another type of maps. In mapserver world, It would mean having one(or 
several) classes defining the thematic style, and one (or several) 
classes for the Regular style. The styles would me butally exclusive. 
The user can then selects through the sld which style to use for drawing 
tha layer. This does not yet exists in Mapserver.

  Using wms_sld_url should be enough for using the sld with a server. 
You can also refer to 
http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?SLDMapServer for more infos.

Later,

Rene Teniere wrote:

> Assefa,
> 
> Thanks, It's all so confusing. I have seen so many variations on how to
> do this, and am especially wondering what the NamedStyle refers to. Does
> it use the style element in the mapfile, or does it have to be created?
> In the OGC SLD reference it shows the NamedLayer, and NamedStyle, but I
> do not know where the NamedStyle comes from or how it is created. If I
> use wms_sld_url, do I still have to use wms_style or wms_stylelist? As
> you can see I have a lot of questions and I'm sorry for the volume as I
> know SLD is new to MapServer.
> 
> Rene
> 
> 
>>>>Yewondwossen Assefa <assefa at dmsolutions.ca> 2004-04-15 2:21:52 PM
>>>>
> 
> 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,
> 


-- 
----------------------------------------------------------------
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