I am trying to load OpenSeaMap
as a provider tile in leaflet
in R
.
leaflet() %>% addProviderTiles(providers$OpenSeaMap) %>% addMarkers(lng = df$Lon,
lat=df$Lat,
label=lapply(labs2, HTML))
However, the tiles are not getting loaded and I get an empty map. No errors, just an empty map with no tiles and my markers correctly plotted. Any idea what the problem could be?
Ok, through some trial and error, I think I've made it to work. I just added the default
addTiles()
before theaddProviderTiles()
. That seems to work, though I find it a bit strange.