[mapserver-users] Postgis layer and SLD
Carman, Darren
darren.carman at infoterra-global.com
Mon Jan 16 09:10:15 PST 2012
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20120116/92f6c105/attachment.htm>
More information about the MapServer-users
mailing list