Drawing multi polyline using Google Maps SDK there is cut on every joint of polyline

79 Views Asked by At

When I add multiple polylines using Google Maps SDK 8.1.0 in iOS, the joints of every polyline I see are cut. I want a smooth polyline at each joint as well either overlap. Here is the code and screenshot attached. Though I am using sprite image, I even tried using solid color and the same issue is happening. Also attaching image.

let path = GMSMutablePath()

for coordinate in stepInfo.stepLatLng {
    path.add(coordinate)
}

let polyline = GMSPolyline(path: path)
polyline.strokeWidth = 14
polyline.strokeColor = .blue
let image = UIImage(named: "nav_path", in: Bundle.mapsSdk, compatibleWith: nil)!

let redWithStamp = GMSStrokeStyle.solidColor(.red)
redWithStamp.stampStyle = GMSTextureStyle(image: image)
let span = GMSStyleSpan(style: redWithStamp)
   
polyline.spans = [span]
polyline.geodesic = true
  
polyline.map = mapView

enter image description here

0

There are 0 best solutions below