Curnelious
Curnelious

Reputation: 1

Map kit route in ios7

I want to show a route between 2 points on the map in ios7. So i have the source point ,but i can't understand how to input a destination with coordinates:

  MKDirectionsRequest *request = [[MKDirectionsRequest alloc] init];
    request.source = [MKMapItem mapItemForCurrentLocation];
    request.destination = _destination;  // HERE I WANT TO ADD COORDINATES.

Than i have some location:

CLLocation *gotopoint = [[CLLocation alloc] initWithLatitude:100.09361 longitude:33.85482];

How to i set this point to the destination ?

Thanks

Upvotes: 1

Views: 129

Answers (1)

Curnelious
Curnelious

Reputation: 1

got it :

CLLocationCoordinate2D _srcCoord = CLLocationCoordinate2DMake(132.09361,134.854);
    MKPlacemark *_srcMark = [[MKPlacemark alloc] initWithCoordinate:_srcCoord addressDictionary:nil];
    MKMapItem *gotopoint= [[MKMapItem alloc] initWithPlacemark:_srcMark];

Upvotes: 1

Related Questions