Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.
[Bug] Fix getSampleData util import (#1947)
Shan Hea98a015bc95f
diff --git a/examples/demo-app/webpack.config.js b/examples/demo-app/webpack.config.jsindex 929d32c94..9613da1c2 100644--- a/examples/demo-app/webpack.config.js+++ b/examples/demo-app/webpack.config.js@@ -74,7 +74,7 @@ const CONFIG = {]};-// This line enables bundling against src in this repo rather than installed deck.gl module+// This line enables bundling against src in this repo rather than installed kepler.gl modulemodule.exports = env => {return env ? require('../webpack.config.local')(CONFIG, __dirname)(env) : CONFIG;};diff --git a/examples/webpack.config.local.js b/examples/webpack.config.local.jsindex 4a8a17169..c99522482 100644--- a/examples/webpack.config.local.js+++ b/examples/webpack.config.local.js@@ -64,6 +64,14 @@ function makeLocalDevConfig(env, EXAMPLE_DIR = LIB_DIR, externals = {}) {const useLocalDeck = env.deck || env.hubble_src;const useRepoDeck = env.deck_src;+ // add kepler.gl submodule aliases+ const workspaces = KeplerPackage.workspaces;+ workspaces.forEach(workspace => {+ // workspace = "./src/types", "./src/constants", etc+ const moduleName = workspace.split('/').pop();+ resolveAlias[`@kepler.gl/${moduleName}`] = join(SRC_DIR, `${moduleName}/src`);+ });+// resolve deck.gl from local dirif (useLocalDeck || useRepoDeck) {// Load deck.gl from root node_modulesdiff --git a/package.json b/package.jsonindex e6b2c48ad..7e1eae775 100644--- a/package.json+++ b/package.json@@ -58,7 +58,7 @@"start:web": "yarn install-and-start -- website start","start:https": "yarn install-and-start -- examples/demo-app start-local-https","start:e2e": "yarn install-and-start -- examples/demo-app start-local-e2e",- "build": "rm -fr dist && babel src/{actions,components,middleware,reducers,templates,cloud-providers,connect,localization,schemas,tasks} --out-dir dist --source-maps inline --extensions '.ts,.tsx,.js,.jsx' --ignore '**/*.d.ts'",+ "build": "rm -fr dist && babel src/{actions,components,middleware,reducers,cloud-providers,connect,localization,schemas,tasks} --out-dir dist --source-maps inline --extensions '.ts,.tsx,.js,.jsx' --ignore '**/*.d.ts'","build:umd": "webpack --config ./webpack/umd.js --progress --env.prod","build:types": "tsc --project tsconfig.production.json","analyze": "yarn analyze:bundle",@@ -359,4 +359,4 @@"node": "12.22.12","yarn": "1.22.19"}-}+}\ No newline at end of filediff --git a/src/layers/src/base-layer.ts b/src/layers/src/base-layer.tsindex 924930e7c..96d32bbca 100644--- a/src/layers/src/base-layer.ts+++ b/src/layers/src/base-layer.ts@@ -66,7 +66,8 @@ import {} from '@kepler.gl/types';import KeplerTable, {Datasets, GpuFilter} from 'reducers/table-utils/kepler-table';import {DataContainerInterface} from 'reducers/table-utils/data-container-interface';-import {getLatLngBounds, getSampleData, isPlainObject, notNullorUndefined} from '@kepler.gl/utils';+import {getSampleData} from 'reducers/table-utils/data-container-utils';+import {getLatLngBounds, isPlainObject, notNullorUndefined} from '@kepler.gl/utils';export type LayerColumn = {value: string | null; fieldIdx: number; optional?: boolean};