library(pragr)
library(sf)
#> Linking to GEOS 3.10.2, GDAL 3.4.1, PROJ 8.2.1; sf_use_s2() is TRUE
library(leaflet)
library(leaflet.esri)
#> Loading required package: leaflet.extras
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=*")
#> Reading layer `ESRIJSON' from data source 
#>   `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=*' 
#>   using driver `ESRIJSON'
#> Simple feature collection with 38 features and 21 fields
#> Geometry type: POLYGON
#> Dimension:     XY
#> Bounding box:  xmin: -751964.9 ymin: -1058623 xmax: -728136.3 ymax: -1036506
#> Projected CRS: S-JTSK / Krovak East North
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")