Skip to content

Instantly share code, notes, and snippets.

@mhweber
Last active January 28, 2020 18:31
Show Gist options
  • Save mhweber/19a2cbe66c55bb6c5e7a468ced509282 to your computer and use it in GitHub Desktop.
Save mhweber/19a2cbe66c55bb6c5e7a468ced509282 to your computer and use it in GitHub Desktop.
R mapview display wms
library(sf)
library(dplyr)
library(mapview)
library(leaflet)
m <- mapview()
m@map = m@map %>% addWMSTiles(group = 'NHDPlus',
"https://watersgeo.epa.gov/arcgis/services/NHDPlus_NP21/NHDSnapshot_NP21/MapServer/WmsServer?",
layers = 4,
options = WMSTileOptions(format = "image/png", transparent = TRUE),
attribution = "") %>% setView(-122, 45, zoom=4)
m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment