How can I detect a mouse click on a screenoverlay?
This code will let me detect all mouse clicks:
google.earth.addEventListener(ge.getWindow(), "click", doMouseClick);
so reading the documentation it appears that I should be able to hook
up an event handler on a screenoverlay like this:
myScreenOverlay = ge.createScreenOverlay('');
//do the stuff to assign an icon and place it. All no problem.
google.earth.addEventListener(myScreenOverlay, "click", doMouseClick);
But this doesn't work. Can someone show me an example of handling
mouse events on screenoverlays please?
I did find the example of handling the mouse even on a placemark
(
http://earth-api-samples.googlecode.com/svn/trunk/examples/event-placemark.html
) but it appears doing the same of a screenoverlay is either not
possible or is done differently
Any help is much appreciated.