Android Question Archiver problem

GiovanniPolese

Well-Known Member
Licensed User
Longtime User
Hi to Everybody
I have a problem writing KMZ files with Images.
Premise: KMZ are simply KML zipped files. When you have additional data, like images at placemarks position, you need to have a folder containing those images, one per each placemark. Then the KML file contains the links to the various images but, while the KML contains only the links, the KMZ contains also the images, inside their folders. If you want to make a KMZ file, you must respect these rules:
1) The name of the KML file must be doc.kml
2) You must include the folders containing the images.
3) all the above must be at Root level, in the KMZ file.
Therefore, I generate a temporary folder "Temp", with inside the necessary stuff, that is the Doc.kml, the folders for each placemark, and inside these latter, the images.
doc.kml
/folder1/image1-1.jpg
/folder1/image1-2.jpg
......
/folderN/imageN-1.jpg
etc.
This should be the Root of the KMZ file. Therefore I need to Zip this folder "Temp".
If I use ZipFolder, I obtain a KMZ file which is structurally correct, but the KMZ file has a root named "Temp", like the temporary folder. The content of "Temp" is what should be the Root, in other words. In this case i obtain a KMZ file like:
/Temp/doc.kml
/Temp/folder1/image1-1.jpg
/Temp/folder1/image1-2.jpg
etc.
This is not correct for GoogleEarth.
Alternatively, I also tried to use ZipFiles, with the names of the image files contain their folder (i.e. the file name is "/Folder1/Image1-1.jpg"). In this case the Archiver creates a KMZ with everything in the Root, loosing the subfolders. In othe words I obtain at Root level:
doc.kml
image1-1.jpg
..
etc.
Resuming : I should need to Zip the entire folder "Temp" omitting its name
I don't see a solution and I hope to miss something.
Thanks in advance for any hint.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…