Draw Dashed Circle on Google Maps : iOS

Viewed 1333

I've been trying so hard to Draw a Dashed Circle on Google Maps but couldn't find anything helping...

I've been looking over the internet literally for days to find some solutions for drawing a Dashed circle on GoogleMaps, unfortunately other than drawing a plain circle is the answer what I get every time..

Here's what I did :

map with circle

Code for the above is :

import UIKit
import GoogleMaps
import GooglePlaces

class ViewController: UIViewController
{
    @IBOutlet weak var gmsMapView: GMSMapView!

    override func viewDidLoad()
    {
        super.viewDidLoad()

        gmsMapView.isMyLocationEnabled = true
        gmsMapView.settings.myLocationButton = true
        gmsMapView.animate(toZoom: 10.0)
        gmsMapView.animate(toLocation: CLLocationCoordinate2D(latitude: 40.709677, longitude: -74.011088))
        let circleCenter = CLLocationCoordinate2D(latitude: 40.709677, longitude: -74.011088)
        let circle = GMSCircle(position: circleCenter, radius: 5000)
        circle.strokeWidth = 2
        circle.strokeColor = UIColor.blue
        circle.map = gmsMapView
    }

    override func didReceiveMemoryWarning(){
        super.didReceiveMemoryWarning()
    }
}

This is what is required :

enter image description here

1 Answers
Related