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

It's probably a mathematical thing.  A point has zero height and
width ; a line has length ... but zero width.  Given the inherent
rounding inaccuracies within javascript, it's pretty unlikely that any
point will exactly fall on a line segment (polygon side) so far as the
calculations go.

If it is something that you really have to check, you might be able to
do something like take each polygon line segment and convert it to a
small polygon of narrow width, a "line" with real width.  Then check
if each segment contains your point.

There's also the philosophical view .... if a point is on the border
of a poly it is NOT contained within the poly.

If you are only dealing with east-west rectangles, you might try
GBounds to see how that compares.

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