[mapserver-users] Styling KML output
Steve Lime
sdlime at gmail.com
Mon Dec 7 10:27:02 PST 2020
So you're using the OGR driver. I wouldn't expect that to leverage
MapServer class/styles at all - more of a data dump. There is a separate
KML driver (see https://mapserver.org/output/kml_output.html) and you can
also use templates to generate KML and define styles as part of the
templates themselves.
--Steve
On Thu, Dec 3, 2020 at 7:30 AM Martin Høgh <mh at mapcentia.com> wrote:
> I've setup KML/KMZ output for WFS with these definitions:
>
> OUTPUTFORMAT
> NAME kml
> DRIVER "OGR/KML"
> MIMETYPE "application/vnd.google-earth.kml+xml"
> IMAGEMODE FEATURE
> EXTENSION "kml"
> FORMATOPTION "FORM=simple"
> FORMATOPTION 'FILENAME=gmap75.kml'
> FORMATOPTION "maxfeaturestodraw=1000"
> END
>
> OUTPUTFORMAT
> NAME kmz
> DRIVER "OGR/LIBKML"
> MIMETYPE "application/vnd.google-earth.kmz"
> IMAGEMODE FEATURE
> EXTENSION "kmz"
> FORMATOPTION "FORM=simple"
> FORMATOPTION 'FILENAME=gmap75.kmz'
> FORMATOPTION "maxfeaturestodraw=1000"
> END
>
> It works fine.
>
> When serving KML polygons they all have a red outline and no fill:
>
>
> <Style><LineStyle><color>ff0000ff</color></LineStyle><PolyStyle><fill>0</fill></PolyStyle></Style>
>
> Is it supposed to use the classes in the MapFile? Or is there another
> way to style KML output?
>
> Best regards,
>
> Martin Høgh
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20201207/5a3f5db4/attachment.htm>
More information about the MapServer-users
mailing list