User Tools

Site Tools


manual:advanced:data_tools:kml_conversion_offline

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

manual:advanced:data_tools:kml_conversion_offline [2015/05/15 07:00] – created mstupkamanual:advanced:data_tools:kml_conversion_offline [2015/09/02 17:48] (current) mstupka
Line 1: Line 1:
-====== Convert an existing KML/KMZ for offline use ======+====== Conversion of a KML/KMZ file for offline use ======
  
 ---- ----
-<WRAP todo round center 60%>This page is obsolete and will be reworked soon</WRAP>+
 ===== Basic information ===== ===== Basic information =====
  
 **Author:** Ferretty **Author:** Ferretty
- 
-**Locus version (min):**  
- 
-**Created:** 29. 7. 2011 
  
 ===== How to ===== ===== How to =====
  
-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 1.9.4.2 of Locus, menion features to import KMZ files including images -- and those KMZ files I am refering to here. With a few stepsyou can include the images with the KMZand import that file into Locus:+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 (displayed) before. Since Locus Map version 1.9.4.2 the app features importing KMZ files including images - and those KMZ files I am referring to here. With a few steps you can include the images with the KMZ and import that file into Locus Map:
  
-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 [[http://code.google.com/apis/kml/documentation/kmzarchives.html|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).+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 [[http://code.google.com/apis/kml/documentation/kmzarchives.html|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 nor the reference (or I must have missed them).
  
   - Create an empty directory   - 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 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 +  - 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 +  - Open the doc.kml with your favorite editor and search for all the images. Download/copy them to the "filesdirectory 
-  - replace all links to those images you have in the files directory to point to files/<imagename>+  - replace all links to those images you have in the "filesdirectory to point to//files/<imagename>//
   - ZIP the resulting directory and make sure the resulting file has the extension .kmz   - ZIP the resulting directory and make sure the resulting file has the extension .kmz
  
Line 34: Line 30:
  
 Image-example: <img src="http://www.example.com/images/foo.jpg"> 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.+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 is 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 all those images belong to, you have 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... 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...
manual/advanced/data_tools/kml_conversion_offline.1431666055.txt.gz · Last modified: 2015/05/15 07:00 (external edit)