1
の円オーバーレイを適用しようとするとエラーを取得:私は、エラー発生した迅速な3
センター(」タイプの引数リストに型「MKCircle」の初期化子を呼び出すことはできません:CLLocationCoordinate2D、半径:INT、識別子:文字列を「)
let region = CLCircularRegion(coder: MKCircle(center: CLLocationCoordinate2DMake(self.destLat!, self.destLong!), radius: 100, identifier: destinationAddress))
self.locationManager .startMonitoring(for: region)
以下は私のovelay方法である
func mapView(_ mapView: MKMapView, rendererFor overlay: MKOverlay) -> MKOverlayRenderer {
if overlay is MKCircle {
let circleRenderer = MKCircleRenderer(overlay: overlay)
circleRenderer.lineWidth = 1.0
circleRenderer.strokeColor = .purple
circleRenderer.fillColor = UIColor.purple.withAlphaComponent(0.4)
return circleRenderer
}
let myLineRenderer = MKPolylineRenderer(polyline: myRoute.polyline)
myLineRenderer.strokeColor = UIColor.blue
myLineRenderer.lineWidth = 3
return myLineRenderer
}
私はその場所に円形のオーバーレイを適用したいと思いますが、どうすればいいですか? –