[mapserver-users] SLD with Mapserver 5.4.2

Michael Schulz mschulz at webgis.de
Thu Jul 30 15:27:28 EDT 2009


Hi Andrea,

to use SLD you won't need very special mapfile configuration. You
should pay attention to setting the imgpath parameter of the web
section correctly, i.e. accessible and writable by mapserver-cgi,
since the sld's are stored there temporarily while/after downloading
them from the specified URL. I am not aware of any other special
configuration, but very helpful are the debugging outputs, that you
can enable with the keyword DEBUG "on" at map or layer level. I find
it most convenient to specify an errorfile path via CONFIG
"MS_ERRORFILE" "/ms4w/tmp/ms_error.txt" at map level.

Be sure to set the SLD's NamedLayer Name tag value exactly the same as
your mapfile's layer name you want to style.

Cheers, Michael


2009/7/30 Andrea Dessì <nkjoep at gmail.com>:
> Hi,
>
> i've started using Mapserver few days ago and i cannot apply SLD styles.
>
> i'm using  MapServer version 5.4.2
> OUTPUT=GIF OUTPUT=PNG
> OUTPUT=JPEG OUTPUT=WBMP
> OUTPUT=SVG
> SUPPORTS=PROJ
> SUPPORTS=AGG
> SUPPORTS=FREETYPE
> SUPPORTS=ICONV
> SUPPORTS=WMS_SERVER
> SUPPORTS=WMS_CLIENT
> SUPPORTS=WFS_SERVER
> SUPPORTS=WFS_CLIENT
> SUPPORTS=WCS_SERVER
> SUPPORTS=FASTCGI
> SUPPORTS=THREADS
> SUPPORTS=GEOS
> INPUT=EPPL7
> INPUT=POSTGIS
> INPUT=OGR
> INPUT=GDAL
> INPUT=SHAPEFILE
>
> under Ubuntu 9.04.
>
> I want to user mapserver as WMS Server and the apply SLD styles on the
> fly... the common query is:
> http://localhost/cgi-bin/wms?SERVICE=WMS&
> VERSION=1.1.1&
> REQUEST=GetMap&
> BBOX=-74.012362,40.752314,-73.948216,40.791051&
> SRS=EPSG:4326&
> WIDTH=500&
> HEIGHT=500&
> LAYERS=myground,myroads&
> FORMAT=image/gif&
> TRANSPARENT=TRUE&
> SLD=http://localhost/mysld.xml
>
> But sld is not applying.
>
> The question is: there are specific parameters for using SLD in mapfile?
> I'm feeling a bit confused about this.
>
> Thank You,
> --
> Andrea
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>



-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Aufwind durch Wissen!

Qualifizierte Open Source Schulungen bei der
http://www.foss-akademie.de/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-----------------------------------------------------------
Michael Schulz
mschulz at webgis.de

in medias res
Gesellschaft für Informationstechnologie mbH

+++ Bitte beachten Sie unsere neue Adresse und Durchwahl +++

Schwimmbadstraße 2
D-79100  Freiburg i. Br.

Tel:  +49 (0)761 705798-102
Tel:  +49 (0)761 705798-0
Fax: +49 (0)761 705798-09

+++ Bitte beachten Sie unsere neue Adresse und Durchwahl +++

http://www.webgis.de / http://www.zopecms.de
--------------------------------------------------------------
Geschäftsführer: Stefan Giese, Dr. Christof Lindenbeck
Eingetragen im Handelsregister HRB 5930 beim Amtsgericht Freiburg


More information about the mapserver-users mailing list