我正在MKmapView
像这样绘制一个多边形:
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];
在那之后,我可以拖我的观点。我想知道如何检查多边形上折线的交点(边缘)?