Call the color callback once per feature

This commit is contained in:
Tim Schaub
2019-04-28 14:09:31 -06:00
parent fde36b237e
commit 3b1a415d6b
3 changed files with 17 additions and 32 deletions

View File

@@ -38,7 +38,7 @@ class WebglPointsLayer extends VectorLayer {
createRenderer() {
return new WebGLPointsLayerRenderer(this, {
texture: texture,
colorCallback: function(feature, vertex, color) {
colorCallback: function(feature, color) {
// color is interpolated based on year (min is 1910, max is 2013)
// please note: most values are between 2000-2013
const ratio = (feature.get('year') - 1950) / (2013 - 1950);