将WMTS / WMS磁贴添加到传单

时间:2019-03-25 04:31:14

标签: r r-leaflet

这篇文章

R - Leaflet WMTS layer is not rendering

我认为我可以添加以下地图图块:

http://spatialservices.conservation.ca.gov/arcgis/rest/services/CGS/GeologicMapCA/MapServer/WMTS/1.0.0/WMTSCapabilities.xml

到传单地图。 (更多提供商数据在这里:https://maps.conservation.ca.gov/developers.html#serviceendpoints

类似:

library(leaflet)

map <- leaflet::leaflet() %>% addTiles() %>%
       setView(-119, 31, zoom = 4) %>%   
       addWMSTiles(baseUrl = "http://spatialservices.conservation.ca.gov/arcgis/rest/services/CGS/GeologicMapCA/MapServer/WMS", 
          layers = "CGS_GeologicMapCA",
          options =  WMSTileOptions(format = "image/png", transparent = TRUE),
          attribution = "State-of-California DOC, CGS")

print(map)

但是什么也没画,我不确定如何找到baseUrl应该是什么,或者我需要做些什么来插入这些图块。使用不同的baseUrl =(例如"http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi"layers = "nexrad-n0r-900913"),上述方法有效。

谢谢。

0 个答案:

没有答案