View Full Version : Images in KMZ Files
JavaGAR
05-18-2008, 02:18 AM
In order to include images in popup balloons for placemarks, some people embed the image files in a files folder within the KMZ file, while others store the image separately on the server and use a remote http reference in the img tag. I'd like to learn what people view as the advantages and disadvantages of each of these methods.
Forkboy2
05-18-2008, 03:44 AM
Depends mainly on the size of the image I suppose. Another advantage of posting image online is that you can change it and it will automatically update for the remote user.
Matt
JavaGAR
05-18-2008, 05:09 AM
Matt:
Thanks for your response.
If the images are large or numerous, I would tend to embed them so that the user could download and save the KMZ file once, and thereafter not have to download the images again in order to view them in Google Earth. But it is true, as you seem to be implying, that if there were many placemarks with large images, and I expected remote users to look at only a few of those placemarks during a typical session, serving the images separately online may save the remote user some download time.
You have also brought up an interesting point regarding the strategy of modifying online images on the server in order to have them automatically update for the remote user. Another possibility would be to create a NetworkLink. This would enable the remote user to save the KMZ file containing the NetworkLink, which would automatically load the remote content (images and/or text) each time it was opened in Google Earth. This seems a good means of serving content that changes frequently. A downside would be that if the remote content were extremely large, there may be a noticeable wait period each time it needed to be loaded.
There are tradeoffs involved in making this decision, and I appreciate finding out what strategies others are using.
- Java
Forkboy2
05-18-2008, 07:45 AM
Matt:
Thanks for your response.
If the images are large or numerous, I would tend to embed them so that the user could download and save the KMZ file once, and thereafter not have to download the images again in order to view them in Google Earth.
- Java
Maybe your definition of large is different than mine. My definition of large is over 10 megabytes. I'm got some image overlays that are several gigabytes. Can't really expect the user to download the entire image set when they might only be interested in viewing one small part of it.
JavaGAR
05-18-2008, 01:04 PM
Matt:
I was referring to photographs of objects intended to appear in placemark information bubbles, which would be much smaller than the files you have mentioned. With image overlays as large as yours, the method you are using, namely, referencing them separately online, is certainly the best strategy, which is essentially how Google serves its GE imagery tiles.
Java
SpiderX22
05-18-2008, 04:22 PM
I'm kinda confused. In my file "google earth's biggest ships" I have pictures in it: each placemark has a small image (screenshot) of the ship at that location, shrunk down to 150x123 size. I save those pictures on my computer in a folder named ships and then subdivided into the different ship sizes (950, 978, etc). Now my question is, do other people, who don't have my computer, still see those pictures? And if not, what can I do in order for them to do so? I still don't understand how to make network links, and I don't own a server (I suppose Mickey might let me borrow some server space...the folder's only 6.03 mb)..
Forkboy2
05-18-2008, 04:47 PM
I'm kinda confused. In my file "google earth's biggest ships" I have pictures in it: each placemark has a small image (screenshot) of the ship at that location, shrunk down to 150x123 size. I save those pictures on my computer in a folder named ships and then subdivided into the different ship sizes (950, 978, etc). Now my question is, do other people, who don't have my computer, still see those pictures? And if not, what can I do in order for them to do so? I still don't understand how to make network links, and I don't own a server (I suppose Mickey might let me borrow some server space...the folder's only 6.03 mb)..
I just tried your collection and yes, the thumbnails are visible in the balloons.
A network link is basically a URL that references KML code on a server somewhere. So for example, lets say you wanted to keep updating your collection of biggest ships but want the users to get the updates automatically. You would put the 6 meg KMZ file on a server somewhere, then just upload a very small KML file to the web with a network link that does nothing but load the 6 meg KMZ file. That way someone only needs to download the small KML file and everytime they open GE, it will check your server and update automatically with whatever changes you've made to the 6 meg file.
HEre is simple example of a KML files with a network link that loads another KML file from a remote server.
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.2">
<NetworkLink>
<Url>
<href>http://www.gelib.com/maps/XXXXXXXX-1.kml</href>
</Url>
</NetworkLink>
</kml>
Network links are also used to create SuperOverlays.
Another advantage of Network links is that GE doesn't have to load the Huge KMZ file everytime you start GE. It only loads the small file and won't load the big one until you click on it under My Places.
Matt
JavaGAR
05-18-2008, 11:36 PM
SpiderX22:
I just downloaded your "google earth's biggest ships" kmz file in order to look at its structure. To do so, I changed its extension from kmz to zip, then unzipped it to extract all the component files. The result was a doc.kml file and a files folder that contained all the images. This is a standard structure for a kmz file that contains embedded images. It explains why remote users are able to see your images even though you did not store them separately on a server. Those users receive your images as embedded files when they download your kmz file. As long as you specify full paths for your images in the html markup within your placemark descriptions, Google Earth will automatically copy the images into a files folder within the kmz file when you save it, and adjust the path specifications accordingly.
- Java
SpiderX22
05-19-2008, 01:55 AM
SpiderX22:
I just downloaded your "google earth's biggest ships" kmz file in order to look at its structure. To do so, I changed its extension from kmz to zip, then unzipped it to extract all the component files. The result was a doc.kml file and a files folder that contained all the images. This is a standard structure for a kmz file that contains embedded images. It explains why remote users are able to see your images even though you did not store them separately on a server. Those users receive your images as embedded files when they download your kmz file. As long as you specify full paths for your images in the html markup within your placemark descriptions, Google Earth will automatically copy the images into a files folder within the kmz file when you save it, and adjust the path specifications accordingly.
- Java
Awesome, thanks for the explanation. Now I understand. =)
Captain Hornblower
05-19-2008, 04:58 AM
Just a littler reminder: Here in GEH is a 2MB-limit for file submissions.
SpiderX22
05-19-2008, 11:58 AM
Yep. My files at 1.89 MB so it's getting closer...
JavaGAR
05-19-2008, 06:09 PM
SpiderX22:
Yep. My files at 1.89 MB so it's getting closer...
Do you have a Google account that you can use to post material on googlepages? If so, you can upload files to your site with the following restrictions, according to the following specifications on the page Google Page Creator Examination And Test Results (http://gpsgfaq.googlepages.com/google_page_creator.html):
The maximum number of files is 500, maximum size of an uploaded file is 10 MB, and your quota (total file usage) is 100 MB (February 2007). You should be able to create four other sites, so the total maximum for all the sites should be 2,500 files and a quota of 500 MB. There seems to be a bandwidth usage limit according to discussions on the official Google Page Creator forum. Google Page Creator doesn't seem to tell what the bandwidth usage limit is, but for example for Yahoo! GeoCities it is 4 MB/hour and 3 GB/month. With Google, when you exceed the bandwidth usage limit you still can see the pages, but pictures will vanish from the pages.
Based on that information, it appears that you could keep a small KMZ file with a network link on Google Earth Hacks, with that network link pointing to a KMZ file containing all the real content, including the photos, stored on your googlepages site. Note that the maximum size of an uploaded file is stated to be 10 MB, which is more than five times the current size of your KMZ file.
sandyrichard
06-08-2008, 04:29 PM
Another good way to include images in placemarks is to use hyperlinks to Flickr. This provides access to various sizes of each image without requiring all of them to be downloaded along with the placemark.
For examples, see the following threads in the Google Earth Community Forums:
White Trillium at Point Au Roche (http://bbs.keyhole.com/ubb/showthreaded.php/Cat/0/Number/1182764/an/0/page/0/vc/1)
Painted Trillium Variations (http://bbs.keyhole.com/ubb/showthreaded.php/Cat/0/Number/1180254/an/0/page/0/vc/1)
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.