2

I'm drawing a polygon on an MKmapView like this:

CLLocationCoordinate2D  points2[[swaping count]];
points2[0] = CLLocationCoordinate2DMake([[[swaping objectAtIndex:0] valueForKey:@"lat"] doubleValue], [[[swaping objectAtIndex:0] valueForKey:@"lng"] doubleValue]);
points2[1] = CLLocationCoordinate2DMake([[[swaping objectAtIndex:1] valueForKey:@"lat"] doubleValue], [[[swaping objectAtIndex:1] valueForKey:@"lng"] doubleValue]);
points2[2] = CLLocationCoordinate2DMake([[[swaping objectAtIndex:2] valueForKey:@"lat"] doubleValue], [[[swaping objectAtIndex:2] valueForKey:@"lng"] doubleValue]);
points2[3] = CLLocationCoordinate2DMake([[[swaping objectAtIndex:3] valueForKey:@"lat"] doubleValue], [[[swaping objectAtIndex:3] valueForKey:@"lng"] doubleValue]);

poly2 = [MKPolygon polygonWithCoordinates:points2 count:4];
[self.mapView addOverlay:poly2];

And after that I can drag my points. I want to know how to check intersection(edge) of poly lines on my polygon?

Neeku
  • 3,646
  • 8
  • 33
  • 43
user3419170
  • 97
  • 10
  • And for example my swaping array is:` { lat = "37.804333"; lng = "-122.271105"; }, { lat = "37.80658"; lng = "-122.269689"; }, { lat = "37.805664"; lng = "-122.267468"; }, { lat = "37.803494"; lng = "-122.268798"; } ) ` – user3419170 Aug 19 '14 at 13:14
  • Not sure if you meant you *can* or *cannot* by saying *cann*. – Neeku Aug 19 '14 at 13:20
  • can) And after moving point i can recive intersection lines in Polygon. How can I check this edge? or intersection of lines? – user3419170 Aug 19 '14 at 13:39
  • Ok, I just re-edited your post to fix minor grammatical mistakes you had. I'm not sure about the answer, but will post if something comes to my mind. (: – Neeku Aug 19 '14 at 13:46

0 Answers0