On May 13, 7:56 am, alex1er <[email protected]> wrote: > Hi > > I've try to use the GPolygon.Contains method from EPoly lib. > > It works fine, but not when i try to know if a point is on the > vertical line of a rectangle. > > In fact, i think that this method do not check if a point is on > vertical line and on horizontal line of a rectangle.
Mike's documentation actually says, "If the point happens to lie exactly on the boundary of the polygon, then it may return either true or false." It is a mathematical thing, and depends on a number of factors. If it really does matter, then loop through each vertex and calculate the bearing of the next vertex. If the point has the same bearing and is within the rectangle defined by the two vertices, it's on the line. Bearing calculations are given at http://www.movable-type.co.uk/scripts/latlong.html For a "rectangle" whose boundaries lie east-west and north-south it's a trivial calculation which can be deduced from the corners. -- 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.
