How to fix cracks appearing in MKPolyline rendering

43 Views Asked by At

I am facing cracks issue when rendering MKPolyline. Is there a way to control the Z of the polyline (like we do in game dev with the z-bias) or any other technic?

GPS realtime rendering

I believe my code’s quite standard, as follows:

public func mapView(_ mapView: MKMapView, rendererFor overlay: MKOverlay) -> MKOverlayRenderer {
    if overlay is MKPolyline {
        let renderer = MKPolylineRenderer(overlay: overlay)

        // Some code where I define thickness and color

        renderer.strokeColor    = color
        renderer.lineWidth      = CGFloat(thickness)

        return renderer
    }

    return MKOverlayRenderer(overlay: overlay)
}
0

There are 0 best solutions below