I'm using MKCircle for displaying the user location on MKMapView. This is done by a few lines of code:
MKCircle
creation:
self.mapCircle = MKCircle(center: pinLocation, radius: 50)
self.mapView.add(self.mapCircle!)
Rendering, using MKMapViewDelegate
:
func mapView(_ mapView: MKMapView, rendererFor overlay: MKOverlay) -> MKOverlayRenderer {
guard let circle = overlay as? MKCircle else { return MKOverlayRenderer(overlay: overlay) }
let renderer = MKCircleRenderer(circle: circle)
renderer.strokeColor = .red
renderer.lineWidth = 1
return renderer
}
It is behaving pretty well untill I zoom out and zoom in back. Then i get the vertical line artefact, which is appearing at the same place all time. It doesn't depend on the stroke width.
Does anyone know any solution to avoid appearing that artefact?