将OGC格式的WMSTiles()添加到传单地图,标识正确的URL和图层名称

时间:2019-05-06 17:42:32

标签: r leaflet ogc

以下是WMS切片的传单示例-https://rstudio.github.io/leaflet/basemaps.html-我希望在传单地图中使用此“ USGS gage” WMS切片服务。

https://worldmap.harvard.edu/data/geonode:usgs_gage_locations_jbd(包括下面的开放式地理空间联盟(ogc)“ OGC WMS链接”)

http://worldmap.harvard.edu/geoserver/geonode/geonode:usgs_gage_locations_jbd/wms?tiled=true&service=WMS&request=GetCapabilities

如何识别要输入的网址和要输入的图层名称?在他们WMS代码页的最底部,

<Layer queryable="1">
<Name>usgs_gage_locations_jbd</Name>
<Title>USGS Gage Locations</Title>

我假设使用layers = "usgs_gage_locations_jbd",所以如果正确,我可能只需要正确的URL。这是我失败的尝试:

library(leaflet)

leaflet() %>% addTiles() %>% setView(-120.65, 40.0285, zoom = 7) %>%
 addWMSTiles(
"http://worldmap.harvard.edu/geoserver/geonode/usgs_gage_locations_jbd/os?SERVICE=WMS&",  
  layers = "usgs_gage_locations_jbd",
  options = WMSTileOptions(format = "image/png", transparent = TRUE),
  attribution = "USGS / Harvard University"
 )

0 个答案:

没有答案