There's an issue reported about this, but it is in Need More Info
status since february 2010.
It would be nice to have a Polygon.isLatLngInside
Circle.isLatLngInside and Rectangle.isLatLngInside methods in the API
from scratch.
For circles I guess that is more easy and less CPU consuming to
estimate the difference between the total distance of the center and
the point (using Havershine's formula) and the total radius. For
irregular polygons, I think Björn's suggestion is the way to go but if
need use that for many polygons yo could expect severe time delays
when that prototype is invoked.
> > 2010/4/21 Charles <
charles.deme...@gmail.com>
>
> > Hi, I want to know if it's possible in v3 to know if a polygon
> >> contains a certain coordinate.
>
> >> I have polygons representing the districts of a city and users enter
> >> their address (which I reverse geocode to get the latlng of where they
> >> live) to know in which district they are. I have no problem with
> >> drawing polygons or getting the coordinates, the only thing missing is
> >> getting to know of the coordinate is in a certain polygon.
>
> >> I know that in v2 there was a GPolygon.contains method but it seems it
> >> is not in v3. I've searched a lot today and all I found were tutorials
> >> for binding clicks... this is not what I want.
>
> >> Thanks
>
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "Google Maps JavaScript API v3" group.
> >> To post to this group, send email to
> >>
google-map...@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >>
google-maps-js-a...@googlegroups.com<
google-maps-js-api-v3%2Bunsu...@googlegroups.com>
> >> .
> >
www.GeoStart.nl/english/- Google maps - Swis Webdesign