Showing stops on bus route using google map on wen application

815 views Asked by At

I have developed a web application for showing bus route between two different stations. I want to show all the stops on the bus route. I have checked this forum and could not find exactly what I am looking for. I am using Google transit API to show the route between two stations. I have more than 30 stops on the route and I want to show them like the Google direction shows when you search the direction between two places on Google maps. My Second question is can I draw a bus route with out using Google transit API. Any help will be highly appreciated.

Thanks Pramod

1

There are 1 answers

0
Mike A On

In order to avoid using the API, you can construct a transit route URL something like this: https://www.google.com/maps/dir/Boston,MA/Bufalo,+NY/data=!4m2!4m1!3e3

This is the simplest URL that will give you a map with the Transit mode between Boston and Buffalo. This URL can be used inside an iframe.

Whether you see the bus stops or not depends on the zoom level.

You can explore the nuances of Google Maps URLs in various posts on the web, or by experimenting with a map. The embed codes that Google uses can be found in the address bar, or by using the embed map selection from the Google Maps menu.