【问题标题】:How to integrate shiny, leaflet and ncWMS?如何集成闪亮、传单和ncWMS?
【发布时间】:2016-01-24 23:01:05
【问题描述】:

我已经设置了一个 ncWMS 服务器,它将我的 netcdf 文件提供给 web 地图服务器。现在我想通过 R 传单包将 ncWMS 服务与我闪亮的 APP 集成:

显示示例代码没有问题,但总是得到空传单结果。

我的代码是:

图书馆(传单)

leaflet() %>% 
    addTiles() %>% 
    setView(133, -23, zoom = 4) %>%
    addWMSTiles(
        "https://croptsrv-cdc.it.csiro.au/ncWMS/wms",
        layers = "fi/mint",
        options = WMSTileOptions(
                  format = "image/png", 
                  transparent = FALSE, version = "1.3.0",
                                 CRS = 'CRS:84',
                                 styles = 'boxfill/redblue'),
        attribution = ""
    )

这是ncWMS数据集功能的链接:

https://croptsrv-cdc.it.csiro.au/ncWMS/wms?SERVICE=WMS&REQUEST=GetCapabilities&VERSION=1.3.0&DATASET=fi

我玩过 URL 和选项,但仍然没有地图。

我应该如何使用传单显示我的 ncWMS 地图?感谢您的任何建议。

【问题讨论】:

    标签: r shiny leaflet wms


    【解决方案1】:

    不要在 WMSTileOptions 中指定 CRS - 这对我有用:

    leaflet() %>%
     addTiles() %>%
     setView(133, -23, zoom = 4) %>% 
     addWMSTiles("https://croptsrv-cdc.it.csiro.au/ncWMS/wms",
       layers = "fi/mint",
       options = WMSTileOptions(
         format = "image/png",
         transparent=TRUE,
         styles="boxfill/redblue"))
    

    【讨论】:

    • 感谢您的建议。你能告诉我你的会议信息吗?我无法重现结果。
    • 我想我找到了问题所在。 ncWMS 层仅不适用于 RStudio 桌面版中的内部查看器。
    猜你喜欢
    • 2017-06-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-05-30
    • 1970-01-01
    • 2018-04-30
    相关资源
    最近更新 更多