I am trying to draw route between two points using polyline . I got somewhat route but not correct and I think it will get confused at the turn . I am using google api for getti
After your line
NSArray *steps=[[aary objectAtIndex:0]valueForKey:@"steps"];
replace lines with this may work
NSMutableArray *polyLinesArray = [[NSMutableArray alloc] init];
for (int i = 0; i < [steps count]; i++)
{
NSString* encodedPoints = [[[steps objectAtIndex:i] objectForKey:@"polyline"] valueForKey:@"points"];
MKPolyline *route = [self polylineWithEncodedString:encodedPoints];
[polyLinesArray addObject:route];
}
[self.mapView addOverlays:polyLinesArray];
[polyLinesArray release];