iPhone: Using Google to get directions

前端 未结 2 1876
长情又很酷
长情又很酷 2021-02-02 04:07

In order to get directions, Google provides this nice URL:

Sample here...

How can I use the information that Google provides to get the same direction line on a

相关标签:
2条回答
  • 2021-02-02 04:55

    In iOS 5, you can also open the maps app using an openURL call to the link you specified, and it will give you multiple possible routes to the location.

    Unfortunately, the way to do it with the built-in MKMapKit is to calculate the route using some webservice then using MKOverlays to render that line. Those tools suggested by neven are probably a good first start.

    0 讨论(0)
  • 2021-02-02 04:56

    You will have to either use a web view with a Google map, or draw on the MKMapView with overlays. There are a couple of projects on GitHub that do this:

    https://github.com/kadirpekel/MapWithRoutes

    https://github.com/kishikawakatsumi/MapKit-Route-Directions

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