On Oct 17, 11:16 pm, rednoise <[email protected]> wrote:
>
> I am new here, and I wondering about intersecting routes. What I would
> like to do is figure out if different routes intersect each other. I
> don't want to see this visually; rather I want to receive an answer
> via an API call....

If you are getting your routes via GDirections, you need something
visual to comply with the Terms; either a map, or the text directions.

> Is this possible? If so, where should I get started for a newbie like
> myself? Are there any examples out there?

I haven't seen any examples. The API doesn't do this by itself. You
need to test each straight-line segment of one route against each
straight-line segment of the other. You can do this by finding the
graph of both (y=mx+c) and solving the equations simultaneously to
give the value of x and y which satisfies both equations.

You should be able to speed things up by only testing segments where
there is some likelihood they cross -- say where the bounding boxes of
each overlap.

It's not trivial.

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