Hi community, I'm try to do a map with leaflet() but I can add the road base map. The idea is highlight the roads near for each coordinates.
Why is the better base map for show this?
Im try to use some example of Leaflet Provider Demo but all don't run well in my script.
How is the better base map and why all not run?
library(tidyverse)
library(readxl)
library(leaflet)
NUEVAS_COORDENADAS <- structure(list(`Coll. No.` = c(3387, 3388, 3389, 3390, 3391, 3392, 3393, 3394, 3395, 3396),
County = c("Dona Ana", "Dona Ana", "Dona Ana", "Dona Ana", "Dona Ana", "Luna", "Luna", "Grant", "Grant", "Grant"),
New_Lat = c(32.3719722222222, 32.3712777777778,32.3348888888889, 32.3370833333333, 32.3656111111111, 32.1489722222222,
32.1489722222222, 33.0703055555556, 32.9730833333333, 32.64025),
New_Lng = c(-106.56225, -106.554805555556, -106.597777777778,-106.587111111111, -106.598666666667, -107.618111111111,
-107.618111111111, -107.982416666667, -108.214222222222, -108.556527777778)),
row.names = c(NA,-10L), class = c("tbl_df", "tbl", "data.frame"))
leaflet()|>
addProviderTiles(providers$Esri.WorldStreetMap)|>
leaflet::addMarkers(lat=NUEVAS_COORDENADAS$New_Lat,
lng=NUEVAS_COORDENADAS$New_Lng,data = NUEVAS_COORDENADAS,
popup =paste("<b> County:</b>",NUEVAS_COORDENADAS$County,"<br>",
"<b> Coll. No:</b>",NUEVAS_COORDENADAS$`Coll. No.`,"<br>",
"<b> Latitude:</b>",NUEVAS_COORDENADAS$New_Lat,"<br>",
"<b> Longitude:</b>",NUEVAS_COORDENADAS$New_Lng,"<br>" ),
labelOptions = labelOptions(noHide = T))
Tnks