-
Notifications
You must be signed in to change notification settings - Fork 97
Open
Labels
triage meI really want to be triaged.I really want to be triaged.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.
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;
// ...
}
noah56 and lucas-garrido
Metadata
Metadata
Assignees
Labels
triage meI really want to be triaged.I really want to be triaged.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.