I’ve created a R markdown report where the sections and tabsets are dynamically created. I have an issue where the Leaflet maps are not being generated in the output, but rather a blank white space. They do however render in R studio. Here is an image showing how the output currently looks, and how it […]
- Tags "{.tabset .tabset-fade .tabset-pills}", "/map.html")) # m <- htmltools::includeHTML("map.html") produces an odd output where the entire document becomes a laggy leaflet map # print(, "\n") cat("\n\n\n") ##### rest of code ##### } } It has something to do with html rendering I presume, "\n") cat("\n\n\n") cat("This is where the map will go ") # generate leaflet plot (doesn't even show white space if not stored i, albeit the same plot over and over. Will explore further. m % addTiles() %>% addMarkers(map_data$Longitude, and how it should look. Here is the code i've tried: {r, as static plots i've generated using ggmap work; however I want my maps to be interactive. N.B. The maps render fine in R studio, but rather a blank white space. They do however render in R studio. Here is an image showing how the output currently looks, echo = FALSE, estates, I have made some changes to the code. The leaflet plots now show (with interactivity too), I've created a R markdown report where the sections and tabsets are dynamically created. I have an issue where the Leaflet maps are not bein, just not in the knitr html output. EDIT As suggested by Susan Switzer, Major, map_data$Latitude) ) ### options i've tried for getting the Leaflet map to plot correctly page print(page) print(page[[1]]) page[[1]], map_data$Latitude) library(mapview) m <- mapshot(m, message=FALSE} for (estates in filtered_list){ map_data % filter(Street_Postcode == estates) cat("###", results='asis', src = "map.html") print(m), url = paste0(getwd(), warning=FALSE