Skip to content

[BUG] set_view_state no longer moves previously rendered map #1062

@ATL2001

Description

@ATL2001

Context

Calling set_view_state on a map with a new lat/lon isn't moving a previously rendered map. I've poked around in the code a bit, but it's not jumping out to me where the issue is. I suspect it's the same underlying problem which is causing #1024 and is what jwardbond is seeing.

Resulting behaviour, error message or logs

Describe what happened:

Image

Environment

  • OS: Windows 11
  • Browser: opera
  • Lonboard Version: 0.13.0

Steps to reproduce the bug

cell 1

from lonboard import viz
m = viz(data=[])
m.set_view_state(longitude=-62, latitude=45, zoom=5) # moves map `m` to Nova Scotia
m

cell2

m.set_view_state(longitude=-90, latitude=45, zoom=5) # should move map `m` to Wisconsin
# If this cell was run really quickly after cell 1 (as in running a notebook with restart kernel
# and run all cells), map `m` in cell 1 will have moved to wisconsin
# but if I let the map in cell 1 render then run this cell and look at the map displayed in cell 1
# it will still be centered in Nova Scotia
# 
# No matter what, if we display the map again here, it is in Wisconsin...
m

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions