MKPolygon交叉点

时间:2014-08-19 13:12:41

标签: ios mkmapview mkpolygon

我正在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];

之后我可以拖点我的观点。我想知道如何检查多边形上多边形线的交点(边缘)?

0 个答案:

没有答案
相关问题