On Oct 15, 9:37 am, fish <[email protected]> wrote:
> Hi there, I would like to deploy a map where people can check to see
> if their postcode (UK) falls within a certain boundary. The boundary
> is not a radius from a location but an unequal area defined by set
> points.

Point-in-polygon is a standard analysis, but Mike's already written it
for Version 2 of the API.

- Load Mike's EPoly extension http://econym.org.uk/gmap/epoly.htm
- Define the boundary as a GPolygon. You don't have to add it to the
map if you don't want it to show.
- Geocode the postcode, and add a draggable marker to the map. Use
EPoly.Contains() to see if it's inside the polygon.
- Check again on the marker's dragend event.

Postcodes have a location, but it's the centroid of the area they
cover. Consequently the location returned from the geocoder may not be
the actual location of the point required, so your users may need to
move the marker to the right place -- and if the postcode is around
the edge of the polygon a few yards could be important.

-- 
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.

Reply via email to