library(pragr)
library(sf)
#> Linking to GEOS 3.8.1, GDAL 3.1.4, PROJ 6.3.1
library(leaflet)
library(leaflet.esri)
#> Loading required package: leaflet.extras
stuz <- st_read("http://mpp.iprpraha.cz/arcgis/rest/services/URK/StavebniUzavery/MapServer/2/query?f=json&where=SHAPE.AREA%3E3&returnGeometry=true&returnIdsOnly=false&outFields=*")
#> Reading layer `ESRIJSON' from data source `http://mpp.iprpraha.cz/arcgis/rest/services/URK/StavebniUzavery/MapServer/2/query?f=json&where=SHAPE.AREA%3E3&returnGeometry=true&returnIdsOnly=false&outFields=*' using driver `ESRIJSON'
#> Simple feature collection with 14 features and 20 fields
#> geometry type:  POLYGON
#> dimension:      XY
#> bbox:           xmin: -753291 ymin: -1053940 xmax: -728396.8 ymax: -1039752
#> projected CRS:  S-JTSK / Krovak East North
map_srvr_uzavery_dopr <- "http://mpp.iprpraha.cz/arcgis/rest/services/URK/StavebniUzavery/MapServer/3"
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")