首页 > 解决方案 > 为什么 USGS 提供商切片和 WMS 图层在 Leaflet 中显示为空白?

问题描述

我正在尝试将USGS.USopo 提供方图块添加到 R 中的传单地图中,但每次尝试都只提供一张空白地图。WMS 瓦片源可以在这里找到。以下所有内容都会产生空地图。

library(leaflet)
map <- leaflet(options = leafletOptions(attributionControl=FALSE)) %>%
  addProviderTiles(providers$Esri.WorldTopoMap)
map
library(leaflet)
map <- leaflet(options = leafletOptions(attributionControl=FALSE)) %>%
  addWMSTiles("https://index.nationalmap.gov/arcgis/services/3DEPElevationIndex/MapServer/WMSServer?request=GetCapabilities&service=WMS", layers ="Layers")
map

library(leaflet)
map <- leaflet(options = leafletOptions(attributionControl=FALSE)) %>%
  addTiles("http://{s}.basemap.nationalmap.gov/arcgis/rest/services/USGSImageryOnly/MapServer/tile/{z}/{y}/{x}.png")
map

标签: rleaflet

解决方案


推荐阅读