问题
Please help me with the following.
I am making a heatmap using leaflet and addWebGLHeatmap. This works fine, until I try and save the plot as PNG using webshot. See the code below:
m <- map %>%
addWebGLHeatmap(data = dataset, lng=~lon, lat=~lat, size = 800,
opacity = 0.6, intensity = 1) %>%
addPolygons(data = shapefile, weight = 2, color = "black", fillOpacity = 0)
mapshot(m, file = "testRplot.png")
What it shows in plotviewer: Plot in viewer
What it shows after saving: Plot after saving
Hope anyone is able to help.
来源:https://stackoverflow.com/questions/45460035/why-does-mapshot-in-r-mapview-package-not-save-the-addwebglheatmap-leaflet-ex