ClusterAnnotationView wit RELATIONSHIP between 3 differnt colored (tintColors) Annotations? As in sample-code TANDm
MapKit Sample-Code (TANDm):
"Decluttering a Map"
WWDC 2017
No. 237
has only TWO different types/ tinColor Annotations (in an Enumeration of three) shown in a custom Cluster Annotation View on the Map
Link: https://developer.apple.com/documentation/mapkit/mkannotationview/decluttering_a_map_with_mapkit_annotation_clustering
If already clustered/ grouped Annotations merging into one circle, two different colors are showing the ratio between the different Annotations in a single clusterAnnotationView. That looks very nice with two colors on the outer perimeter of the shown circle wit the count of all different Annotations in it (orange/ green)
Is there a way to show the R A T I O between three or four different tintColors, which are merging in a single customAnnotationView, instead of only two in the sample code?
I think the following code-snippets can be important for the solution :
private func drawRatioBicycleToTricycle(_ tricycleCount: Int, to totalBikes: Int) -> UIImage {
return drawRatio(tricycleCount, to: totalBikes, fractionColor: UIColor.tricycleColor, wholeColor: UIColor.bicycleColor)
}
private func drawRatio(_ fraction: Int, to whole: Int, fractionColor: UIColor?, wholeColor: UIColor?) -> UIImage { ...