(Using iOS 5 and Xcode 4.2)
I have an MKMapView and want to draw a circle of 1000m radius around the user location.
On the surface it would seem tha
All I did is, After displaying the location on the map kit called the below function in the end.
@IBOutlet weak var mapView: GMSMapView!
var cirlce: GMSCircle!
override func viewDidLoad() {
super.viewDidLoad()
mapView.delegate = self
circleview(redius: 5000)
}
//used this func to draw the circle
func circleview(redius:Double) {
let circleCenter = CLLocationCoordinate2D(latitude: 13.3450223, longitude: 74.7512519)
cirlce = GMSCircle(position: circleCenter, radius: redius)
cirlce.fillColor = UIColor(red: 230.0/255.0, green: 230.0/255.0, blue: 250.0/255.0, alpha:1.0)
cirlce.strokeColor = .blue
cirlce.strokeWidth = 2
cirlce.map = mapView
}