-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(defaultRenderer): enable color change #871
base: main
Are you sure you want to change the base?
feat(defaultRenderer): enable color change #871
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
FYI, I've accepted the Cla, but don't know how to run the pipe again |
Just leaving a comment to say I would love this feature |
It would be great if I could pass function in constructor that will receive current cluster and returns color of the cluster. |
Another +1 to this thread. |
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) ? "#ff0000" : "#0000ff"; | ||
count > Math.max(10, stats.clusters.markers.mean) ? this.overMeanColor : this.underMeanColor; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
count > Math.max(10, stats.clusters.markers.mean) ? this.overMeanColor : this.underMeanColor; | |
count > Math.max(10, stats.clusters.markers.mean) ? var(--over-mean) : var(--under-mean); |
Wondering if it would be easier to just change the hex values to css variables.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@behunin they didn't accept my original pull request, not sure what to do to make them look at this issue :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jpoehnelt Could you poke whomever google has assigned to this product right now? How can we get some traction here?
@wangela ptal |
Thank you for opening a Pull Request!
Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #870 🦕