我想从 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()