大家好,我正在使用 Google map ,我需要显示城市中源和目的地之间的公交车站列表。我尽力了,但我无法得到结果。请帮我解决这个问题。
大家好,我正在使用下面的 api,但没有获取源和目的地之间的公交车站列表 "https://maps.googleapis.com/maps/api/directions/json?origin=Raidurg am 巴士站,旧孟买公路,Madhura Nagar Colony,Gachibowli,Hyderabad,Telangana 500032&destination=Mehdipatnam 巴士站,Mehdipatnam Road,Santosh Nagar,Mehdipatnam,Hyderabad,Telangana 500028&mode=transit&types=bus_station&key= API_KEY"
提前致谢
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
})
最佳答案
参数
半径-->以米为单位的 Distance_Between_Source_Destination。
位置-->Source_lat_long。
关于ios - 如何在 iOS Swift 中使用 GOOGLE MAPS 获取源和目的地之间的公交车站列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40926637/