Skip to content

[BUG] map.set_view_state does not set pitch and bearing #1052

@jwardbond

Description

@jwardbond

After updating to 0.13, map.set_view_state() calls no longer update the bearing or pitch. I looked for the breaking commit and found that it was 2ac3d52

Environment

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

Steps to reproduce the bug

from lonboard import viz
from lonboard.basemap import MaplibreBasemap

m = viz(data=[])
m.set_view_state(longitude=-80, latitude=50, zoom=2, pitch=45, bearing=90)
m

This should produce a map that is 1) at significant pitch and 2) rotated 90 degrees. Instead, it produces

Image

Additionally, changing the pitch/bearing manually and then calling m.view_state does not show the changes to the map.

I have tested this using all MaplibreBasemap modes (except it is difficult to manually change the pitch/bearing using reverse-controlled without getting a context menu lol).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions