user1895844
user1895844

Reputation: 21

Google Earth show description on placemark rollover

When clicking on a placemark the description balloon opens. I would like to do the same thing using a mouse rollover instead of a click. I've done a lot of searching and have only been able to find out how to highlight a placemark on rollover. This question seems the closest to what I'm looking for but it's for Bing, not Google Earth.

It seems like this would be a basic feature (I looked under tools first to see if the option was there). When you have a lot of placemarks a rollover is far faster to search for specific information rather than scrolling down the list of placemarks under Places.

I can write kml but anything more complicated than that, e.g., javascript, is beyond me so I'm hoping there's a relatively simple answer

Thanks for any help you can provide.

Rando

Upvotes: 2

Views: 3302

Answers (1)

CodeMonkey
CodeMonkey

Reputation: 23748

If you want to use Google Earth with vanilla KML then only option is using StyleMaps and mouse roll over events to show the highlighted styles of your Placemarks.

The JavaScript tricks in KML require you to first click Placemark to show the balloon description with embedded JavaScript. For examples, check out http://kml-samples.googlecode.com/svn/trunk/kml/javascript/.

One trick is to use <gx:balloonVisibility> on a target KML file then wrap that KML with a root KML file having a region-based NetworkLink that loads the first KML file when the region becomes active via zooming. When the KML with placemark loads, the balloon is automatically opened but not the same thing you want.

It's in the realm of possibilities if Google adds this new feature in future version of Google Earth.

If, however, you want to roll your own app web using Google Earth API then you have full control and can handle the mouse over events any way you want to.

https://developers.google.com/earth/documentation/events#event_listeners

Upvotes: 1

Related Questions