1

I'm trying to use OpenTopoMap on a R Leaflet map. The basemaps from OSM, Esri and Stamen loads fine (thus no proxy problem) but when I try to load OpenTopoMap, all I get are gray tiles.

Anyone else has this problem? Bellow is the R code I use:

require(leaflet)

m <- leaflet() %>%
  addTiles(group = 'OSM') %>%
  addProviderTiles(providers$OpenTopoMap, group='Topo') %>%
  addProviderTiles(providers$Esri.WorldTopoMap, group='Esri') %>%
  addProviderTiles(providers$Stamen.Toner, group = "Toner") %>%
  addLayersControl(
    baseGroups = c('OSM', 'Topo', 'Toner', 'Esri'))

m
  • 1
    Have you tried viewing it in the browser? – TimSalabim Mar 22 '18 at 12:16
  • 1
    That sound you heard was my head banging against the keyboard... It works in the browser. Now I just need to figure out why OSM, Toner and Esri works in RStudio viewer but OpenTopoMap doesn't. – Daniel Mar 22 '18 at 12:21
  • I think it might have to do with https vs http but this is only a guess. Best to have a look through the source code of the leaflet package. – TimSalabim Mar 22 '18 at 12:39
  • TimSalabim: Where do I check that? Noob here – Daniel Mar 22 '18 at 15:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.