Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.
add supportedDatasetTypes to layer, show dataset selector even if there is only 1 or no option (#1883)
Jacob Wasilkowskidfd73a534188
diff --git a/src/components/side-panel/layer-panel/layer-configurator.tsx b/src/components/side-panel/layer-panel/layer-configurator.tsxindex d4361cfa6..f33123231 100644--- a/src/components/side-panel/layer-panel/layer-configurator.tsx+++ b/src/components/side-panel/layer-panel/layer-configurator.tsx@@ -1029,15 +1029,13 @@ export default function LayerConfiguratorFactory(// @ts-ignoreonSelect={updateLayerType}/>- {Object.keys(datasets).length > 1 && (- <SourceDataSelector- datasets={datasets}- id={layer.id}- dataId={config.dataId}- // @ts-ignore- onSelect={(value: string) => updateLayerConfig({dataId: value})}- />- )}+ <SourceDataSelector+ datasets={datasets}+ id={layer.id}+ dataId={config.dataId}+ // @ts-ignore+ onSelect={(value: string) => updateLayerConfig({dataId: value})}+ /><LayerColumnConfigcolumnPairs={layer.columnPairs}columns={layer.config.columns}diff --git a/src/layers/src/base-layer.ts b/src/layers/src/base-layer.tsindex 5dd21d99b..04dbc14ea 100644--- a/src/layers/src/base-layer.ts+++ b/src/layers/src/base-layer.ts@@ -350,6 +350,10 @@ class Layer {get layerInfoModal(): any {return null;}++ get supportedDatasetTypes(): string[] | null {+ return null;+ }/** Given a dataset, automatically find props to create layer based on it* and return the props and previous found layers.