Last active
March 28, 2019 22:45
-
-
Save ateucher/1c99db8dab2d7aa2d1df36a7e7e4acb9 to your computer and use it in GitHub Desktop.
BC WMSTiles
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(bcmaps) | |
library(leaflet) | |
library(sf) | |
st_transform(bc_bound(), 4326) %>% | |
leaflet() %>% | |
#add basemap | |
#addpolygons and make it show in three different layers, by risk level | |
addPolygons() %>% | |
addProviderTiles(providers$CartoDB.DarkMatter, | |
options = providerTileOptions(noWrap = TRUE)) %>% | |
addWMSTiles("https://openmaps.gov.bc.ca/geo/pub/WHSE_WATER_MANAGEMENT.WLS_PWD_APPLICATIONS_SVW/ows?service=WMS", | |
layers="pub:WHSE_WATER_MANAGEMENT.WLS_PWD_APPLICATIONS_SVW", | |
options = WMSTileOptions(format = "image/png", | |
transparent = TRUE)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(leaflet) | |
library(envreportutils) | |
library(leaflet.extras) | |
leaflet() %>% | |
addProviderTiles(providers$CartoDB.DarkMatter, | |
options = providerTileOptions(noWrap = TRUE)) %>% | |
addWMSTiles("https://openmaps.gov.bc.ca/geo/pub/WHSE_WATER_MANAGEMENT.WLS_PWD_APPLICATIONS_SVW/ows?service=WMS", | |
layers="pub:WHSE_WATER_MANAGEMENT.WLS_PWD_APPLICATIONS_SVW", | |
options = WMSTileOptions(format = "image/png", | |
transparent = TRUE)) %>% | |
addWMSLegend(uri = "https://openmaps.gov.bc.ca/geo/pub/WHSE_WATER_MANAGEMENT.WLS_PWD_APPLICATIONS_SVW/ows?service=WMS&request=GetLegendGraphic&format=image%2Fpng&width=20&height=20&layer=pub%3AWHSE_WATER_MANAGEMENT.WLS_PWD_APPLICATIONS_SVW") %>% | |
set_bc_view() %>% | |
add_bc_home_button() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment