🏥 🏭 Working on the COVID-19 response in Canada? Plotly & the Canadian government can help you and your organization. Learn more and get in touch.

change scattermapbox symbols in R

I would like to change the symbol in a scattermapbox. I have found many resources on how to solve this problem in python but not in R

This is a rep example:

dat <- tribble(~latitude, ~longitude,
 "39.33359", "-76.63563",
 "38.85391", "-76.90812",
 "39.39105", "-76.83006")

fig <- dat  %>%
        lat = ~latitude,
        lon = ~longitude,
        mode = "markers",
        marker = list(symbol = 'car', size = 15, color='blue'),
        type = 'scattermapbox') 
fig %>%
      mapbox = list(
        style = 'open-street-map',
        zoom = 5,
        center = list(lat = 39.33359, lon = -76.63563)))

It works fine with the default shape (circle). I tried different syntaxes without any success.

Any hints?

Got the solution on github

At the moment, you can change markers only when using the default style.