library(leaflet)
library(leaflet.extras)
leaflet(quakes) %>%
addTiles() %>%
addHeatmap(lng = ~long, lat = ~lat, radius = 8) %>%
addFullscreenControl() %>%
htmlwidgets::onRender("
function(el, x) {
this.toggleFullscreen({pseudoFullscreen: true})
this.fullscreenControl.remove()
}
")