Tuesday, May 15, 2007

Community-powered Road Map 2007 Edition

Note: This is the continuation of the map idea from last year.

I was lying in bed and I started thinking of how to implement this with Google Maps. If you haven't used it, you can only use satellite mode when you need to go to more detailed zoom levels.

I was drawing lines on the floor on how I would render lines on top of Maps but a quick glance at the API led me to Encoded Polylines (example). Now I don't have to worry about that.

The following should be the core elements of a polyline data [that will be stored in a database].
  1. Coordinates (x,y)
  2. Direction
  3. Connected nodes

I haven't read the whole documentation yet but there should be an event when the center is changed. So when that happens, you call the function that will add the polylines if there are any. All you need is to grab the points that are within the region shown in the map (there are lots of ways).

For traffic reports and path suggestion, you'll need a very good algorithm and add other properties like traffic volume, density and distance from next/previous point. Some nice-to-haves for your algorithm could be road width and road quality. More analysis can be done if traffic data was recorded.

It feels so doable, doesn't it? Sounds like a good afternoon exercise.

Labels: , , , , , ,

0 Comments:

Post a Comment

<< Home