keplergl / kepler.gl

Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.
http://kepler.gl
MIT License
10.38k stars 1.74k forks source link

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

Open ngodber opened 2 years ago

ngodber commented 2 years ago

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):

ngodber commented 2 years ago

@satnamsinghdev

ngodber commented 2 years ago

I have confirmed this bug is also present when using the save/load from Dropbox functionality.

lalzart commented 1 year ago

@ngodber Did you figure this out?

ngodber commented 1 year ago

Hi,

Sorry, I didn't but it was solved. I believe it was in the method that data were being added to the map.

Cheers

On Fri, 28 Jul 2023 at 12:32, Lance Balzart @.***> wrote:

@ngodber https://github.com/ngodber Did you figure this out?

— Reply to this email directly, view it on GitHub https://github.com/keplergl/kepler.gl/issues/1693#issuecomment-1654886513, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC2JLXUDYLOP3I6PYS5DHQLXSMQDJANCNFSM5NMA4YRA . You are receiving this because you were mentioned.Message ID: @.***>