# Question: Px.scatter\_mapbox hover not showing anything

**URL:** <https://community.plotly.com/t/question-px-scatter-mapbox-hover-not-showing-anything/64693>\
**Category:** 📊 Plotly Python\
**Created:** [June 1, 2022, 12:33pm UTC](https://community.plotly.com/t/question-px-scatter-mapbox-hover-not-showing-anything/64693 "2022-06-01T12:33:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![AsadBagheri](https://avatars.discourse-cdn.com/v4/letter/a/e9a140/32.png) [@AsadBagheri](https://community.plotly.com/u/AsadBagheri)\
**Post date:** [June 1, 2022, 12:33pm UTC](https://community.plotly.com/t/question-px-scatter-mapbox-hover-not-showing-anything/64693/1 "2022-06-01T12:33:41Z")

</div>

fig = px.scatter\_mapbox(data\_frame=dff29, lat=“latid”, lon=“long”, center={“lat”: 60, “lon”: 10},  
width=800, height=800, zoom=5, hover\_name=“Name”, hover\_data=[“Name”, “latid”, “long”],  
color\_discrete\_sequence=[“fuchsia”],  
title=‘Målepunkter veiobjekter 2021’  
)  
fig.update\_layout(mapbox\_style=“dark”, mapbox\_accesstoken=AccessToken)  
fig.update\_layout(mapbox\_style=“open-street-map”)

fig.show()

Any Idea??? my work is stopped, would be very greatfull for a response and help, thanks

---

<div class="post-metadata">

**Author:** ![r-beginners](https://avatars.discourse-cdn.com/v4/letter/r/a87d85/32.png) [@r-beginners](https://community.plotly.com/u/r-beginners)\
**Post date:** [June 1, 2022, 1:22pm UTC](https://community.plotly.com/t/question-px-scatter-mapbox-hover-not-showing-anything/64693/2 "2022-06-01T13:22:14Z")

</div>

Are you using native language in your code? I think you need to check again the double quotation (mark) of latitude and longitude, the center of latitude and longitude, the title, and the specification of hover data.

---

<div class="post-metadata">

**Author:** ![AsadBagheri](https://avatars.discourse-cdn.com/v4/letter/a/e9a140/32.png) [@AsadBagheri](https://community.plotly.com/u/AsadBagheri)\
**Post date:** [June 1, 2022, 3:07pm UTC](https://community.plotly.com/t/question-px-scatter-mapbox-hover-not-showing-anything/64693/3 "2022-06-01T15:07:12Z")

</div>

Yes, i am using native language, but no effect if i use english  
single and double quitation are testet and there were no effect.  
thank for your response

---

<div class="post-metadata">

**Author:** ![r-beginners](https://avatars.discourse-cdn.com/v4/letter/r/a87d85/32.png) [@r-beginners](https://community.plotly.com/u/r-beginners)\
**Post date:** [June 2, 2022, 12:26am UTC](https://community.plotly.com/t/question-px-scatter-mapbox-hover-not-showing-anything/64693/4 "2022-06-02T00:26:54Z")

</div>

Double quotation marks, etc. have been corrected to English standards. And since there is no data presented, I modified the code using data from the official reference. Added color and marker size settings. Please check the data by replacing them with yours.

```auto
import plotly.express as px
import numpy as np

AccessToken = open("mapbox_api_key.txt").read()

df = px.data.carshare()

fig = px.scatter_mapbox(df,
                        lat="centroid_lat",
                        lon="centroid_lon", 
                        center={"lat": np.mean(df['centroid_lat']), "lon": np.mean(df['centroid_lon'])},
                        width=800,
                        height=800,
                        zoom=10,
                        #hover_name="Name",
                        hover_data=["centroid_lat", "centroid_lon", "peak_hour"],
                        color_discrete_sequence="fuchsia",
                        title="Målepunkter veiobjekter 2021",
                        color="peak_hour",
                        size="car_hours",
                       )

fig.update_layout(mapbox_style="dark", mapbox_accesstoken=AccessToken)
fig.update_layout(mapbox_style="open-street-map")

fig.show()

```

 ![newplot(29)](https://us1.discourse-cdn.com/flex024/uploads/plot/original/3X/3/8/38207ef110c3e2efe0ba5b204cc05d08f491a049.jpeg)

---

<div class="post-metadata">

**Author:** ![AsadBagheri](https://avatars.discourse-cdn.com/v4/letter/a/e9a140/32.png) [@AsadBagheri](https://community.plotly.com/u/AsadBagheri)\
**Post date:** [June 2, 2022, 8:35am UTC](https://community.plotly.com/t/question-px-scatter-mapbox-hover-not-showing-anything/64693/5 "2022-06-02T08:35:41Z")

</div>

Thank you for your response,  
after a more detailed review yesterday, I found the fault in my data, one of latitude points had an incorrect format (it was 585638.2 instead of 58.56382).  
I will write a new BUG report about it for Dash community.  
thank again
