Pregunta

I have a KML I wrote inside of a KMZ using relative references to images. The description shows a resized thumbnail perfectly. When I click on the image it used to open inside of GE. I don't know what happened but the image wont open any more.

Inside my kmz I have doc.kml and dir "files" containing my images

I would also like for it to open in the windows photo viewer if possible. Thanks in advance! Here is my code (partial)

<tr><td class="padr">Photo 1:</td><td><a href="files/IMG_0003331.JPG"><img src="files/IMG_0003331.jpg" width="200" height="150"/></a></td></tr>
<tr><td class="padr">Photo 2:</td><td><a href="files/IMG_0004332.JPG"><img src="files/IMG_0004332.jpg" width="200" height="150"/></a></td></tr>
<tr><td class="padr">Photo 3:</td><td><a href="files/IMG_0005333.JPG"><img src="files/IMG_0005333.jpg" width="200" height="150"/></a></td></tr>
<tr><td class="padr">Photo 4:</td><td><a href="files/IMG_0006334.JPG"><img src="files/IMG_0006334.jpg" width="200" height="150"/></a></td></tr>             <tr><td class="padr">Photo 5:</td><td><a href="files/IMG_0007335.JPG"><img src="files/IMG_0007335.jpg" width="200" height="150"/></a></td></tr>
<tr><td class="padr">Photo 6:</td><td><a href="files/IMG_0008336.JPG"><img src="files/IMG_0008336.jpg" width="200" height="150"/></a></td></tr>
¿Fue útil?

Solución 2

Just in case someone comes across this post with the same issue as I, I finally got it working the way I wanted it to.

<tr><td class="padr">Photo 1:</td><td><a href="../files/IMG_0003331.JPG"><img src="../files/IMG_0003331.jpg" width="200" height="150"/></a></td></tr>
<tr><td class="padr">Photo 2:</td><td><a href="../files/IMG_0004332.JPG"><img src="../files/IMG_0004332.jpg" width="200" height="150"/></a></td></tr>
<tr><td class="padr">Photo 3:</td><td><a href="../files/IMG_0005333.JPG"><img src="../files/IMG_0005333.jpg" width="200" height="150"/></a></td></tr>

This shows thumbnail sized preview in the bubble and opens the photo in photo viewer upon click.

Otros consejos

I had the same problem. A recent forced update took an established project I had where embeded hyuperlinking to images was critical and broke it.

My work around has been to use UNC path names rather than mapped drive names. i.e. \server\drive name\directory\file.html rather than k:\directory\file.html, and to force Google Earth to open in an external browser rather than to open directly in GE.

It's not ideal but it at least is functional now and I can resolve with "copy+paste" instead of teraing down my whole project and starting over.

Frustrating. It should be more elegant than that.

You can inline them in the KML description Balloon popup and they will display as they would in an HTML document. It would be assumed that you could also link to images embedded within KMZ file as you're trying to do above so you could show thumbnails in the balloon popup and link to larger versions of images also embedded in the KMZ file.

The current version of GE 7.x does not allow linking to embedded images within the KMZ file. A less than ideal workaround is post the images externally on a web site (e.g. plus.google.com, dropbox.com, imageshack.us, etc.) and have KML/KMZ refer to the image by its absolute URL, but that defeats the whole purpose of the KMZ as a self-contained dataset. But you can still embed the thumbnail image inside the KMZ file to view it inline in the balloon. Only issue is linking to the image (i.e. <A href="">) and accessing it external to the balloon context.

Even if you have the "access local files" option checked in GE clicking on links to the embedded images is ignored by Google Earth. Likewise, selecting "Open in New Window" on the image has no effect.

UPDATE: On a related topic, it was recently discussed that embedded images in KMZ files on the Google Earth iOS platform are not supported, and inline images don't work there.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top