On Sep 22, 6:31 am, sway <[email protected]> wrote: > Is there some standard way to allow users to select/click on polygons > on a map which are completely covered by other polygons? They are > visible because all polygon opacity is set to less than 100% but they > are just not clickable if they happen to be completely under a larger > polygon.
That's the way it works. You could make sure your polygons are stacked in the right order -- I believe polygons are stacked in the order in which they are added to the map. Or you could make all your polygons non-clickable so that the only object which needs to respond to a click is the map. Have the map click handler determine which polygon is relevant. One way you might do *that* is use point-in-polygon analysis to determine which polygon(s) contain the click point, and then use the smallest polygon from that result set. Mike's EPoly extension provides Contains and area calculations. http://econym.org.uk/gmap/epoly.htm You could even use EPoly's area calculation to sort the polygons by area and then add them to the map in the right order, which would probably involve the least amount of re-written/additional code. -- You received this message because you are subscribed to the Google Groups "Google Maps API V2" 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.
