Skip to content

Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.

[Bug] Fix getSampleData import (#1964)

Shan He359e03878f77
diff --git a/src/layers/src/base-layer.ts b/src/layers/src/base-layer.ts
index f99fe6862..5bf52746f 100644
--- a/src/layers/src/base-layer.ts
+++ b/src/layers/src/base-layer.ts
@@ -65,7 +65,8 @@ import {
Filter
} from '@kepler.gl/types';
import {KeplerTable, Datasets, GpuFilter, DataContainerInterface} from '@kepler.gl/table';
-import {getLatLngBounds, getSampleData, isPlainObject, notNullorUndefined} from '@kepler.gl/utils';
+import {getLatLngBounds, isPlainObject, notNullorUndefined} from '@kepler.gl/utils';
+import {getSampleContainerData} from '@kepler.gl/table';
export type LayerColumn = {value: string | null; fieldIdx: number; optional?: boolean};
@@ -989,7 +990,7 @@ class Layer {
// get a sample of data to calculate bounds
const sampleData =
dataContainer.numRows() > MAX_SAMPLE_SIZE
- ? getSampleData(dataContainer, MAX_SAMPLE_SIZE)
+ ? getSampleContainerData(dataContainer, MAX_SAMPLE_SIZE)
: dataContainer;
const points = sampleData.mapIndex(getPosition);