List of bus stops from Google Maps

Pirozek picture Pirozek · Aug 21, 2011 · Viewed 13.3k times · Source

I am trying to build web app where you input your address and it will give you list of bus stops in your area. I want to use Google Maps for this, but i can't find the way to use them for this. Is there any way to get list of points on maps in, lets say, JSON or XML format? I tried Google Maps Places API, but it didn't work this way. Only thing i found is this example - http://gmaps-samples-v3.googlecode.com/svn/trunk/localsearch/places.html but thats not what i need.

So, anyone knows?

Answer

Tyler picture Tyler · Dec 20, 2012

The Google Places API does have stop information on there but you need to form your query very specifically to make it work.

The key is using the nearby search with rankby=distance and radius= and types=bus_station

The default rankby prominence rarely shows bus stations.

Sample query:

https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=49.89458,-97.14137&sensor=true&key=your_key&rankby=distance&types=bus_station