Snap a polyline to the street? Bus Route

382 views
Skip to first unread message

chat2joe

unread,
Jan 27, 2011, 3:00:47 PM1/27/11
to Google Maps JavaScript API v3
Hey guys,

I've seen an example over here which follows the street layout between
two points:
http://econym.org.uk/gmap/snap.htm

Is there a way to do this with a pre-saved route rather than clicking?
I want to input bus routes on a map. 7 or 8 markers along the route is
enough to show the route accurately using the above method... but can
I have this preloaded (and I'd use transparent markers to just show
route).

Otherwise I'll be constructing polyine with hundreds of points in an
area with a lot of curved roads (not a handy grid network).

Thanks!

Joe

geoco...@gmail.com

unread,
Jan 27, 2011, 5:16:33 PM1/27/11
to Google Maps JavaScript API v3
On Jan 27, 12:00 pm, chat2joe <chat2...@gmail.com> wrote:
> Hey guys,
>
> I've seen an example over here which follows the street layout between
> two points:http://econym.org.uk/gmap/snap.htm
>
> Is there a way to do this with a pre-saved route rather than clicking?
> I want to input bus routes on a map. 7 or 8 markers along the route is
> enough to show the route accurately using the above method... but can
> I have this preloaded (and I'd use transparent markers to just show
> route).

Similar question (from the v2 group):
http://groups.google.com/group/google-maps-api/browse_frm/thread/99c3bd7b3cce3be7#

Do those examples help?
Since you are going to be displaying it on a map, you should be able
to save the points from the polyline and just display that (verify for
youself that meets the terms of use though).

-- Larry
Reply all
Reply to author
Forward
0 new messages