You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the documentation in Readme.md and what I have seen debugging, the two arguments for the color function vary by geometry type. As someone who wants to color a bunch of points by e.g. feature.properties.my_value, I'm totally confused. Is this an error or intentional?
"shapes" (i.e. polys) and lines: When color is a Function its arguments are the index:number and the feature:object that is being colored
points: When color is a Function its arguments are the index:number and the point:array that is being colored
Thanks!
The text was updated successfully, but these errors were encountered:
The discrepancy is quite confusing. If you look at points.ts:
When plotting an array the color function takes in LatLng
When plotting a FeatureCollection the color function takes in the entire feature.
Is there a reason for implementing it like this ?
Same thing happens for the size property and I think it would be better if both color and size take in the entire feature
if (colorFn) {
chosenColor = colorFn(i, latLng);
}
if (colorFn) {
chosenColor = colorFn(i, feature);
}
According to the documentation in Readme.md and what I have seen debugging, the two arguments for the color function vary by geometry type. As someone who wants to color a bunch of points by e.g. feature.properties.my_value, I'm totally confused. Is this an error or intentional?
"shapes" (i.e. polys) and lines:
When color is a Function its arguments are the index:number and the feature:object that is being colored
points:
When color is a Function its arguments are the index:number and the point:array that is being colored
Thanks!
The text was updated successfully, but these errors were encountered: