Of course you can use any KML/KMZ offline. But if it links some images (icons and pictures), those won't be available offline if they haven't been cached before -- i.e. if you watched them all before. With version 22.214.171.124 of Locus, menion features to import KMZ files including images -- and those KMZ files I am refering to here. With a few steps, you can include the images with the KMZ, and import that file into Locus:Remark first:
In my example here I use the name "files
" for the folder containing our images, as this is the name used by Google Earth
KMZ export, and also used in Googles KMZ Tutorial
. As it turned out later in this thread, it is a good idea to use a different name. Feel free to do so -- the folder name just must not end with .kmz
, no other restrictions appear in either the tutorial or the reference (or I must have missed them).
- Create an empty directory
- If your original file is a KML, just copy it into this directory and name it doc.kml. If it is a KMZ, unpack it into this directory (it is a ZIP file).
- If the directory does not contain a sub-directory named files, create it. Here we place all images
- With your favorite editor, open the doc.kml and search for all the images. Download/copy them to the files directory
- replace all links to those images you have in the files directory to point to files/<imagename>
- ZIP the resulting directory and make sure the resulting file has the extension .kmz
That's all. But I will explain steps 4 and 5 a bit closer:Step 4: Where to check for the images?
They are in two places: One is the icons in the styles, and the others are the <IMG>
tags in the description. The former are enclosed with a <href>
tag.Step 5: Renaming examples
This should read <href>files/hiker.png</href>
Image-example: <img src="http://www.example.com/images/foo.jpg">
As currently there is no cleanup mechanism in Locus, it is a good idea to include the KMZ name in all those image names. So if your resulting KMZ will be greece.kmz
, you should have stored this image as greece_foo.jpg
in the files
folder, and thus this image tag should now read <img src="files/greece_foo.jpg">
-- so if you later wonder what are all those images belong to, you have an easier guess on which ones you may remove.
So far, this is a general explanation. If you have complex descriptions in the KML file, you may need to reformat them as well. This won't be necessary for plain flowing text, but probably will be the case for multi-column tables. Those are fine with a large monitor, but will cause a lot of scrolling on a phone display...