Hello. I'm writing a script that'll show the closest marker near a clicked point of the map and I run into trouble.
Firefox reports 'a is undefined' error in main.js in line 1121 (or 1149 when using v=2.x) Opera reports: Event thread: mouseup Error: name: TypeError message: Statement on line 1121: Cannot convert undefined or null to Object and Chrome says: Uncaught TypeError: Cannot read property 'lat' of undefined Here's the page: http://nowotny.x10hosting.com/gmap/index.html Steps to reproduce: 1. click the 'go' button below the map 2. click once on the map; the marker will be added and a line from that marker to the nearest found marker 3. a infowinow of that nearest marker will be shown Everything works correctly only the error console shows the mentioned error... It seems to be triggered by the following code: GEvent.trigger(marks[0],"click"); If I comment it out there's no error... I was hoping somebody could shed some light on why it's happening... --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
