Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.
[fix] show scale options for Point Count in aggregation layers (#2870)
Igor Dykhta00dd00279fbd
diff --git a/src/constants/src/default-settings.ts b/src/constants/src/default-settings.tsindex 3e9a398c8..5b8848462 100644--- a/src/constants/src/default-settings.ts+++ b/src/constants/src/default-settings.ts@@ -641,14 +641,14 @@ const DEFAULT_AGGREGATION_COLOR_SCALES = [export const linearFieldAggrScaleFunctions = {[CHANNEL_SCALES.colorAggr]: [- AGGREGATION_TYPES.count,AGGREGATION_TYPES.average,AGGREGATION_TYPES.maximum,AGGREGATION_TYPES.minimum,AGGREGATION_TYPES.median,AGGREGATION_TYPES.stdev,AGGREGATION_TYPES.sum,- AGGREGATION_TYPES.variance+ AGGREGATION_TYPES.variance,+ AGGREGATION_TYPES.count].reduce((prev, cur) => {prev[cur] = DEFAULT_AGGREGATION_COLOR_SCALES;return prev;diff --git a/src/layers/src/aggregation-layer.ts b/src/layers/src/aggregation-layer.tsindex 95501f0bc..c9e62e7bd 100644--- a/src/layers/src/aggregation-layer.ts+++ b/src/layers/src/aggregation-layer.ts@@ -15,7 +15,8 @@ import {HIGHLIGH_COLOR_3D,CHANNEL_SCALES,FIELD_OPTS,- DEFAULT_AGGREGATION+ DEFAULT_AGGREGATION,+ AGGREGATION_TYPES} from '@kepler.gl/constants';import {ColorRange, Field, LayerColumn, Merge} from '@kepler.gl/types';import {KeplerTable, Datasets} from '@kepler.gl/table';@@ -262,8 +263,9 @@ export default class AggregationLayer extends Layer {return this.config[field]? // scale options based on aggregationFIELD_OPTS[this.config[field].type].scale[channelScaleType][aggregationType]- : // default scale options for point count- DEFAULT_AGGREGATION[channelScaleType][aggregationType];+ : // default scale options for point count: aggregationType should be count since+ // LAYER_VIS_CONFIGS.aggregation.defaultValue is AGGREGATION_TYPES.average,+ DEFAULT_AGGREGATION[channelScaleType][AGGREGATION_TYPES.count];}/**