Why does mapshot in R (mapview package) not save the addWebGLHeatmap (leaflet extras) layer?

那年仲夏 提交于 2019-12-11 15:20:03

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!