Reputation: 389
Hello every one I am working with Google maps, I have a requirement to show list of bus stops in between the source and destination within the city. I tried my best but I am not able to get the result. Please help me on this.
Hi all i am using below api but not getting list of bus stations between the source and destination "https://maps.googleapis.com/maps/api/directions/json?origin=Raidurgam Bus Stop, Old Mumbai Highway, Madhura Nagar Colony, Gachibowli, Hyderabad, Telangana 500032&destination=Mehdipatnam Bus Stop, Mehdipatnam Road, Santosh Nagar, Mehdipatnam, Hyderabad, Telangana 500028&mode=transit&types=bus_station&key= API_KEY"
THANKS IN ADVANCE
dispatch_async(dispatch_get_main_queue(),{
let path = GMSPath(fromEncodedPath: rout)
let polilin = GMSPolyline(path: path)
polilin.strokeWidth = 4.0
polilin.map = self.mapView
polilin.tappable = true
var bounds = GMSCoordinateBounds()
for index in 1...path!.count() {
bounds = bounds.includingCoordinate(path!.coordinateAtIndex(index))
}
self.mapView.animateWithCameraUpdate(GMSCameraUpdate.fitBounds(bounds))
self.mapView.trafficEnabled = true
})
Upvotes: 2
Views: 753
Reputation: 4827
parameters
radius-->Distance_Between_Source_Destination in meter.
location-->Source_lat_long.
Upvotes: 1