I'd like to subclass MaplyClusterGenerator and allow each cluster displayed on screen to have a size depending on much objects it gathers.
Each cluster's size would depend on the number of objects it covers versus the minimum number the smaller contains and the maximum number the bigger contains.
How would you do that ?
In the subclass func: func makeClusterGroup(_ clusterInfo: MaplyClusterInfo) -> MaplyClusterGroup
We can use clusterInfo.numObjects to get how much objects this MaplyClusterGroup covers
But how can I compare this numObjects to all the others clusters (already displayed and to be) ?
I'd like to subclass
MaplyClusterGenerator
and allow each cluster displayed on screen to have a size depending on much objects it gathers. Each cluster's size would depend on the number of objects it covers versus the minimum number the smaller contains and the maximum number the bigger contains.How would you do that ?
In the subclass func:
func makeClusterGroup(_ clusterInfo: MaplyClusterInfo) -> MaplyClusterGroup
We can useclusterInfo.numObjects
to get how much objects thisMaplyClusterGroup
covers But how can I compare thisnumObjects
to all the others clusters (already displayed and to be) ?