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

后端 未结 1 1187
既然无缘
既然无缘 2021-02-06 16:33

I would like to know if someone has got documentation about the Google Maps API, I\'m only looking for the traffic live information I would like to imp

相关标签:
1条回答
  • 2021-02-06 16:56

    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

    0 讨论(0)
提交回复
热议问题