title: How to draw a polygon and calculate the area of that polygon on mapview in iOS
body: <p>please take a look on this link</p>
  
  <p><a href="http://www.daftlogic.com/projects-google-maps-area-calculator-tool.htm" rel="nofollow">http://www.daftlogic.com/projects-google-maps-area-calculator-tool.htm</a>.</p>
  
  <p>where the use taps on some locations and that forms a polygon.you can see the area covered by the polygon in output. I want same thing to be achieved in iOS through map kit.
  currently i am using the following simple code to get touched coordinates on map view . I am unable to get much idea to that. please provide any sample links or code </p>
  
  <pre><code>- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
  {
      if (!self.isDrawingPolygon)
          return;
  
      UITouch *touch = [touches anyObject];
      CGPoint location = [touch locationInView:self.mapView];
      CLLocationCoordinate2D coordinate = [self.mapView convertPoint:location toCoordinateFromView:self.mapView];
  
      [self addCoordinate:coordinate replaceLastObject:YES];
  }
  </code></pre>