Is there a Google Maps API for iOS which offers traffic information?

本秂侑毒 提交于 2019-12-03 03:48:54

I don't think Google offers a standlone traffic API as of now. However there are a couple options.

  • Render the Google Maps element in a WebView and use the Google JavaScript API to enable the traffic layer. The downside of this approach is that the UX likely wont be as nice as native programming. The upside is less coding.

http://code.google.com/apis/maps/documentation/javascript/

http://code.google.com/apis/maps/documentation/javascript/reference.html#TrafficLayer

  • Call another traffic provider's REST API and overlay on top of the native iOS map component. This overlay is pretty straightforward through code if you get a KML response. The two I know of are MapQuest (yes, they are still around!) and Yahoo (though their API is in transition now).

http://www.mapquestapi.com/traffic/

http://developer.yahoo.com/traffic/rest/V1/index.html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!