宣传单地图:删除路图层

时间:2017-02-20 21:53:16

标签: r leaflet

我想从R中的传单地图中删除道路。有没有办法去除我们想要的层,例如道路,湖泊,州界等?

示例代码:

library(leaflet)
library(plot3D)
top = 45      # north lat
left = -110   # west long
right = -90   # east long
bottom =  32  # south lat

longitudes= seq(left,right, length.out = 3)
latitude=seq(bottom,top,length.out = 5)

 latlons_mesh=mesh(longitudes,latitude)

 longitude=as.vector(latlons_mesh$x)
 latitude=as.vector(latlons_mesh$y)

 mydata=data.frame(longitude=longitude,
                  latitude=latitude)

 leaflet(mydata)%>%fitBounds(right,bottom,left,top)%>%
    addTiles()%>%
    addMarkers()

enter image description here

0 个答案:

没有答案