Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
150 views
Welcome To Ask or Share your Answers For Others

1 Answer

Apple integrate new feature to show route.

Requirement -> OS version should be IOS6or 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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...