Show path from Current Location Tutorial.


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];
}




GOOGLE

Draw Path between Two address

Draw Path between Two LatLong



To get detail from Address


To get detail from LatLong

Other Link

Comments

Popular posts from this blog

How to Make REST api call in Objective-C.

Launch iPhone simulator without Xcode.

Hacker Rank problem solution