leaflet() %>%
addTiles() %>%
setView(11, 51, 6) %>%
addWMSTiles(
baseUrl = "https://www.wms.nrw.de/wms/unfallatlas?request=GetMap",
layers = c("Unfallorte", "Personenschaden_5000", "Personenschaden_250"),
options = WMSTileOptions(format = "image/png", transparent = TRUE)
) %>%
addWMSLegend(
title = "Personenschaden_5000", titleStyle = "font-size:1em; font-weight:800",
uri = paste0(
"https://www.wms.nrw.de/wms/unfallatlas?request=",
"GetLegendGraphic&version=1.3.0&",
"format=image/png&layer=Personenschaden_5000"
)
)
Run the code above in your browser using DataLab