title: Issues in getting directions in mkmapview
body: <p>I'm working with getting directions in <code>mkmapview</code>, I got code from this <a href="https://stackoverflow.com/a/11924208/756941">answer</a>.</p>
  
  <p>In the function</p>
  
  <pre><code>- (NSArray*)getRoutePointFrom:(Annotation *)origin to:(Annotation *)destination
  {
  NSString* saddr = [NSString stringWithFormat:@"%f,%f", origin.coordinate.latitude, origin.coordinate.longitude];
  NSString* daddr = [NSString stringWithFormat:@"%f,%f", destination.coordinate.latitude, destination.coordinate.longitude];
  
  NSString* apiUrlStr = [NSString stringWithFormat:@"http://maps.google.com/maps?output=dragdir&amp;saddr=%@&amp;daddr=%@", saddr, daddr];
  NSURL* apiUrl = [NSURL URLWithString:apiUrlStr];
  
  NSError *error;
  NSString *apiResponse = [NSString stringWithContentsOfURL:apiUrl encoding:NSUTF8StringEncoding error:&amp;error];
  NSString* encodedPoints = [apiResponse stringByMatching:@"points:\\\"([^\\\"]*)\\\"" capture:1L];
  
  return [self decodePolyLine:[encodedPoints mutableCopy]];
  }
  </code></pre>
  
  <p>I got some small issues, searched for solutions, but I can't.</p>
  
  <p>The issues are</p>
  
  <p><strong>1.Parse Issue</strong></p>
  
  <pre><code>Expected a type 
  </code></pre>
  
  <p>in </p>
  
  <pre><code>- (NSArray*)getRoutePointFrom:(Annotation *)origin to:(Annotation *)destination
  </code></pre>
  
  <p><strong>2.Automatic Reference counting issue</strong> </p>
  
  <pre><code> 'NSString' for instance message does not declare a method with selector 'stringByMatching:capture:'
  </code></pre>
  
  <p>in</p>
  
  <pre><code>NSString* encodedPoints = [apiResponse stringByMatching:@"points:\\\"([^\\\"]*)\\\"" capture:1L];
  </code></pre>
  
  <p>How to solve these two issues?</p>