Scattermap hover functionality broken when mapbox bearing is set to 90 degrees
Open
@camdecoster is already working on this.
Since Aug 1, 2025.
bug
P2
regression
- Dominant language
- Python
- Stars
- 18.8k
- Forks
- 2.8k
- Avg merge
- 16h 26m
- Merged PRs (30d)
- 21
Description
Code example:
import plotly.graph_objects as go
import pandas as pd
import numpy as np
df = pd.DataFrame({
'lat': np.random.uniform(chicago_lat - lat_range, chicago_lat + lat_range, 50),
'lon': np.random.uniform(chicago_lon - lon_range, chicago_lon + lon_range, 50),
})
figure = go.Figure(
go.Scattermap(
lat=df['lat'],
lon=df['lon'],
mode='markers',
)
)
figure.update_layout(map_bearing=90)
figure.show()
When I move the mouse over different locations, I cannot see the hover information for the location I am hovering over. Instead, it is stuck on a location at the edge of the map. This does not happen when map_bearing is set to 80, 70, 45. The screen recording below demonstrates the issue.
https://github.com/user-attachments/assets/0d5299c3-83cf-430a-a856-8999dbf48ee6
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.