├── .gitignore ├── Intro_to_spatial_analysis.R ├── Intro_to_spatial_analysis.Rmd ├── Intro_to_spatial_analysis.Rproj ├── Intro_to_spatial_analysis.html ├── Intro_to_spatial_analysis_files └── figure-html │ ├── unnamed-chunk-30-1.png │ ├── unnamed-chunk-30-2.png │ ├── unnamed-chunk-31-1.png │ ├── unnamed-chunk-32-1.png │ ├── unnamed-chunk-47-1.png │ ├── unnamed-chunk-48-1.png │ ├── unnamed-chunk-49-1.png │ ├── unnamed-chunk-51-1.png │ ├── unnamed-chunk-52-1.png │ ├── unnamed-chunk-53-1.png │ ├── unnamed-chunk-54-1.png │ ├── unnamed-chunk-55-1.png │ ├── unnamed-chunk-56-1.png │ ├── unnamed-chunk-57-1.png │ ├── unnamed-chunk-58-1.png │ ├── unnamed-chunk-59-1.png │ ├── unnamed-chunk-60-1.png │ ├── unnamed-chunk-61-1.png │ ├── unnamed-chunk-62-1.png │ ├── unnamed-chunk-63-1.png │ ├── unnamed-chunk-64-1.png │ ├── unnamed-chunk-65-1.png │ ├── unnamed-chunk-66-1.png │ ├── unnamed-chunk-68-1.png │ ├── unnamed-chunk-69-1.png │ ├── unnamed-chunk-70-1.png │ ├── unnamed-chunk-71-1.png │ ├── unnamed-chunk-72-1.png │ ├── unnamed-chunk-73-1.png │ ├── unnamed-chunk-74-1.png │ └── widgets │ ├── leaflet_libs │ ├── Proj4Leaflet │ │ ├── proj4-compressed.js │ │ ├── proj4.js │ │ └── proj4leaflet.js │ ├── htmlwidgets │ │ └── htmlwidgets.js │ ├── jquery │ │ ├── jquery.js │ │ └── jquery.min.js │ ├── leaflet-binding │ │ └── leaflet.js │ ├── leaflet-label │ │ ├── images │ │ │ └── death.png │ │ ├── leaflet.label-src.js │ │ ├── leaflet.label.css │ │ └── leaflet.label.js │ ├── leaflet-providers-plugin │ │ └── leaflet-providers-plugin.js │ ├── leaflet-providers │ │ ├── CONTRIBUTING.md │ │ ├── README.md │ │ ├── bower.json │ │ ├── css │ │ │ ├── gh-fork-ribbon.css │ │ │ └── gh-fork-ribbon.ie.css │ │ ├── leaflet-providers.js │ │ ├── license.md │ │ ├── package.json │ │ └── providers.json │ ├── leaflet │ │ ├── images │ │ │ ├── 1px.png │ │ │ ├── layers-2x.png │ │ │ ├── layers.png │ │ │ ├── marker-icon-2x.png │ │ │ ├── marker-icon.png │ │ │ └── marker-shadow.png │ │ ├── leaflet-src.js │ │ ├── leaflet.css │ │ └── leaflet.js │ ├── leafletfix │ │ └── leafletfix.css │ └── pymjs │ │ ├── pym.v1.js │ │ └── pym.v1.min.js │ └── widget_unnamed-chunk-76.html ├── README.md ├── data.zip ├── data ├── hamiltion_cities.csv ├── hamilton_county.gpkg ├── new_wrld.dbf ├── new_wrld.prj ├── new_wrld.shx ├── srtm.tif ├── wrld.dbf ├── wrld.prj ├── wrld.shp ├── wrld.shx └── wrld.zip ├── figs ├── coord_compare.png ├── coord_compare0.png ├── coord_compare_raster.png └── plot_compare.png ├── libs ├── Proj4Leaflet │ ├── proj4-compressed.js │ ├── proj4.js │ └── proj4leaflet.js ├── blazy │ └── blazy.min.js ├── htmlwidgets │ └── htmlwidgets.js ├── jquery │ ├── jquery.js │ └── jquery.min.js ├── leaflet-binding │ └── leaflet.js ├── leaflet-label │ ├── images │ │ └── death.png │ ├── leaflet.label-src.js │ ├── leaflet.label.css │ └── leaflet.label.js ├── leaflet-providers-plugin │ └── leaflet-providers-plugin.js ├── leaflet-providers │ ├── CONTRIBUTING.md │ ├── README.md │ ├── bower.json │ ├── css │ │ ├── gh-fork-ribbon.css │ │ └── gh-fork-ribbon.ie.css │ ├── leaflet-providers.js │ ├── license.md │ ├── package.json │ └── providers.json ├── leaflet │ ├── images │ │ ├── 1px.png │ │ ├── layers-2x.png │ │ ├── layers.png │ │ ├── marker-icon-2x.png │ │ ├── marker-icon.png │ │ └── marker-shadow.png │ ├── leaflet-src.js │ ├── leaflet.css │ └── leaflet.js ├── leafletfix │ └── leafletfix.css ├── pymjs │ ├── pym.v1.js │ └── pym.v1.min.js ├── remark-css │ └── example.css └── widgetframe-binding │ └── widgetframe.js ├── mytheme.css ├── toDo.md ├── widget_libs ├── Proj4Leaflet │ ├── proj4-compressed.js │ ├── proj4.js │ └── proj4leaflet.js ├── htmlwidgets │ └── htmlwidgets.js ├── jquery │ ├── jquery.js │ └── jquery.min.js ├── leaflet-binding │ └── leaflet.js ├── leaflet-label │ ├── images │ │ └── death.png │ ├── leaflet.label-src.js │ ├── leaflet.label.css │ └── leaflet.label.js ├── leaflet-providers-plugin │ └── leaflet-providers-plugin.js ├── leaflet-providers │ ├── CONTRIBUTING.md │ ├── README.md │ ├── bower.json │ ├── css │ │ ├── gh-fork-ribbon.css │ │ └── gh-fork-ribbon.ie.css │ ├── leaflet-providers.js │ ├── license.md │ ├── package.json │ └── providers.json ├── leaflet │ ├── images │ │ ├── 1px.png │ │ ├── layers-2x.png │ │ ├── layers.png │ │ ├── marker-icon-2x.png │ │ ├── marker-icon.png │ │ └── marker-shadow.png │ ├── leaflet-src.js │ ├── leaflet.css │ └── leaflet.js ├── leafletfix │ └── leafletfix.css └── pymjs │ └── pym.v1.min.js ├── widget_unnamed-chunk-74.html ├── widget_unnamed-chunk-75.html └── widget_unnamed-chunk-76.html /.gitignore: -------------------------------------------------------------------------------- 1 | .Rproj.user 2 | .Rhistory 3 | .RData 4 | .Ruserdata 5 | -------------------------------------------------------------------------------- /Intro_to_spatial_analysis.R: -------------------------------------------------------------------------------- 1 | ## ---- eval=FALSE--------------------------------------------------------- 2 | ## devtools::install_github('edzer/sfr') # development version 3 | 4 | ## ---- eval=FALSE--------------------------------------------------------- 5 | ## install.packages('sf') # stable version 6 | 7 | ## ---- message=FALSE------------------------------------------------------ 8 | library('sf') 9 | 10 | ## ------------------------------------------------------------------------ 11 | wrld <- st_read('data/wrld.shp') 12 | 13 | ## ------------------------------------------------------------------------ 14 | ham <- st_read('data/hamilton_county.gpkg') 15 | 16 | ## ------------------------------------------------------------------------ 17 | ham_cities <- read.csv('data/hamiltion_cities.csv') 18 | 19 | ## ------------------------------------------------------------------------ 20 | ham_cities_sf <- st_as_sf(ham_cities, coords = c("X","Y")) 21 | ham_cities_sf 22 | 23 | ## ---- warning=FALSE, results='hide', echo=FALSE-------------------------- 24 | file.remove(c('data/new_wrld.shp', 'data/new_wrld.gpkg')) 25 | 26 | ## ---- warning=FALSE------------------------------------------------------ 27 | st_write(wrld, 'data/new_wrld.shp') 28 | 29 | ## ---- warning=FALSE------------------------------------------------------ 30 | st_write(wrld, 'data/new_wrld.gpkg') 31 | 32 | ## ---- warning=FALSE, results='hide', echo=FALSE-------------------------- 33 | file.remove(c('data/new_wrld.shp', 'data/new_wrld.gpkg')) 34 | 35 | ## ------------------------------------------------------------------------ 36 | class(wrld) 37 | 38 | ## ------------------------------------------------------------------------ 39 | wrld[1:2, 1:3] 40 | 41 | ## ---- eval=FALSE--------------------------------------------------------- 42 | head(wrld) 43 | nrow(wrld) 44 | ncol(wrld) 45 | wrld[, c(1, 3)] 46 | wrld[1:5, 2] 47 | wrld[c(5, 10, 15), ] 48 | 49 | ## ------------------------------------------------------------------------ 50 | wrld_df <- st_set_geometry(wrld, NULL) 51 | class(wrld_df) 52 | 53 | ## ---- message=FALSE------------------------------------------------------ 54 | library('dplyr') 55 | 56 | ## ------------------------------------------------------------------------ 57 | wrld_sel <- select(wrld, name_long, area_km2) 58 | 59 | ## ---- echo=FALSE--------------------------------------------------------- 60 | wrld_sel[1:4, ] 61 | 62 | ## ------------------------------------------------------------------------ 63 | wrld_arr <- arrange(wrld, area_km2) 64 | 65 | ## ---- echo=FALSE--------------------------------------------------------- 66 | wrld_arr[1:3, ] 67 | 68 | ## ------------------------------------------------------------------------ 69 | wrld_fil <- filter(wrld, pop < 297517) 70 | 71 | ## ---- echo=FALSE--------------------------------------------------------- 72 | wrld_fil[1:3, ] 73 | 74 | ## ------------------------------------------------------------------------ 75 | wrld_mut <- mutate(wrld, pop_density = pop/area_km2) 76 | 77 | ## ---- echo=FALSE--------------------------------------------------------- 78 | wrld_mut[1:3, ] 79 | 80 | ## ------------------------------------------------------------------------ 81 | wrld_sum1 <- summarize(wrld, pop_sum = sum(pop, na.rm = TRUE), 82 | pop_mean = mean(pop, na.rm = TRUE), 83 | pop_median = median(pop, na.rm = TRUE)) 84 | 85 | ## ---- echo=FALSE--------------------------------------------------------- 86 | wrld_sum1[1, ] 87 | 88 | ## ------------------------------------------------------------------------ 89 | wrld_sum1 <- wrld %>% 90 | group_by(continent) %>% 91 | summarize(pop_sum = sum(pop, na.rm = TRUE), 92 | pop_mean = mean(pop, na.rm = TRUE), 93 | pop_median = median(pop, na.rm = TRUE)) 94 | 95 | ## ---- echo=FALSE--------------------------------------------------------- 96 | wrld_sum1[1:3, ] 97 | 98 | ## ---- warning=FALSE------------------------------------------------------ 99 | wrld_set3410 <- st_set_crs(wrld, 3410) 100 | st_crs(wrld_set3410) 101 | 102 | ## ----echo=FALSE, eval=FALSE---------------------------------------------- 103 | plot(wrld_set3410[0]);plot(wrld[0]) 104 | 105 | ## ------------------------------------------------------------------------ 106 | st_crs(ham_cities_sf) 107 | 108 | ## ------------------------------------------------------------------------ 109 | ham_cities_sf <- st_set_crs(ham_cities_sf, 4326) 110 | st_crs(ham_cities_sf) 111 | 112 | ## ------------------------------------------------------------------------ 113 | wrld_3410 <- st_transform(wrld, 3410) 114 | st_crs(wrld_3410) 115 | 116 | ## ----echo=FALSE, eval=FALSE---------------------------------------------- 117 | plot(wrld_3410[0]);plot(wrld[0]) 118 | 119 | ## ---- eval=FALSE--------------------------------------------------------- 120 | plot(wrld[0]) 121 | 122 | ## ---- eval=FALSE--------------------------------------------------------- 123 | plot(wrld["pop"]) 124 | 125 | ## ------------------------------------------------------------------------ 126 | wrld_sp <- as(wrld, 'Spatial') 127 | class(wrld_sp) 128 | wrld_sf <- st_as_sf(wrld_sp) 129 | class(wrld_sf) 130 | 131 | ## ---- message=FALSE------------------------------------------------------ 132 | library('raster') 133 | 134 | ## ------------------------------------------------------------------------ 135 | dem <- raster('data/srtm.tif') 136 | dem 137 | 138 | ## ---- warning=FALSE, results='hide', echo=FALSE-------------------------- 139 | file.remove(c('data/new_dem.tif', 'data/new_dem2.tif')) 140 | 141 | ## ------------------------------------------------------------------------ 142 | writeRaster(dem, 'data/new_dem.tif') 143 | 144 | ## ------------------------------------------------------------------------ 145 | writeRaster(dem, 'data/new_dem2.tif', 146 | datatype = 'FLT4S', options=c("COMPRESS=DEFLATE")) 147 | 148 | ## ---- warning=FALSE, results='hide', echo=FALSE-------------------------- 149 | file.remove(c('data/new_dem.tif', 'data/new_dem2.tif')) 150 | 151 | ## ------------------------------------------------------------------------ 152 | writeFormats() 153 | 154 | ## ------------------------------------------------------------------------ 155 | dem 156 | 157 | ## ------------------------------------------------------------------------ 158 | inMemory(dem) 159 | 160 | ## ------------------------------------------------------------------------ 161 | values_dem <- getValues(dem) 162 | 163 | ## ---- echo=FALSE--------------------------------------------------------- 164 | values_dem[1:50] 165 | 166 | ## ---- eval=FALSE--------------------------------------------------------- 167 | getValues(dem, row = 5) 168 | 169 | ## ------------------------------------------------------------------------ 170 | new_values <- runif(864000, min=150, max=300) # pseudo-random number generator 171 | new_dem <- setValues(dem, new_values) 172 | 173 | ## ---- fig.align='center', fig.height=5, echo=FALSE----------------------- 174 | plot(new_dem) 175 | 176 | ## ------------------------------------------------------------------------ 177 | new_dem2 <- dem 178 | new_dem2[new_dem2 < 0] <- NA 179 | 180 | ## ---- fig.align='center', fig.height=5, echo=FALSE----------------------- 181 | plot(new_dem2) 182 | 183 | ## ------------------------------------------------------------------------ 184 | new_dem3 <- dem + 50 185 | 186 | ## ---- fig.align='center', fig.height=5, echo=FALSE----------------------- 187 | plot(new_dem3) 188 | 189 | ## ------------------------------------------------------------------------ 190 | new_dem4 <- dem * new_dem 191 | 192 | ## ---- fig.align='center', fig.height=5, echo=FALSE----------------------- 193 | plot(new_dem4) 194 | 195 | ## ------------------------------------------------------------------------ 196 | dem_set3410 <- dem 197 | crs(dem_set3410) <- "+proj=cea +lon_0=0 +lat_ts=30 +x_0=0 +y_0=0 +a=6371228 +b=6371228 +units=m +no_defs" 198 | 199 | ## ------------------------------------------------------------------------ 200 | crs(dem_set3410) 201 | 202 | ## ------------------------------------------------------------------------ 203 | dem3410 <- projectRaster(dem, crs="+proj=cea +lon_0=0 +lat_ts=30 +x_0=0 +y_0=0 +a=6371228 +b=6371228 +units=m +no_defs") 204 | 205 | ## ----echo=FALSE, eval=FALSE---------------------------------------------- 206 | plot(dem);plot(dem3410) 207 | 208 | ## ---- fig.align='center'------------------------------------------------- 209 | plot(dem) 210 | 211 | ## ------------------------------------------------------------------------ 212 | ham_cities_sp <- as(ham_cities_sf, 'Spatial') 213 | raster::extract(dem, ham_cities_sp) 214 | 215 | ## ------------------------------------------------------------------------ 216 | ham_cities_sf$dem <- raster::extract(dem, ham_cities_sp) 217 | ham_cities_sf 218 | 219 | ## ---- echo=FALSE, message=FALSE------------------------------------------ 220 | library('tigris') 221 | oh <- counties(state='OH') 222 | ham0 <- oh %>% 223 | st_as_sf(.) %>% 224 | filter(NAME=='Hamilton') 225 | ham <- st_transform(ham0, 4326) 226 | 227 | ## ------------------------------------------------------------------------ 228 | ham84 <- st_transform(ham, 4326) 229 | ham_sp <- as(ham84, 'Spatial') 230 | 231 | ## ------------------------------------------------------------------------ 232 | dem_crop <- crop(dem, ham_sp) 233 | 234 | ## ---- echo=FALSE--------------------------------------------------------- 235 | plot(dem_crop) 236 | 237 | ## ------------------------------------------------------------------------ 238 | dem_mask <- mask(dem_crop, ham_sp) 239 | 240 | ## ---- echo=FALSE--------------------------------------------------------- 241 | plot(dem_mask) 242 | 243 | ## ---- message=FALSE, fig.align='center', fig.height=4-------------------- 244 | library('rasterVis') 245 | my_theme <- rasterTheme(region=brewer.pal('RdYlGn', n = 9)) 246 | p <- levelplot(dem_crop, margin = FALSE, par.settings = my_theme) 247 | p <- p + layer(sp.lines(ham_sp, lwd = 3, col = 'darkgrey')) 248 | p + layer(sp.points(ham_cities_sp, pch = 19, col = 'black')) 249 | 250 | ## ---- fig.align='center', fig.height=4----------------------------------- 251 | library('tmap') 252 | tm_shape(wrld, projection="wintri") + 253 | tm_polygons("lifeExp", style="pretty", palette="RdYlGn", 254 | auto.palette.mapping=FALSE, title=c("Life expactancy")) + 255 | tm_style_grey() 256 | 257 | ## ---- eval=FALSE--------------------------------------------------------- 258 | library('leaflet') 259 | leaflet(ham_sp) %>% 260 | addProviderTiles(providers$Stamen.Watercolor) %>% 261 | # addTiles() %>% 262 | addPolygons() %>% 263 | addMarkers(data=ham_cities_sp, popup=~as.character(name)) 264 | 265 | -------------------------------------------------------------------------------- /Intro_to_spatial_analysis.Rproj: -------------------------------------------------------------------------------- 1 | Version: 1.0 2 | 3 | RestoreWorkspace: Default 4 | SaveWorkspace: Default 5 | AlwaysSaveHistory: Default 6 | 7 | EnableCodeIndexing: Yes 8 | UseSpacesForTab: Yes 9 | NumSpacesForTab: 8 10 | Encoding: UTF-8 11 | 12 | RnwWeave: knitr 13 | LaTeX: pdfLaTeX 14 | -------------------------------------------------------------------------------- /Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-30-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-30-1.png -------------------------------------------------------------------------------- /Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-30-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-30-2.png -------------------------------------------------------------------------------- /Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-31-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-31-1.png -------------------------------------------------------------------------------- /Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-32-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-32-1.png -------------------------------------------------------------------------------- /Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-47-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-47-1.png -------------------------------------------------------------------------------- /Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-48-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-48-1.png -------------------------------------------------------------------------------- /Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-49-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-49-1.png -------------------------------------------------------------------------------- /Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-51-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-51-1.png -------------------------------------------------------------------------------- /Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-52-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-52-1.png -------------------------------------------------------------------------------- /Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-53-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-53-1.png -------------------------------------------------------------------------------- /Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-54-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-54-1.png -------------------------------------------------------------------------------- /Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-55-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-55-1.png -------------------------------------------------------------------------------- /Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-56-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-56-1.png -------------------------------------------------------------------------------- /Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-57-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-57-1.png -------------------------------------------------------------------------------- /Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-58-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-58-1.png -------------------------------------------------------------------------------- /Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-59-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-59-1.png -------------------------------------------------------------------------------- /Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-60-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-60-1.png -------------------------------------------------------------------------------- /Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-61-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-61-1.png -------------------------------------------------------------------------------- /Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-62-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-62-1.png -------------------------------------------------------------------------------- /Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-63-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-63-1.png -------------------------------------------------------------------------------- /Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-64-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-64-1.png -------------------------------------------------------------------------------- /Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-65-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-65-1.png -------------------------------------------------------------------------------- /Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-66-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-66-1.png -------------------------------------------------------------------------------- /Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-68-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-68-1.png -------------------------------------------------------------------------------- /Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-69-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-69-1.png -------------------------------------------------------------------------------- /Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-70-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-70-1.png -------------------------------------------------------------------------------- /Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-71-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-71-1.png -------------------------------------------------------------------------------- /Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-72-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-72-1.png -------------------------------------------------------------------------------- /Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-73-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-73-1.png -------------------------------------------------------------------------------- /Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-74-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/Intro_to_spatial_analysis_files/figure-html/unnamed-chunk-74-1.png -------------------------------------------------------------------------------- /Intro_to_spatial_analysis_files/figure-html/widgets/leaflet_libs/leaflet-label/images/death.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/Intro_to_spatial_analysis_files/figure-html/widgets/leaflet_libs/leaflet-label/images/death.png -------------------------------------------------------------------------------- /Intro_to_spatial_analysis_files/figure-html/widgets/leaflet_libs/leaflet-label/leaflet.label.css: -------------------------------------------------------------------------------- 1 | .leaflet-label { 2 | background: rgb(235, 235, 235); 3 | background: rgba(235, 235, 235, 0.81); 4 | background-clip: padding-box; 5 | border-color: #777; 6 | border-color: rgba(0,0,0,0.45); 7 | border-radius: 4px; 8 | border-style: solid; 9 | border-width: 4px; 10 | color: #111; 11 | display: block; 12 | font: 12px/20px "Helvetica Neue", Arial, Helvetica, sans-serif; 13 | font-weight: bold; 14 | padding: 1px 6px; 15 | position: absolute; 16 | -webkit-user-select: none; 17 | -moz-user-select: none; 18 | -ms-user-select: none; 19 | user-select: none; 20 | pointer-events: none; 21 | white-space: nowrap; 22 | z-index: 500; 23 | } 24 | 25 | .leaflet-label.leaflet-clickable { 26 | cursor: pointer; 27 | pointer-events: auto; 28 | } 29 | 30 | .leaflet-label:before, 31 | .leaflet-label:after { 32 | border-top: 6px solid transparent; 33 | border-bottom: 6px solid transparent; 34 | border-right: 6px solid transparent; 35 | content: none; 36 | position: absolute; 37 | top: 5px; 38 | } 39 | 40 | .leaflet-label:before { 41 | border-right: 6px solid black; 42 | border-right-color: inherit; 43 | left: -10px; 44 | } 45 | 46 | .leaflet-label:after { 47 | border-left: 6px solid black; 48 | border-left-color: inherit; 49 | right: -16px; 50 | } 51 | 52 | .leaflet-label-top:after, 53 | .leaflet-label-top:before { 54 | left: -50%; 55 | border-top-color: black; 56 | border-top-color: rgba(0,0,0,0.45); 57 | position: relative; 58 | top: 29px; 59 | } 60 | 61 | .leaflet-label-top:before { 62 | display: none; 63 | border-right-color: transparent; 64 | border-bottom-color: transparent; 65 | border-left-color: transparent; 66 | border-top-color: transparent; 67 | } 68 | 69 | .leaflet-label-top:after { 70 | content: ' '; 71 | border-right-color: transparent; 72 | border-bottom-color: transparent; 73 | border-left-color: transparent; 74 | } 75 | 76 | .leaflet-label-bottom:before { 77 | display: none; 78 | border-right-color: transparent; 79 | border-bottom-color: transparent; 80 | border-left-color: transparent; 81 | border-top-color: transparent; 82 | } 83 | 84 | .leaflet-label-bottom:after, 85 | .leaflet-label-bottom:before { 86 | left: -50%; 87 | border-bottom-color: black; 88 | border-bottom-color: rgba(0,0,0,0.45); 89 | position: relative; 90 | top: -28px; 91 | } 92 | 93 | .leaflet-label-bottom:after { 94 | border-right-color: transparent; 95 | border-top-color: transparent; 96 | border-left-color: transparent; 97 | } 98 | 99 | .leaflet-label-bottom:after, 100 | .leaflet-label-top:after, 101 | .leaflet-label-right:before, 102 | .leaflet-label-left:after { 103 | content: ""; 104 | } 105 | 106 | .leaflet-label.leaflet-label-text-only, 107 | .leaflet-label.leaflet-label-text-only:before, 108 | .leaflet-label.leaflet-label-text-only:after { 109 | background: none; 110 | border: none; 111 | } 112 | 113 | .leaflet-label.leaflet-label-text-only.leaflet-label-left { 114 | margin-right: -10px; 115 | } 116 | 117 | .leaflet-label.leaflet-label-text-only.leaflet-label-right { 118 | margin-left: -10px; 119 | } 120 | -------------------------------------------------------------------------------- /Intro_to_spatial_analysis_files/figure-html/widgets/leaflet_libs/leaflet-label/leaflet.label.js: -------------------------------------------------------------------------------- 1 | /* 2 | Leaflet.label, a plugin that adds labels to markers and vectors for Leaflet powered maps. 3 | (c) 2012-2013, Jacob Toye, Smartrak 4 | 5 | https://github.com/Leaflet/Leaflet.label 6 | http://leafletjs.com 7 | https://github.com/jacobtoye 8 | */ 9 | !function(t,e){"function"==typeof define&&define.amd?define(["leaflet"],t):"object"==typeof exports&&(module.exports=t(require("leaflet"))),"undefined"!=typeof e&&e.L&&(e.LeafletLabel=t(L))}(function(t){t.labelVersion="0.2.4";var e=t.Class.extend({includes:t.Mixin.Events,_directions:["top","right","bottom","left"],options:{className:"",clickable:!1,direction:"right",noHide:!1,offset:[12,-15],opacity:1,textsize:"10px",textOnly:!1,style:null,zoomAnimation:!0},initialize:function(e,i){t.setOptions(this,e),this._source=i,this._animated=t.Browser.any3d&&this.options.zoomAnimation,this._isOpen=!1},_isOnMarker:function(){return this._source instanceof t.Marker},onAdd:function(e){this._map=e,this._pane=this.options.pane?e._panes[this.options.pane]:this._isOnMarker()?e._panes.markerPane:e._panes.popupPane,this._container||this._initLayout(),this._pane.appendChild(this._container),this._initInteraction(),this._update(),this.setOpacity(this.options.opacity),e.on("moveend",this._onMoveEnd,this).on("viewreset",this._onViewReset,this),this._animated&&e.on("zoomanim",this._zoomAnimation,this),t.Browser.touch&&!this.options.noHide&&(t.DomEvent.on(this._container,"click",this.close,this),e.on("click",this.close,this))},onRemove:function(t){this._pane.removeChild(this._container),t.off({zoomanim:this._zoomAnimation,moveend:this._onMoveEnd,viewreset:this._onViewReset},this),this._removeInteraction(),this._map=null},setLatLng:function(e){return this._latlng=t.latLng(e),this._map&&this._updatePosition(),this},setContent:function(t){return this._previousContent=this._content,this._content=t,this._updateContent(),this},close:function(){var e=this._map;e&&(t.Browser.touch&&!this.options.noHide&&(t.DomEvent.off(this._container,"click",this.close),e.off("click",this.close,this)),e.removeLayer(this))},updateZIndex:function(t){this._zIndex=t,this._container&&this._zIndex&&(this._container.style.zIndex=t)},setOpacity:function(e){this.options.opacity=e,this._container&&t.DomUtil.setOpacity(this._container,e)},_initLayout:function(){if(this._container=t.DomUtil.create("div","leaflet-label "+this.options.className+" leaflet-zoom-animated"),this._container.style.fontSize=this.options.textsize,this.options.textOnly&&t.DomUtil.addClass(this._container,"leaflet-label-text-only"),this.options.style)for(var e in this.options.style)this.options.style.hasOwnProperty(e)&&(this._container.style[e]=this.options.style[e]);this.updateZIndex(this._zIndex)},_update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updatePosition(),this._container.style.visibility="")},_updateContent:function(){this._content&&this._map&&this._prevContent!==this._content&&"string"==typeof this._content&&(this._container.innerHTML=this._content,this._prevContent=this._content,this._labelWidth=this._container.offsetWidth)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},_getIconHeight:function(){return this._source.options.icon?this._source.options.icon.options.iconSize[1]:0},_setPosition:function(e){var i=this._map,n=this._container,o=i.latLngToContainerPoint(i.getCenter()),s=i.layerPointToContainerPoint(e),a=this._getDirection(),h=this._labelWidth,l=t.point(this.options.offset),r=l.y;"top"===a?(r-=this._isOnMarker()?this._getIconHeight():0,e=e.add(t.point(-h/2,r))):"bottom"===a?(r+=this._isOnMarker?this._getIconHeight():0,e=e.add(t.point(-h/2,r))):"right"===a||"auto"===a&&s.x[1](#what-is-free) tile providers. 4 | 5 | # Usage 6 | Leaflet-providers [providers](#providers) are refered to with a `provider[.]`-string. Let's say you want to add the nice [Watercolor](http://maps.stamen.com/#watercolor/) style from Stamen to your map, you pass `Stamen.Watercolor` to the `L.tileLayer.provider`-constructor, which will return a [L.TileLayer](http://leafletjs.com/reference.html#tilelayer) instance for Stamens Watercolor tile layer. 7 | 8 | ```Javascript 9 | // add Stamen Watercolor to map. 10 | L.tileLayer.provider('Stamen.Watercolor').addTo(map); 11 | ``` 12 | 13 | ## Protocol relativity (`https://`-urls) 14 | 15 | Leaflet-providers tries to use `https://` if the page uses `https://` and the provider supports it. 16 | You can force the use of `http://` by passing `force_http: true` in the options argument. 17 | 18 | ## Retina tiles 19 | 20 | Some providers have retina tiles for which the URL only needs to be slightly adjusted, e.g. `-----@2x.png`. For this, add the retina option in the URL, e.g. `-----{retina}.png`, and set a retina value in the options, e.g. `retina: '@2x'`. If Leaflet detects a retina screen (`L.Browser.retina`), the retina option passed to the tileLayer is set to the value supplied, otherwise it's replaced by an empty string. 21 | 22 | # Providers 23 | 24 | Leaflet-providers provides tile layers from different providers, including *OpenStreetMap*, *Stamen*, *Esri* and *OpenWeatherMap*. The full listing of free to use layers can be [previewed](http://leaflet-extras.github.io/leaflet-providers/preview/index.html). The page will show you the name to use with `leaflet-providers.js` and the code to use it without dependencies. 25 | 26 | ## Providers requiring registration 27 | 28 | In addition to the providers you are free1 to use, we support some layers which require registration. 29 | 30 | ### HERE (formerly Nokia). 31 | 32 | In order to use HERE layers, you must [register](http://developer.here.com/). Once registered, you can create an `app_id` and `app_code` which you have to pass to `L.tileLayer.provider` in the options: 33 | 34 | ```Javascript 35 | L.tileLayer.provider('HERE.terrainDay', { 36 | app_id: '', 37 | app_code: '' 38 | }).addTo(map); 39 | ``` 40 | 41 | [Available HERE layers](http://leaflet-extras.github.io/leaflet-providers/preview/#filter=HERE) 42 | 43 | ### Mapbox 44 | 45 | In order to use Mapbox maps, you must [register](https://tiles.mapbox.com/signup). You can get map ID and ACCESS_TOKEN from [Mapbox projects](https://www.mapbox.com/projects): 46 | ```JavaScript 47 | L.tileLayer.provider('MapBox', {id: 'ID', accessToken: 'ACCESS_TOKEN'}).addTo(map); 48 | ``` 49 | 50 | ### Esri/ArcGIS 51 | 52 | In order to use ArcGIS maps, you must [register](https://developers.arcgis.com/en/sign-up/) and abide by the [terms of service](https://developers.arcgis.com/en/terms/). No special syntax is required. 53 | 54 | [Available Esri layers](http://leaflet-extras.github.io/leaflet-providers/preview/#filter=Esri) 55 | 56 | # Attribution 57 | 58 | This work was inspired from , and originally created by [Stefan Seelmann](https://github.com/seelmann). 59 | 60 | ### What do we mean by *free*? 61 | 1 62 | We try to maintain leaflet-providers in such a way that you'll be able to use the layers we include without paying money. 63 | This doesn't mean no limits apply, you should always check before using these layers for anything serious. 64 | -------------------------------------------------------------------------------- /Intro_to_spatial_analysis_files/figure-html/widgets/leaflet_libs/leaflet-providers/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "leaflet-providers", 3 | "version": "1.1.15", 4 | "homepage": "https://github.com/leaflet-extras/leaflet-providers", 5 | "description": "An extension to Leaflet that contains configurations for various free tile providers.", 6 | "dependencies": { 7 | "leaflet": "~0.7.3" 8 | }, 9 | "main": "leaflet-providers.js", 10 | "keywords": [ 11 | "leaflet", 12 | "stamen", 13 | "osm" 14 | ], 15 | "license": "BSD-2-Clause", 16 | "ignore": [ 17 | "**/.*", 18 | "node_modules", 19 | "bower_components", 20 | "test", 21 | "tests", 22 | "preview", 23 | "*.html" 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /Intro_to_spatial_analysis_files/figure-html/widgets/leaflet_libs/leaflet-providers/css/gh-fork-ribbon.css: -------------------------------------------------------------------------------- 1 | /* Left will inherit from right (so we don't need to duplicate code */ 2 | .github-fork-ribbon { 3 | /* The right and left lasses determine the side we attach our banner to */ 4 | position: absolute; 5 | 6 | /* Add a bit of padding to give some substance outside the "stitching" */ 7 | padding: 2px 0; 8 | 9 | /* Set the base colour */ 10 | background-color: #a00; 11 | 12 | /* Set a gradient: transparent black at the top to almost-transparent black at the bottom */ 13 | background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.00)), to(rgba(0, 0, 0, 0.15))); 14 | background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0.00), rgba(0, 0, 0, 0.15)); 15 | background-image: -moz-linear-gradient(top, rgba(0, 0, 0, 0.00), rgba(0, 0, 0, 0.15)); 16 | background-image: -o-linear-gradient(top, rgba(0, 0, 0, 0.00), rgba(0, 0, 0, 0.15)); 17 | background-image: -ms-linear-gradient(top, rgba(0, 0, 0, 0.00), rgba(0, 0, 0, 0.15)); 18 | background-image: linear-gradient(top, rgba(0, 0, 0, 0.00), rgba(0, 0, 0, 0.15)); 19 | filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='#000000', EndColorStr='#000000'); 20 | 21 | /* Add a drop shadow */ 22 | -webkit-box-shadow: 0px 2px 3px 0px rgba(0, 0, 0, 0.5); 23 | box-shadow: 0px 2px 3px 0px rgba(0, 0, 0, 0.5); 24 | 25 | z-index: 9999; 26 | } 27 | 28 | .github-fork-ribbon a { 29 | /* Set the font */ 30 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 31 | font-size: 13px; 32 | font-weight: 700; 33 | color: white; 34 | 35 | /* Set the text properties */ 36 | text-decoration: none; 37 | text-shadow: 0 -1px rgba(0,0,0,0.5); 38 | text-align: center; 39 | 40 | /* Set the geometry. If you fiddle with these you'll also need to tweak the top and right values in #github-fork-ribbon. */ 41 | width: 200px; 42 | line-height: 20px; 43 | 44 | /* Set the layout properties */ 45 | display: inline-block; 46 | padding: 2px 0; 47 | 48 | /* Add "stitching" effect */ 49 | border-width: 1px 0; 50 | border-style: dotted; 51 | border-color: rgba(255,255,255,0.7); 52 | } 53 | 54 | .github-fork-ribbon-wrapper { 55 | width: 150px; 56 | height: 150px; 57 | position: absolute; 58 | overflow: hidden; 59 | top: 0; 60 | } 61 | 62 | .github-fork-ribbon-wrapper.left { 63 | left: 0; 64 | } 65 | 66 | .github-fork-ribbon-wrapper.right { 67 | right: 0; 68 | } 69 | 70 | .github-fork-ribbon-wrapper.left-bottom { 71 | position: fixed; 72 | top: inherit; 73 | bottom: 0; 74 | left: 0; 75 | } 76 | 77 | .github-fork-ribbon-wrapper.right-bottom { 78 | position: fixed; 79 | top: inherit; 80 | bottom: 0; 81 | right: 0; 82 | } 83 | 84 | .github-fork-ribbon-wrapper.right .github-fork-ribbon { 85 | top: 42px; 86 | right: -43px; 87 | 88 | /* Rotate the banner 45 degrees */ 89 | -webkit-transform: rotate(45deg); 90 | -moz-transform: rotate(45deg); 91 | -o-transform: rotate(45deg); 92 | transform: rotate(45deg); 93 | } 94 | 95 | .github-fork-ribbon-wrapper.left .github-fork-ribbon { 96 | top: 42px; 97 | left: -43px; 98 | 99 | /* Rotate the banner -45 degrees */ 100 | -webkit-transform: rotate(-45deg); 101 | -moz-transform: rotate(-45deg); 102 | -o-transform: rotate(-45deg); 103 | transform: rotate(-45deg); 104 | } 105 | 106 | 107 | .github-fork-ribbon-wrapper.left-bottom .github-fork-ribbon { 108 | top: 80px; 109 | left: -43px; 110 | 111 | /* Rotate the banner -45 degrees */ 112 | -webkit-transform: rotate(45deg); 113 | -moz-transform: rotate(45deg); 114 | -o-transform: rotate(45deg); 115 | transform: rotate(45deg); 116 | } 117 | 118 | .github-fork-ribbon-wrapper.right-bottom .github-fork-ribbon { 119 | top: 80px; 120 | right: -43px; 121 | 122 | /* Rotate the banner -45 degrees */ 123 | -webkit-transform: rotate(-45deg); 124 | -moz-transform: rotate(-45deg); 125 | -o-transform: rotate(-45deg); 126 | transform: rotate(-45deg); 127 | } -------------------------------------------------------------------------------- /Intro_to_spatial_analysis_files/figure-html/widgets/leaflet_libs/leaflet-providers/css/gh-fork-ribbon.ie.css: -------------------------------------------------------------------------------- 1 | /* IE voodoo courtesy of http://stackoverflow.com/a/4617511/263871 and 2 | * http://www.useragentman.com/IETransformsTranslator */ 3 | .github-fork-ribbon-wrapper.right .github-fork-ribbon { 4 | /* IE positioning hack (couldn't find a transform-origin alternative for IE) */ 5 | top: -22px; 6 | right: -62px; 7 | 8 | /* IE8+ */ 9 | -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.7071067811865474, M12=-0.7071067811865477, M21=0.7071067811865477, M22=0.7071067811865474, SizingMethod='auto expand')"; 10 | /* IE6 and 7 */ 11 | filter: progid:DXImageTransform.Microsoft.Matrix( 12 | M11=0.7071067811865474, 13 | M12=-0.7071067811865477, 14 | M21=0.7071067811865477, 15 | M22=0.7071067811865474, 16 | SizingMethod='auto expand' 17 | ); 18 | } 19 | 20 | .github-fork-ribbon-wrapper.left .github-fork-ribbon { 21 | top: -22px; 22 | left: -22px; 23 | 24 | /* IE8+ */ 25 | -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.7071067811865483, M12=0.7071067811865467, M21=-0.7071067811865467, M22=0.7071067811865483, SizingMethod='auto expand')"; 26 | /* IE6 and 7 */ 27 | filter: progid:DXImageTransform.Microsoft.Matrix( 28 | M11=0.7071067811865483, 29 | M12=0.7071067811865467, 30 | M21=-0.7071067811865467, 31 | M22=0.7071067811865483, 32 | SizingMethod='auto expand' 33 | ); 34 | } 35 | 36 | .github-fork-ribbon-wrapper.left-bottom .github-fork-ribbon { 37 | /* IE positioning hack (couldn't find a transform-origin alternative for IE) */ 38 | top: 12px; 39 | left: -22px; 40 | 41 | 42 | /* IE8+ */ 43 | -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.7071067811865474, M12=-0.7071067811865477, M21=0.7071067811865477, M22=0.7071067811865474, SizingMethod='auto expand')"; 44 | /* IE6 and 7 */ 45 | /* filter: progid:DXImageTransform.Microsoft.Matrix( 46 | M11=0.7071067811865474, 47 | M12=-0.7071067811865477, 48 | M21=0.7071067811865477, 49 | M22=0.7071067811865474, 50 | SizingMethod='auto expand' 51 | ); 52 | */} 53 | 54 | .github-fork-ribbon-wrapper.right-bottom .github-fork-ribbon { 55 | top: 12px; 56 | right: -62px; 57 | 58 | /* IE8+ */ 59 | -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.7071067811865483, M12=0.7071067811865467, M21=-0.7071067811865467, M22=0.7071067811865483, SizingMethod='auto expand')"; 60 | /* IE6 and 7 */ 61 | filter: progid:DXImageTransform.Microsoft.Matrix( 62 | M11=0.7071067811865483, 63 | M12=0.7071067811865467, 64 | M21=-0.7071067811865467, 65 | M22=0.7071067811865483, 66 | SizingMethod='auto expand' 67 | ); 68 | } -------------------------------------------------------------------------------- /Intro_to_spatial_analysis_files/figure-html/widgets/leaflet_libs/leaflet-providers/license.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Leaflet Providers contributors 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 5 | 6 | * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 7 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 8 | 9 | _THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE._ -------------------------------------------------------------------------------- /Intro_to_spatial_analysis_files/figure-html/widgets/leaflet_libs/leaflet-providers/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "leaflet-providers", 3 | "version": "1.1.15", 4 | "description": "An extension to Leaflet that contains configurations for various free tile providers.", 5 | "main": "leaflet-providers.js", 6 | "repository": { 7 | "type": "git", 8 | "url": "git://github.com/leaflet-extras/leaflet-providers.git" 9 | }, 10 | "scripts": { 11 | "test": "npm run lint && npm run testsuite", 12 | "testsuite": "mocha-phantomjs tests/index.html", 13 | "lint": "eslint --config .eslintrc leaflet-providers.js index.html preview/*.js preview/*.html tests/*", 14 | "min": "uglifyjs leaflet-providers.js -mc -o leaflet-providers.min.js", 15 | "release": "mversion patch -m" 16 | }, 17 | "license": "BSD-2-Clause", 18 | "bugs": { 19 | "url": "https://github.com/leaflet-extras/leaflet-providers/issues" 20 | }, 21 | "files": [ 22 | "leaflet-providers.js", 23 | "README.md", 24 | "CHANGELOG.md", 25 | "licence.md" 26 | ], 27 | "devDependencies": { 28 | "chai": "^2.3.0", 29 | "eslint": ">=4.18.2", 30 | "eslint-plugin-html": "^1.4.0", 31 | "mocha": "^2.2.4", 32 | "mocha-phantomjs": "^3.5.3", 33 | "mversion": "^2.0.0", 34 | "phantomjs": "1.9.7-15", 35 | "uglify-js": "^2.4.15" 36 | }, 37 | "autoupdate": { 38 | "source": "git", 39 | "target": "git://github.com/leaflet-extras/leaflet-providers.git", 40 | "basePath": "/", 41 | "files": [ 42 | "leaflet-providers.js" 43 | ] 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Intro_to_spatial_analysis_files/figure-html/widgets/leaflet_libs/leaflet/images/1px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/Intro_to_spatial_analysis_files/figure-html/widgets/leaflet_libs/leaflet/images/1px.png -------------------------------------------------------------------------------- /Intro_to_spatial_analysis_files/figure-html/widgets/leaflet_libs/leaflet/images/layers-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/Intro_to_spatial_analysis_files/figure-html/widgets/leaflet_libs/leaflet/images/layers-2x.png -------------------------------------------------------------------------------- /Intro_to_spatial_analysis_files/figure-html/widgets/leaflet_libs/leaflet/images/layers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/Intro_to_spatial_analysis_files/figure-html/widgets/leaflet_libs/leaflet/images/layers.png -------------------------------------------------------------------------------- /Intro_to_spatial_analysis_files/figure-html/widgets/leaflet_libs/leaflet/images/marker-icon-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/Intro_to_spatial_analysis_files/figure-html/widgets/leaflet_libs/leaflet/images/marker-icon-2x.png -------------------------------------------------------------------------------- /Intro_to_spatial_analysis_files/figure-html/widgets/leaflet_libs/leaflet/images/marker-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/Intro_to_spatial_analysis_files/figure-html/widgets/leaflet_libs/leaflet/images/marker-icon.png -------------------------------------------------------------------------------- /Intro_to_spatial_analysis_files/figure-html/widgets/leaflet_libs/leaflet/images/marker-shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/Intro_to_spatial_analysis_files/figure-html/widgets/leaflet_libs/leaflet/images/marker-shadow.png -------------------------------------------------------------------------------- /Intro_to_spatial_analysis_files/figure-html/widgets/leaflet_libs/leaflet/leaflet.css: -------------------------------------------------------------------------------- 1 | /* required styles */ 2 | 3 | .leaflet-map-pane, 4 | .leaflet-tile, 5 | .leaflet-marker-icon, 6 | .leaflet-marker-shadow, 7 | .leaflet-tile-pane, 8 | .leaflet-tile-container, 9 | .leaflet-overlay-pane, 10 | .leaflet-shadow-pane, 11 | .leaflet-marker-pane, 12 | .leaflet-popup-pane, 13 | .leaflet-overlay-pane svg, 14 | .leaflet-zoom-box, 15 | .leaflet-image-layer, 16 | .leaflet-layer { 17 | position: absolute; 18 | left: 0; 19 | top: 0; 20 | } 21 | .leaflet-container { 22 | overflow: hidden; 23 | -ms-touch-action: none; 24 | touch-action: none; 25 | } 26 | .leaflet-tile, 27 | .leaflet-marker-icon, 28 | .leaflet-marker-shadow { 29 | -webkit-user-select: none; 30 | -moz-user-select: none; 31 | user-select: none; 32 | -webkit-user-drag: none; 33 | } 34 | .leaflet-marker-icon, 35 | .leaflet-marker-shadow { 36 | display: block; 37 | } 38 | /* map is broken in FF if you have max-width: 100% on tiles */ 39 | .leaflet-container img { 40 | max-width: none !important; 41 | } 42 | /* stupid Android 2 doesn't understand "max-width: none" properly */ 43 | .leaflet-container img.leaflet-image-layer { 44 | max-width: 15000px !important; 45 | } 46 | .leaflet-tile { 47 | filter: inherit; 48 | visibility: hidden; 49 | } 50 | .leaflet-tile-loaded { 51 | visibility: inherit; 52 | } 53 | .leaflet-zoom-box { 54 | width: 0; 55 | height: 0; 56 | } 57 | /* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */ 58 | .leaflet-overlay-pane svg { 59 | -moz-user-select: none; 60 | } 61 | 62 | .leaflet-tile-pane { z-index: 2; } 63 | .leaflet-objects-pane { z-index: 3; } 64 | .leaflet-overlay-pane { z-index: 4; } 65 | .leaflet-shadow-pane { z-index: 5; } 66 | .leaflet-marker-pane { z-index: 6; } 67 | .leaflet-popup-pane { z-index: 7; } 68 | 69 | .leaflet-vml-shape { 70 | width: 1px; 71 | height: 1px; 72 | } 73 | .lvml { 74 | behavior: url(#default#VML); 75 | display: inline-block; 76 | position: absolute; 77 | } 78 | 79 | 80 | /* control positioning */ 81 | 82 | .leaflet-control { 83 | position: relative; 84 | z-index: 7; 85 | pointer-events: auto; 86 | } 87 | .leaflet-top, 88 | .leaflet-bottom { 89 | position: absolute; 90 | z-index: 1000; 91 | pointer-events: none; 92 | } 93 | .leaflet-top { 94 | top: 0; 95 | } 96 | .leaflet-right { 97 | right: 0; 98 | } 99 | .leaflet-bottom { 100 | bottom: 0; 101 | } 102 | .leaflet-left { 103 | left: 0; 104 | } 105 | .leaflet-control { 106 | float: left; 107 | clear: both; 108 | } 109 | .leaflet-right .leaflet-control { 110 | float: right; 111 | } 112 | .leaflet-top .leaflet-control { 113 | margin-top: 10px; 114 | } 115 | .leaflet-bottom .leaflet-control { 116 | margin-bottom: 10px; 117 | } 118 | .leaflet-left .leaflet-control { 119 | margin-left: 10px; 120 | } 121 | .leaflet-right .leaflet-control { 122 | margin-right: 10px; 123 | } 124 | 125 | 126 | /* zoom and fade animations */ 127 | 128 | .leaflet-fade-anim .leaflet-tile, 129 | .leaflet-fade-anim .leaflet-popup { 130 | opacity: 0; 131 | -webkit-transition: opacity 0.2s linear; 132 | -moz-transition: opacity 0.2s linear; 133 | -o-transition: opacity 0.2s linear; 134 | transition: opacity 0.2s linear; 135 | } 136 | .leaflet-fade-anim .leaflet-tile-loaded, 137 | .leaflet-fade-anim .leaflet-map-pane .leaflet-popup { 138 | opacity: 1; 139 | } 140 | 141 | .leaflet-zoom-anim .leaflet-zoom-animated { 142 | -webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1); 143 | -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1); 144 | -o-transition: -o-transform 0.25s cubic-bezier(0,0,0.25,1); 145 | transition: transform 0.25s cubic-bezier(0,0,0.25,1); 146 | } 147 | .leaflet-zoom-anim .leaflet-tile, 148 | .leaflet-pan-anim .leaflet-tile, 149 | .leaflet-touching .leaflet-zoom-animated { 150 | -webkit-transition: none; 151 | -moz-transition: none; 152 | -o-transition: none; 153 | transition: none; 154 | } 155 | 156 | .leaflet-zoom-anim .leaflet-zoom-hide { 157 | visibility: hidden; 158 | } 159 | 160 | 161 | /* cursors */ 162 | 163 | .leaflet-clickable { 164 | cursor: pointer; 165 | } 166 | .leaflet-container { 167 | cursor: -webkit-grab; 168 | cursor: -moz-grab; 169 | } 170 | .leaflet-popup-pane, 171 | .leaflet-control { 172 | cursor: auto; 173 | } 174 | .leaflet-dragging .leaflet-container, 175 | .leaflet-dragging .leaflet-clickable { 176 | cursor: move; 177 | cursor: -webkit-grabbing; 178 | cursor: -moz-grabbing; 179 | } 180 | 181 | 182 | /* visual tweaks */ 183 | 184 | .leaflet-container { 185 | background: #ddd; 186 | outline: 0; 187 | } 188 | .leaflet-container a { 189 | color: #0078A8; 190 | } 191 | .leaflet-container a.leaflet-active { 192 | outline: 2px solid orange; 193 | } 194 | .leaflet-zoom-box { 195 | border: 2px dotted #38f; 196 | background: rgba(255,255,255,0.5); 197 | } 198 | 199 | 200 | /* general typography */ 201 | .leaflet-container { 202 | font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif; 203 | } 204 | 205 | 206 | /* general toolbar styles */ 207 | 208 | .leaflet-bar { 209 | box-shadow: 0 1px 5px rgba(0,0,0,0.65); 210 | border-radius: 4px; 211 | } 212 | .leaflet-bar a, 213 | .leaflet-bar a:hover { 214 | background-color: #fff; 215 | border-bottom: 1px solid #ccc; 216 | width: 26px; 217 | height: 26px; 218 | line-height: 26px; 219 | display: block; 220 | text-align: center; 221 | text-decoration: none; 222 | color: black; 223 | } 224 | .leaflet-bar a, 225 | .leaflet-control-layers-toggle { 226 | background-position: 50% 50%; 227 | background-repeat: no-repeat; 228 | display: block; 229 | } 230 | .leaflet-bar a:hover { 231 | background-color: #f4f4f4; 232 | } 233 | .leaflet-bar a:first-child { 234 | border-top-left-radius: 4px; 235 | border-top-right-radius: 4px; 236 | } 237 | .leaflet-bar a:last-child { 238 | border-bottom-left-radius: 4px; 239 | border-bottom-right-radius: 4px; 240 | border-bottom: none; 241 | } 242 | .leaflet-bar a.leaflet-disabled { 243 | cursor: default; 244 | background-color: #f4f4f4; 245 | color: #bbb; 246 | } 247 | 248 | .leaflet-touch .leaflet-bar a { 249 | width: 30px; 250 | height: 30px; 251 | line-height: 30px; 252 | } 253 | 254 | 255 | /* zoom control */ 256 | 257 | .leaflet-control-zoom-in, 258 | .leaflet-control-zoom-out { 259 | font: bold 18px 'Lucida Console', Monaco, monospace; 260 | text-indent: 1px; 261 | } 262 | .leaflet-control-zoom-out { 263 | font-size: 20px; 264 | } 265 | 266 | .leaflet-touch .leaflet-control-zoom-in { 267 | font-size: 22px; 268 | } 269 | .leaflet-touch .leaflet-control-zoom-out { 270 | font-size: 24px; 271 | } 272 | 273 | 274 | /* layers control */ 275 | 276 | .leaflet-control-layers { 277 | box-shadow: 0 1px 5px rgba(0,0,0,0.4); 278 | background: #fff; 279 | border-radius: 5px; 280 | } 281 | .leaflet-control-layers-toggle { 282 | background-image: url(images/layers.png); 283 | width: 36px; 284 | height: 36px; 285 | } 286 | .leaflet-retina .leaflet-control-layers-toggle { 287 | background-image: url(images/layers-2x.png); 288 | background-size: 26px 26px; 289 | } 290 | .leaflet-touch .leaflet-control-layers-toggle { 291 | width: 44px; 292 | height: 44px; 293 | } 294 | .leaflet-control-layers .leaflet-control-layers-list, 295 | .leaflet-control-layers-expanded .leaflet-control-layers-toggle { 296 | display: none; 297 | } 298 | .leaflet-control-layers-expanded .leaflet-control-layers-list { 299 | display: block; 300 | position: relative; 301 | } 302 | .leaflet-control-layers-expanded { 303 | padding: 6px 10px 6px 6px; 304 | color: #333; 305 | background: #fff; 306 | } 307 | .leaflet-control-layers-selector { 308 | margin-top: 2px; 309 | position: relative; 310 | top: 1px; 311 | } 312 | .leaflet-control-layers label { 313 | display: block; 314 | } 315 | .leaflet-control-layers-separator { 316 | height: 0; 317 | border-top: 1px solid #ddd; 318 | margin: 5px -10px 5px -6px; 319 | } 320 | 321 | 322 | /* attribution and scale controls */ 323 | 324 | .leaflet-container .leaflet-control-attribution { 325 | background: #fff; 326 | background: rgba(255, 255, 255, 0.7); 327 | margin: 0; 328 | } 329 | .leaflet-control-attribution, 330 | .leaflet-control-scale-line { 331 | padding: 0 5px; 332 | color: #333; 333 | } 334 | .leaflet-control-attribution a { 335 | text-decoration: none; 336 | } 337 | .leaflet-control-attribution a:hover { 338 | text-decoration: underline; 339 | } 340 | .leaflet-container .leaflet-control-attribution, 341 | .leaflet-container .leaflet-control-scale { 342 | font-size: 11px; 343 | } 344 | .leaflet-left .leaflet-control-scale { 345 | margin-left: 5px; 346 | } 347 | .leaflet-bottom .leaflet-control-scale { 348 | margin-bottom: 5px; 349 | } 350 | .leaflet-control-scale-line { 351 | border: 2px solid #777; 352 | border-top: none; 353 | line-height: 1.1; 354 | padding: 2px 5px 1px; 355 | font-size: 11px; 356 | white-space: nowrap; 357 | overflow: hidden; 358 | -moz-box-sizing: content-box; 359 | box-sizing: content-box; 360 | 361 | background: #fff; 362 | background: rgba(255, 255, 255, 0.5); 363 | } 364 | .leaflet-control-scale-line:not(:first-child) { 365 | border-top: 2px solid #777; 366 | border-bottom: none; 367 | margin-top: -2px; 368 | } 369 | .leaflet-control-scale-line:not(:first-child):not(:last-child) { 370 | border-bottom: 2px solid #777; 371 | } 372 | 373 | .leaflet-touch .leaflet-control-attribution, 374 | .leaflet-touch .leaflet-control-layers, 375 | .leaflet-touch .leaflet-bar { 376 | box-shadow: none; 377 | } 378 | .leaflet-touch .leaflet-control-layers, 379 | .leaflet-touch .leaflet-bar { 380 | border: 2px solid rgba(0,0,0,0.2); 381 | background-clip: padding-box; 382 | } 383 | 384 | 385 | /* popup */ 386 | 387 | .leaflet-popup { 388 | position: absolute; 389 | text-align: center; 390 | } 391 | .leaflet-popup-content-wrapper { 392 | padding: 1px; 393 | text-align: left; 394 | border-radius: 12px; 395 | } 396 | .leaflet-popup-content { 397 | margin: 13px 19px; 398 | line-height: 1.4; 399 | } 400 | .leaflet-popup-content p { 401 | margin: 18px 0; 402 | } 403 | .leaflet-popup-tip-container { 404 | margin: 0 auto; 405 | width: 40px; 406 | height: 20px; 407 | position: relative; 408 | overflow: hidden; 409 | } 410 | .leaflet-popup-tip { 411 | width: 17px; 412 | height: 17px; 413 | padding: 1px; 414 | 415 | margin: -10px auto 0; 416 | 417 | -webkit-transform: rotate(45deg); 418 | -moz-transform: rotate(45deg); 419 | -ms-transform: rotate(45deg); 420 | -o-transform: rotate(45deg); 421 | transform: rotate(45deg); 422 | } 423 | .leaflet-popup-content-wrapper, 424 | .leaflet-popup-tip { 425 | background: white; 426 | 427 | box-shadow: 0 3px 14px rgba(0,0,0,0.4); 428 | } 429 | .leaflet-container a.leaflet-popup-close-button { 430 | position: absolute; 431 | top: 0; 432 | right: 0; 433 | padding: 4px 4px 0 0; 434 | text-align: center; 435 | width: 18px; 436 | height: 14px; 437 | font: 16px/14px Tahoma, Verdana, sans-serif; 438 | color: #c3c3c3; 439 | text-decoration: none; 440 | font-weight: bold; 441 | background: transparent; 442 | } 443 | .leaflet-container a.leaflet-popup-close-button:hover { 444 | color: #999; 445 | } 446 | .leaflet-popup-scrolled { 447 | overflow: auto; 448 | border-bottom: 1px solid #ddd; 449 | border-top: 1px solid #ddd; 450 | } 451 | 452 | .leaflet-oldie .leaflet-popup-content-wrapper { 453 | zoom: 1; 454 | } 455 | .leaflet-oldie .leaflet-popup-tip { 456 | width: 24px; 457 | margin: 0 auto; 458 | 459 | -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)"; 460 | filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678); 461 | } 462 | .leaflet-oldie .leaflet-popup-tip-container { 463 | margin-top: -1px; 464 | } 465 | 466 | .leaflet-oldie .leaflet-control-zoom, 467 | .leaflet-oldie .leaflet-control-layers, 468 | .leaflet-oldie .leaflet-popup-content-wrapper, 469 | .leaflet-oldie .leaflet-popup-tip { 470 | border: 1px solid #999; 471 | } 472 | 473 | 474 | /* div icon */ 475 | 476 | .leaflet-div-icon { 477 | background: #fff; 478 | border: 1px solid #666; 479 | } 480 | -------------------------------------------------------------------------------- /Intro_to_spatial_analysis_files/figure-html/widgets/leaflet_libs/leafletfix/leafletfix.css: -------------------------------------------------------------------------------- 1 | /* Work around CSS properties introduced on img by bootstrap */ 2 | img.leaflet-tile { 3 | padding: 0; 4 | margin: 0; 5 | border-radius: 0; 6 | border: none; 7 | } 8 | .info { 9 | padding: 6px 8px; 10 | font: 14px/16px Arial, Helvetica, sans-serif; 11 | background: white; 12 | background: rgba(255,255,255,0.8); 13 | box-shadow: 0 0 15px rgba(0,0,0,0.2); 14 | border-radius: 5px; 15 | } 16 | .legend { 17 | line-height: 18px; 18 | color: #555; 19 | } 20 | .legend svg text { 21 | fill: #555; 22 | } 23 | .legend svg line { 24 | stroke: #555; 25 | } 26 | .legend i { 27 | width: 18px; 28 | height: 18px; 29 | float: left; 30 | margin-right: 8px; 31 | opacity: 0.7; 32 | } 33 | -------------------------------------------------------------------------------- /Intro_to_spatial_analysis_files/figure-html/widgets/leaflet_libs/pymjs/pym.v1.min.js: -------------------------------------------------------------------------------- 1 | /*! pym.js - v1.3.1 - 2017-08-06 */ 2 | 3 | !function(a){"function"==typeof define&&define.amd?define(a):"undefined"!=typeof module&&module.exports?module.exports=a():window.pym=a.call(this)}(function(){var a={},b=function(a){var b=document.createEvent("Event");b.initEvent("pym:"+a,!0,!0),document.dispatchEvent(b)},c=function(a){var b=new RegExp("[\\?&]"+a.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]")+"=([^&#]*)"),c=b.exec(location.search);return null===c?"":decodeURIComponent(c[1].replace(/\+/g," "))},d=function(a,b){if(("*"===b.xdomain||a.origin.match(new RegExp(b.xdomain+"$")))&&"string"==typeof a.data)return!0},e=function(a,b,c){return["pym",a,b,c].join("xPYMx")},f=function(a){var b=["pym",a,"(\\S+)","(.*)"];return new RegExp("^"+b.join("xPYMx")+"$")},g=Date.now||function(){return(new Date).getTime()},h=function(a,b,c){var d,e,f,h=null,i=0;c||(c={});var j=function(){i=!1===c.leading?0:g(),h=null,f=a.apply(d,e),h||(d=e=null)};return function(){var k=g();i||!1!==c.leading||(i=k);var l=b-(k-i);return d=this,e=arguments,l<=0||l>b?(h&&(clearTimeout(h),h=null),i=k,f=a.apply(d,e),h||(d=e=null)):h||!1===c.trailing||(h=setTimeout(j,l)),f}},i=function(){for(var b=a.autoInitInstances.length,c=b-1;c>=0;c--){var d=a.autoInitInstances[c];d.el.getElementsByTagName("iframe").length&&d.el.getElementsByTagName("iframe")[0].contentWindow||a.autoInitInstances.splice(c,1)}};return a.autoInitInstances=[],a.autoInit=function(c){var d=document.querySelectorAll("[data-pym-src]:not([data-pym-auto-initialized])"),e=d.length;i();for(var f=0;f-1&&(b=this.url.substring(c,this.url.length),this.url=this.url.substring(0,c)),this.url.indexOf("?")<0?this.url+="?":this.url+="&",this.iframe.src=this.url+"initialWidth="+a+"&childId="+this.id,this.settings.optionalparams&&(this.iframe.src+="&parentTitle="+encodeURIComponent(document.title),this.iframe.src+="&"+this.settings.parenturlparam+"="+encodeURIComponent(this.settings.parenturlvalue)),this.iframe.src+=b,this.settings.lazyload&&(this.iframe.setAttribute("data-src",this.iframe.src),this.iframe.setAttribute("class","b-lazy"),this.iframe.src="about:blank"),this.iframe.setAttribute("width","100%"),this.iframe.setAttribute("scrolling","no"),this.iframe.setAttribute("marginheight","0"),this.iframe.setAttribute("frameborder","0"),this.settings.title&&this.iframe.setAttribute("title",this.settings.title),void 0!==this.settings.allowfullscreen&&!1!==this.settings.allowfullscreen&&this.iframe.setAttribute("allowfullscreen",""),void 0!==this.settings.sandbox&&"string"==typeof this.settings.sandbox&&this.iframe.setAttribute("sandbox",this.settings.sandbox),this.settings.id&&(document.getElementById(this.settings.id)||this.iframe.setAttribute("id",this.settings.id)),this.settings.name&&this.iframe.setAttribute("name",this.settings.name);this.el.firstChild;)this.el.removeChild(this.el.firstChild);this.el.appendChild(this.iframe),window.addEventListener("resize",this._onResize),this.settings.trackscroll&&window.addEventListener("scroll",this._throttleOnScroll)},this._onResize=function(){this.sendWidth(),this.settings.trackscroll&&this.sendViewportAndIFramePosition()}.bind(this),this._onScroll=function(){this.sendViewportAndIFramePosition()}.bind(this),this._fire=function(a,b){if(a in this.messageHandlers)for(var c=0;c 39 | 40 | ![](https://licensebuttons.net/l/by-nc/4.0/88x31.png) 41 | 42 | This work is licensed under a [Creative Commons Attribution-NonCommercial 4.0 International License](https://creativecommons.org/licenses/by-nc/4.0/). -------------------------------------------------------------------------------- /data.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/data.zip -------------------------------------------------------------------------------- /data/hamiltion_cities.csv: -------------------------------------------------------------------------------- 1 | name,place,X,Y 2 | Delhi,town,-84.6052225,39.0950595 3 | Milford,town,-84.2958988,39.174625 4 | Covington,town,-84.508371,39.0836224 5 | Harrison,town,-84.8199516,39.2619993 6 | Cincinnati,city,-84.5124602,39.1014537 7 | Springdale,town,-84.4852213,39.287002 8 | Sycamore,town,-84.347427,39.2800883 9 | Norwood,town,-84.4596641,39.1556149 10 | Loveland,town,-84.2638406,39.2689562 11 | Fort Thomas,town,-84.4483432,39.0786242 12 | Saint Bernard,town,-84.4985541,39.1670033 13 | Montgomery,town,-84.3539662,39.2282432 14 | Forest Park,town,-84.5041108,39.2903353 15 | Blue Ash,town,-84.3782817,39.2320073 16 | Ludlow,town,-84.5474435,39.0925598 17 | Sharonville,town,-84.4132779,39.2681145 18 | Reading,town,-84.4421641,39.2236694 19 | Bellevue,town,-84.4826482,39.1067078 20 | Newport,town,-84.4919524,39.0889469 21 | -------------------------------------------------------------------------------- /data/hamilton_county.gpkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/data/hamilton_county.gpkg -------------------------------------------------------------------------------- /data/new_wrld.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/data/new_wrld.dbf -------------------------------------------------------------------------------- /data/new_wrld.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] -------------------------------------------------------------------------------- /data/new_wrld.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/data/new_wrld.shx -------------------------------------------------------------------------------- /data/srtm.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/data/srtm.tif -------------------------------------------------------------------------------- /data/wrld.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/data/wrld.dbf -------------------------------------------------------------------------------- /data/wrld.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] -------------------------------------------------------------------------------- /data/wrld.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/data/wrld.shp -------------------------------------------------------------------------------- /data/wrld.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/data/wrld.shx -------------------------------------------------------------------------------- /data/wrld.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/data/wrld.zip -------------------------------------------------------------------------------- /figs/coord_compare.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/figs/coord_compare.png -------------------------------------------------------------------------------- /figs/coord_compare0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/figs/coord_compare0.png -------------------------------------------------------------------------------- /figs/coord_compare_raster.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/figs/coord_compare_raster.png -------------------------------------------------------------------------------- /figs/plot_compare.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/figs/plot_compare.png -------------------------------------------------------------------------------- /libs/Proj4Leaflet/proj4leaflet.js: -------------------------------------------------------------------------------- 1 | (function (factory) { 2 | var L, proj4; 3 | if (typeof define === 'function' && define.amd) { 4 | // AMD 5 | define(['leaflet', 'proj4'], factory); 6 | } else if (typeof module === 'object' && typeof module.exports === "object") { 7 | // Node/CommonJS 8 | L = require('leaflet'); 9 | proj4 = require('proj4'); 10 | module.exports = factory(L, proj4); 11 | } else { 12 | // Browser globals 13 | if (typeof window.L === 'undefined' || typeof window.proj4 === 'undefined') 14 | throw 'Leaflet and proj4 must be loaded first'; 15 | factory(window.L, window.proj4); 16 | } 17 | }(function (L, proj4) { 18 | 19 | L.Proj = {}; 20 | 21 | L.Proj._isProj4Obj = function(a) { 22 | return (typeof a.inverse !== 'undefined' && 23 | typeof a.forward !== 'undefined'); 24 | }; 25 | 26 | L.Proj.ScaleDependantTransformation = function(scaleTransforms) { 27 | this.scaleTransforms = scaleTransforms; 28 | }; 29 | 30 | L.Proj.ScaleDependantTransformation.prototype.transform = function(point, scale) { 31 | return this.scaleTransforms[scale].transform(point, scale); 32 | }; 33 | 34 | L.Proj.ScaleDependantTransformation.prototype.untransform = function(point, scale) { 35 | return this.scaleTransforms[scale].untransform(point, scale); 36 | }; 37 | 38 | L.Proj.Projection = L.Class.extend({ 39 | initialize: function(a, def) { 40 | if (L.Proj._isProj4Obj(a)) { 41 | this._proj = a; 42 | } else { 43 | var code = a; 44 | if (def) { 45 | proj4.defs(code, def); 46 | } else if (proj4.defs[code] === undefined) { 47 | var urn = code.split(':'); 48 | if (urn.length > 3) { 49 | code = urn[urn.length - 3] + ':' + urn[urn.length - 1]; 50 | } 51 | if (proj4.defs[code] === undefined) { 52 | throw 'No projection definition for code ' + code; 53 | } 54 | } 55 | this._proj = proj4(code); 56 | } 57 | }, 58 | 59 | project: function (latlng) { 60 | var point = this._proj.forward([latlng.lng, latlng.lat]); 61 | return new L.Point(point[0], point[1]); 62 | }, 63 | 64 | unproject: function (point, unbounded) { 65 | var point2 = this._proj.inverse([point.x, point.y]); 66 | return new L.LatLng(point2[1], point2[0], unbounded); 67 | } 68 | }); 69 | 70 | L.Proj.CRS = L.Class.extend({ 71 | includes: L.CRS, 72 | 73 | options: { 74 | transformation: new L.Transformation(1, 0, -1, 0) 75 | }, 76 | 77 | initialize: function(a, b, c) { 78 | var code, proj, def, options; 79 | 80 | if (L.Proj._isProj4Obj(a)) { 81 | proj = a; 82 | code = proj.srsCode; 83 | options = b || {}; 84 | 85 | this.projection = new L.Proj.Projection(proj); 86 | } else { 87 | code = a; 88 | def = b; 89 | options = c || {}; 90 | this.projection = new L.Proj.Projection(code, def); 91 | } 92 | 93 | L.Util.setOptions(this, options); 94 | this.code = code; 95 | this.transformation = this.options.transformation; 96 | 97 | if (this.options.origin) { 98 | this.transformation = 99 | new L.Transformation(1, -this.options.origin[0], 100 | -1, this.options.origin[1]); 101 | } 102 | 103 | if (this.options.scales) { 104 | this._scales = this.options.scales; 105 | } else if (this.options.resolutions) { 106 | this._scales = []; 107 | for (var i = this.options.resolutions.length - 1; i >= 0; i--) { 108 | if (this.options.resolutions[i]) { 109 | this._scales[i] = 1 / this.options.resolutions[i]; 110 | } 111 | } 112 | } 113 | }, 114 | 115 | scale: function(zoom) { 116 | var iZoom = Math.floor(zoom), 117 | baseScale, 118 | nextScale, 119 | scaleDiff, 120 | zDiff; 121 | if (zoom === iZoom) { 122 | return this._scales[zoom]; 123 | } else { 124 | // Non-integer zoom, interpolate 125 | baseScale = this._scales[iZoom]; 126 | nextScale = this._scales[iZoom + 1]; 127 | scaleDiff = nextScale - baseScale; 128 | zDiff = (zoom - iZoom); 129 | return baseScale + scaleDiff * zDiff; 130 | } 131 | }, 132 | 133 | getSize: function(zoom) { 134 | var b = this.options.bounds, 135 | s, 136 | min, 137 | max; 138 | 139 | if (b) { 140 | s = this.scale(zoom); 141 | min = this.transformation.transform(b.min, s); 142 | max = this.transformation.transform(b.max, s); 143 | return L.point(Math.abs(max.x - min.x), Math.abs(max.y - min.y)); 144 | } else { 145 | // Backwards compatibility with Leaflet < 0.7 146 | s = 256 * Math.pow(2, zoom); 147 | return L.point(s, s); 148 | } 149 | } 150 | }); 151 | 152 | L.Proj.CRS.TMS = L.Proj.CRS.extend({ 153 | options: { 154 | tileSize: 256 155 | }, 156 | 157 | initialize: function(a, b, c, d) { 158 | var code, 159 | def, 160 | proj, 161 | projectedBounds, 162 | options; 163 | 164 | if (L.Proj._isProj4Obj(a)) { 165 | proj = a; 166 | projectedBounds = b; 167 | options = c || {}; 168 | options.origin = [projectedBounds[0], projectedBounds[3]]; 169 | L.Proj.CRS.prototype.initialize.call(this, proj, options); 170 | } else { 171 | code = a; 172 | def = b; 173 | projectedBounds = c; 174 | options = d || {}; 175 | options.origin = [projectedBounds[0], projectedBounds[3]]; 176 | L.Proj.CRS.prototype.initialize.call(this, code, def, options); 177 | } 178 | 179 | this.projectedBounds = projectedBounds; 180 | 181 | this._sizes = this._calculateSizes(); 182 | }, 183 | 184 | _calculateSizes: function() { 185 | var sizes = [], 186 | crsBounds = this.projectedBounds, 187 | projectedTileSize, 188 | i, 189 | x, 190 | y; 191 | for (i = this._scales.length - 1; i >= 0; i--) { 192 | if (this._scales[i]) { 193 | projectedTileSize = this.options.tileSize / this._scales[i]; 194 | // to prevent very small rounding errors from causing us to round up, 195 | // cut any decimals after 3rd before rounding up. 196 | x = Math.ceil(parseFloat((crsBounds[2] - crsBounds[0]) / projectedTileSize).toPrecision(3)) * 197 | projectedTileSize * this._scales[i]; 198 | y = Math.ceil(parseFloat((crsBounds[3] - crsBounds[1]) / projectedTileSize).toPrecision(3)) * 199 | projectedTileSize * this._scales[i]; 200 | sizes[i] = L.point(x, y); 201 | } 202 | } 203 | 204 | return sizes; 205 | }, 206 | 207 | getSize: function(zoom) { 208 | return this._sizes[zoom]; 209 | } 210 | }); 211 | 212 | L.Proj.TileLayer = {}; 213 | 214 | // Note: deprecated and not necessary since 0.7, will be removed 215 | L.Proj.TileLayer.TMS = L.TileLayer.extend({ 216 | options: { 217 | continuousWorld: true 218 | }, 219 | 220 | initialize: function(urlTemplate, crs, options) { 221 | var boundsMatchesGrid = true, 222 | scaleTransforms, 223 | upperY, 224 | crsBounds, 225 | i; 226 | 227 | if (!(crs instanceof L.Proj.CRS.TMS)) { 228 | throw 'CRS is not L.Proj.CRS.TMS.'; 229 | } 230 | 231 | L.TileLayer.prototype.initialize.call(this, urlTemplate, options); 232 | // Enabling tms will cause Leaflet to also try to do TMS, which will 233 | // break (at least prior to 0.7.0). Actively disable it, to prevent 234 | // well-meaning users from shooting themselves in the foot. 235 | this.options.tms = false; 236 | this.crs = crs; 237 | crsBounds = this.crs.projectedBounds; 238 | 239 | // Verify grid alignment 240 | for (i = this.options.minZoom; i < this.options.maxZoom && boundsMatchesGrid; i++) { 241 | var gridHeight = (crsBounds[3] - crsBounds[1]) / 242 | this._projectedTileSize(i); 243 | boundsMatchesGrid = Math.abs(gridHeight - Math.round(gridHeight)) > 1e-3; 244 | } 245 | 246 | if (!boundsMatchesGrid) { 247 | scaleTransforms = {}; 248 | for (i = this.options.minZoom; i < this.options.maxZoom; i++) { 249 | upperY = crsBounds[1] + Math.ceil((crsBounds[3] - crsBounds[1]) / 250 | this._projectedTileSize(i)) * this._projectedTileSize(i); 251 | scaleTransforms[this.crs.scale(i)] = new L.Transformation(1, -crsBounds[0], -1, upperY); 252 | } 253 | 254 | this.crs = new L.Proj.CRS.TMS(this.crs.projection._proj, crsBounds, this.crs.options); 255 | this.crs.transformation = new L.Proj.ScaleDependantTransformation(scaleTransforms); 256 | } 257 | }, 258 | 259 | getTileUrl: function(tilePoint) { 260 | var zoom = this._map.getZoom(), 261 | gridHeight = Math.ceil( 262 | (this.crs.projectedBounds[3] - this.crs.projectedBounds[1]) / 263 | this._projectedTileSize(zoom)); 264 | 265 | return L.Util.template(this._url, L.Util.extend({ 266 | s: this._getSubdomain(tilePoint), 267 | z: this._getZoomForUrl(), 268 | x: tilePoint.x, 269 | y: gridHeight - tilePoint.y - 1 270 | }, this.options)); 271 | }, 272 | 273 | _projectedTileSize: function(zoom) { 274 | return (this.options.tileSize / this.crs.scale(zoom)); 275 | } 276 | }); 277 | 278 | L.Proj.GeoJSON = L.GeoJSON.extend({ 279 | initialize: function(geojson, options) { 280 | this._callLevel = 0; 281 | L.GeoJSON.prototype.initialize.call(this, null, options); 282 | if (geojson) { 283 | this.addData(geojson); 284 | } 285 | }, 286 | 287 | addData: function(geojson) { 288 | var crs; 289 | 290 | if (geojson) { 291 | if (geojson.crs && geojson.crs.type === 'name') { 292 | crs = new L.Proj.CRS(geojson.crs.properties.name); 293 | } else if (geojson.crs && geojson.crs.type) { 294 | crs = new L.Proj.CRS(geojson.crs.type + ':' + geojson.crs.properties.code); 295 | } 296 | 297 | if (crs !== undefined) { 298 | this.options.coordsToLatLng = function(coords) { 299 | var point = L.point(coords[0], coords[1]); 300 | return crs.projection.unproject(point); 301 | }; 302 | } 303 | } 304 | 305 | // Base class' addData might call us recursively, but 306 | // CRS shouldn't be cleared in that case, since CRS applies 307 | // to the whole GeoJSON, inluding sub-features. 308 | this._callLevel++; 309 | try { 310 | L.GeoJSON.prototype.addData.call(this, geojson); 311 | } finally { 312 | this._callLevel--; 313 | if (this._callLevel === 0) { 314 | delete this.options.coordsToLatLng; 315 | } 316 | } 317 | } 318 | }); 319 | 320 | L.Proj.geoJson = function(geojson, options) { 321 | return new L.Proj.GeoJSON(geojson, options); 322 | }; 323 | 324 | L.Proj.ImageOverlay = L.ImageOverlay.extend({ 325 | initialize: function(url, bounds, options) { 326 | L.ImageOverlay.prototype.initialize.call(this, url, null, options); 327 | this._projBounds = bounds; 328 | }, 329 | 330 | /* Danger ahead: overriding internal methods in Leaflet. 331 | I've decided to do this rather than making a copy of L.ImageOverlay 332 | and making very tiny modifications to it. Future will tell if this 333 | was wise or not. */ 334 | _animateZoom: function (e) { 335 | var northwest = L.point(this._projBounds.min.x, this._projBounds.max.y), 336 | southeast = L.point(this._projBounds.max.x, this._projBounds.min.y), 337 | topLeft = this._projectedToNewLayerPoint(northwest, e.zoom, e.center), 338 | size = this._projectedToNewLayerPoint(southeast, e.zoom, e.center).subtract(topLeft), 339 | origin = topLeft.add(size._multiplyBy((1 - 1 / e.scale) / 2)); 340 | 341 | this._image.style[L.DomUtil.TRANSFORM] = 342 | L.DomUtil.getTranslateString(origin) + ' scale(' + this._map.getZoomScale(e.zoom) + ') '; 343 | }, 344 | 345 | _reset: function() { 346 | var zoom = this._map.getZoom(), 347 | pixelOrigin = this._map.getPixelOrigin(), 348 | bounds = L.bounds(this._transform(this._projBounds.min, zoom)._subtract(pixelOrigin), 349 | this._transform(this._projBounds.max, zoom)._subtract(pixelOrigin)), 350 | size = bounds.getSize(), 351 | image = this._image; 352 | 353 | L.DomUtil.setPosition(image, bounds.min); 354 | image.style.width = size.x + 'px'; 355 | image.style.height = size.y + 'px'; 356 | }, 357 | 358 | _projectedToNewLayerPoint: function (point, newZoom, newCenter) { 359 | var topLeft = this._map._getNewTopLeftPoint(newCenter, newZoom).add(this._map._getMapPanePos()); 360 | return this._transform(point, newZoom)._subtract(topLeft); 361 | }, 362 | 363 | _transform: function(p, zoom) { 364 | var crs = this._map.options.crs, 365 | transformation = crs.transformation, 366 | scale = crs.scale(zoom); 367 | return transformation.transform(p, scale); 368 | } 369 | }); 370 | 371 | L.Proj.imageOverlay = function(url, bounds, options) { 372 | return new L.Proj.ImageOverlay(url, bounds, options); 373 | }; 374 | 375 | if (typeof L.CRS !== 'undefined') { 376 | // This is left here for backwards compatibility 377 | L.CRS.proj4js = (function () { 378 | return function (code, def, transformation, options) { 379 | options = options || {}; 380 | if (transformation) { 381 | options.transformation = transformation; 382 | } 383 | 384 | return new L.Proj.CRS(code, def, options); 385 | }; 386 | }()); 387 | } 388 | 389 | return L.Proj; 390 | })); 391 | -------------------------------------------------------------------------------- /libs/blazy/blazy.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | hey, [be]Lazy.js - v1.8.2 - 2016.10.25 3 | A fast, small and dependency free lazy load script (https://github.com/dinbror/blazy) 4 | (c) Bjoern Klinggaard - @bklinggaard - http://dinbror.dk/blazy 5 | */ 6 | (function(q,m){"function"===typeof define&&define.amd?define(m):"object"===typeof exports?module.exports=m():q.Blazy=m()})(this,function(){function q(b){var c=b._util;c.elements=E(b.options);c.count=c.elements.length;c.destroyed&&(c.destroyed=!1,b.options.container&&l(b.options.container,function(a){n(a,"scroll",c.validateT)}),n(window,"resize",c.saveViewportOffsetT),n(window,"resize",c.validateT),n(window,"scroll",c.validateT));m(b)}function m(b){for(var c=b._util,a=0;a=c.left&&b.bottom>=c.top&&b.left<=c.right&&b.top<=c.bottom}function z(b,c,a){if(!t(b,a.successClass)&&(c||a.loadInvisible||0=window.screen.width)return u=a.src,!1});setTimeout(function(){q(a)})}}); -------------------------------------------------------------------------------- /libs/jquery/jquery.min.js: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /libs/leaflet-label/images/death.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/libs/leaflet-label/images/death.png -------------------------------------------------------------------------------- /libs/leaflet-label/leaflet.label.css: -------------------------------------------------------------------------------- 1 | .leaflet-label { 2 | background: rgb(235, 235, 235); 3 | background: rgba(235, 235, 235, 0.81); 4 | background-clip: padding-box; 5 | border-color: #777; 6 | border-color: rgba(0,0,0,0.45); 7 | border-radius: 4px; 8 | border-style: solid; 9 | border-width: 4px; 10 | color: #111; 11 | display: block; 12 | font: 12px/20px "Helvetica Neue", Arial, Helvetica, sans-serif; 13 | font-weight: bold; 14 | padding: 1px 6px; 15 | position: absolute; 16 | -webkit-user-select: none; 17 | -moz-user-select: none; 18 | -ms-user-select: none; 19 | user-select: none; 20 | pointer-events: none; 21 | white-space: nowrap; 22 | z-index: 500; 23 | } 24 | 25 | .leaflet-label.leaflet-clickable { 26 | cursor: pointer; 27 | pointer-events: auto; 28 | } 29 | 30 | .leaflet-label:before, 31 | .leaflet-label:after { 32 | border-top: 6px solid transparent; 33 | border-bottom: 6px solid transparent; 34 | border-right: 6px solid transparent; 35 | content: none; 36 | position: absolute; 37 | top: 5px; 38 | } 39 | 40 | .leaflet-label:before { 41 | border-right: 6px solid black; 42 | border-right-color: inherit; 43 | left: -10px; 44 | } 45 | 46 | .leaflet-label:after { 47 | border-left: 6px solid black; 48 | border-left-color: inherit; 49 | right: -16px; 50 | } 51 | 52 | .leaflet-label-top:after, 53 | .leaflet-label-top:before { 54 | left: -50%; 55 | border-top-color: black; 56 | border-top-color: rgba(0,0,0,0.45); 57 | position: relative; 58 | top: 29px; 59 | } 60 | 61 | .leaflet-label-top:before { 62 | display: none; 63 | border-right-color: transparent; 64 | border-bottom-color: transparent; 65 | border-left-color: transparent; 66 | border-top-color: transparent; 67 | } 68 | 69 | .leaflet-label-top:after { 70 | content: ' '; 71 | border-right-color: transparent; 72 | border-bottom-color: transparent; 73 | border-left-color: transparent; 74 | } 75 | 76 | .leaflet-label-bottom:before { 77 | display: none; 78 | border-right-color: transparent; 79 | border-bottom-color: transparent; 80 | border-left-color: transparent; 81 | border-top-color: transparent; 82 | } 83 | 84 | .leaflet-label-bottom:after, 85 | .leaflet-label-bottom:before { 86 | left: -50%; 87 | border-bottom-color: black; 88 | border-bottom-color: rgba(0,0,0,0.45); 89 | position: relative; 90 | top: -28px; 91 | } 92 | 93 | .leaflet-label-bottom:after { 94 | border-right-color: transparent; 95 | border-top-color: transparent; 96 | border-left-color: transparent; 97 | } 98 | 99 | .leaflet-label-bottom:after, 100 | .leaflet-label-top:after, 101 | .leaflet-label-right:before, 102 | .leaflet-label-left:after { 103 | content: ""; 104 | } 105 | 106 | .leaflet-label.leaflet-label-text-only, 107 | .leaflet-label.leaflet-label-text-only:before, 108 | .leaflet-label.leaflet-label-text-only:after { 109 | background: none; 110 | border: none; 111 | } 112 | 113 | .leaflet-label.leaflet-label-text-only.leaflet-label-left { 114 | margin-right: -10px; 115 | } 116 | 117 | .leaflet-label.leaflet-label-text-only.leaflet-label-right { 118 | margin-left: -10px; 119 | } 120 | -------------------------------------------------------------------------------- /libs/leaflet-label/leaflet.label.js: -------------------------------------------------------------------------------- 1 | /* 2 | Leaflet.label, a plugin that adds labels to markers and vectors for Leaflet powered maps. 3 | (c) 2012-2013, Jacob Toye, Smartrak 4 | 5 | https://github.com/Leaflet/Leaflet.label 6 | http://leafletjs.com 7 | https://github.com/jacobtoye 8 | */ 9 | !function(t,e){"function"==typeof define&&define.amd?define(["leaflet"],t):"object"==typeof exports&&(module.exports=t(require("leaflet"))),"undefined"!=typeof e&&e.L&&(e.LeafletLabel=t(L))}(function(t){t.labelVersion="0.2.4";var e=t.Class.extend({includes:t.Mixin.Events,_directions:["top","right","bottom","left"],options:{className:"",clickable:!1,direction:"right",noHide:!1,offset:[12,-15],opacity:1,textsize:"10px",textOnly:!1,style:null,zoomAnimation:!0},initialize:function(e,i){t.setOptions(this,e),this._source=i,this._animated=t.Browser.any3d&&this.options.zoomAnimation,this._isOpen=!1},_isOnMarker:function(){return this._source instanceof t.Marker},onAdd:function(e){this._map=e,this._pane=this.options.pane?e._panes[this.options.pane]:this._isOnMarker()?e._panes.markerPane:e._panes.popupPane,this._container||this._initLayout(),this._pane.appendChild(this._container),this._initInteraction(),this._update(),this.setOpacity(this.options.opacity),e.on("moveend",this._onMoveEnd,this).on("viewreset",this._onViewReset,this),this._animated&&e.on("zoomanim",this._zoomAnimation,this),t.Browser.touch&&!this.options.noHide&&(t.DomEvent.on(this._container,"click",this.close,this),e.on("click",this.close,this))},onRemove:function(t){this._pane.removeChild(this._container),t.off({zoomanim:this._zoomAnimation,moveend:this._onMoveEnd,viewreset:this._onViewReset},this),this._removeInteraction(),this._map=null},setLatLng:function(e){return this._latlng=t.latLng(e),this._map&&this._updatePosition(),this},setContent:function(t){return this._previousContent=this._content,this._content=t,this._updateContent(),this},close:function(){var e=this._map;e&&(t.Browser.touch&&!this.options.noHide&&(t.DomEvent.off(this._container,"click",this.close),e.off("click",this.close,this)),e.removeLayer(this))},updateZIndex:function(t){this._zIndex=t,this._container&&this._zIndex&&(this._container.style.zIndex=t)},setOpacity:function(e){this.options.opacity=e,this._container&&t.DomUtil.setOpacity(this._container,e)},_initLayout:function(){if(this._container=t.DomUtil.create("div","leaflet-label "+this.options.className+" leaflet-zoom-animated"),this._container.style.fontSize=this.options.textsize,this.options.textOnly&&t.DomUtil.addClass(this._container,"leaflet-label-text-only"),this.options.style)for(var e in this.options.style)this.options.style.hasOwnProperty(e)&&(this._container.style[e]=this.options.style[e]);this.updateZIndex(this._zIndex)},_update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updatePosition(),this._container.style.visibility="")},_updateContent:function(){this._content&&this._map&&this._prevContent!==this._content&&"string"==typeof this._content&&(this._container.innerHTML=this._content,this._prevContent=this._content,this._labelWidth=this._container.offsetWidth)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},_getIconHeight:function(){return this._source.options.icon?this._source.options.icon.options.iconSize[1]:0},_setPosition:function(e){var i=this._map,n=this._container,o=i.latLngToContainerPoint(i.getCenter()),s=i.layerPointToContainerPoint(e),a=this._getDirection(),h=this._labelWidth,l=t.point(this.options.offset),r=l.y;"top"===a?(r-=this._isOnMarker()?this._getIconHeight():0,e=e.add(t.point(-h/2,r))):"bottom"===a?(r+=this._isOnMarker?this._getIconHeight():0,e=e.add(t.point(-h/2,r))):"right"===a||"auto"===a&&s.x[1](#what-is-free) tile providers. 4 | 5 | # Usage 6 | Leaflet-providers [providers](#providers) are refered to with a `provider[.]`-string. Let's say you want to add the nice [Watercolor](http://maps.stamen.com/#watercolor/) style from Stamen to your map, you pass `Stamen.Watercolor` to the `L.tileLayer.provider`-constructor, which will return a [L.TileLayer](http://leafletjs.com/reference.html#tilelayer) instance for Stamens Watercolor tile layer. 7 | 8 | ```Javascript 9 | // add Stamen Watercolor to map. 10 | L.tileLayer.provider('Stamen.Watercolor').addTo(map); 11 | ``` 12 | 13 | ## Protocol relativity (`https://`-urls) 14 | 15 | Leaflet-providers tries to use `https://` if the page uses `https://` and the provider supports it. 16 | You can force the use of `http://` by passing `force_http: true` in the options argument. 17 | 18 | ## Retina tiles 19 | 20 | Some providers have retina tiles for which the URL only needs to be slightly adjusted, e.g. `-----@2x.png`. For this, add the retina option in the URL, e.g. `-----{retina}.png`, and set a retina value in the options, e.g. `retina: '@2x'`. If Leaflet detects a retina screen (`L.Browser.retina`), the retina option passed to the tileLayer is set to the value supplied, otherwise it's replaced by an empty string. 21 | 22 | # Providers 23 | 24 | Leaflet-providers provides tile layers from different providers, including *OpenStreetMap*, *Stamen*, *Esri* and *OpenWeatherMap*. The full listing of free to use layers can be [previewed](http://leaflet-extras.github.io/leaflet-providers/preview/index.html). The page will show you the name to use with `leaflet-providers.js` and the code to use it without dependencies. 25 | 26 | ## Providers requiring registration 27 | 28 | In addition to the providers you are free1 to use, we support some layers which require registration. 29 | 30 | ### HERE (formerly Nokia). 31 | 32 | In order to use HERE layers, you must [register](http://developer.here.com/). Once registered, you can create an `app_id` and `app_code` which you have to pass to `L.tileLayer.provider` in the options: 33 | 34 | ```Javascript 35 | L.tileLayer.provider('HERE.terrainDay', { 36 | app_id: '', 37 | app_code: '' 38 | }).addTo(map); 39 | ``` 40 | 41 | [Available HERE layers](http://leaflet-extras.github.io/leaflet-providers/preview/#filter=HERE) 42 | 43 | ### Mapbox 44 | 45 | In order to use Mapbox maps, you must [register](https://tiles.mapbox.com/signup). You can get map ID and ACCESS_TOKEN from [Mapbox projects](https://www.mapbox.com/projects): 46 | ```JavaScript 47 | L.tileLayer.provider('MapBox', {id: 'ID', accessToken: 'ACCESS_TOKEN'}).addTo(map); 48 | ``` 49 | 50 | ### Esri/ArcGIS 51 | 52 | In order to use ArcGIS maps, you must [register](https://developers.arcgis.com/en/sign-up/) and abide by the [terms of service](https://developers.arcgis.com/en/terms/). No special syntax is required. 53 | 54 | [Available Esri layers](http://leaflet-extras.github.io/leaflet-providers/preview/#filter=Esri) 55 | 56 | # Attribution 57 | 58 | This work was inspired from , and originally created by [Stefan Seelmann](https://github.com/seelmann). 59 | 60 | ### What do we mean by *free*? 61 | 1 62 | We try to maintain leaflet-providers in such a way that you'll be able to use the layers we include without paying money. 63 | This doesn't mean no limits apply, you should always check before using these layers for anything serious. 64 | -------------------------------------------------------------------------------- /libs/leaflet-providers/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "leaflet-providers", 3 | "version": "1.1.15", 4 | "homepage": "https://github.com/leaflet-extras/leaflet-providers", 5 | "description": "An extension to Leaflet that contains configurations for various free tile providers.", 6 | "dependencies": { 7 | "leaflet": "~0.7.3" 8 | }, 9 | "main": "leaflet-providers.js", 10 | "keywords": [ 11 | "leaflet", 12 | "stamen", 13 | "osm" 14 | ], 15 | "license": "BSD-2-Clause", 16 | "ignore": [ 17 | "**/.*", 18 | "node_modules", 19 | "bower_components", 20 | "test", 21 | "tests", 22 | "preview", 23 | "*.html" 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /libs/leaflet-providers/css/gh-fork-ribbon.css: -------------------------------------------------------------------------------- 1 | /* Left will inherit from right (so we don't need to duplicate code */ 2 | .github-fork-ribbon { 3 | /* The right and left lasses determine the side we attach our banner to */ 4 | position: absolute; 5 | 6 | /* Add a bit of padding to give some substance outside the "stitching" */ 7 | padding: 2px 0; 8 | 9 | /* Set the base colour */ 10 | background-color: #a00; 11 | 12 | /* Set a gradient: transparent black at the top to almost-transparent black at the bottom */ 13 | background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.00)), to(rgba(0, 0, 0, 0.15))); 14 | background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0.00), rgba(0, 0, 0, 0.15)); 15 | background-image: -moz-linear-gradient(top, rgba(0, 0, 0, 0.00), rgba(0, 0, 0, 0.15)); 16 | background-image: -o-linear-gradient(top, rgba(0, 0, 0, 0.00), rgba(0, 0, 0, 0.15)); 17 | background-image: -ms-linear-gradient(top, rgba(0, 0, 0, 0.00), rgba(0, 0, 0, 0.15)); 18 | background-image: linear-gradient(top, rgba(0, 0, 0, 0.00), rgba(0, 0, 0, 0.15)); 19 | filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='#000000', EndColorStr='#000000'); 20 | 21 | /* Add a drop shadow */ 22 | -webkit-box-shadow: 0px 2px 3px 0px rgba(0, 0, 0, 0.5); 23 | box-shadow: 0px 2px 3px 0px rgba(0, 0, 0, 0.5); 24 | 25 | z-index: 9999; 26 | } 27 | 28 | .github-fork-ribbon a { 29 | /* Set the font */ 30 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 31 | font-size: 13px; 32 | font-weight: 700; 33 | color: white; 34 | 35 | /* Set the text properties */ 36 | text-decoration: none; 37 | text-shadow: 0 -1px rgba(0,0,0,0.5); 38 | text-align: center; 39 | 40 | /* Set the geometry. If you fiddle with these you'll also need to tweak the top and right values in #github-fork-ribbon. */ 41 | width: 200px; 42 | line-height: 20px; 43 | 44 | /* Set the layout properties */ 45 | display: inline-block; 46 | padding: 2px 0; 47 | 48 | /* Add "stitching" effect */ 49 | border-width: 1px 0; 50 | border-style: dotted; 51 | border-color: rgba(255,255,255,0.7); 52 | } 53 | 54 | .github-fork-ribbon-wrapper { 55 | width: 150px; 56 | height: 150px; 57 | position: absolute; 58 | overflow: hidden; 59 | top: 0; 60 | } 61 | 62 | .github-fork-ribbon-wrapper.left { 63 | left: 0; 64 | } 65 | 66 | .github-fork-ribbon-wrapper.right { 67 | right: 0; 68 | } 69 | 70 | .github-fork-ribbon-wrapper.left-bottom { 71 | position: fixed; 72 | top: inherit; 73 | bottom: 0; 74 | left: 0; 75 | } 76 | 77 | .github-fork-ribbon-wrapper.right-bottom { 78 | position: fixed; 79 | top: inherit; 80 | bottom: 0; 81 | right: 0; 82 | } 83 | 84 | .github-fork-ribbon-wrapper.right .github-fork-ribbon { 85 | top: 42px; 86 | right: -43px; 87 | 88 | /* Rotate the banner 45 degrees */ 89 | -webkit-transform: rotate(45deg); 90 | -moz-transform: rotate(45deg); 91 | -o-transform: rotate(45deg); 92 | transform: rotate(45deg); 93 | } 94 | 95 | .github-fork-ribbon-wrapper.left .github-fork-ribbon { 96 | top: 42px; 97 | left: -43px; 98 | 99 | /* Rotate the banner -45 degrees */ 100 | -webkit-transform: rotate(-45deg); 101 | -moz-transform: rotate(-45deg); 102 | -o-transform: rotate(-45deg); 103 | transform: rotate(-45deg); 104 | } 105 | 106 | 107 | .github-fork-ribbon-wrapper.left-bottom .github-fork-ribbon { 108 | top: 80px; 109 | left: -43px; 110 | 111 | /* Rotate the banner -45 degrees */ 112 | -webkit-transform: rotate(45deg); 113 | -moz-transform: rotate(45deg); 114 | -o-transform: rotate(45deg); 115 | transform: rotate(45deg); 116 | } 117 | 118 | .github-fork-ribbon-wrapper.right-bottom .github-fork-ribbon { 119 | top: 80px; 120 | right: -43px; 121 | 122 | /* Rotate the banner -45 degrees */ 123 | -webkit-transform: rotate(-45deg); 124 | -moz-transform: rotate(-45deg); 125 | -o-transform: rotate(-45deg); 126 | transform: rotate(-45deg); 127 | } -------------------------------------------------------------------------------- /libs/leaflet-providers/css/gh-fork-ribbon.ie.css: -------------------------------------------------------------------------------- 1 | /* IE voodoo courtesy of http://stackoverflow.com/a/4617511/263871 and 2 | * http://www.useragentman.com/IETransformsTranslator */ 3 | .github-fork-ribbon-wrapper.right .github-fork-ribbon { 4 | /* IE positioning hack (couldn't find a transform-origin alternative for IE) */ 5 | top: -22px; 6 | right: -62px; 7 | 8 | /* IE8+ */ 9 | -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.7071067811865474, M12=-0.7071067811865477, M21=0.7071067811865477, M22=0.7071067811865474, SizingMethod='auto expand')"; 10 | /* IE6 and 7 */ 11 | filter: progid:DXImageTransform.Microsoft.Matrix( 12 | M11=0.7071067811865474, 13 | M12=-0.7071067811865477, 14 | M21=0.7071067811865477, 15 | M22=0.7071067811865474, 16 | SizingMethod='auto expand' 17 | ); 18 | } 19 | 20 | .github-fork-ribbon-wrapper.left .github-fork-ribbon { 21 | top: -22px; 22 | left: -22px; 23 | 24 | /* IE8+ */ 25 | -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.7071067811865483, M12=0.7071067811865467, M21=-0.7071067811865467, M22=0.7071067811865483, SizingMethod='auto expand')"; 26 | /* IE6 and 7 */ 27 | filter: progid:DXImageTransform.Microsoft.Matrix( 28 | M11=0.7071067811865483, 29 | M12=0.7071067811865467, 30 | M21=-0.7071067811865467, 31 | M22=0.7071067811865483, 32 | SizingMethod='auto expand' 33 | ); 34 | } 35 | 36 | .github-fork-ribbon-wrapper.left-bottom .github-fork-ribbon { 37 | /* IE positioning hack (couldn't find a transform-origin alternative for IE) */ 38 | top: 12px; 39 | left: -22px; 40 | 41 | 42 | /* IE8+ */ 43 | -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.7071067811865474, M12=-0.7071067811865477, M21=0.7071067811865477, M22=0.7071067811865474, SizingMethod='auto expand')"; 44 | /* IE6 and 7 */ 45 | /* filter: progid:DXImageTransform.Microsoft.Matrix( 46 | M11=0.7071067811865474, 47 | M12=-0.7071067811865477, 48 | M21=0.7071067811865477, 49 | M22=0.7071067811865474, 50 | SizingMethod='auto expand' 51 | ); 52 | */} 53 | 54 | .github-fork-ribbon-wrapper.right-bottom .github-fork-ribbon { 55 | top: 12px; 56 | right: -62px; 57 | 58 | /* IE8+ */ 59 | -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.7071067811865483, M12=0.7071067811865467, M21=-0.7071067811865467, M22=0.7071067811865483, SizingMethod='auto expand')"; 60 | /* IE6 and 7 */ 61 | filter: progid:DXImageTransform.Microsoft.Matrix( 62 | M11=0.7071067811865483, 63 | M12=0.7071067811865467, 64 | M21=-0.7071067811865467, 65 | M22=0.7071067811865483, 66 | SizingMethod='auto expand' 67 | ); 68 | } -------------------------------------------------------------------------------- /libs/leaflet-providers/license.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Leaflet Providers contributors 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 5 | 6 | * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 7 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 8 | 9 | _THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE._ -------------------------------------------------------------------------------- /libs/leaflet-providers/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "leaflet-providers", 3 | "version": "1.1.15", 4 | "description": "An extension to Leaflet that contains configurations for various free tile providers.", 5 | "main": "leaflet-providers.js", 6 | "repository": { 7 | "type": "git", 8 | "url": "git://github.com/leaflet-extras/leaflet-providers.git" 9 | }, 10 | "scripts": { 11 | "test": "npm run lint && npm run testsuite", 12 | "testsuite": "mocha-phantomjs tests/index.html", 13 | "lint": "eslint --config .eslintrc leaflet-providers.js index.html preview/*.js preview/*.html tests/*", 14 | "min": "uglifyjs leaflet-providers.js -mc -o leaflet-providers.min.js", 15 | "release": "mversion patch -m" 16 | }, 17 | "license": "BSD-2-Clause", 18 | "bugs": { 19 | "url": "https://github.com/leaflet-extras/leaflet-providers/issues" 20 | }, 21 | "files": [ 22 | "leaflet-providers.js", 23 | "README.md", 24 | "CHANGELOG.md", 25 | "licence.md" 26 | ], 27 | "devDependencies": { 28 | "chai": "^2.3.0", 29 | "eslint": ">=4.18.2", 30 | "eslint-plugin-html": "^1.4.0", 31 | "mocha": "^2.2.4", 32 | "mocha-phantomjs": "^3.5.3", 33 | "mversion": "^2.0.0", 34 | "phantomjs": "1.9.7-15", 35 | "uglify-js": "^2.4.15" 36 | }, 37 | "autoupdate": { 38 | "source": "git", 39 | "target": "git://github.com/leaflet-extras/leaflet-providers.git", 40 | "basePath": "/", 41 | "files": [ 42 | "leaflet-providers.js" 43 | ] 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /libs/leaflet/images/1px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/libs/leaflet/images/1px.png -------------------------------------------------------------------------------- /libs/leaflet/images/layers-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/libs/leaflet/images/layers-2x.png -------------------------------------------------------------------------------- /libs/leaflet/images/layers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/libs/leaflet/images/layers.png -------------------------------------------------------------------------------- /libs/leaflet/images/marker-icon-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/libs/leaflet/images/marker-icon-2x.png -------------------------------------------------------------------------------- /libs/leaflet/images/marker-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/libs/leaflet/images/marker-icon.png -------------------------------------------------------------------------------- /libs/leaflet/images/marker-shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/libs/leaflet/images/marker-shadow.png -------------------------------------------------------------------------------- /libs/leaflet/leaflet.css: -------------------------------------------------------------------------------- 1 | /* required styles */ 2 | 3 | .leaflet-map-pane, 4 | .leaflet-tile, 5 | .leaflet-marker-icon, 6 | .leaflet-marker-shadow, 7 | .leaflet-tile-pane, 8 | .leaflet-tile-container, 9 | .leaflet-overlay-pane, 10 | .leaflet-shadow-pane, 11 | .leaflet-marker-pane, 12 | .leaflet-popup-pane, 13 | .leaflet-overlay-pane svg, 14 | .leaflet-zoom-box, 15 | .leaflet-image-layer, 16 | .leaflet-layer { 17 | position: absolute; 18 | left: 0; 19 | top: 0; 20 | } 21 | .leaflet-container { 22 | overflow: hidden; 23 | -ms-touch-action: none; 24 | touch-action: none; 25 | } 26 | .leaflet-tile, 27 | .leaflet-marker-icon, 28 | .leaflet-marker-shadow { 29 | -webkit-user-select: none; 30 | -moz-user-select: none; 31 | user-select: none; 32 | -webkit-user-drag: none; 33 | } 34 | .leaflet-marker-icon, 35 | .leaflet-marker-shadow { 36 | display: block; 37 | } 38 | /* map is broken in FF if you have max-width: 100% on tiles */ 39 | .leaflet-container img { 40 | max-width: none !important; 41 | } 42 | /* stupid Android 2 doesn't understand "max-width: none" properly */ 43 | .leaflet-container img.leaflet-image-layer { 44 | max-width: 15000px !important; 45 | } 46 | .leaflet-tile { 47 | filter: inherit; 48 | visibility: hidden; 49 | } 50 | .leaflet-tile-loaded { 51 | visibility: inherit; 52 | } 53 | .leaflet-zoom-box { 54 | width: 0; 55 | height: 0; 56 | } 57 | /* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */ 58 | .leaflet-overlay-pane svg { 59 | -moz-user-select: none; 60 | } 61 | 62 | .leaflet-tile-pane { z-index: 2; } 63 | .leaflet-objects-pane { z-index: 3; } 64 | .leaflet-overlay-pane { z-index: 4; } 65 | .leaflet-shadow-pane { z-index: 5; } 66 | .leaflet-marker-pane { z-index: 6; } 67 | .leaflet-popup-pane { z-index: 7; } 68 | 69 | .leaflet-vml-shape { 70 | width: 1px; 71 | height: 1px; 72 | } 73 | .lvml { 74 | behavior: url(#default#VML); 75 | display: inline-block; 76 | position: absolute; 77 | } 78 | 79 | 80 | /* control positioning */ 81 | 82 | .leaflet-control { 83 | position: relative; 84 | z-index: 7; 85 | pointer-events: auto; 86 | } 87 | .leaflet-top, 88 | .leaflet-bottom { 89 | position: absolute; 90 | z-index: 1000; 91 | pointer-events: none; 92 | } 93 | .leaflet-top { 94 | top: 0; 95 | } 96 | .leaflet-right { 97 | right: 0; 98 | } 99 | .leaflet-bottom { 100 | bottom: 0; 101 | } 102 | .leaflet-left { 103 | left: 0; 104 | } 105 | .leaflet-control { 106 | float: left; 107 | clear: both; 108 | } 109 | .leaflet-right .leaflet-control { 110 | float: right; 111 | } 112 | .leaflet-top .leaflet-control { 113 | margin-top: 10px; 114 | } 115 | .leaflet-bottom .leaflet-control { 116 | margin-bottom: 10px; 117 | } 118 | .leaflet-left .leaflet-control { 119 | margin-left: 10px; 120 | } 121 | .leaflet-right .leaflet-control { 122 | margin-right: 10px; 123 | } 124 | 125 | 126 | /* zoom and fade animations */ 127 | 128 | .leaflet-fade-anim .leaflet-tile, 129 | .leaflet-fade-anim .leaflet-popup { 130 | opacity: 0; 131 | -webkit-transition: opacity 0.2s linear; 132 | -moz-transition: opacity 0.2s linear; 133 | -o-transition: opacity 0.2s linear; 134 | transition: opacity 0.2s linear; 135 | } 136 | .leaflet-fade-anim .leaflet-tile-loaded, 137 | .leaflet-fade-anim .leaflet-map-pane .leaflet-popup { 138 | opacity: 1; 139 | } 140 | 141 | .leaflet-zoom-anim .leaflet-zoom-animated { 142 | -webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1); 143 | -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1); 144 | -o-transition: -o-transform 0.25s cubic-bezier(0,0,0.25,1); 145 | transition: transform 0.25s cubic-bezier(0,0,0.25,1); 146 | } 147 | .leaflet-zoom-anim .leaflet-tile, 148 | .leaflet-pan-anim .leaflet-tile, 149 | .leaflet-touching .leaflet-zoom-animated { 150 | -webkit-transition: none; 151 | -moz-transition: none; 152 | -o-transition: none; 153 | transition: none; 154 | } 155 | 156 | .leaflet-zoom-anim .leaflet-zoom-hide { 157 | visibility: hidden; 158 | } 159 | 160 | 161 | /* cursors */ 162 | 163 | .leaflet-clickable { 164 | cursor: pointer; 165 | } 166 | .leaflet-container { 167 | cursor: -webkit-grab; 168 | cursor: -moz-grab; 169 | } 170 | .leaflet-popup-pane, 171 | .leaflet-control { 172 | cursor: auto; 173 | } 174 | .leaflet-dragging .leaflet-container, 175 | .leaflet-dragging .leaflet-clickable { 176 | cursor: move; 177 | cursor: -webkit-grabbing; 178 | cursor: -moz-grabbing; 179 | } 180 | 181 | 182 | /* visual tweaks */ 183 | 184 | .leaflet-container { 185 | background: #ddd; 186 | outline: 0; 187 | } 188 | .leaflet-container a { 189 | color: #0078A8; 190 | } 191 | .leaflet-container a.leaflet-active { 192 | outline: 2px solid orange; 193 | } 194 | .leaflet-zoom-box { 195 | border: 2px dotted #38f; 196 | background: rgba(255,255,255,0.5); 197 | } 198 | 199 | 200 | /* general typography */ 201 | .leaflet-container { 202 | font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif; 203 | } 204 | 205 | 206 | /* general toolbar styles */ 207 | 208 | .leaflet-bar { 209 | box-shadow: 0 1px 5px rgba(0,0,0,0.65); 210 | border-radius: 4px; 211 | } 212 | .leaflet-bar a, 213 | .leaflet-bar a:hover { 214 | background-color: #fff; 215 | border-bottom: 1px solid #ccc; 216 | width: 26px; 217 | height: 26px; 218 | line-height: 26px; 219 | display: block; 220 | text-align: center; 221 | text-decoration: none; 222 | color: black; 223 | } 224 | .leaflet-bar a, 225 | .leaflet-control-layers-toggle { 226 | background-position: 50% 50%; 227 | background-repeat: no-repeat; 228 | display: block; 229 | } 230 | .leaflet-bar a:hover { 231 | background-color: #f4f4f4; 232 | } 233 | .leaflet-bar a:first-child { 234 | border-top-left-radius: 4px; 235 | border-top-right-radius: 4px; 236 | } 237 | .leaflet-bar a:last-child { 238 | border-bottom-left-radius: 4px; 239 | border-bottom-right-radius: 4px; 240 | border-bottom: none; 241 | } 242 | .leaflet-bar a.leaflet-disabled { 243 | cursor: default; 244 | background-color: #f4f4f4; 245 | color: #bbb; 246 | } 247 | 248 | .leaflet-touch .leaflet-bar a { 249 | width: 30px; 250 | height: 30px; 251 | line-height: 30px; 252 | } 253 | 254 | 255 | /* zoom control */ 256 | 257 | .leaflet-control-zoom-in, 258 | .leaflet-control-zoom-out { 259 | font: bold 18px 'Lucida Console', Monaco, monospace; 260 | text-indent: 1px; 261 | } 262 | .leaflet-control-zoom-out { 263 | font-size: 20px; 264 | } 265 | 266 | .leaflet-touch .leaflet-control-zoom-in { 267 | font-size: 22px; 268 | } 269 | .leaflet-touch .leaflet-control-zoom-out { 270 | font-size: 24px; 271 | } 272 | 273 | 274 | /* layers control */ 275 | 276 | .leaflet-control-layers { 277 | box-shadow: 0 1px 5px rgba(0,0,0,0.4); 278 | background: #fff; 279 | border-radius: 5px; 280 | } 281 | .leaflet-control-layers-toggle { 282 | background-image: url(images/layers.png); 283 | width: 36px; 284 | height: 36px; 285 | } 286 | .leaflet-retina .leaflet-control-layers-toggle { 287 | background-image: url(images/layers-2x.png); 288 | background-size: 26px 26px; 289 | } 290 | .leaflet-touch .leaflet-control-layers-toggle { 291 | width: 44px; 292 | height: 44px; 293 | } 294 | .leaflet-control-layers .leaflet-control-layers-list, 295 | .leaflet-control-layers-expanded .leaflet-control-layers-toggle { 296 | display: none; 297 | } 298 | .leaflet-control-layers-expanded .leaflet-control-layers-list { 299 | display: block; 300 | position: relative; 301 | } 302 | .leaflet-control-layers-expanded { 303 | padding: 6px 10px 6px 6px; 304 | color: #333; 305 | background: #fff; 306 | } 307 | .leaflet-control-layers-selector { 308 | margin-top: 2px; 309 | position: relative; 310 | top: 1px; 311 | } 312 | .leaflet-control-layers label { 313 | display: block; 314 | } 315 | .leaflet-control-layers-separator { 316 | height: 0; 317 | border-top: 1px solid #ddd; 318 | margin: 5px -10px 5px -6px; 319 | } 320 | 321 | 322 | /* attribution and scale controls */ 323 | 324 | .leaflet-container .leaflet-control-attribution { 325 | background: #fff; 326 | background: rgba(255, 255, 255, 0.7); 327 | margin: 0; 328 | } 329 | .leaflet-control-attribution, 330 | .leaflet-control-scale-line { 331 | padding: 0 5px; 332 | color: #333; 333 | } 334 | .leaflet-control-attribution a { 335 | text-decoration: none; 336 | } 337 | .leaflet-control-attribution a:hover { 338 | text-decoration: underline; 339 | } 340 | .leaflet-container .leaflet-control-attribution, 341 | .leaflet-container .leaflet-control-scale { 342 | font-size: 11px; 343 | } 344 | .leaflet-left .leaflet-control-scale { 345 | margin-left: 5px; 346 | } 347 | .leaflet-bottom .leaflet-control-scale { 348 | margin-bottom: 5px; 349 | } 350 | .leaflet-control-scale-line { 351 | border: 2px solid #777; 352 | border-top: none; 353 | line-height: 1.1; 354 | padding: 2px 5px 1px; 355 | font-size: 11px; 356 | white-space: nowrap; 357 | overflow: hidden; 358 | -moz-box-sizing: content-box; 359 | box-sizing: content-box; 360 | 361 | background: #fff; 362 | background: rgba(255, 255, 255, 0.5); 363 | } 364 | .leaflet-control-scale-line:not(:first-child) { 365 | border-top: 2px solid #777; 366 | border-bottom: none; 367 | margin-top: -2px; 368 | } 369 | .leaflet-control-scale-line:not(:first-child):not(:last-child) { 370 | border-bottom: 2px solid #777; 371 | } 372 | 373 | .leaflet-touch .leaflet-control-attribution, 374 | .leaflet-touch .leaflet-control-layers, 375 | .leaflet-touch .leaflet-bar { 376 | box-shadow: none; 377 | } 378 | .leaflet-touch .leaflet-control-layers, 379 | .leaflet-touch .leaflet-bar { 380 | border: 2px solid rgba(0,0,0,0.2); 381 | background-clip: padding-box; 382 | } 383 | 384 | 385 | /* popup */ 386 | 387 | .leaflet-popup { 388 | position: absolute; 389 | text-align: center; 390 | } 391 | .leaflet-popup-content-wrapper { 392 | padding: 1px; 393 | text-align: left; 394 | border-radius: 12px; 395 | } 396 | .leaflet-popup-content { 397 | margin: 13px 19px; 398 | line-height: 1.4; 399 | } 400 | .leaflet-popup-content p { 401 | margin: 18px 0; 402 | } 403 | .leaflet-popup-tip-container { 404 | margin: 0 auto; 405 | width: 40px; 406 | height: 20px; 407 | position: relative; 408 | overflow: hidden; 409 | } 410 | .leaflet-popup-tip { 411 | width: 17px; 412 | height: 17px; 413 | padding: 1px; 414 | 415 | margin: -10px auto 0; 416 | 417 | -webkit-transform: rotate(45deg); 418 | -moz-transform: rotate(45deg); 419 | -ms-transform: rotate(45deg); 420 | -o-transform: rotate(45deg); 421 | transform: rotate(45deg); 422 | } 423 | .leaflet-popup-content-wrapper, 424 | .leaflet-popup-tip { 425 | background: white; 426 | 427 | box-shadow: 0 3px 14px rgba(0,0,0,0.4); 428 | } 429 | .leaflet-container a.leaflet-popup-close-button { 430 | position: absolute; 431 | top: 0; 432 | right: 0; 433 | padding: 4px 4px 0 0; 434 | text-align: center; 435 | width: 18px; 436 | height: 14px; 437 | font: 16px/14px Tahoma, Verdana, sans-serif; 438 | color: #c3c3c3; 439 | text-decoration: none; 440 | font-weight: bold; 441 | background: transparent; 442 | } 443 | .leaflet-container a.leaflet-popup-close-button:hover { 444 | color: #999; 445 | } 446 | .leaflet-popup-scrolled { 447 | overflow: auto; 448 | border-bottom: 1px solid #ddd; 449 | border-top: 1px solid #ddd; 450 | } 451 | 452 | .leaflet-oldie .leaflet-popup-content-wrapper { 453 | zoom: 1; 454 | } 455 | .leaflet-oldie .leaflet-popup-tip { 456 | width: 24px; 457 | margin: 0 auto; 458 | 459 | -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)"; 460 | filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678); 461 | } 462 | .leaflet-oldie .leaflet-popup-tip-container { 463 | margin-top: -1px; 464 | } 465 | 466 | .leaflet-oldie .leaflet-control-zoom, 467 | .leaflet-oldie .leaflet-control-layers, 468 | .leaflet-oldie .leaflet-popup-content-wrapper, 469 | .leaflet-oldie .leaflet-popup-tip { 470 | border: 1px solid #999; 471 | } 472 | 473 | 474 | /* div icon */ 475 | 476 | .leaflet-div-icon { 477 | background: #fff; 478 | border: 1px solid #666; 479 | } 480 | -------------------------------------------------------------------------------- /libs/leafletfix/leafletfix.css: -------------------------------------------------------------------------------- 1 | /* Work around CSS properties introduced on img by bootstrap */ 2 | img.leaflet-tile { 3 | padding: 0; 4 | margin: 0; 5 | border-radius: 0; 6 | border: none; 7 | } 8 | .info { 9 | padding: 6px 8px; 10 | font: 14px/16px Arial, Helvetica, sans-serif; 11 | background: white; 12 | background: rgba(255,255,255,0.8); 13 | box-shadow: 0 0 15px rgba(0,0,0,0.2); 14 | border-radius: 5px; 15 | } 16 | .legend { 17 | line-height: 18px; 18 | color: #555; 19 | } 20 | .legend svg text { 21 | fill: #555; 22 | } 23 | .legend svg line { 24 | stroke: #555; 25 | } 26 | .legend i { 27 | width: 18px; 28 | height: 18px; 29 | float: left; 30 | margin-right: 8px; 31 | opacity: 0.7; 32 | } 33 | -------------------------------------------------------------------------------- /libs/pymjs/pym.v1.min.js: -------------------------------------------------------------------------------- 1 | /*! pym.js - v1.3.1 - 2017-08-06 */ 2 | 3 | !function(a){"function"==typeof define&&define.amd?define(a):"undefined"!=typeof module&&module.exports?module.exports=a():window.pym=a.call(this)}(function(){var a={},b=function(a){var b=document.createEvent("Event");b.initEvent("pym:"+a,!0,!0),document.dispatchEvent(b)},c=function(a){var b=new RegExp("[\\?&]"+a.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]")+"=([^&#]*)"),c=b.exec(location.search);return null===c?"":decodeURIComponent(c[1].replace(/\+/g," "))},d=function(a,b){if(("*"===b.xdomain||a.origin.match(new RegExp(b.xdomain+"$")))&&"string"==typeof a.data)return!0},e=function(a,b,c){return["pym",a,b,c].join("xPYMx")},f=function(a){var b=["pym",a,"(\\S+)","(.*)"];return new RegExp("^"+b.join("xPYMx")+"$")},g=Date.now||function(){return(new Date).getTime()},h=function(a,b,c){var d,e,f,h=null,i=0;c||(c={});var j=function(){i=!1===c.leading?0:g(),h=null,f=a.apply(d,e),h||(d=e=null)};return function(){var k=g();i||!1!==c.leading||(i=k);var l=b-(k-i);return d=this,e=arguments,l<=0||l>b?(h&&(clearTimeout(h),h=null),i=k,f=a.apply(d,e),h||(d=e=null)):h||!1===c.trailing||(h=setTimeout(j,l)),f}},i=function(){for(var b=a.autoInitInstances.length,c=b-1;c>=0;c--){var d=a.autoInitInstances[c];d.el.getElementsByTagName("iframe").length&&d.el.getElementsByTagName("iframe")[0].contentWindow||a.autoInitInstances.splice(c,1)}};return a.autoInitInstances=[],a.autoInit=function(c){var d=document.querySelectorAll("[data-pym-src]:not([data-pym-auto-initialized])"),e=d.length;i();for(var f=0;f-1&&(b=this.url.substring(c,this.url.length),this.url=this.url.substring(0,c)),this.url.indexOf("?")<0?this.url+="?":this.url+="&",this.iframe.src=this.url+"initialWidth="+a+"&childId="+this.id,this.settings.optionalparams&&(this.iframe.src+="&parentTitle="+encodeURIComponent(document.title),this.iframe.src+="&"+this.settings.parenturlparam+"="+encodeURIComponent(this.settings.parenturlvalue)),this.iframe.src+=b,this.settings.lazyload&&(this.iframe.setAttribute("data-src",this.iframe.src),this.iframe.setAttribute("class","b-lazy"),this.iframe.src="about:blank"),this.iframe.setAttribute("width","100%"),this.iframe.setAttribute("scrolling","no"),this.iframe.setAttribute("marginheight","0"),this.iframe.setAttribute("frameborder","0"),this.settings.title&&this.iframe.setAttribute("title",this.settings.title),void 0!==this.settings.allowfullscreen&&!1!==this.settings.allowfullscreen&&this.iframe.setAttribute("allowfullscreen",""),void 0!==this.settings.sandbox&&"string"==typeof this.settings.sandbox&&this.iframe.setAttribute("sandbox",this.settings.sandbox),this.settings.id&&(document.getElementById(this.settings.id)||this.iframe.setAttribute("id",this.settings.id)),this.settings.name&&this.iframe.setAttribute("name",this.settings.name);this.el.firstChild;)this.el.removeChild(this.el.firstChild);this.el.appendChild(this.iframe),window.addEventListener("resize",this._onResize),this.settings.trackscroll&&window.addEventListener("scroll",this._throttleOnScroll)},this._onResize=function(){this.sendWidth(),this.settings.trackscroll&&this.sendViewportAndIFramePosition()}.bind(this),this._onScroll=function(){this.sendViewportAndIFramePosition()}.bind(this),this._fire=function(a,b){if(a in this.messageHandlers)for(var c=0;c code { 11 | color: rgb(249, 38, 114); 12 | text-decoration: none; 13 | } 14 | .footnote { 15 | position: absolute; 16 | bottom: 3em; 17 | padding-right: 4em; 18 | font-size: 90%; 19 | } 20 | .remark-code, .remark-inline-code { font-family: 'Source Code Pro', 'Lucida Console', Monaco, monospace; } 21 | .remark-code-line-highlighted { background-color: #ffff88; } 22 | 23 | .inverse { 24 | background-color: #272822; 25 | color: #d6d6d6; 26 | text-shadow: 0 0 20px #333; 27 | } 28 | .inverse h1, .inverse h2, .inverse h3 { 29 | color: #f3f3f3; 30 | line-height: 1.0em; 31 | } 32 | /* Two-column layout */ 33 | .left-column { 34 | color: #777; 35 | width: 20%; 36 | height: 92%; 37 | float: left; 38 | } 39 | .left-column h2:last-of-type, .left-column h3:last-child { 40 | color: #000; 41 | } 42 | .right-column { 43 | width: 75%; 44 | float: right; 45 | padding-top: 1em; 46 | } 47 | .pull-left { 48 | float: left; 49 | width: 47%; 50 | } 51 | .pull-right { 52 | float: right; 53 | width: 47%; 54 | } 55 | .pull-right ~ * { 56 | clear: both; 57 | } 58 | img, video, iframe { 59 | max-width: 100%; 60 | } 61 | blockquote { 62 | border-left: solid 5px lightgray; 63 | padding-left: 1em; 64 | } 65 | table { 66 | margin: auto; 67 | border-top: 1px solid #666; 68 | border-bottom: 1px solid #666; 69 | } 70 | table thead th { border-bottom: 1px solid #ddd; } 71 | th, td { padding: 5px; } 72 | thead, tfoot, tr:nth-child(even) { background: #eee } 73 | 74 | @page { margin: 0; } 75 | @media print { 76 | .remark-slide-scaler { 77 | width: 100% !important; 78 | height: 100% !important; 79 | transform: scale(1) !important; 80 | top: 0 !important; 81 | left: 0 !important; 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /libs/widgetframe-binding/widgetframe.js: -------------------------------------------------------------------------------- 1 | HTMLWidgets.widget({ 2 | 3 | name: 'widgetframe', 4 | 5 | type: 'output', 6 | 7 | factory: function(el, width, height) { 8 | 9 | return { 10 | 11 | renderValue: function(x) { 12 | HTMLWidgets.pymParent = new pym.Parent(el.id, x.url, x.options || {}); 13 | }, 14 | 15 | resize: function(width, height) { 16 | 17 | } 18 | 19 | }; 20 | } 21 | }); -------------------------------------------------------------------------------- /mytheme.css: -------------------------------------------------------------------------------- 1 | a { 2 | color: #2199e8; 3 | } -------------------------------------------------------------------------------- /toDo.md: -------------------------------------------------------------------------------- 1 | 1. Prerequisites 2 | 2. add code 3 | 4 | -------------------------------------------------------------------------------- /widget_libs/Proj4Leaflet/proj4leaflet.js: -------------------------------------------------------------------------------- 1 | (function (factory) { 2 | var L, proj4; 3 | if (typeof define === 'function' && define.amd) { 4 | // AMD 5 | define(['leaflet', 'proj4'], factory); 6 | } else if (typeof module === 'object' && typeof module.exports === "object") { 7 | // Node/CommonJS 8 | L = require('leaflet'); 9 | proj4 = require('proj4'); 10 | module.exports = factory(L, proj4); 11 | } else { 12 | // Browser globals 13 | if (typeof window.L === 'undefined' || typeof window.proj4 === 'undefined') 14 | throw 'Leaflet and proj4 must be loaded first'; 15 | factory(window.L, window.proj4); 16 | } 17 | }(function (L, proj4) { 18 | 19 | L.Proj = {}; 20 | 21 | L.Proj._isProj4Obj = function(a) { 22 | return (typeof a.inverse !== 'undefined' && 23 | typeof a.forward !== 'undefined'); 24 | }; 25 | 26 | L.Proj.ScaleDependantTransformation = function(scaleTransforms) { 27 | this.scaleTransforms = scaleTransforms; 28 | }; 29 | 30 | L.Proj.ScaleDependantTransformation.prototype.transform = function(point, scale) { 31 | return this.scaleTransforms[scale].transform(point, scale); 32 | }; 33 | 34 | L.Proj.ScaleDependantTransformation.prototype.untransform = function(point, scale) { 35 | return this.scaleTransforms[scale].untransform(point, scale); 36 | }; 37 | 38 | L.Proj.Projection = L.Class.extend({ 39 | initialize: function(a, def) { 40 | if (L.Proj._isProj4Obj(a)) { 41 | this._proj = a; 42 | } else { 43 | var code = a; 44 | if (def) { 45 | proj4.defs(code, def); 46 | } else if (proj4.defs[code] === undefined) { 47 | var urn = code.split(':'); 48 | if (urn.length > 3) { 49 | code = urn[urn.length - 3] + ':' + urn[urn.length - 1]; 50 | } 51 | if (proj4.defs[code] === undefined) { 52 | throw 'No projection definition for code ' + code; 53 | } 54 | } 55 | this._proj = proj4(code); 56 | } 57 | }, 58 | 59 | project: function (latlng) { 60 | var point = this._proj.forward([latlng.lng, latlng.lat]); 61 | return new L.Point(point[0], point[1]); 62 | }, 63 | 64 | unproject: function (point, unbounded) { 65 | var point2 = this._proj.inverse([point.x, point.y]); 66 | return new L.LatLng(point2[1], point2[0], unbounded); 67 | } 68 | }); 69 | 70 | L.Proj.CRS = L.Class.extend({ 71 | includes: L.CRS, 72 | 73 | options: { 74 | transformation: new L.Transformation(1, 0, -1, 0) 75 | }, 76 | 77 | initialize: function(a, b, c) { 78 | var code, proj, def, options; 79 | 80 | if (L.Proj._isProj4Obj(a)) { 81 | proj = a; 82 | code = proj.srsCode; 83 | options = b || {}; 84 | 85 | this.projection = new L.Proj.Projection(proj); 86 | } else { 87 | code = a; 88 | def = b; 89 | options = c || {}; 90 | this.projection = new L.Proj.Projection(code, def); 91 | } 92 | 93 | L.Util.setOptions(this, options); 94 | this.code = code; 95 | this.transformation = this.options.transformation; 96 | 97 | if (this.options.origin) { 98 | this.transformation = 99 | new L.Transformation(1, -this.options.origin[0], 100 | -1, this.options.origin[1]); 101 | } 102 | 103 | if (this.options.scales) { 104 | this._scales = this.options.scales; 105 | } else if (this.options.resolutions) { 106 | this._scales = []; 107 | for (var i = this.options.resolutions.length - 1; i >= 0; i--) { 108 | if (this.options.resolutions[i]) { 109 | this._scales[i] = 1 / this.options.resolutions[i]; 110 | } 111 | } 112 | } 113 | }, 114 | 115 | scale: function(zoom) { 116 | var iZoom = Math.floor(zoom), 117 | baseScale, 118 | nextScale, 119 | scaleDiff, 120 | zDiff; 121 | if (zoom === iZoom) { 122 | return this._scales[zoom]; 123 | } else { 124 | // Non-integer zoom, interpolate 125 | baseScale = this._scales[iZoom]; 126 | nextScale = this._scales[iZoom + 1]; 127 | scaleDiff = nextScale - baseScale; 128 | zDiff = (zoom - iZoom); 129 | return baseScale + scaleDiff * zDiff; 130 | } 131 | }, 132 | 133 | getSize: function(zoom) { 134 | var b = this.options.bounds, 135 | s, 136 | min, 137 | max; 138 | 139 | if (b) { 140 | s = this.scale(zoom); 141 | min = this.transformation.transform(b.min, s); 142 | max = this.transformation.transform(b.max, s); 143 | return L.point(Math.abs(max.x - min.x), Math.abs(max.y - min.y)); 144 | } else { 145 | // Backwards compatibility with Leaflet < 0.7 146 | s = 256 * Math.pow(2, zoom); 147 | return L.point(s, s); 148 | } 149 | } 150 | }); 151 | 152 | L.Proj.CRS.TMS = L.Proj.CRS.extend({ 153 | options: { 154 | tileSize: 256 155 | }, 156 | 157 | initialize: function(a, b, c, d) { 158 | var code, 159 | def, 160 | proj, 161 | projectedBounds, 162 | options; 163 | 164 | if (L.Proj._isProj4Obj(a)) { 165 | proj = a; 166 | projectedBounds = b; 167 | options = c || {}; 168 | options.origin = [projectedBounds[0], projectedBounds[3]]; 169 | L.Proj.CRS.prototype.initialize.call(this, proj, options); 170 | } else { 171 | code = a; 172 | def = b; 173 | projectedBounds = c; 174 | options = d || {}; 175 | options.origin = [projectedBounds[0], projectedBounds[3]]; 176 | L.Proj.CRS.prototype.initialize.call(this, code, def, options); 177 | } 178 | 179 | this.projectedBounds = projectedBounds; 180 | 181 | this._sizes = this._calculateSizes(); 182 | }, 183 | 184 | _calculateSizes: function() { 185 | var sizes = [], 186 | crsBounds = this.projectedBounds, 187 | projectedTileSize, 188 | i, 189 | x, 190 | y; 191 | for (i = this._scales.length - 1; i >= 0; i--) { 192 | if (this._scales[i]) { 193 | projectedTileSize = this.options.tileSize / this._scales[i]; 194 | // to prevent very small rounding errors from causing us to round up, 195 | // cut any decimals after 3rd before rounding up. 196 | x = Math.ceil(parseFloat((crsBounds[2] - crsBounds[0]) / projectedTileSize).toPrecision(3)) * 197 | projectedTileSize * this._scales[i]; 198 | y = Math.ceil(parseFloat((crsBounds[3] - crsBounds[1]) / projectedTileSize).toPrecision(3)) * 199 | projectedTileSize * this._scales[i]; 200 | sizes[i] = L.point(x, y); 201 | } 202 | } 203 | 204 | return sizes; 205 | }, 206 | 207 | getSize: function(zoom) { 208 | return this._sizes[zoom]; 209 | } 210 | }); 211 | 212 | L.Proj.TileLayer = {}; 213 | 214 | // Note: deprecated and not necessary since 0.7, will be removed 215 | L.Proj.TileLayer.TMS = L.TileLayer.extend({ 216 | options: { 217 | continuousWorld: true 218 | }, 219 | 220 | initialize: function(urlTemplate, crs, options) { 221 | var boundsMatchesGrid = true, 222 | scaleTransforms, 223 | upperY, 224 | crsBounds, 225 | i; 226 | 227 | if (!(crs instanceof L.Proj.CRS.TMS)) { 228 | throw 'CRS is not L.Proj.CRS.TMS.'; 229 | } 230 | 231 | L.TileLayer.prototype.initialize.call(this, urlTemplate, options); 232 | // Enabling tms will cause Leaflet to also try to do TMS, which will 233 | // break (at least prior to 0.7.0). Actively disable it, to prevent 234 | // well-meaning users from shooting themselves in the foot. 235 | this.options.tms = false; 236 | this.crs = crs; 237 | crsBounds = this.crs.projectedBounds; 238 | 239 | // Verify grid alignment 240 | for (i = this.options.minZoom; i < this.options.maxZoom && boundsMatchesGrid; i++) { 241 | var gridHeight = (crsBounds[3] - crsBounds[1]) / 242 | this._projectedTileSize(i); 243 | boundsMatchesGrid = Math.abs(gridHeight - Math.round(gridHeight)) > 1e-3; 244 | } 245 | 246 | if (!boundsMatchesGrid) { 247 | scaleTransforms = {}; 248 | for (i = this.options.minZoom; i < this.options.maxZoom; i++) { 249 | upperY = crsBounds[1] + Math.ceil((crsBounds[3] - crsBounds[1]) / 250 | this._projectedTileSize(i)) * this._projectedTileSize(i); 251 | scaleTransforms[this.crs.scale(i)] = new L.Transformation(1, -crsBounds[0], -1, upperY); 252 | } 253 | 254 | this.crs = new L.Proj.CRS.TMS(this.crs.projection._proj, crsBounds, this.crs.options); 255 | this.crs.transformation = new L.Proj.ScaleDependantTransformation(scaleTransforms); 256 | } 257 | }, 258 | 259 | getTileUrl: function(tilePoint) { 260 | var zoom = this._map.getZoom(), 261 | gridHeight = Math.ceil( 262 | (this.crs.projectedBounds[3] - this.crs.projectedBounds[1]) / 263 | this._projectedTileSize(zoom)); 264 | 265 | return L.Util.template(this._url, L.Util.extend({ 266 | s: this._getSubdomain(tilePoint), 267 | z: this._getZoomForUrl(), 268 | x: tilePoint.x, 269 | y: gridHeight - tilePoint.y - 1 270 | }, this.options)); 271 | }, 272 | 273 | _projectedTileSize: function(zoom) { 274 | return (this.options.tileSize / this.crs.scale(zoom)); 275 | } 276 | }); 277 | 278 | L.Proj.GeoJSON = L.GeoJSON.extend({ 279 | initialize: function(geojson, options) { 280 | this._callLevel = 0; 281 | L.GeoJSON.prototype.initialize.call(this, null, options); 282 | if (geojson) { 283 | this.addData(geojson); 284 | } 285 | }, 286 | 287 | addData: function(geojson) { 288 | var crs; 289 | 290 | if (geojson) { 291 | if (geojson.crs && geojson.crs.type === 'name') { 292 | crs = new L.Proj.CRS(geojson.crs.properties.name); 293 | } else if (geojson.crs && geojson.crs.type) { 294 | crs = new L.Proj.CRS(geojson.crs.type + ':' + geojson.crs.properties.code); 295 | } 296 | 297 | if (crs !== undefined) { 298 | this.options.coordsToLatLng = function(coords) { 299 | var point = L.point(coords[0], coords[1]); 300 | return crs.projection.unproject(point); 301 | }; 302 | } 303 | } 304 | 305 | // Base class' addData might call us recursively, but 306 | // CRS shouldn't be cleared in that case, since CRS applies 307 | // to the whole GeoJSON, inluding sub-features. 308 | this._callLevel++; 309 | try { 310 | L.GeoJSON.prototype.addData.call(this, geojson); 311 | } finally { 312 | this._callLevel--; 313 | if (this._callLevel === 0) { 314 | delete this.options.coordsToLatLng; 315 | } 316 | } 317 | } 318 | }); 319 | 320 | L.Proj.geoJson = function(geojson, options) { 321 | return new L.Proj.GeoJSON(geojson, options); 322 | }; 323 | 324 | L.Proj.ImageOverlay = L.ImageOverlay.extend({ 325 | initialize: function(url, bounds, options) { 326 | L.ImageOverlay.prototype.initialize.call(this, url, null, options); 327 | this._projBounds = bounds; 328 | }, 329 | 330 | /* Danger ahead: overriding internal methods in Leaflet. 331 | I've decided to do this rather than making a copy of L.ImageOverlay 332 | and making very tiny modifications to it. Future will tell if this 333 | was wise or not. */ 334 | _animateZoom: function (e) { 335 | var northwest = L.point(this._projBounds.min.x, this._projBounds.max.y), 336 | southeast = L.point(this._projBounds.max.x, this._projBounds.min.y), 337 | topLeft = this._projectedToNewLayerPoint(northwest, e.zoom, e.center), 338 | size = this._projectedToNewLayerPoint(southeast, e.zoom, e.center).subtract(topLeft), 339 | origin = topLeft.add(size._multiplyBy((1 - 1 / e.scale) / 2)); 340 | 341 | this._image.style[L.DomUtil.TRANSFORM] = 342 | L.DomUtil.getTranslateString(origin) + ' scale(' + this._map.getZoomScale(e.zoom) + ') '; 343 | }, 344 | 345 | _reset: function() { 346 | var zoom = this._map.getZoom(), 347 | pixelOrigin = this._map.getPixelOrigin(), 348 | bounds = L.bounds(this._transform(this._projBounds.min, zoom)._subtract(pixelOrigin), 349 | this._transform(this._projBounds.max, zoom)._subtract(pixelOrigin)), 350 | size = bounds.getSize(), 351 | image = this._image; 352 | 353 | L.DomUtil.setPosition(image, bounds.min); 354 | image.style.width = size.x + 'px'; 355 | image.style.height = size.y + 'px'; 356 | }, 357 | 358 | _projectedToNewLayerPoint: function (point, newZoom, newCenter) { 359 | var topLeft = this._map._getNewTopLeftPoint(newCenter, newZoom).add(this._map._getMapPanePos()); 360 | return this._transform(point, newZoom)._subtract(topLeft); 361 | }, 362 | 363 | _transform: function(p, zoom) { 364 | var crs = this._map.options.crs, 365 | transformation = crs.transformation, 366 | scale = crs.scale(zoom); 367 | return transformation.transform(p, scale); 368 | } 369 | }); 370 | 371 | L.Proj.imageOverlay = function(url, bounds, options) { 372 | return new L.Proj.ImageOverlay(url, bounds, options); 373 | }; 374 | 375 | if (typeof L.CRS !== 'undefined') { 376 | // This is left here for backwards compatibility 377 | L.CRS.proj4js = (function () { 378 | return function (code, def, transformation, options) { 379 | options = options || {}; 380 | if (transformation) { 381 | options.transformation = transformation; 382 | } 383 | 384 | return new L.Proj.CRS(code, def, options); 385 | }; 386 | }()); 387 | } 388 | 389 | return L.Proj; 390 | })); 391 | -------------------------------------------------------------------------------- /widget_libs/leaflet-label/images/death.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/widget_libs/leaflet-label/images/death.png -------------------------------------------------------------------------------- /widget_libs/leaflet-label/leaflet.label.css: -------------------------------------------------------------------------------- 1 | .leaflet-label { 2 | background: rgb(235, 235, 235); 3 | background: rgba(235, 235, 235, 0.81); 4 | background-clip: padding-box; 5 | border-color: #777; 6 | border-color: rgba(0,0,0,0.45); 7 | border-radius: 4px; 8 | border-style: solid; 9 | border-width: 4px; 10 | color: #111; 11 | display: block; 12 | font: 12px/20px "Helvetica Neue", Arial, Helvetica, sans-serif; 13 | font-weight: bold; 14 | padding: 1px 6px; 15 | position: absolute; 16 | -webkit-user-select: none; 17 | -moz-user-select: none; 18 | -ms-user-select: none; 19 | user-select: none; 20 | pointer-events: none; 21 | white-space: nowrap; 22 | z-index: 500; 23 | } 24 | 25 | .leaflet-label.leaflet-clickable { 26 | cursor: pointer; 27 | pointer-events: auto; 28 | } 29 | 30 | .leaflet-label:before, 31 | .leaflet-label:after { 32 | border-top: 6px solid transparent; 33 | border-bottom: 6px solid transparent; 34 | border-right: 6px solid transparent; 35 | content: none; 36 | position: absolute; 37 | top: 5px; 38 | } 39 | 40 | .leaflet-label:before { 41 | border-right: 6px solid black; 42 | border-right-color: inherit; 43 | left: -10px; 44 | } 45 | 46 | .leaflet-label:after { 47 | border-left: 6px solid black; 48 | border-left-color: inherit; 49 | right: -16px; 50 | } 51 | 52 | .leaflet-label-top:after, 53 | .leaflet-label-top:before { 54 | left: -50%; 55 | border-top-color: black; 56 | border-top-color: rgba(0,0,0,0.45); 57 | position: relative; 58 | top: 29px; 59 | } 60 | 61 | .leaflet-label-top:before { 62 | display: none; 63 | border-right-color: transparent; 64 | border-bottom-color: transparent; 65 | border-left-color: transparent; 66 | border-top-color: transparent; 67 | } 68 | 69 | .leaflet-label-top:after { 70 | content: ' '; 71 | border-right-color: transparent; 72 | border-bottom-color: transparent; 73 | border-left-color: transparent; 74 | } 75 | 76 | .leaflet-label-bottom:before { 77 | display: none; 78 | border-right-color: transparent; 79 | border-bottom-color: transparent; 80 | border-left-color: transparent; 81 | border-top-color: transparent; 82 | } 83 | 84 | .leaflet-label-bottom:after, 85 | .leaflet-label-bottom:before { 86 | left: -50%; 87 | border-bottom-color: black; 88 | border-bottom-color: rgba(0,0,0,0.45); 89 | position: relative; 90 | top: -28px; 91 | } 92 | 93 | .leaflet-label-bottom:after { 94 | border-right-color: transparent; 95 | border-top-color: transparent; 96 | border-left-color: transparent; 97 | } 98 | 99 | .leaflet-label-bottom:after, 100 | .leaflet-label-top:after, 101 | .leaflet-label-right:before, 102 | .leaflet-label-left:after { 103 | content: ""; 104 | } 105 | 106 | .leaflet-label.leaflet-label-text-only, 107 | .leaflet-label.leaflet-label-text-only:before, 108 | .leaflet-label.leaflet-label-text-only:after { 109 | background: none; 110 | border: none; 111 | } 112 | 113 | .leaflet-label.leaflet-label-text-only.leaflet-label-left { 114 | margin-right: -10px; 115 | } 116 | 117 | .leaflet-label.leaflet-label-text-only.leaflet-label-right { 118 | margin-left: -10px; 119 | } 120 | -------------------------------------------------------------------------------- /widget_libs/leaflet-label/leaflet.label.js: -------------------------------------------------------------------------------- 1 | /* 2 | Leaflet.label, a plugin that adds labels to markers and vectors for Leaflet powered maps. 3 | (c) 2012-2013, Jacob Toye, Smartrak 4 | 5 | https://github.com/Leaflet/Leaflet.label 6 | http://leafletjs.com 7 | https://github.com/jacobtoye 8 | */ 9 | !function(t,e){"function"==typeof define&&define.amd?define(["leaflet"],t):"object"==typeof exports&&(module.exports=t(require("leaflet"))),"undefined"!=typeof e&&e.L&&(e.LeafletLabel=t(L))}(function(t){t.labelVersion="0.2.4";var e=t.Class.extend({includes:t.Mixin.Events,_directions:["top","right","bottom","left"],options:{className:"",clickable:!1,direction:"right",noHide:!1,offset:[12,-15],opacity:1,textsize:"10px",textOnly:!1,style:null,zoomAnimation:!0},initialize:function(e,i){t.setOptions(this,e),this._source=i,this._animated=t.Browser.any3d&&this.options.zoomAnimation,this._isOpen=!1},_isOnMarker:function(){return this._source instanceof t.Marker},onAdd:function(e){this._map=e,this._pane=this.options.pane?e._panes[this.options.pane]:this._isOnMarker()?e._panes.markerPane:e._panes.popupPane,this._container||this._initLayout(),this._pane.appendChild(this._container),this._initInteraction(),this._update(),this.setOpacity(this.options.opacity),e.on("moveend",this._onMoveEnd,this).on("viewreset",this._onViewReset,this),this._animated&&e.on("zoomanim",this._zoomAnimation,this),t.Browser.touch&&!this.options.noHide&&(t.DomEvent.on(this._container,"click",this.close,this),e.on("click",this.close,this))},onRemove:function(t){this._pane.removeChild(this._container),t.off({zoomanim:this._zoomAnimation,moveend:this._onMoveEnd,viewreset:this._onViewReset},this),this._removeInteraction(),this._map=null},setLatLng:function(e){return this._latlng=t.latLng(e),this._map&&this._updatePosition(),this},setContent:function(t){return this._previousContent=this._content,this._content=t,this._updateContent(),this},close:function(){var e=this._map;e&&(t.Browser.touch&&!this.options.noHide&&(t.DomEvent.off(this._container,"click",this.close),e.off("click",this.close,this)),e.removeLayer(this))},updateZIndex:function(t){this._zIndex=t,this._container&&this._zIndex&&(this._container.style.zIndex=t)},setOpacity:function(e){this.options.opacity=e,this._container&&t.DomUtil.setOpacity(this._container,e)},_initLayout:function(){if(this._container=t.DomUtil.create("div","leaflet-label "+this.options.className+" leaflet-zoom-animated"),this._container.style.fontSize=this.options.textsize,this.options.textOnly&&t.DomUtil.addClass(this._container,"leaflet-label-text-only"),this.options.style)for(var e in this.options.style)this.options.style.hasOwnProperty(e)&&(this._container.style[e]=this.options.style[e]);this.updateZIndex(this._zIndex)},_update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updatePosition(),this._container.style.visibility="")},_updateContent:function(){this._content&&this._map&&this._prevContent!==this._content&&"string"==typeof this._content&&(this._container.innerHTML=this._content,this._prevContent=this._content,this._labelWidth=this._container.offsetWidth)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},_getIconHeight:function(){return this._source.options.icon?this._source.options.icon.options.iconSize[1]:0},_setPosition:function(e){var i=this._map,n=this._container,o=i.latLngToContainerPoint(i.getCenter()),s=i.layerPointToContainerPoint(e),a=this._getDirection(),h=this._labelWidth,l=t.point(this.options.offset),r=l.y;"top"===a?(r-=this._isOnMarker()?this._getIconHeight():0,e=e.add(t.point(-h/2,r))):"bottom"===a?(r+=this._isOnMarker?this._getIconHeight():0,e=e.add(t.point(-h/2,r))):"right"===a||"auto"===a&&s.x[1](#what-is-free) tile providers. 4 | 5 | # Usage 6 | Leaflet-providers [providers](#providers) are refered to with a `provider[.]`-string. Let's say you want to add the nice [Watercolor](http://maps.stamen.com/#watercolor/) style from Stamen to your map, you pass `Stamen.Watercolor` to the `L.tileLayer.provider`-constructor, which will return a [L.TileLayer](http://leafletjs.com/reference.html#tilelayer) instance for Stamens Watercolor tile layer. 7 | 8 | ```Javascript 9 | // add Stamen Watercolor to map. 10 | L.tileLayer.provider('Stamen.Watercolor').addTo(map); 11 | ``` 12 | 13 | ## Protocol relativity (`https://`-urls) 14 | 15 | Leaflet-providers tries to use `https://` if the page uses `https://` and the provider supports it. 16 | You can force the use of `http://` by passing `force_http: true` in the options argument. 17 | 18 | ## Retina tiles 19 | 20 | Some providers have retina tiles for which the URL only needs to be slightly adjusted, e.g. `-----@2x.png`. For this, add the retina option in the URL, e.g. `-----{retina}.png`, and set a retina value in the options, e.g. `retina: '@2x'`. If Leaflet detects a retina screen (`L.Browser.retina`), the retina option passed to the tileLayer is set to the value supplied, otherwise it's replaced by an empty string. 21 | 22 | # Providers 23 | 24 | Leaflet-providers provides tile layers from different providers, including *OpenStreetMap*, *Stamen*, *Esri* and *OpenWeatherMap*. The full listing of free to use layers can be [previewed](http://leaflet-extras.github.io/leaflet-providers/preview/index.html). The page will show you the name to use with `leaflet-providers.js` and the code to use it without dependencies. 25 | 26 | ## Providers requiring registration 27 | 28 | In addition to the providers you are free1 to use, we support some layers which require registration. 29 | 30 | ### HERE (formerly Nokia). 31 | 32 | In order to use HERE layers, you must [register](http://developer.here.com/). Once registered, you can create an `app_id` and `app_code` which you have to pass to `L.tileLayer.provider` in the options: 33 | 34 | ```Javascript 35 | L.tileLayer.provider('HERE.terrainDay', { 36 | app_id: '', 37 | app_code: '' 38 | }).addTo(map); 39 | ``` 40 | 41 | [Available HERE layers](http://leaflet-extras.github.io/leaflet-providers/preview/#filter=HERE) 42 | 43 | ### Mapbox 44 | 45 | In order to use Mapbox maps, you must [register](https://tiles.mapbox.com/signup). You can get map ID and ACCESS_TOKEN from [Mapbox projects](https://www.mapbox.com/projects): 46 | ```JavaScript 47 | L.tileLayer.provider('MapBox', {id: 'ID', accessToken: 'ACCESS_TOKEN'}).addTo(map); 48 | ``` 49 | 50 | ### Esri/ArcGIS 51 | 52 | In order to use ArcGIS maps, you must [register](https://developers.arcgis.com/en/sign-up/) and abide by the [terms of service](https://developers.arcgis.com/en/terms/). No special syntax is required. 53 | 54 | [Available Esri layers](http://leaflet-extras.github.io/leaflet-providers/preview/#filter=Esri) 55 | 56 | # Attribution 57 | 58 | This work was inspired from , and originally created by [Stefan Seelmann](https://github.com/seelmann). 59 | 60 | ### What do we mean by *free*? 61 | 1 62 | We try to maintain leaflet-providers in such a way that you'll be able to use the layers we include without paying money. 63 | This doesn't mean no limits apply, you should always check before using these layers for anything serious. 64 | -------------------------------------------------------------------------------- /widget_libs/leaflet-providers/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "leaflet-providers", 3 | "version": "1.1.15", 4 | "homepage": "https://github.com/leaflet-extras/leaflet-providers", 5 | "description": "An extension to Leaflet that contains configurations for various free tile providers.", 6 | "dependencies": { 7 | "leaflet": "~0.7.3" 8 | }, 9 | "main": "leaflet-providers.js", 10 | "keywords": [ 11 | "leaflet", 12 | "stamen", 13 | "osm" 14 | ], 15 | "license": "BSD-2-Clause", 16 | "ignore": [ 17 | "**/.*", 18 | "node_modules", 19 | "bower_components", 20 | "test", 21 | "tests", 22 | "preview", 23 | "*.html" 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /widget_libs/leaflet-providers/css/gh-fork-ribbon.css: -------------------------------------------------------------------------------- 1 | /* Left will inherit from right (so we don't need to duplicate code */ 2 | .github-fork-ribbon { 3 | /* The right and left lasses determine the side we attach our banner to */ 4 | position: absolute; 5 | 6 | /* Add a bit of padding to give some substance outside the "stitching" */ 7 | padding: 2px 0; 8 | 9 | /* Set the base colour */ 10 | background-color: #a00; 11 | 12 | /* Set a gradient: transparent black at the top to almost-transparent black at the bottom */ 13 | background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.00)), to(rgba(0, 0, 0, 0.15))); 14 | background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0.00), rgba(0, 0, 0, 0.15)); 15 | background-image: -moz-linear-gradient(top, rgba(0, 0, 0, 0.00), rgba(0, 0, 0, 0.15)); 16 | background-image: -o-linear-gradient(top, rgba(0, 0, 0, 0.00), rgba(0, 0, 0, 0.15)); 17 | background-image: -ms-linear-gradient(top, rgba(0, 0, 0, 0.00), rgba(0, 0, 0, 0.15)); 18 | background-image: linear-gradient(top, rgba(0, 0, 0, 0.00), rgba(0, 0, 0, 0.15)); 19 | filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,StartColorStr='#000000', EndColorStr='#000000'); 20 | 21 | /* Add a drop shadow */ 22 | -webkit-box-shadow: 0px 2px 3px 0px rgba(0, 0, 0, 0.5); 23 | box-shadow: 0px 2px 3px 0px rgba(0, 0, 0, 0.5); 24 | 25 | z-index: 9999; 26 | } 27 | 28 | .github-fork-ribbon a { 29 | /* Set the font */ 30 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 31 | font-size: 13px; 32 | font-weight: 700; 33 | color: white; 34 | 35 | /* Set the text properties */ 36 | text-decoration: none; 37 | text-shadow: 0 -1px rgba(0,0,0,0.5); 38 | text-align: center; 39 | 40 | /* Set the geometry. If you fiddle with these you'll also need to tweak the top and right values in #github-fork-ribbon. */ 41 | width: 200px; 42 | line-height: 20px; 43 | 44 | /* Set the layout properties */ 45 | display: inline-block; 46 | padding: 2px 0; 47 | 48 | /* Add "stitching" effect */ 49 | border-width: 1px 0; 50 | border-style: dotted; 51 | border-color: rgba(255,255,255,0.7); 52 | } 53 | 54 | .github-fork-ribbon-wrapper { 55 | width: 150px; 56 | height: 150px; 57 | position: absolute; 58 | overflow: hidden; 59 | top: 0; 60 | } 61 | 62 | .github-fork-ribbon-wrapper.left { 63 | left: 0; 64 | } 65 | 66 | .github-fork-ribbon-wrapper.right { 67 | right: 0; 68 | } 69 | 70 | .github-fork-ribbon-wrapper.left-bottom { 71 | position: fixed; 72 | top: inherit; 73 | bottom: 0; 74 | left: 0; 75 | } 76 | 77 | .github-fork-ribbon-wrapper.right-bottom { 78 | position: fixed; 79 | top: inherit; 80 | bottom: 0; 81 | right: 0; 82 | } 83 | 84 | .github-fork-ribbon-wrapper.right .github-fork-ribbon { 85 | top: 42px; 86 | right: -43px; 87 | 88 | /* Rotate the banner 45 degrees */ 89 | -webkit-transform: rotate(45deg); 90 | -moz-transform: rotate(45deg); 91 | -o-transform: rotate(45deg); 92 | transform: rotate(45deg); 93 | } 94 | 95 | .github-fork-ribbon-wrapper.left .github-fork-ribbon { 96 | top: 42px; 97 | left: -43px; 98 | 99 | /* Rotate the banner -45 degrees */ 100 | -webkit-transform: rotate(-45deg); 101 | -moz-transform: rotate(-45deg); 102 | -o-transform: rotate(-45deg); 103 | transform: rotate(-45deg); 104 | } 105 | 106 | 107 | .github-fork-ribbon-wrapper.left-bottom .github-fork-ribbon { 108 | top: 80px; 109 | left: -43px; 110 | 111 | /* Rotate the banner -45 degrees */ 112 | -webkit-transform: rotate(45deg); 113 | -moz-transform: rotate(45deg); 114 | -o-transform: rotate(45deg); 115 | transform: rotate(45deg); 116 | } 117 | 118 | .github-fork-ribbon-wrapper.right-bottom .github-fork-ribbon { 119 | top: 80px; 120 | right: -43px; 121 | 122 | /* Rotate the banner -45 degrees */ 123 | -webkit-transform: rotate(-45deg); 124 | -moz-transform: rotate(-45deg); 125 | -o-transform: rotate(-45deg); 126 | transform: rotate(-45deg); 127 | } -------------------------------------------------------------------------------- /widget_libs/leaflet-providers/css/gh-fork-ribbon.ie.css: -------------------------------------------------------------------------------- 1 | /* IE voodoo courtesy of http://stackoverflow.com/a/4617511/263871 and 2 | * http://www.useragentman.com/IETransformsTranslator */ 3 | .github-fork-ribbon-wrapper.right .github-fork-ribbon { 4 | /* IE positioning hack (couldn't find a transform-origin alternative for IE) */ 5 | top: -22px; 6 | right: -62px; 7 | 8 | /* IE8+ */ 9 | -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.7071067811865474, M12=-0.7071067811865477, M21=0.7071067811865477, M22=0.7071067811865474, SizingMethod='auto expand')"; 10 | /* IE6 and 7 */ 11 | filter: progid:DXImageTransform.Microsoft.Matrix( 12 | M11=0.7071067811865474, 13 | M12=-0.7071067811865477, 14 | M21=0.7071067811865477, 15 | M22=0.7071067811865474, 16 | SizingMethod='auto expand' 17 | ); 18 | } 19 | 20 | .github-fork-ribbon-wrapper.left .github-fork-ribbon { 21 | top: -22px; 22 | left: -22px; 23 | 24 | /* IE8+ */ 25 | -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.7071067811865483, M12=0.7071067811865467, M21=-0.7071067811865467, M22=0.7071067811865483, SizingMethod='auto expand')"; 26 | /* IE6 and 7 */ 27 | filter: progid:DXImageTransform.Microsoft.Matrix( 28 | M11=0.7071067811865483, 29 | M12=0.7071067811865467, 30 | M21=-0.7071067811865467, 31 | M22=0.7071067811865483, 32 | SizingMethod='auto expand' 33 | ); 34 | } 35 | 36 | .github-fork-ribbon-wrapper.left-bottom .github-fork-ribbon { 37 | /* IE positioning hack (couldn't find a transform-origin alternative for IE) */ 38 | top: 12px; 39 | left: -22px; 40 | 41 | 42 | /* IE8+ */ 43 | -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.7071067811865474, M12=-0.7071067811865477, M21=0.7071067811865477, M22=0.7071067811865474, SizingMethod='auto expand')"; 44 | /* IE6 and 7 */ 45 | /* filter: progid:DXImageTransform.Microsoft.Matrix( 46 | M11=0.7071067811865474, 47 | M12=-0.7071067811865477, 48 | M21=0.7071067811865477, 49 | M22=0.7071067811865474, 50 | SizingMethod='auto expand' 51 | ); 52 | */} 53 | 54 | .github-fork-ribbon-wrapper.right-bottom .github-fork-ribbon { 55 | top: 12px; 56 | right: -62px; 57 | 58 | /* IE8+ */ 59 | -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.7071067811865483, M12=0.7071067811865467, M21=-0.7071067811865467, M22=0.7071067811865483, SizingMethod='auto expand')"; 60 | /* IE6 and 7 */ 61 | filter: progid:DXImageTransform.Microsoft.Matrix( 62 | M11=0.7071067811865483, 63 | M12=0.7071067811865467, 64 | M21=-0.7071067811865467, 65 | M22=0.7071067811865483, 66 | SizingMethod='auto expand' 67 | ); 68 | } -------------------------------------------------------------------------------- /widget_libs/leaflet-providers/license.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013 Leaflet Providers contributors 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 5 | 6 | * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 7 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 8 | 9 | _THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE._ -------------------------------------------------------------------------------- /widget_libs/leaflet-providers/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "leaflet-providers", 3 | "version": "1.1.15", 4 | "description": "An extension to Leaflet that contains configurations for various free tile providers.", 5 | "main": "leaflet-providers.js", 6 | "repository": { 7 | "type": "git", 8 | "url": "git://github.com/leaflet-extras/leaflet-providers.git" 9 | }, 10 | "scripts": { 11 | "test": "npm run lint && npm run testsuite", 12 | "testsuite": "mocha-phantomjs tests/index.html", 13 | "lint": "eslint --config .eslintrc leaflet-providers.js index.html preview/*.js preview/*.html tests/*", 14 | "min": "uglifyjs leaflet-providers.js -mc -o leaflet-providers.min.js", 15 | "release": "mversion patch -m" 16 | }, 17 | "license": "BSD-2-Clause", 18 | "bugs": { 19 | "url": "https://github.com/leaflet-extras/leaflet-providers/issues" 20 | }, 21 | "files": [ 22 | "leaflet-providers.js", 23 | "README.md", 24 | "CHANGELOG.md", 25 | "licence.md" 26 | ], 27 | "devDependencies": { 28 | "chai": "^2.3.0", 29 | "eslint": ">=4.18.2", 30 | "eslint-plugin-html": "^1.4.0", 31 | "mocha": "^2.2.4", 32 | "mocha-phantomjs": "^3.5.3", 33 | "mversion": "^2.0.0", 34 | "phantomjs": "1.9.7-15", 35 | "uglify-js": "^2.4.15" 36 | }, 37 | "autoupdate": { 38 | "source": "git", 39 | "target": "git://github.com/leaflet-extras/leaflet-providers.git", 40 | "basePath": "/", 41 | "files": [ 42 | "leaflet-providers.js" 43 | ] 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /widget_libs/leaflet/images/1px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/widget_libs/leaflet/images/1px.png -------------------------------------------------------------------------------- /widget_libs/leaflet/images/layers-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/widget_libs/leaflet/images/layers-2x.png -------------------------------------------------------------------------------- /widget_libs/leaflet/images/layers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/widget_libs/leaflet/images/layers.png -------------------------------------------------------------------------------- /widget_libs/leaflet/images/marker-icon-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/widget_libs/leaflet/images/marker-icon-2x.png -------------------------------------------------------------------------------- /widget_libs/leaflet/images/marker-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/widget_libs/leaflet/images/marker-icon.png -------------------------------------------------------------------------------- /widget_libs/leaflet/images/marker-shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Nowosad/Intro_to_spatial_analysis/936dd2d3d458ae3117d6ba2d3557dca1deeac95a/widget_libs/leaflet/images/marker-shadow.png -------------------------------------------------------------------------------- /widget_libs/leaflet/leaflet.css: -------------------------------------------------------------------------------- 1 | /* required styles */ 2 | 3 | .leaflet-map-pane, 4 | .leaflet-tile, 5 | .leaflet-marker-icon, 6 | .leaflet-marker-shadow, 7 | .leaflet-tile-pane, 8 | .leaflet-tile-container, 9 | .leaflet-overlay-pane, 10 | .leaflet-shadow-pane, 11 | .leaflet-marker-pane, 12 | .leaflet-popup-pane, 13 | .leaflet-overlay-pane svg, 14 | .leaflet-zoom-box, 15 | .leaflet-image-layer, 16 | .leaflet-layer { 17 | position: absolute; 18 | left: 0; 19 | top: 0; 20 | } 21 | .leaflet-container { 22 | overflow: hidden; 23 | -ms-touch-action: none; 24 | touch-action: none; 25 | } 26 | .leaflet-tile, 27 | .leaflet-marker-icon, 28 | .leaflet-marker-shadow { 29 | -webkit-user-select: none; 30 | -moz-user-select: none; 31 | user-select: none; 32 | -webkit-user-drag: none; 33 | } 34 | .leaflet-marker-icon, 35 | .leaflet-marker-shadow { 36 | display: block; 37 | } 38 | /* map is broken in FF if you have max-width: 100% on tiles */ 39 | .leaflet-container img { 40 | max-width: none !important; 41 | } 42 | /* stupid Android 2 doesn't understand "max-width: none" properly */ 43 | .leaflet-container img.leaflet-image-layer { 44 | max-width: 15000px !important; 45 | } 46 | .leaflet-tile { 47 | filter: inherit; 48 | visibility: hidden; 49 | } 50 | .leaflet-tile-loaded { 51 | visibility: inherit; 52 | } 53 | .leaflet-zoom-box { 54 | width: 0; 55 | height: 0; 56 | } 57 | /* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */ 58 | .leaflet-overlay-pane svg { 59 | -moz-user-select: none; 60 | } 61 | 62 | .leaflet-tile-pane { z-index: 2; } 63 | .leaflet-objects-pane { z-index: 3; } 64 | .leaflet-overlay-pane { z-index: 4; } 65 | .leaflet-shadow-pane { z-index: 5; } 66 | .leaflet-marker-pane { z-index: 6; } 67 | .leaflet-popup-pane { z-index: 7; } 68 | 69 | .leaflet-vml-shape { 70 | width: 1px; 71 | height: 1px; 72 | } 73 | .lvml { 74 | behavior: url(#default#VML); 75 | display: inline-block; 76 | position: absolute; 77 | } 78 | 79 | 80 | /* control positioning */ 81 | 82 | .leaflet-control { 83 | position: relative; 84 | z-index: 7; 85 | pointer-events: auto; 86 | } 87 | .leaflet-top, 88 | .leaflet-bottom { 89 | position: absolute; 90 | z-index: 1000; 91 | pointer-events: none; 92 | } 93 | .leaflet-top { 94 | top: 0; 95 | } 96 | .leaflet-right { 97 | right: 0; 98 | } 99 | .leaflet-bottom { 100 | bottom: 0; 101 | } 102 | .leaflet-left { 103 | left: 0; 104 | } 105 | .leaflet-control { 106 | float: left; 107 | clear: both; 108 | } 109 | .leaflet-right .leaflet-control { 110 | float: right; 111 | } 112 | .leaflet-top .leaflet-control { 113 | margin-top: 10px; 114 | } 115 | .leaflet-bottom .leaflet-control { 116 | margin-bottom: 10px; 117 | } 118 | .leaflet-left .leaflet-control { 119 | margin-left: 10px; 120 | } 121 | .leaflet-right .leaflet-control { 122 | margin-right: 10px; 123 | } 124 | 125 | 126 | /* zoom and fade animations */ 127 | 128 | .leaflet-fade-anim .leaflet-tile, 129 | .leaflet-fade-anim .leaflet-popup { 130 | opacity: 0; 131 | -webkit-transition: opacity 0.2s linear; 132 | -moz-transition: opacity 0.2s linear; 133 | -o-transition: opacity 0.2s linear; 134 | transition: opacity 0.2s linear; 135 | } 136 | .leaflet-fade-anim .leaflet-tile-loaded, 137 | .leaflet-fade-anim .leaflet-map-pane .leaflet-popup { 138 | opacity: 1; 139 | } 140 | 141 | .leaflet-zoom-anim .leaflet-zoom-animated { 142 | -webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1); 143 | -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1); 144 | -o-transition: -o-transform 0.25s cubic-bezier(0,0,0.25,1); 145 | transition: transform 0.25s cubic-bezier(0,0,0.25,1); 146 | } 147 | .leaflet-zoom-anim .leaflet-tile, 148 | .leaflet-pan-anim .leaflet-tile, 149 | .leaflet-touching .leaflet-zoom-animated { 150 | -webkit-transition: none; 151 | -moz-transition: none; 152 | -o-transition: none; 153 | transition: none; 154 | } 155 | 156 | .leaflet-zoom-anim .leaflet-zoom-hide { 157 | visibility: hidden; 158 | } 159 | 160 | 161 | /* cursors */ 162 | 163 | .leaflet-clickable { 164 | cursor: pointer; 165 | } 166 | .leaflet-container { 167 | cursor: -webkit-grab; 168 | cursor: -moz-grab; 169 | } 170 | .leaflet-popup-pane, 171 | .leaflet-control { 172 | cursor: auto; 173 | } 174 | .leaflet-dragging .leaflet-container, 175 | .leaflet-dragging .leaflet-clickable { 176 | cursor: move; 177 | cursor: -webkit-grabbing; 178 | cursor: -moz-grabbing; 179 | } 180 | 181 | 182 | /* visual tweaks */ 183 | 184 | .leaflet-container { 185 | background: #ddd; 186 | outline: 0; 187 | } 188 | .leaflet-container a { 189 | color: #0078A8; 190 | } 191 | .leaflet-container a.leaflet-active { 192 | outline: 2px solid orange; 193 | } 194 | .leaflet-zoom-box { 195 | border: 2px dotted #38f; 196 | background: rgba(255,255,255,0.5); 197 | } 198 | 199 | 200 | /* general typography */ 201 | .leaflet-container { 202 | font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif; 203 | } 204 | 205 | 206 | /* general toolbar styles */ 207 | 208 | .leaflet-bar { 209 | box-shadow: 0 1px 5px rgba(0,0,0,0.65); 210 | border-radius: 4px; 211 | } 212 | .leaflet-bar a, 213 | .leaflet-bar a:hover { 214 | background-color: #fff; 215 | border-bottom: 1px solid #ccc; 216 | width: 26px; 217 | height: 26px; 218 | line-height: 26px; 219 | display: block; 220 | text-align: center; 221 | text-decoration: none; 222 | color: black; 223 | } 224 | .leaflet-bar a, 225 | .leaflet-control-layers-toggle { 226 | background-position: 50% 50%; 227 | background-repeat: no-repeat; 228 | display: block; 229 | } 230 | .leaflet-bar a:hover { 231 | background-color: #f4f4f4; 232 | } 233 | .leaflet-bar a:first-child { 234 | border-top-left-radius: 4px; 235 | border-top-right-radius: 4px; 236 | } 237 | .leaflet-bar a:last-child { 238 | border-bottom-left-radius: 4px; 239 | border-bottom-right-radius: 4px; 240 | border-bottom: none; 241 | } 242 | .leaflet-bar a.leaflet-disabled { 243 | cursor: default; 244 | background-color: #f4f4f4; 245 | color: #bbb; 246 | } 247 | 248 | .leaflet-touch .leaflet-bar a { 249 | width: 30px; 250 | height: 30px; 251 | line-height: 30px; 252 | } 253 | 254 | 255 | /* zoom control */ 256 | 257 | .leaflet-control-zoom-in, 258 | .leaflet-control-zoom-out { 259 | font: bold 18px 'Lucida Console', Monaco, monospace; 260 | text-indent: 1px; 261 | } 262 | .leaflet-control-zoom-out { 263 | font-size: 20px; 264 | } 265 | 266 | .leaflet-touch .leaflet-control-zoom-in { 267 | font-size: 22px; 268 | } 269 | .leaflet-touch .leaflet-control-zoom-out { 270 | font-size: 24px; 271 | } 272 | 273 | 274 | /* layers control */ 275 | 276 | .leaflet-control-layers { 277 | box-shadow: 0 1px 5px rgba(0,0,0,0.4); 278 | background: #fff; 279 | border-radius: 5px; 280 | } 281 | .leaflet-control-layers-toggle { 282 | background-image: url(images/layers.png); 283 | width: 36px; 284 | height: 36px; 285 | } 286 | .leaflet-retina .leaflet-control-layers-toggle { 287 | background-image: url(images/layers-2x.png); 288 | background-size: 26px 26px; 289 | } 290 | .leaflet-touch .leaflet-control-layers-toggle { 291 | width: 44px; 292 | height: 44px; 293 | } 294 | .leaflet-control-layers .leaflet-control-layers-list, 295 | .leaflet-control-layers-expanded .leaflet-control-layers-toggle { 296 | display: none; 297 | } 298 | .leaflet-control-layers-expanded .leaflet-control-layers-list { 299 | display: block; 300 | position: relative; 301 | } 302 | .leaflet-control-layers-expanded { 303 | padding: 6px 10px 6px 6px; 304 | color: #333; 305 | background: #fff; 306 | } 307 | .leaflet-control-layers-selector { 308 | margin-top: 2px; 309 | position: relative; 310 | top: 1px; 311 | } 312 | .leaflet-control-layers label { 313 | display: block; 314 | } 315 | .leaflet-control-layers-separator { 316 | height: 0; 317 | border-top: 1px solid #ddd; 318 | margin: 5px -10px 5px -6px; 319 | } 320 | 321 | 322 | /* attribution and scale controls */ 323 | 324 | .leaflet-container .leaflet-control-attribution { 325 | background: #fff; 326 | background: rgba(255, 255, 255, 0.7); 327 | margin: 0; 328 | } 329 | .leaflet-control-attribution, 330 | .leaflet-control-scale-line { 331 | padding: 0 5px; 332 | color: #333; 333 | } 334 | .leaflet-control-attribution a { 335 | text-decoration: none; 336 | } 337 | .leaflet-control-attribution a:hover { 338 | text-decoration: underline; 339 | } 340 | .leaflet-container .leaflet-control-attribution, 341 | .leaflet-container .leaflet-control-scale { 342 | font-size: 11px; 343 | } 344 | .leaflet-left .leaflet-control-scale { 345 | margin-left: 5px; 346 | } 347 | .leaflet-bottom .leaflet-control-scale { 348 | margin-bottom: 5px; 349 | } 350 | .leaflet-control-scale-line { 351 | border: 2px solid #777; 352 | border-top: none; 353 | line-height: 1.1; 354 | padding: 2px 5px 1px; 355 | font-size: 11px; 356 | white-space: nowrap; 357 | overflow: hidden; 358 | -moz-box-sizing: content-box; 359 | box-sizing: content-box; 360 | 361 | background: #fff; 362 | background: rgba(255, 255, 255, 0.5); 363 | } 364 | .leaflet-control-scale-line:not(:first-child) { 365 | border-top: 2px solid #777; 366 | border-bottom: none; 367 | margin-top: -2px; 368 | } 369 | .leaflet-control-scale-line:not(:first-child):not(:last-child) { 370 | border-bottom: 2px solid #777; 371 | } 372 | 373 | .leaflet-touch .leaflet-control-attribution, 374 | .leaflet-touch .leaflet-control-layers, 375 | .leaflet-touch .leaflet-bar { 376 | box-shadow: none; 377 | } 378 | .leaflet-touch .leaflet-control-layers, 379 | .leaflet-touch .leaflet-bar { 380 | border: 2px solid rgba(0,0,0,0.2); 381 | background-clip: padding-box; 382 | } 383 | 384 | 385 | /* popup */ 386 | 387 | .leaflet-popup { 388 | position: absolute; 389 | text-align: center; 390 | } 391 | .leaflet-popup-content-wrapper { 392 | padding: 1px; 393 | text-align: left; 394 | border-radius: 12px; 395 | } 396 | .leaflet-popup-content { 397 | margin: 13px 19px; 398 | line-height: 1.4; 399 | } 400 | .leaflet-popup-content p { 401 | margin: 18px 0; 402 | } 403 | .leaflet-popup-tip-container { 404 | margin: 0 auto; 405 | width: 40px; 406 | height: 20px; 407 | position: relative; 408 | overflow: hidden; 409 | } 410 | .leaflet-popup-tip { 411 | width: 17px; 412 | height: 17px; 413 | padding: 1px; 414 | 415 | margin: -10px auto 0; 416 | 417 | -webkit-transform: rotate(45deg); 418 | -moz-transform: rotate(45deg); 419 | -ms-transform: rotate(45deg); 420 | -o-transform: rotate(45deg); 421 | transform: rotate(45deg); 422 | } 423 | .leaflet-popup-content-wrapper, 424 | .leaflet-popup-tip { 425 | background: white; 426 | 427 | box-shadow: 0 3px 14px rgba(0,0,0,0.4); 428 | } 429 | .leaflet-container a.leaflet-popup-close-button { 430 | position: absolute; 431 | top: 0; 432 | right: 0; 433 | padding: 4px 4px 0 0; 434 | text-align: center; 435 | width: 18px; 436 | height: 14px; 437 | font: 16px/14px Tahoma, Verdana, sans-serif; 438 | color: #c3c3c3; 439 | text-decoration: none; 440 | font-weight: bold; 441 | background: transparent; 442 | } 443 | .leaflet-container a.leaflet-popup-close-button:hover { 444 | color: #999; 445 | } 446 | .leaflet-popup-scrolled { 447 | overflow: auto; 448 | border-bottom: 1px solid #ddd; 449 | border-top: 1px solid #ddd; 450 | } 451 | 452 | .leaflet-oldie .leaflet-popup-content-wrapper { 453 | zoom: 1; 454 | } 455 | .leaflet-oldie .leaflet-popup-tip { 456 | width: 24px; 457 | margin: 0 auto; 458 | 459 | -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)"; 460 | filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678); 461 | } 462 | .leaflet-oldie .leaflet-popup-tip-container { 463 | margin-top: -1px; 464 | } 465 | 466 | .leaflet-oldie .leaflet-control-zoom, 467 | .leaflet-oldie .leaflet-control-layers, 468 | .leaflet-oldie .leaflet-popup-content-wrapper, 469 | .leaflet-oldie .leaflet-popup-tip { 470 | border: 1px solid #999; 471 | } 472 | 473 | 474 | /* div icon */ 475 | 476 | .leaflet-div-icon { 477 | background: #fff; 478 | border: 1px solid #666; 479 | } 480 | -------------------------------------------------------------------------------- /widget_libs/leafletfix/leafletfix.css: -------------------------------------------------------------------------------- 1 | /* Work around CSS properties introduced on img by bootstrap */ 2 | img.leaflet-tile { 3 | padding: 0; 4 | margin: 0; 5 | border-radius: 0; 6 | border: none; 7 | } 8 | .info { 9 | padding: 6px 8px; 10 | font: 14px/16px Arial, Helvetica, sans-serif; 11 | background: white; 12 | background: rgba(255,255,255,0.8); 13 | box-shadow: 0 0 15px rgba(0,0,0,0.2); 14 | border-radius: 5px; 15 | } 16 | .legend { 17 | line-height: 18px; 18 | color: #555; 19 | } 20 | .legend svg text { 21 | fill: #555; 22 | } 23 | .legend svg line { 24 | stroke: #555; 25 | } 26 | .legend i { 27 | width: 18px; 28 | height: 18px; 29 | float: left; 30 | margin-right: 8px; 31 | opacity: 0.7; 32 | } 33 | -------------------------------------------------------------------------------- /widget_libs/pymjs/pym.v1.min.js: -------------------------------------------------------------------------------- 1 | /*! pym.js - v1.1.2 - 2016-12-10 */ 2 | !function(a){"function"==typeof define&&define.amd?define(a):"undefined"!=typeof module&&module.exports?module.exports=a():window.pym=a.call(this)}(function(){var a="xPYMx",b={},c=function(a){var b=new RegExp("[\\?&]"+a.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]")+"=([^&#]*)"),c=b.exec(location.search);return null===c?"":decodeURIComponent(c[1].replace(/\+/g," "))},d=function(a,b){if("*"===b.xdomain||a.origin.match(new RegExp(b.xdomain+"$")))return!0},e=function(b,c,d){var e=["pym",b,c,d];return e.join(a)},f=function(b){var c=["pym",b,"(\\S+)","(.*)"];return new RegExp("^"+c.join(a)+"$")},g=function(){for(var a=b.autoInitInstances.length,c=a-1;c>=0;c--){var d=b.autoInitInstances[c];d.el.getElementsByTagName("iframe").length&&d.el.getElementsByTagName("iframe")[0].contentWindow||b.autoInitInstances.splice(c,1)}};return b.autoInitInstances=[],b.autoInit=function(){var a=document.querySelectorAll("[data-pym-src]:not([data-pym-auto-initialized])"),c=a.length;g();for(var d=0;d-1&&(b=this.url.substring(c,this.url.length),this.url=this.url.substring(0,c)),this.url.indexOf("?")<0?this.url+="?":this.url+="&",this.iframe.src=this.url+"initialWidth="+a+"&childId="+this.id+"&parentTitle="+encodeURIComponent(document.title)+"&parentUrl="+encodeURIComponent(window.location.href)+b,this.iframe.setAttribute("width","100%"),this.iframe.setAttribute("scrolling","no"),this.iframe.setAttribute("marginheight","0"),this.iframe.setAttribute("frameborder","0"),this.settings.title&&this.iframe.setAttribute("title",this.settings.title),void 0!==this.settings.allowfullscreen&&this.settings.allowfullscreen!==!1&&this.iframe.setAttribute("allowfullscreen",""),void 0!==this.settings.sandbox&&"string"==typeof this.settings.sandbox&&this.iframe.setAttribute("sandbox",this.settings.sandbox),this.settings.id&&(document.getElementById(this.settings.id)||this.iframe.setAttribute("id",this.settings.id)),this.settings.name&&this.iframe.setAttribute("name",this.settings.name);this.el.firstChild;)this.el.removeChild(this.el.firstChild);this.el.appendChild(this.iframe),window.addEventListener("resize",this._onResize)},this._srcdocIframe=function(){this.iframe=this.el.getElementsByTagName("iframe")[0],this.iframe.setAttribute("width","100%"),this.iframe.setAttribute("scrolling","no"),this.iframe.setAttribute("marginheight","0"),this.iframe.setAttribute("frameborder","0"),this.settings.title&&this.iframe.setAttribute("title",this.settings.title),window.addEventListener("resize",this._onResize)},this._onResize=function(){this.sendWidth()}.bind(this),this._fire=function(a,b){if(a in this.messageHandlers)for(var c=0;c