<div dir="ltr">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 <a href="https://mapserver.org/output/kml_output.html">https://mapserver.org/output/kml_output.html</a>) and you can also use templates to generate KML and define styles as part of the templates themselves.<div><br></div><div>--Steve</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Dec 3, 2020 at 7:30 AM Martin Høgh <<a href="mailto:mh@mapcentia.com">mh@mapcentia.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I've setup KML/KMZ output for WFS with these definitions:<br>
<br>
         OUTPUTFORMAT<br>
             NAME kml<br>
             DRIVER "OGR/KML"<br>
             MIMETYPE "application/vnd.google-earth.kml+xml"<br>
             IMAGEMODE FEATURE<br>
             EXTENSION "kml"<br>
             FORMATOPTION "FORM=simple"<br>
             FORMATOPTION 'FILENAME=gmap75.kml'<br>
             FORMATOPTION "maxfeaturestodraw=1000"<br>
         END<br>
<br>
         OUTPUTFORMAT<br>
             NAME kmz<br>
             DRIVER "OGR/LIBKML"<br>
             MIMETYPE "application/vnd.google-earth.kmz"<br>
             IMAGEMODE FEATURE<br>
             EXTENSION "kmz"<br>
             FORMATOPTION "FORM=simple"<br>
             FORMATOPTION 'FILENAME=gmap75.kmz'<br>
             FORMATOPTION "maxfeaturestodraw=1000"<br>
         END<br>
<br>
It works fine.<br>
<br>
When serving KML polygons they all have a red outline and no fill:<br>
<br>
<Style><LineStyle><color>ff0000ff</color></LineStyle><PolyStyle><fill>0</fill></PolyStyle></Style><br>
<br>
Is it supposed to use the classes in the MapFile? Or is there another <br>
way to style KML output?<br>
<br>
Best regards,<br>
<br>
Martin Høgh<br>
<br>
<br>
_______________________________________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
</blockquote></div>