Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.
[feat] minZoom and maxZoom for examples (#2933)
Igor Dykhta4d1bfb3d0f56
diff --git a/examples/demo-app/src/reducers/index.js b/examples/demo-app/src/reducers/index.jsindex 16744a37e..87c7ba7bd 100644--- a/examples/demo-app/src/reducers/index.js+++ b/examples/demo-app/src/reducers/index.js@@ -175,6 +175,16 @@ const loadRemoteDatasetProcessedSuccess = (state, action) => {const parsedConfig = config ? KeplerGlSchema.parseSavedConfig(config) : null;+ // a hack to use minZoom and maxZoom from examples+ if (parsedConfig?.mapState) {+ if (typeof config?.config?.mapState?.maxZoom === 'number') {+ parsedConfig.mapState.maxZoom = config.config.mapState.maxZoom;+ }+ if (typeof config?.config?.mapState?.minZoom === 'number') {+ parsedConfig.mapState.minZoom = config.config.mapState.maxZoom;+ }+ }+const keplerGlInstance = combinedUpdaters.addDataToMapUpdater(state.keplerGl.map, // "map" is the id of your kepler.gl instance{