[mapserver-users] Postgis layer and SLD
Francesco D'Alesio
francesco.dalesio at r3-gis.com
Mon Jan 16 23:37:28 PST 2012
Hi Darren,
I think wms_style and wms_style_<stylename>_sld works only when
cascading external WMS (CONNECTIONTYPE WMS).
You can use SLDs with postgis layers using mapscript applySLD()
Francesco
Il 16/01/2012 18:10, Carman, Darren ha scritto:
>
> Hi,
>
> I am using mapserver 5.6.7 trying to get SLDs to work for a postgis layer.
>
> I can get this to work when adding the SLD parameter onto the url but
> cannot get it to work using the wms_sld_url parameter in the mapfile.
> Should it be possible to have this working from the mapfile? I have
> also tried the wms_style and wms_style_<stylename>_sld metadata
> parameters with no luck as well.
>
> The reason I ask is that we have many layers stored in
> postgresql/postgis with different SLDs for each. I am hoping I have
> done something wrong in the mapfile (or missing something vital) so
> that I can set up the layers to use individual SLDs -- the alternative
> is for me to combine the SLDs into 1 xml file, which is work I would
> like to avoid if the mapfile solution is possible.
>
> Thanks for any help in advance
>
> My layer config:
>
> LAYER
>
> NAME layer1
>
> CONNECTIONTYPE postgis
>
> CONNECTION "user=<user> password=<password> dbname=<database>
> host=<host>"
>
> DATA "geometry from <table> using unique geometry using SRID=27700"
>
> PROJECTION
>
> "init=epsg:27700"
>
> END
>
> DUMP true
>
> METADATA
>
> "wms_title" "Layer 1"
>
> "wms_srs" "EPSG:27700"
>
> "wms_server_version" "1.3.0"
>
> "wms_name" "sldname"
>
> "wms_boundingbox" "EPSG:27700 0 0 700000 1300000"
>
> "wms_latlonboundingbox" "-7.556 49.776 2.934 60.810"
>
> "wfs_extent" "0 0 700000 1300000"
>
> "wms_sld_url" "http://<my server>/SLDs/MySLD.sld"
>
> END
>
> TYPE POINT
>
> STATUS ON
>
> CLASS
>
> NAME "POI"
>
> COLOR 0 0 255
>
> symbol 'circle'
>
> size 10
>
> END
>
> END
>
> Regards,
>
> Darren
>
>
>
> _______________________________________________
> 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/20120117/de462302/attachment.htm>
More information about the MapServer-users
mailing list