views:

247

answers:

2

You can replicate the bug here: http://www.trailbehind.com/node/1148091

For some reason, the following event will fire only if the user's cursor is over a marker, but I have seen it work properly elsewhere, and I'm not sure what's messing things up on my site:

GEvent.addListener(map, 'singlerightclick', function(latLng, src, overlay) {
  console.log(1);
}

Thanks for any help you can give.

+2  A: 

Your code looks right, and when I visit the URL you give (I've tried only with Google Chrome) and right-click at any spot, a marker appears with relevant information. What misbehavior am I supposed to observe (or fail to observe) and on what browser?

Alex Martelli
Works just fine here as well.
Aistina
Works with Chrome, Firefox, IE6/7/8. Fails in Opera - but that's expected because Opera doesn't allow scripts to receive right clicks.
Rene Saarsoo
I just confirmed it also works with Safari on my Mac. @Andrew, can you at all clarify the issue...?
Alex Martelli
A: 

It fails for me. I am running Mac with Firefox 3.x It only fires when on a marker.

I am having the same problem on an app I am developing.