Well, you could easily arrange the polygons in the desired order by
holding them in an array, sort the array by using the getArea()
method, and addOverlay() in order, from large to small.

But still, IMHO, it is incorrect to say that a click in Dallas is not
a click in Texas. :-)

--
Marcelo - http://maps.forum.nu
--



On Mar 14, 12:23 pm, Nick <[email protected]> wrote:
> Thanks for the reply:
>
> > I don't know the specific needs of the application you're planning,
> > but I see no reason why a click onDallasshould not be considered a
> > click on Texas.
>
> My idea is that if they want Texas, they can click anywhere that isn't
> Dallas.  Where the two overlap, I want the smallest zone to get the
> click.  Because they're consciously choosing where to click, I wanted
> to give them the benefit of that.  Your approach of looking for which
> polygons contain the point seems more suited for a random point coming
> from outside. (I'm doing all of the application's point-in-polygon
> stuff on the server side; I'm "paying" Google to do that for me on the
> client. :-))
>
> Another approach I'm thinking of adopting is to give the user a check
> box saying "do not show polygons which are bigger than the map".  That
> would allow a general workaround to this problem because if they zoom
> so that Dallas fills half the screen, then Texas will have been left
> behind long ago.  There are some pathological cases where that might
> not work, eg two concentric symmetrical rectangles whose linear
> dimensions differ by a factor less than the zoom level (oh, but then
> the user can probably scroll so that one of them doesn't completely
> fill one side of the map... hmm, this is going to be fun.)
--~--~---------~--~----~------------~-------~--~----~
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