drawing routes on MKMapView [duplicate]

泪湿孤枕 提交于 2019-12-17 16:26:38

问题


Possible Duplicate:
Adding a route to a MKMapView

So I am planning to draw multiple routes on the MKMapView. What are the easiest way to do this on iOS? I am not sure if the iPhone can calculate routes if I give them two points (lattitude, longitude). But then if the iPhone were able to calculate a route, then that route might not be the route I want to draw to go from point A to B.

Do I need multiple points along the route and draw it? As that seems really complex, as the number of points grows linearly with the growth of distance. Any suggestions?


回答1:


Try these posts.. It will help you i think

http://navarra.ca/?p=786

http://spitzkoff.com/craig/?p=108

This will automatically use Google Direction API and will fetch the points in between the locations i guess..

Anyhoo see this blog http://laurilarjo.wordpress.com/2010/10/23/using-google-directions-api-and-drawing-routes-in-iphone-mkmapview/



来源:https://stackoverflow.com/questions/5018826/drawing-routes-on-mkmapview

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