开发者

how show all points on map view?

I am using Google Direction API. In this i am http://maps.googleapis.com/maps/api/directions/json?origin=Chicago,IL&destination=Los+Angeles,CA&mode=driving,OK&sensor=false . When i show response of it then get so may point's latitude and longitude. On map v开发者_Go百科iew showing only starting and ending points. Now i want to show points coming in between them. So how could i do that?


You can use KMLViewer Sample code which has been provided by Apple which you will get in the following link, http://developer.apple.com/library/ios/#samplecode/KMLViewer/Introduction/Intro.html

In this, path has been drawn with the help of KML file.

You can get the coordinates between the Source and destination by using following URL, https://maps.google.com/maps?saddr=SOURCE_COORDINATES&daddr=DESTINATION_COORDINATES&output=kml

and you will have to parse above URLSTRING with following code,

parseKMLAtURL:URLSTRING


You need to draw a path. Explore this sample project by Apple:

http://developer.apple.com/library/ios/#samplecode/Breadcrumb/Introduction/Intro.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜