MKPolygon Intersection Point

294 Views Asked by At

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?

0

There are 0 best solutions below