最佳答案
没关系,我设法弄清楚了。
我将以下内容添加到委托(delegate)的 mapView(_ mapView: MKMapView, viewFor comment: MKAnnotation)
函数中。
if let cluster = annotation as? MKClusterAnnotation {
let markerAnnotationView = MKMarkerAnnotationView()
markerAnnotationView.glyphText = String(cluster.memberAnnotations.count)
markerAnnotationView.markerTintColor = UIColor.appPrimary
markerAnnotationView.canShowCallout = false
return markerAnnotationView
}
关于mapkit - MKMarkerAnnotationView 簇颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46726124/