简体   繁体   English

iOS-在MKMapView上显示路况

[英]iOS - Displaying traffic on MKMapView

I know how to display routes/overlays onto a map view. 我知道如何在地图视图上显示路线/叠加层。 I tried to check if there was an API for traffic on the iOS 5 Google Maps or iOS 6 Beta Apple Maps but its not available. 我试图检查iOS 5 Google Maps或iOS 6 Beta Apple Maps上是否存在用于流量的API,但它不可用。

Both maps (google and apple) are capable of displaying traffic on the map view as a route form. 两种地图(谷歌和苹果)都能够在地图视图上以路线形式显示路况。 I am looking to mimic that. 我想模仿那个。 Is there an API I can use, or particularly a tutorial? 有没有我可以使用的API,或者特别是教程?

I do not believe the data from Google Traffic is public. 我不认为来自Google交通的数据是公开的。 There are some valid answers here on this Quora post: http://www.quora.com/Is-there-any-public-API-for-obtaining-traffic-information 在此Quora帖子上,这里有一些有效的答案: http : //www.quora.com/Is-there-any-public-API-for-obtaining-traffic-information

You will most likely have to find out that information yourself and that add it to your map, colorized if you like (as the maps app does on your iOS Device). 您很可能必须自己找出该信息,然后将其添加到地图中,并根据需要将其着色(就像地图应用程序在iOS设备上一样)。

Hope that helps. 希望能有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM