When a polygon is clicked, the map receives the click too, with the third parameter described in the documentation instead of the first: http://code.google.com/apis/maps/documentation/reference.html#GMap2.click
I don't know the specific needs of the application you're planning, but I see no reason why a click on Dallas should not be considered a click on Texas. That means that you should probably look at the lat-lon of the click and then do some point-in-polygon analysis and determine ALL the polygons that contain the point where the click took place. -- Marcelo - http://maps.forum.nu -- On Mar 13, 5:06 pm, sTeamTraen <[email protected]> wrote: > The app which I'm planning will allow people to draw polygons of > various sizes on the map. For example, you could draw around the > state of Texas and the city of Dallas. > > This gives problems if Texas loads on top of Dallas, because every > click on Dallas will, I presume, be intercepted by the Texas overlay. > > My idea was to sort the polygons by size and load the largest ones > first, in the hope that Dallas will be "on top of" Texas. Is this > necessary? Is it sufficient? Or do I need to investigate layers? > > Thanks > Nick --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
