Google Maps API for getting a bus route

Here is my situation, maybe someone can give a hint of a solution or, perhaps, indicate that this is impossible:

I have bus routes defined only by the streets that the buses pass, for example:

W 49th St, 10th Ave, W 65th St, 79th Street Transverse Rd, 5th Ave, ... 

I want to get this data and create a visual route on Google Maps. I had experience with Gmaps b4, but only using webservice to get directions between points.

In this case, the web service used in this way is useless, because if I specify the routes that consider each point (A, B, C) as a street, GMaps create a route that goes from "W 49th St" to the middle of "10- go Ave, "then to the middle of" W 65th St, "etc.

I think that I could do this if there was a way to get map data and create a route myself, navigating the map and finding the shortest paths taking into account many streets.

Can I have this kind of information from Google Maps, or maybe someday it's easier to do?

Thanks.

+6
source share
1 answer

The only real option to get bus information from the Google Maps v3 API is to use the service with the mode set to TRANSIT . Whether it will return data or not will depend on which city you are looking for this information in.

Transit Route Example

The β€œmanual” option is to use the route service to get routes [with DRIVING mode] between the actual stops on the route, your current list is not detailed enough for this, but if you have coordinates stops, this can be done (or you can try to capture the route using drag and drop directions).

Multiple Direction Example

+10
source

All Articles