Scattermapbox: Don't draw the points

Hello,

I'm trying to draw the terraces of a certain city on a map.

I have the latitude and longitude of the terraces. In addition, a grouping of them by "zones", in the dataset it appears as "districts" (11 different districts)

I have followed the code suggested in the "plotly" guide (Scattermapbox in R), but as you can see in the attached image, no map is drawn.

I am attaching part of the code that I am using, but if necessary I can attach the dataset.

Sys.setenv(mapboxAccessToken = Sys.getenv("MAPBOX_TOKEN"))

fig <- df %>% plot_mapbox(lat = ~lat, lon = ~long,
                          split = ~Distrito, size=2,
                          mode = 'scattermapbox', hoverinfo='name') 
fig <- fig %>% layout(title = 'Terrazas en Málaga',
                      font = list(color='white'),
                      plot_bgcolor = '#191A1A', paper_bgcolor = '#191A1A',
                      mapbox = list(style = 'dark'),
                      legend = list(orientation = 'h',
                                    font = list(size = 10)),
                      margin = list(l = 25, r = 25,
                                    b = 25, t = 25,
                                    pad = 2)) 
fig <- fig %>% config(mapboxAccessToken = Sys.getenv("MAPBOX_TOKEN"))

fig

I have removed the MAPBOX TOKEN to upload the code.

I hope someone knows how to help me.
Thanks a lot. And excuse my English.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.