Hi,
This could be due to a couple of things.
Firstly, the kmlEvent doesn't contain the method 'getButton' only the
KmlMouseEvent does.
Secondly, the alert function can cause issues as it effectively pauses
the script execution.
With that in mind you could try the following to see if it resolves
the issue.
----------------------------------------------------------------------------------------------------------------------------------------------------------------
if(event.getType() == 'KmlMouseEvent') {
if (event.getButton() == 0) { //left mouse
document.getElementById('output').innerHtml = 'left button down';
}
}
...
<div id='output'>...</div>
----------------------------------------------------------------------------------------------------------------------------------------------------------------
F.
On Sep 15, 10:40 pm, James Lamanna wrote:
> Hi,
> I've noticed that if you attach an event handler to the 'mousemove'
> event of say GEGlobe, you do not get any mouse events while holding a
> mousebutton down _unless_ you call preventDefault() in the mousedown
> event.
>
> This problem only seems to manifest itself when you are only over the
> globe. If you are over placemarks, then it seems to work how it should
> (mousemove events come through).
>
> You can see this behavior if you take the example of drag drop:
http://earth-api-samples.googlecode.com/svn/trunk/examples/placemark-...