Open
Description
Is your feature request related to a problem? Please describe.
To avoid having the recreate the renderer just to be ab le to change the color, letting user change those color while instantiating the class would be useful
Describe the solution you'd like
Add two color variable that can be set through class instantiation.
Additional context
The Idea
export class DefaultRenderer implements Renderer {
underMeanColor: string
overMeanColor: string
constructor(underMeanColor = '#0000ff', overMeanColor = '#ff0000') {
this.underMeanColor = underMeanColor
this.overMeanColor = overMeanColor
super()
}
public render( { count, position }: Cluster, stats: ClusterStats, map: google.maps.Map): Marker {
// change color if this cluster has more markers than the mean cluster
const color =
count > Math.max(10, stats.clusters.markers.mean) ? this.overMeanColor : this.underMeanColor;
// ...
}