Image In Balloon As Hyperlink

266 views
Skip to first unread message

Joe McCann

unread,
May 7, 2014, 2:27:51 AM5/7/14
to kml-support-g...@googlegroups.com
I have a KML file which has an <img> HTML tag in each <Placemark><description> element.  The src attribute points to a file on disk, "next to" the KML file itself.

I would like for users who have this KML (along with the associated images) to be able to click on the displayed image in the Balloon (in Google Earth), and have the image they clicked-on open in the operating system's default image viewing software.

So far I have attempted to wrap the <img> tag within an <a> tag, but I have not been able to achieve the behaviour described above.  When I hover over the image, the cursor becomes a hand, indicating the presence of a link, but clicking on the image yields nothing.

Is what I am trying to do possible?

washi

unread,
May 7, 2014, 9:27:58 PM5/7/14
to kml-support-g...@googlegroups.com

I think you may need to insert "balloon", "flyto", or "balloonFlyto" into your KML file.  This description of HOW I DO IT was posted in the Google Earth Community.  Getting an id into your target placemark, folder, etc., is crucial, as is restarting GE after the id has been added.

(See the example file linked to near the end of the post to see it does what you intend.)

Noisette

unread,
May 9, 2014, 9:31:40 AM5/9/14
to kml-support-g...@googlegroups.com
Hi, I did get this to work, but, I don't know if it will help you.

First you need to make sure you have enabled "Allow access to local files and personal data" in Tools - Options - General tab

When opening the kmz file there are three stages:
  • File opens in Temporary Places - the image is displayed but not accessible when clicked.
  • You save the file to your "My Places", but until your My Places have been saved, the image is still not accessible.
  • Close Google Earth and reopen it, at that point the file will be part of myplaces.kml, the image will be in the same folder and you should be able to open the image when clicking it.  It doesn't seem to be enough to "Save My Places".
I tend think it would be easier to save the images in a web album and link to them there.  If privacy is an issue most services allow you to keep the album private or available only to those with the link.

Reply all
Reply to author
Forward
0 new messages