1

I am attempting a slickR carousel using leaflet htmlwidgets instead of images. I am following the https://metrumresearchgroup.github.io/slickR/ 'htmlwigets' section.

When I execute the following code, the carousel is blank for each slide.

library(slickR)
library(leaflet)
#Create leaflet object
l <- leaflet() %>% addProviderTiles(providers$OpenStreetMap) %>%
                   setView(lng = -118.03746, lat=54.04148,zoom=10)

#Save leaflet object as .html file
htmlwidgets::saveWidget(l,'leaflet.html')

#Read-in .html and copy 4 times, 1 map for each slide 
slickR(c(rep(paste0(readLines('leaflet.html'),collapse='\n'),4)),
       slideId = 'leaf',
       slideType = rep('iframe'),
       height='400px',width='100%')

enter image description here

In my file directory the leaflet.html saved and can open. Spinning the tires on this one - any ideas on how I can get the maps to show in the carousel?

ismirsehregal
  • 30,045
  • 5
  • 31
  • 78
dwiz
  • 410
  • 3
  • 16
  • Works for me on RStudio Server 1.3.959 running R 4.0.2 and **slickR** 0.4.9 on an Ubuntu 18.04.5 LTS machine. – fdetsch Aug 31 '20 at 16:45

0 Answers0