Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Hope you can convert <code>CLLocationCoordinate2D</code> to <code>CGPoint</code> by the following way, then you may have the coordinates of all points.</p> <pre><code>//CGPoint myPoint = CGPointMake(coordinate.longitude, coordinate.latitude); CGPoint Point = [self.mapView convertCoordinate:self.mapCoordinate toPointToView:self.mapView]; </code></pre> <p>Then you can try the way as per the link</p> <p><a href="http://www.wikihow.com/Sample/Area-of-an-Irregular-Polygon" rel="nofollow">http://www.wikihow.com/Sample/Area-of-an-Irregular-Polygon</a></p> <pre><code>CLLocationCoordinate2D overflowLotCoords[15]={ CLLocationCoordinate2DMake(39.04864351611461,-76.8513227245313), CLLocationCoordinate2DMake(39.04851710015167,-76.8517540587399), CLLocationCoordinate2DMake(39.04868674731313,-76.85192728689483), CLLocationCoordinate2DMake(39.04850095882104,-76.85230365946416), CLLocationCoordinate2DMake(39.04819087100218,-76.85265260435219), CLLocationCoordinate2DMake(39.0477370134458,-76.85286078490296), CLLocationCoordinate2DMake(39.04692851484644,-76.85283202926037), CLLocationCoordinate2DMake(39.04695987529381,-76.85235192135768), CLLocationCoordinate2DMake(39.04734847050665,-76.85236298239703), CLLocationCoordinate2DMake(39.04779491740192,-76.85232236959109), CLLocationCoordinate2DMake(39.04814366462639,-76.85208905182692), CLLocationCoordinate2DMake(39.04838024069194,-76.85164072166863), CLLocationCoordinate2DMake(39.04843331131504,-76.85085998781742), CLLocationCoordinate2DMake(39.04857547181026,-76.8507923535788), CLLocationCoordinate2DMake(39.04864351611461,-76.8513227245313) }; NSMutableArray *marrPointsList = [NSMutableArray array]; for (int i = 0; i &lt; 15; i++) { CLLocationCoordinate2D coordinate = overflowLotCoords[i]; CGPoint point = [self.myMapView convertCoordinate:overflowLotCoords[i] toPointToView:self.myMapView]; NSLog(@"convert %@", NSStringFromCGPoint(point)); [marrPointsList addObject:[NSValue valueWithCGPoint:point]]; } </code></pre> <p>hope this code snippet may help you.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload