Skip to content
Prev 361008 / 398503 Next

No map background showed up when adding tile in leaflet()

Hey All,

I am learning to create a map with leaflet(), but my default map background won't show up, its just grey.

Here is my code:

leaflet() %>% addTiles()
addCircleMarkers(lng=points$lon,lat=points$lat,
                         radius=6,stroke=FALSE,fillOpacity = 0.5)

When I run the code, the markers show up and interaction of zoom in/out works okay, but background is always solid grey, not sure why. I tried "addProviderTiles("Stamen.TonerLabels")" as well, does not work out.

Thanks for your help in advance.

We respect your privacy. Please review our privacy policy for more information.
http://www.pge.com/en/about/company/privacy/customer/index.page