【问题标题】:Is it possible to retrieve the time for a route with the iOS Google Maps SDK?是否可以使用 iOS Google Maps SDK 检索路线的时间?
【发布时间】:2014-03-11 22:45:38
【问题描述】:

使用适用于 iOS 的 Google Maps SDK,是否可以像在常规 Google Maps 应用中那样计算/检索骑自行车、汽车或步行从位置 A 到位置 B 的路线的时间iOS 版?

我知道可以使用 Google Directions API 使用 GMSPolyLine 显示路线,现在是否可以计算从 A 到 B 的折线一路步行所需的时间?

【问题讨论】:

    标签: ios google-maps google-maps-sdk-ios google-geocoding-api google-directions-api


    【解决方案1】:

    路线 API 在响应中包含一段持续时间:

    https://developers.google.com/maps/documentation/directions/#Legs

    这些持续时间取决于您在请求中指定的出行方式(驾车、步行等):

    https://developers.google.com/maps/documentation/directions/#TravelModes

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-01-21
      • 2014-01-24
      • 1970-01-01
      相关资源
      最近更新 更多