> I would like relate > these to the polylines returned by the Google Directions API so that I > can display a map that color-codes the Google polylines.
I'll have a stab that the question generalises to: Given an arbritary polyline (the Directions), you want to test if that overlies, in whole or in part, some of your own collection of arbritary polylines. I guess the expected results are a bunch of your polylines that together make up the Directions line. I don't think that will be at all easy. Start here http://www.google.com/search?q=test+matching+polylines I cannot see a good approach. You can certainly get a set of candidates easily, by finding all the suspects whose bounds intersect the target directions bounds. But then it gets difficult. I'm not sure if finding all lines that intersect, and then comparing headings is useful. That should at least allow discarding some easily. It _might_ be useful, as only a limited number of real roads exist near each other without intersecting - but see dual carriageways below. Some factors you might need to consider are "how close is close enough" - a few metres? The polylines are unlikely to ever be an exact match. "what about dual carriageways" - will you treat one side as interchangeable with the other, or distinguish the directions of travel? There may other multilane circumstances, e.g. where an access road lies alongside a major route but does not connect to it. "do I want to find lines that only partially match" e.g. if your dataset includes A-B-C and the directions is B-C-D does that match for your purpose? -- 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.
