plotly.py
plotly.py copied to clipboard
Some Scattermapbox Symbols Not Available
This issue was first reported in https://github.com/plotly/plotly.py/issues/891, but it doesn't seem like it was fully understood or addressed. I found another post on the community forums about the same thing at https://community.plot.ly/t/solved-symbol-changes-not-showing-up-with-scattermapbox/1638
I am able to use only a subset of the icons found on https://labs.mapbox.com/maki-icons/. When I use "bus" or "embasssy" as the symbol, I see the icon without issue. When I change the symbol to "home" or "wheelchair", the icon is not rendered. It's as though only a subset of the mapbox icons are actually available. An excerpt from my code is copied below. This is intended to show a "wheelchair" icon, but it does not appear to work.
vehicle_fig.add_trace(go.Scattermapbox(
name='Stop',
lat=stop_lat,
lon=stop_lon,
mode='markers',
marker=go.scattermapbox.Marker(
size=15,
symbol='wheelchair'
),
showlegend=False,
text=stop_address,
hoverinfo='text',
hoverlabel=dict(bgcolor='#735139',
font=dict(color='white',
size=20))
))
I'm facing the same problem right now.
The icon heart
e. g. is also not working.
Hi, Has anyone found a solution? I am only able to plot points when I set symbol = "circle".
Same for me. I'm not connecting to a mapbox server, instead using WMS basemaps. Could that be the problem?
I found a solutions for this. Plotly/Dash uses the Maki icon set made by mapbox icons. Most of the icons in this icon set are not loaded into the default themes in mapbox such as monochrome. I was able to get icons other than circle to work by editing the theme I was using in mapbox studio by dragging the .svgs from the maki icon set into the browser window and then publishing the theme changes. After waiting for about 10 mins I was able to set and see icons other than the circle.
I am facing the exact same problem right now. The icon airport/airfield etc. are not working.
It's important to note that the special icon symbols only work when using a Mapbox-provided style, per the documentation: https://plotly.com/python/scattermapbox/#set-marker-symbols
Hey there,
The graph provided in the link provided by @nicolaskruchten renders just fine with my mapbox token. However, if y change the "airport" icon to "cross", the cross is not rendered. See also this discussion on the plotly forums.
https://community.plotly.com/t/scattermapbox-marker-symbol/82957
@archmoj will this be addressed by your recent work?
@BerserkerGaruk How did you import your custom style after publishing? I can't find any documentation around importing custom styles from MapBox Studio.
@gvwilson Do you have an estimate for when this might get addressed?