Skip to content

Scattermap hover functionality broken when mapbox bearing is set to 90 degrees #5288

@madeofcroatia

Description

@madeofcroatia

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.

Screen.Recording.2025-07-21.at.1.13.55.PM.mov

Metadata

Metadata

Assignees

Labels

P2considered for next cyclebugsomething brokenregressionthis used to work

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions