When I use GEvent.addListener like this everything works fine:

GEvent.addListener(marker, "dblclick", function() {
    alert("you clicked twice");
});

But if I do it like this the function is called without a doubleclick:

function drawLine (){
    alert("you clicked twice");
}
GEvent.addListener(marker, "dblclick", drawLine());

I wrote a few Google Maps applications a few years ago and am working
on a new one now but I seem to have forgotten some basics :-(

Could someone please explain why this is?

Regards, Steve.

--

You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-api?hl=en.


Reply via email to