显示iphone sdk中多个点之间的路线 [英] To show the route between mutliple points in iphone sdk
问题描述
我确实有一些例子,但所有例子都显示了两点之间的路线。
Exmaple: - ,也是这个
,即使我也经历了正则表达式的例子。
但是都有两点之间路线的逻辑。
通过折线我可以画出直线,我无法看到路线。
编辑问题:
有5点: -
1)点是: - lat:-35.29987329273559,
lng:149.13395404815674,
2)要点是: - lat:-35.2984416380826,
lng:149.13144886493683,
3)点是: - lat:-35.302576234486935,
lng:149.13335928744252,
4 )点是: - lat:-35.301081642089805,
lng:149.13073539733887,
<5>要点是: - lat:-35.29991644393122,
lng:149.13659454104746,
现在我想绘制从点1到点5的路线。路线必须包含所有点。
我知道我可以找到两点之间的路线,但我如何一次又一次地开启同一个方法,所以找到路线
请帮助我。
提前致谢
苹果整合新功能以显示路线。
> 要求 - > 操作系统版本应该 IOS6
或更高版本。 b
显示从当前位置到 YourCoordinate
的路线
- (void)showMapRouteFromCurrentLocation
{
CLLocationCoordinate2D currentUserCoordinate = YourCoordinate;
//currentUserCoordinate.latitude= +53.509980;
//currentUserCoordinate.longitude = -0.133700;
MKPlacemark * place = [[MKPlacemark alloc]
initWithCoordinate:currentUserCoordinate
addressDictionary:nil];
MKMapItem * mapItem = [[MKMapItem alloc] initWithPlacemark:place];
NSDictionary * routeOption = [[NSDictionary alloc] initWithObjectsAndKeys:MKLaunchOptionsDirectionsModeDriving,MKLaunchOptionsDirectionsModeKey,nil];
[mapItem openInMapsWithLaunchOptions:routeOption];
}
这里是这个链接。
I want to show the exact route path between the more that two points.
I do have some example but all are having example which show the route between two points.
Exmaple :- this, also this even i had also gone through the example of regexlite. But all have the logic for the route between two points. Through polyline i can just draw the straight line.I am not able to see the route.
EDITED QUESTION:-
There are 5 points:-
1)points is :-"lat": -35.29987329273559, "lng": 149.13395404815674,
2)Point is:- "lat": -35.2984416380826, "lng": 149.13144886493683,
3)point is:- "lat": -35.302576234486935, "lng": 149.13335928744252,
4)point is:- "lat": -35.301081642089805, "lng": 149.13073539733887,
5)point is :-"lat": -35.29991644393122, "lng": 149.13659454104746,
Now i want to draw a route from point 1 to point 5.And route must contain all the points. I know i can find the route between two points but how do i fire the one and same method again and again so find the route Please help me. Thank in advance
Apple integrate new feature to show route.
Requirement -> OS version should be IOS6
or later.
Show route from current location to YourCoordinate
in iOS6
-(void)showMapRouteFromCurrentLocation
{
CLLocationCoordinate2D currentUserCoordinate = YourCoordinate;
//currentUserCoordinate.latitude= +53.509980;
//currentUserCoordinate.longitude = -0.133700;
MKPlacemark *place = [[MKPlacemark alloc]
initWithCoordinate:currentUserCoordinate
addressDictionary:nil];
MKMapItem *mapItem = [[MKMapItem alloc]initWithPlacemark:place];
NSDictionary *routeOption = [[NSDictionary alloc] initWithObjectsAndKeys:MKLaunchOptionsDirectionsModeDriving,MKLaunchOptionsDirectionsModeKey, nil];
[mapItem openInMapsWithLaunchOptions:routeOption];
}
Here is the link of this.
这篇关于显示iphone sdk中多个点之间的路线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!