title: Draw Route on google Map in iphone
body: <p>I want to draw route on mapview using latitude and longitude. how is it possible to draw?</p>
  
  <p>Here is my code. but it is not working. i have added location in points Mutable array. and after that called drawRoute function to draw route between that location.</p>
  
  <pre><code>- (void)viewDidLoad {
      [super viewDidLoad];
  CLLocationCoordinate2D location;
      location.latitude = (double) 23.00000;
      location.longitude = (double) 73.00000;
  
  
  CLLocationCoordinate2D location2;
      location2.latitude = (double) 73.00000;
      location2.longitude = (double) 23.00000;
  
      CLLocation *locationPoint1 = [[CLLocation alloc]initWithLatitude:location.latitude longitude:location.longitude];
      CLLocation *locationPoint2 = [[CLLocation alloc]initWithLatitude:location2.latitude longitude:location2.longitude]; 
      [self.points addObject:locationPoint1];
      [self.points addObject:locationPoint2];
  [self performSelector:@selector(drowRoute)];
  }
  
  
  -(void)drowRoute{
      CGContextRef context = UIGraphicsGetCurrentContext(); 
   //   CGContextSetStrokeColorWithColor(context, [[UIColor blueColor]CGColor]);
      CGContextSetLineWidth(context, 2.0);
  
      for(int idx = 0; idx &lt; self.points.count; idx++)
      {
          CLLocation* location = [self.points objectAtIndex:idx];
          CGPoint point = [mapView convertCoordinate:location.coordinate toPointToView:self.view];
  
          if(idx == 0)
          {
              // move to the first point
              CGContextMoveToPoint(context, point.x, point.y);
          }
          else
          {
              CGContextAddLineToPoint(context, point.x, point.y);
          }
      }
      CGContextStrokePath(context);
  }
  </code></pre>