On Apr 4, 9:12 am, <[email protected]> wrote: > I was under the impression that it was ok to pass the name of an existing > function to GEvent.addListener, such as. > > GEvent.addListener(map,'click',my_click_handler());
In this case, you are not passing a function, but the result of a function. Adding the brackets causes the function to be evaluated: that means that when there's a map click, the handler function which the API attempts to run is (probably) a value of null or false. Try GEvent.addListener(map,'click',my_click_handler); Andrew --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
