问题
I got to draw a circle on my map, it has to be about 1,8 miles centered on a point.. How can I do it?
回答1:
Basically you need to do 2 steps:
- Create MKCircle object using
circleWithCenterCoordinate:radius:
method and add it to your mapView (usingaddOverlay:
method) - In mapView delegate implement
mapView:viewForOverlay:
method, create and setupMKCircleView
instance there and return it
If you have different overlay types you may need to perform some type-checks in delegate method to create overlay views appropriate for each type of overlay.
来源:https://stackoverflow.com/questions/5563093/drawing-a-circle-on-mapkit