On Sep 21, 2:43 am, Kontaktschmied <[EMAIL PROTECTED]> wrote: > Moin, > > I try to build a app likehttp://econym.org.uk/gmap/example_states.htm. > In my issue the polygons are included via ajax. A PHP-class parse a > KML and send Javascript. > > Here is the ithttp://tools.webmasterei.com/countrymap/ > > If I click outside a polygon , all works, but if I click into a > colored polygon overlay is filled with an object and latlng is empty. > > Any idas why?
Because that is the way the documentation says it will work. You get either overlay or latlng, not both: http://code.google.com/apis/maps/documentation/reference.html#GMap2.Events click overlay, latlng, overlaylatlng This event is fired when the user clicks on the map with the mouse. A click event passes different arguments based on the context of the click, and whether or not the click occured on a clickable overlay. If the click does not occur on a clickable overlay, the overlay argument is null and the latlng argument contains the geographical coordinates of the point that was clicked. If the user clicks on an overlay that is clickable (such as a GMarker, GPolygon, GPolyline, or GInfoWindow), the overlay argument contains the overlay object, while the overlaylatlng argument contains the coordinates of the clicked overlay. In addition, a click event is then also fired on the overlay itself. -- Larry > > Rainer from Hamburg --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
