[mapserver-users] using sld on the server
Jeff McKenna
jmckenna at gatewaygeomatics.com
Sat Jun 27 08:25:39 PDT 2015
On 2015-06-27 7:57 AM, Jachym Cepicky wrote:
> Hi all,
>
> is there possibility to style layer using SLD file configured in
> MapScript? Idea would be, instead of using CLASS for configuration, you
> would just pass the SLD and things would magically happen (just like it
> works in GeoServer).
>
> Generating MapFiles from QGIS would than be next logical step ..
>
> I assume, I've missed something and there must be solution for this
> lying around for couple of years, but did not find anything
>
Hi Jachym,
Maybe you are looking for the applySLD function? I know it exists for
PHPMapScript on the LAYER object (see
http://www.mapserver.org/mapscript/php/phpmapscript.html#layerobj).
Regarding QGIS, I believe the existing export tool uses Python MapScript
and SLDs (https://plugins.qgis.org/plugins/rt_mapserver_exporter/), so I
believe that tool uses that same function (guessing, as I'm not the
tool's developer). But I suppose you could check the source
(https://github.com/faunalia/rt_mapserver_exporter).
-jeff
--
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/
More information about the MapServer-users
mailing list