Is there a way to convert an MKPolygon
to a UIBezierPath
? I have an MKPolygon
that is using latitude and longitude coordinates to make up its points. How would those latitude/longitude coordinates translate to coordinates on a UIView
?
Asked
Active
Viewed 504 times
1

jszumski
- 7,430
- 11
- 40
- 53

tentmaking
- 2,076
- 4
- 30
- 53
1 Answers
1
MKPolygon *myPolygon;
MKPolygonView *polygonView = [[MKPolygonView alloc] initWithPolygon:myPolygon];
UIBezierPath *myBezierPath = [UIBezierPath bezierPathWithCGPath:polygonView.path];

fumoboy007
- 5,345
- 4
- 32
- 49
-
Thanks for that solution. I implemented it and it is not drawing onto my UIView. Is there anything else I need to add to the code above to get it to show up? I have done some debugging and, as far as I know, the shape isn't empty. Thanks for the help – tentmaking Apr 19 '13 at 00:53