Skip to main content
I am using the KML writer to save output as KMZ by specifying Destination KML Dataset as "myoutput.kmz". This works, but I have an icon referenced in the KML output in the Icon->href tag as:

 

images/D2.png

 

 

How can I add the images/D2.png folder and file to the output KMZ?

 

 

Thanks
Do you have the parameter copy icons to destination dataset on the kml writer set to Yes?
Do you have the parameter copy icons to destination dataset on the kml writer set to Yes?

Yes, I do have that parameter set, but it doesn't copy them to the KMZ dataset.


That's odd. It works for me. So, if you have the file extension set to .kml then it writes a folder called images containing D2.png? But if you simply change the extension to .kmz then it writes the kmz archive and inside that there is no images folder? Is that right? Is it writing any data at all?


Yes, it creates the shelters.KMZ file but without the images folder. The images folder is in the same folder as shelters.kmz, that is outputs\\kml\\shelters.kmz. When I set the icon in the KMLStyler I use "images/D2.png" as shown.

 

I am assuming that the Icon Name setting is relative to where the KMZ file is, not to where the FMW file is. The FMW folder is in a folder above the outputs folder.

 

 

The other thing that I notice is that when I unzip the KMZ, the KML file within is called "doc.kml" not shelters.kml.
Okay, I figured this one out. On our FME 2009 machine someone added a folder named "images" to the <FME Install Folder>\\icons folder. The KML Styler always said, "images/D2" and the KML writer found D2.png in that images folder.

 

 

However, when I installed FME 2015 on a new machine I was not aware of this and expected the images folder to be in the same folder as the KML or KMZ output. However, the KML writer was looking for that images folder in the icons folder.

 

 

When I added that images folder to the icons folder, it wrote the images folder and D2.png to the KMZ.

Reply