I am developing an application in which I have to show a mapView. What I exactly want to do is when user click on radius button, there should be circle drawn of that radius with the center point as the current location. Please tell me how can I draw a filled circle on my map that indicate the radius from the current location.
Any help will be highly appreciated Thanks in advance!!
Create a new instance of MKCircle with appropriate center and radius, and then add it to the map view's overlays. MKCircle in a subclass of MKOverlay, so you can handle it like any other overlay. Example:
MKCircle *myCircle = [MKCircle circleWithCenterCoordinate:myCenterPoint radius:myRadius];
[myMapView addOverlay:myCircle];
I'll leave it to you to substitute "current location" and user-selected radius for myCenterPoint and myRadius in the code above.
If you want to draw anything on a map your best friend is MKOverlay.. Search in Google for MKOverlay tutorials.
MKCircle is the Class which you want to know about. Just read the docs to get to know some idea
Just see circleWithCenterCoordinate:radius
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With