keplergl / keplergl/kepler.gl

[Bug] KeplerGL is ignoring confg > mapState > latitude, longtitude, zoom

Open
#1,693 4 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
12k
Forks
2k
Avg merge
1d 5h
Merged PRs (30d)
66

Description

**Describe the bug**
We are using KeplerGL embedded in a portal and are persisting user datasets and configs to our backend. As per the the documentation we are using keplerGLSchema.getConfigToSave() and then keplerGLSchema.parseSavedConfig(). However once we parse and load into a new instance map state zoom and center are lost. KeplerGL behaves as if data have been added via AddDataButton (eg centers map on last layer added). Interestingly, other map state information is persisted. eg if isSplit = True, the reloaded map will be split. That and all other config information (eg layer, colours etc) lead me to believe this is a bug.

**To Reproduce**
Steps to reproduce the behavior:
1. use keplerGlSchema to getConfigToSave() and getDatasetsToSave() and save resultant to disk.
2. start new kepler instance and parseSavedDatasets() and parseSavedConfig()
3. pass to addDataToMap.
4. Observe zoom and center have been reset to default (almost as if centerMap=True)

**Expected behavior**
Map zoom and centre are persisted in the same manner as all other visConfig.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: Windows
- BrowserL: Tested on Chrome and Firefox latest.
- Version [e.g. 22]

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the keplerGlSchema getConfigToSave(), parseSavedConfig(), and parseSavedDatasets() entry points, then follow how the parsed values reach addDataToMap. Reproduce the save-and-reload sequence and verify that map latitude, longitude, and zoom remain unchanged while other visConfig values still load.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.