knitr::opts_chunk$set( echo = TRUE, collapse = TRUE, comment = "#>" )
library(pragr) library(sf) library(leaflet) library(leaflet.esri)
stuz <- st_read("https://gs-pub.praha.eu/arcgis/rest/services/urk/stavebni_uzavery/MapServer/1/query?f=json&where=SHAPE.AREA%3E3&returnGeometry=true&returnIdsOnly=false&outFields=*")
map_srvr_uzavery_dopr <- "https://gs-pub.praha.eu/arcgis/rest/services/urk/stavebni_uzavery/MapServer/1" map_srvr_orto <- "https://gs-pub.praha.eu/imgs/services/ort/letecke_snimkovani/ImageServer/WMSServer"
leaflet(stuz %>% st_transform(4326)) %>% setView( 14.5, 50.1, zoom = 12) %>% addPolygons(color = "red") %>% addEsriFeatureLayer(map_srvr_uzavery_dopr) %>% addWMSTiles(map_srvr_orto, layers = "0")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.