Detecting whether one GDirections shares portions of itself with an 
other GDirections is fairly straightforward, but identifying the various 
types of comparison might be trickier.

Get the two polygons, then loop through all possible pairs of vertices 
looking for points that match. If you get two adjacent points that 
match, then you've got a shared portion.

Note that any two matching points is insufficient. The polylines might 
cross each other at intersections more than once without sharing any 
portions. So you do need adjacent points.

If you want to exclude sharing portions but travelling in the opposite 
direction, then check for adjacent points in the same direction.

-- 
Mike Williams
http://econym.org.uk/gmap


--

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