I'll be using the MapKit framework and I'd like to know if it is possible to display traffic time, for example, from my house to my office.
问问题
3829 次
4 回答
3
MapKit 中没有交通信息,但 Google Maps SDK 确实有:https ://developers.google.com/maps/documentation/ios/releases
于 2014-01-24T18:30:29.410 回答
2
MapKit 现在包含交通信息,其方式与 Google 地图非常相似:.showsTraffic
于 2017-04-14T22:20:54.937 回答
0
MapKit 不提供交通信息,但如果您有数据源,您当然可以使用MKOverlay
或其中一个子类将其显示在 MapKit 地图上。
于 2014-01-24T18:27:23.407 回答
0
如果您使用 MKDirectionsRequest,MapKit 有交通信息并在内部使用它来计算旅行时间。您可以设置开始或到达时间/日期,Apple 会根据高峰时间等计算旅行时间。 Apple Docs
您可以使用 calculateETAWithCompletionHandler() 来获取行程时间,而不需要路线信息。这应该快得多。
于 2015-04-17T19:58:02.177 回答