The next bit that goes wrong is that map, "click" events *either* return
"overlay" or "latlng".
If someone clicks on an infowindow, then as well as the <form>
processing, you also get a map "click" event that only returns the
"overlay" parameter, and this line fails:

   var lng = latlng.lng();

What you should do is check for whether the "latlng" parameter is
passed:

GEvent.addListener(map, "click", function(overlay, latlng) {
  if (latlng) {
    ...
    map.openInfoWindow (latlng,inputForm);
  }
});

This then causes your code only to be invoked if the user clicks on the
actual map tiles.


-- 
http://econym.googlepages.com/index.htm
The Blackpool Community Church Javascript Team


--~--~---------~--~----~------------~-------~--~----~
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