Skip to content

Problems with getFeatureInfo #14

@Rudolf-May

Description

@Rudolf-May

Hallo trafficonese,

I had been very happy when i found your plugin for leaflet which enables to retrieve the feature info from a wms when clicking on some feature of a wms layer.
It worked perfectly when I tested this in my local RStudio environment. But -
when I upload the app to my productive server (where shiny server is configured to run behind an apache proxy) I get blank popups instead of the feature information.
This is my simplified code for testing (you can try it here: https://floraweb.de/shiny/wmstest):

library(leaflet)
library(leaflet.extras)
library(leaflet.extras2)
library(shiny)

ui <- fluidPage(
  leafletOutput("myMap", height = "600"))

server <- function(input, output, session) {
  output$myMap <- renderLeaflet(leaflet() %>% 
                    setView(lng=10,lat=51.2, zoom = 6) %>% addTiles(group = "OSM") %>%
                    addProviderTiles(providers$OpenTopoMap, group = "Topo") %>%
                    addProviderTiles(providers$Esri.WorldImagery, group = "ESRI Sat") %>%
                    addWMS(baseUrl = "http://geodienste.bfn.de/ogc/wms/schutzgebiet?",
                           group="NP",
                           layers = "Nationalparke",
                           options = WMSTileOptions(format="image/png",transparent=TRUE,opacity=0.7,info_format = "text/html",tiled = FALSE),
                           attribution = "Overlaykarten: (c) Bundesamt für Naturschutz (BfN) 2015") %>%
                    addWMS(baseUrl = "http://geodienste.bfn.de/ogc/wms/schutzgebiet?",
                           group="BSR",
                           layers = "Biosphaerenreservate",
                           options = WMSTileOptions(transparent = TRUE,opacity=0.7,format = "image/png",info_format = "text/html",tiled = FALSE),
                           attribution = "Overlaykarten: (c) Bundesamt für Naturschutz (BfN) 2015" ) %>%
                    addWMS(baseUrl = "http://geodienste.bfn.de/ogc/wms/gliederungen?",
                           group="RGL",
                           layers = "Naturraeume",
                           options = WMSTileOptions(format="image/png",transparent=TRUE,opacity=0.7,info_format = "text/html",tiled = FALSE),
                           attribution = "Overlaykarten: (c) Bundesamt für Naturschutz (BfN) 2015" ) %>%
                    addWMS(baseUrl = "http://sg.geodatenzentrum.de/wms_vg250-ew?",
                           group="VG250",
                           layers = "vg250_krs",
                           options = WMSTileOptions(format="image/png",transparent=TRUE,opacity=0.7,info_format = "text/html",tiled = FALSE),
                           attribution = "Overlaykarte: (c) Bundesamt für Kartographie und Geodäsie (BKG) 2014" ) %>%
                    addLayersControl(
                          baseGroups = c("OSM", "Topo", "ESRI Sat"),
                          overlayGroups = c("NP","BSR","RGL","VG250"),
                          options = layersControlOptions(collapsed = TRUE)) %>%
                    hideGroup("NP") %>% hideGroup("BSR") %>% hideGroup("RGL") %>% hideGroup("VG250") %>%
                    addResetMapButton()
        )
}
shinyApp(ui, server)

I would be very happy if you could help to find out what might be the reason for this (I have read the issue #4, but this did'nt put me on the right track...

Metadata

Metadata

Assignees

No one assigned

    Labels

    upstreamBug in upstream repo

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions