0
自定义视图至于我读的境界文档在地图集群中还有一类ABFClusterAnnotationView
具有几个特性:count
,color
,countLabel
但我找不到任何地方的注释image
。这是override
与添加image
属性?我设法添加images
通过使用默认注释iside mapView
委托方法,但从那里我无法管理的群集计数。我只想在地图上只有1个值的地方更改图片。的境界地图集群
所以没有什么猫腻,简单设置图像的注释:
func mapView(_ mapView: MKMapView, viewFor annotation: MKAnnotation) -> MKAnnotationView? {
let annView = MKAnnotationView(annotation: annotation, reuseIdentifier: "test")
annView.image = myImage
return annView
}
提前感谢!
是啊,那是很酷的答案!但是它不会影响'MyAnnotation',因为默认情况下所有的注释都来自Realm库。 – yerpy