<div dir="ltr">Sorry I should have said at first that I already checked that. I have both KML and LIBKML drivers listed.<div><br></div><div>And KML output works if I remove the LABEL entry from my mapfile...</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le jeu. 15 oct. 2020 à 09:52, Jeff McKenna <<a href="mailto:jmckenna@gatewaygeomatics.com">jmckenna@gatewaygeomatics.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Bruno,<br>
<br>
Next test is to test that your local GDAL was built with KML support:<br>
<br>
   ogrinfo --formats<br>
<br>
(you should see a 'LIBKML' or 'KML' driver listed there, either one can <br>
be used for this)<br>
<br>
-jeff<br>
<br>
<br>
<br>
-- <br>
Jeff McKenna<br>
MapServer Consulting and Training Services<br>
co-founder of FOSS4G<br>
<a href="http://gatewaygeo.com/" rel="noreferrer" target="_blank">http://gatewaygeo.com/</a><br>
<br>
<br>
On 2020-10-15 10:48 a.m., Bruno Domenget wrote:<br>
> Hi Jeff,<br>
> <br>
> Thanks for your quick answer !<br>
> <br>
> So I tried with shp2img but got the same error with KML output...<br>
> *msDrawMap(): Image handling error. Failed to draw layer named 'points'. <br>
> <br><br>
> GDAL: In GDALDestroy - unloading GDAL shared library.*<br>
> <br>
> Logfile :<br>
> [Thu Oct 15 15:36:02 2020].174254 msLoadMap(): 0.005s<br>
> [Thu Oct 15 15:36:02 2020].174344 msDrawMap(): rendering using <br>
> outputformat named kml (KML).<br>
> [Thu Oct 15 15:36:02 2020].174348 msDrawMap(): WMS/WFS set-up and query, <br>
> 0.000s<br>
> [Thu Oct 15 15:36:02 2020].174369 msINLINELayerOpen: Layer is already open!<br>
> [Thu Oct 15 15:36:02 2020].174564 <br>
> msSaveImage(/home/mapserver/public_html/test/././5f885042_26ab_0.png) <br>
> total time: 0.000s<br>
> [Thu Oct 15 15:36:02 2020].174629 msDrawMap(): Image handling error. <br>
> Failed to draw layer named 'points'.<br>
> [Thu Oct 15 15:36:02 2020].174649 msFreeMap(): freeing map at <br>
> 0x559913f1af60.<br>
> [Thu Oct 15 15:36:02 2020].174698 freeLayer(): freeing layer at <br>
> 0x559914207ad0.<br>
> <br>
> It works perfectly with PNG output, and with KML output if I remove the <br>
> LABEL lines from my mapfile.<br>
> <br>
> So it is not a Mapscript issue, there is definitely an issue with my <br>
> Mapserver instance...<br>
> <br>
> Bruno<br>
> <br>
> <br>
> <br>
> Le jeu. 15 oct. 2020 à 08:42, Jeff McKenna <br>
> <<a href="mailto:jmckenna@gatewaygeomatics.com" target="_blank">jmckenna@gatewaygeomatics.com</a> <mailto:<a href="mailto:jmckenna@gatewaygeomatics.com" target="_blank">jmckenna@gatewaygeomatics.com</a>>> a <br>
> écrit :<br>
> <br>
>     oops here is the correct command for kml output:<br>
> <br>
>         shp2img -m mymap.map -o ttt.kml -i kml -all_debug 5<br>
> <br>
>     (does that generate a valid KML file?)<br>
> <br>
> <br>
>     -jeff<br>
> <br>
> <br>
> <br>
>     -- <br>
>     Jeff McKenna<br>
>     MapServer Consulting and Training Services<br>
>     co-founder of FOSS4G<br>
>     <a href="http://gatewaygeo.com/" rel="noreferrer" target="_blank">http://gatewaygeo.com/</a><br>
> <br>
> <br>
>     On 2020-10-15 9:41 a.m., Jeff McKenna wrote:<br>
>      > Hi Bruno,<br>
>      ><br>
>      > What happens if you call that mapfile at the commandline with<br>
>     shp2img<br>
>      > (and pass the "i" switch with your format name)?  such as:<br>
>      ><br>
>      >    shp2img -m mymap.map -o ttt.png -i kml -all_debug 5<br>
>      ><br>
>      > You can also then try png output:<br>
>      ><br>
>      >    shp2img -m mymap.map -o ttt.png -i png -all_debug 5<br>
>      ><br>
>      > Does it generate a valid map image?<br>
>      ><br>
>      ><br>
>      ><br>
>      ><br>
>      > -jeff<br>
>      ><br>
>      ><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> <mailto:<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>
> <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>
> <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></blockquote></div>