From 8ff4508626d107014743f1e7d7867c3a8c241335 Mon Sep 17 00:00:00 2001 From: Alexis Markwick Date: Sat, 17 Feb 2024 23:39:25 +0000 Subject: [PATCH] v8.0.0 --- .gitignore | 1 + CHANGELOG.md | 15 + web/.htaccess | 12 +- web/assets/css/dark-theme.css | 76 +- web/assets/css/plugins/leaflet-sidebar.css | 32 +- web/assets/css/site.css | 582 ++++++------- web/assets/data/taginfo.json | 8 +- web/assets/img/booking_com.png | Bin 2767 -> 0 bytes web/assets/img/icons/bouddha.png | Bin 0 -> 493 bytes web/assets/img/icons/church-2.png | Bin 0 -> 372 bytes web/assets/img/icons/mosquee.png | Bin 0 -> 388 bytes web/assets/js/OverPassLayer.js | 46 +- web/assets/js/plugins/jquery.min.js | 4 +- web/assets/js/plugins/leaflet.js | 1 - web/assets/js/site.js | 923 +++++++++++---------- web/assets/js/tags-parsers.js | 252 +++--- web/index.html | 186 +++-- web/tour/checkframe.js | 2 +- web/tour/itemStreetNames/streetnames.css | 48 +- web/tour/itemStreetNames/streetnames.js | 54 +- web/tour/itemStreetNames/streetnames.xml | 485 ++++++----- web/tour/itemStreetNames/streetnames.xsl | 32 +- web/tour/listAmsterdam/index.html | 2 +- web/tour/listBexhill/index.html | 4 +- web/tour/listBoundary/index.html | 4 +- web/tour/listClocks/index.html | 10 +- web/tour/listDlwp/index.html | 2 +- web/tour/listFilm/index.html | 26 +- web/tour/listHeritage/index.html | 26 +- web/tour/listManor/index.html | 2 +- web/tour/listMartello/index.html | 2 +- web/tour/listNortheye/index.html | 4 +- web/tour/listOverlays/index.html | 24 +- web/tour/listPeople/index.html | 12 +- web/tour/listPrehistory/index.html | 4 +- web/tour/listRacing/index.html | 8 +- web/tour/listRailways/index.html | 10 +- web/tour/listSmuggling/index.html | 4 +- web/tour/listSurveying/index.html | 2 +- web/tour/listTrams/index.html | 2 +- web/tour/listWw2/incidents.geojson | 29 +- web/tour/listWw2/index.html | 10 +- web/tour/listZrefs/index.html | 2 +- web/tour/listZrefs/refs.js | 6 +- web/tour/tour.css | 40 +- web/tour/tour.js | 87 +- 46 files changed, 1622 insertions(+), 1459 deletions(-) delete mode 100644 web/assets/img/booking_com.png create mode 100644 web/assets/img/icons/bouddha.png create mode 100644 web/assets/img/icons/church-2.png create mode 100644 web/assets/img/icons/mosquee.png diff --git a/.gitignore b/.gitignore index 51bb4a8..d27134d 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ web/assets/img/uploads/ web/assets/js/config.js web/robots.txt *.pdf +*.pbf ############# ## Windows detritus diff --git a/CHANGELOG.md b/CHANGELOG.md index a7bd58f..16e9c9a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # CHANGELOG +## v8.0.0 + +**Date:** 17/02/2024 + +Site changes + - Overhauled html/css naming conventions to be more consistent + - Replace jQuery depreciations + - Animate visual click to POI address when hovering over modal + - Allow reverse sorting in POI results list + - Separate map icons for different Places of Worship + - streetnames book to use hashed anchors + - Delay tutorial modal opening + - More of the usual bug fixes and code improvements + + ## v7.9.0 **Date:** 09/12/2023 diff --git a/web/.htaccess b/web/.htaccess index 0854ef7..8c553d5 100644 --- a/web/.htaccess +++ b/web/.htaccess @@ -8,13 +8,13 @@ RewriteCond %{HTTPS} on RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ https://%1/$1 [R=301,L] -Redirect /ext /?M=general&T=none#13/50.8470/0.4670 -Redirect /scarecrow /?M=general&T=none&G=scarecrow +Redirect /ext /?m=general&t=none#13/50.8470/0.4670 +Redirect /scarecrow /?m=general&t=none&g=scarecrow Redirect /streetnames /tour/itemStreetNames/streetnames.xml -Redirect /manorhouse /?T=tour&G=manorHouse&U=manor&O=os1955 -Redirect /millifest /?T=none&G=milligan -Redirect /ww2 /?M=general&T=tour&G=bombmap&U=ww2 -Redirect /xmas /?T=none&G=xmas +Redirect /manorhouse /?t=tour&g=manorHouse&u=manor&O=os1955 +Redirect /millifest /?t=none&g=milligan +Redirect /ww2 /?m=general&t=tour&g=bombmap&u=ww2 +Redirect /xmas /?t=none&g=xmas # php -- BEGIN cPanel-generated handler, do not edit # This domain inherits the “PHP” package. diff --git a/web/assets/css/dark-theme.css b/web/assets/css/dark-theme.css index a7acf7c..f42201b 100644 --- a/web/assets/css/dark-theme.css +++ b/web/assets/css/dark-theme.css @@ -8,72 +8,75 @@ --scroll-shadow: 0, 0, 0; --scroll-shadow-popup: 0, 0, 0; } +body { + background-color: #111111; +} .spinner svg circle { fill: rgba(0, 0, 0, 0.75); } -.leaflet-control-layers-expanded, #msgStatusHead, .leaflet-control-attribution, .leaflet-tooltip, .leaflet-contextmenu a.leaflet-contextmenu-item, +.leaflet-control-layers-expanded, #modal-head, .leaflet-control-attribution, .leaflet-tooltip, .leaflet-contextmenu a.leaflet-contextmenu-item, .leaflet-popup-content-wrapper, .leaflet-popup-tip, .leaflet-control-scale-line, .leaflet-routing-remove-waypoint:hover::after { color: var(--text-color) !important; } -.anchor:hover, select:hover:enabled, #home .sidebar-body a i:hover, #inputWw2 div, .leaflet-control-attribution .fa-circle-info:hover, button:hover:enabled:not(.fancybox-button), -.leaflet-bar a:hover, .navigateItem a:hover, .leaflet-container a.leaflet-popup-close-button:hover, #msgStatus div.leaflet-popup-close-button:hover, -#inputOpacity div.leaflet-popup-close-button:hover, .popup-header-button:hover, .leaflet-routing-geocoders button:hover::after, #devTools h3:hover::after, -.popup-ohContainer .popup-tagValue:hover::after, .leaflet-control-layers-list input:not(:checked,:disabled) + span:hover:before { +.sidebar-anchor:hover, select:hover:enabled, #home .sidebar-body a i:hover, #control-ww2 div, .leaflet-control-attribution .fa-circle-info:hover, button:hover:enabled:not(.fancybox-button), +.leaflet-bar a:hover, .popup-navigate a:hover, .leaflet-container a.leaflet-popup-close-button:hover, #modal div.leaflet-popup-close-button:hover, +#control-opacity div.leaflet-popup-close-button:hover, .popup-header-button:hover, .leaflet-routing-geocoders button:hover::after, #settings-devtools h3:hover::after, +.popup-openhrs .popup-tag-value:hover::after, .leaflet-control-layers-list input:not(:checked,:disabled) + span:hover:before { color: var(--hover-color) !important; } -.sidebar-tabs, footer, #homeBox, #xmasMsg, .anchor, input:not([type="range"]), hr, select, button, .leaflet-control-geocoder input, .slider::before, -.leaflet-control-geocoder, .leaflet-contextmenu, #msgStatusHead, .leaflet-container a.leaflet-popup-close-button, .leaflet-control-geocoder-selected, .fancybox-bg, -#poi-results-list tr:hover, .poi-checkbox-selected, .poi-checkbox > label:hover, .leaflet-touch .leaflet-bar:not(#inputWw2, #inputOpacity), #walking a img { +.sidebar-tabs, footer, #home-box, #holiday-xmas-msg, .sidebar-anchor, input:not([type="range"]), hr, select, button, .leaflet-control-geocoder input, .slider::before, +.leaflet-control-geocoder, .leaflet-contextmenu, #modal-head, .leaflet-container a.leaflet-popup-close-button, .leaflet-control-geocoder-selected, .fancybox-bg, +#pois-results-list tr:hover, .pois-checkbox-selected, .pois-checkbox > label:hover, .leaflet-touch .leaflet-bar:not(#control-ww2, #control-opacity), #walking a img { background-color: var(--bg-color) !important; } -#msgStatus, #inputOpacity, .leaflet-bar > a, .leaflet-bar button, .leaflet-popup-content-wrapper, .leaflet-popup-tip, .sidebar-content, .leaflet-control-layers-expanded, .leaflet-control-layers, -.leaflet-control-geocoder, .leaflet-control-geocoder-alternatives, .leaflet-control-geocoder-alternatives li:hover, .leaflet-tooltip, .popup-imgAttrib, .navigateBg { +#modal, #control-opacity, .leaflet-bar > a, .leaflet-bar button, .leaflet-popup-content-wrapper, .leaflet-popup-tip, .sidebar-content, .leaflet-control-layers-expanded, .leaflet-control-layers, +.leaflet-control-geocoder, .leaflet-control-geocoder-alternatives, .leaflet-control-geocoder-alternatives li:hover, .leaflet-tooltip, .popup-img-attrib, .popup-navigate-background { background-color: var(--bg-color2) !important; } .leaflet-control-layers-list input + span:before { color: #444444; } -#weather, #newFeed ul { +#home-weather, #home-new-feed ul { color: #688c81; } -.leaflet-bar a, .leaflet-bar a:hover, .setLabel { +.leaflet-bar a, .leaflet-bar a:hover, .settings-label { border-bottom: 1px solid var(--bg-color); } .leaflet-bar a:last-child { border-bottom: none; } -#devTools { +#settings-devtools { border-top: 1px solid var(--bg-color); } -#inputOpacity input[type=range] { +#control-opacity input[type=range] { background-image: linear-gradient(to right, #333, #666); } input[type=range] { background-color: #666666; } -.custscroll { +.theme-scroll { scrollbar-color: var(--scr-thumb) var(--scr-track) !important; } -.layerDark, #minimap > img { +.theme-invert { filter: invert(90%) hue-rotate(180deg) contrast(80%); } -.sidebar-header { +.sidebar-header-text, .sidebar-close { color: #dddddd; } .leaflet-control-layers-separator { border-top: 2px solid var(--bg-color); } -#poi-results, #walkDesc img, #thennow img, #myprofile img, .popup-imgContainer, .leaflet-touch .leaflet-control-layers, .leaflet-touch .leaflet-bar:not(#inputWw2) { +#pois-results, #walk-desc img, #thennow img, #info-profile img, .popup-img, .leaflet-touch .leaflet-control-layers, .leaflet-touch .leaflet-bar:not(#control-ww2) { border: 2px solid var(--bg-color); } input[type=range]::-webkit-slider-thumb { border-color: var(--bg-color); } input[type=range]:hover::-webkit-slider-thumb { background-color: var(--hover-color); } input[type=range]::-moz-range-thumb { border-color: var(--bg-color); } input[type=range]:hover::-moz-range-thumb { background-color: var(--hover-color); } -#poi-results-list tr, .popup-header, .leaflet-control-geocoder-alternatives li:not(:last-child) { +#pois-results-list tr, .popup-header, .leaflet-control-geocoder-alternatives li:not(:last-child) { border-bottom: 2px solid var(--bg-color) !important; } -.leaflet-control-scale-line, .poi-result-selected { +.leaflet-control-scale-line, .pois-result-selected { background-color: rgba(0, 0, 0, 0.5); } .leaflet-control-scale-line { @@ -83,16 +86,16 @@ input[type=range]:hover::-moz-range-thumb { background-color: var(--hover-color) .leaflet-container .leaflet-control-attribution { background: rgba(0, 0, 0, 0.7); } -.anchor, .easy-autocomplete-container ul li, .easy-autocomplete-container ul .eac-category { +.sidebar-anchor, .easy-autocomplete-container ul li, .easy-autocomplete-container ul .eac-category { border-color: #666666; } button:disabled, button:disabled:hover, button:disabled::after, button:disabled:hover::after { color: #555555 !important; } -input:not([type=range]), select, #sidebar button:not(.modalButton), .leaflet-tooltip { +input:not([type=range]), select, #sidebar button:not(.tutorial-button), .leaflet-tooltip { border: 1px solid #333 !important; } -.leaflet-control-geocoder input, .leaflet-control-geocoder-alternatives a, .fancybox-button, .modalButton { +.leaflet-control-geocoder input, .leaflet-control-geocoder-alternatives a, .fancybox-button, .tutorial-button { border: none !important; } .easy-autocomplete-container ul li, .easy-autocomplete-container ul .eac-category { @@ -116,14 +119,14 @@ input:not([type=range]), select, #sidebar button:not(.modalButton), .leaflet-too .leaflet-container a.leaflet-popup-close-button { border: 3px solid #333333; } -.leaflet-popup .award { +.leaflet-popup .competition-award { text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5), 0 0 15px black; } .leaflet-tooltip-right::before { border-right-color: var(--bg-color2); } .leaflet-tooltip-left::before { border-left-color: var(--bg-color2); } .leaflet-tooltip-top::before { border-top-color: var(--bg-color2); } .leaflet-tooltip-bottom::before { border-bottom-color: var(--bg-color2); } -.modalButton { +.tutorial-button { background-color: #222 !important; } .leaflet-contextmenu a.leaflet-contextmenu-item.over { @@ -134,31 +137,32 @@ input:not([type=range]), select, #sidebar button:not(.modalButton), .leaflet-too .leaflet-contextmenu-separator { border-bottom: 1px solid #333333; } -.popup-ohTable tr, .popup-bsTable tr { border: 1px solid black; } -.popup-bsTable tr, .popup-ohTable td.times { background-color: #222222; } -.popup-bsTable tr:nth-child(1) { color: #eeeeee; } -.popup-ohTable td.workday { background-color: #333333; } -.popup-ohTable td.weekend { background-color: #444444; } +.popup-img { background-color: #333333; } +.popup-openhrs-table tr, .popup-bustime-table tr { border: 1px solid black; } +.popup-bustime-table tr, .popup-openhrs-table td.times { background-color: #222222; } +.popup-bustime-table tr:nth-child(1) { color: #eeeeee; } +.popup-openhrs-table td.workday { background-color: #333333; } +.popup-openhrs-table td.weekend { background-color: #444444; } .sidebar-close:hover { color: #bbbbbb; } .sidebar-notif { border-color: var(--bg-color); } .xmasMapTree { filter: drop-shadow(0px 10px 9px #000000); } .circleMarker { fill: #000000; } -.poi-results-circleMarker { color: #000000; } -.popup-xmas .leaflet-popup-content-wrapper, .leaflet-tooltip.popup-xmas, #xmasMsg { +.pois-results-circleMarker { color: #000000; } +.popup-xmas .leaflet-popup-content-wrapper, .leaflet-tooltip.popup-xmas, #holiday-xmas-msg { background-blend-mode: lighten; } -.custscroll::-webkit-scrollbar { +.theme-scroll::-webkit-scrollbar { background-color: var(--scr-track); } -.custscroll::-webkit-scrollbar-thumb { +.theme-scroll::-webkit-scrollbar-thumb { background-color: var(--scr-thumb); } -#gotocontrols .fa-border, #gotoprivacy .fa-border { +#info-privacy .fa-border { border: 1px solid #333333; border-radius: 5px; background-color: var(--bg-color); } -.comment, figcaption { +.popup-comment, .comment, figcaption { color: #888888; } diff --git a/web/assets/css/plugins/leaflet-sidebar.css b/web/assets/css/plugins/leaflet-sidebar.css index acbec82..a70151c 100644 --- a/web/assets/css/plugins/leaflet-sidebar.css +++ b/web/assets/css/plugins/leaflet-sidebar.css @@ -21,7 +21,10 @@ bottom: 10px; resize: vertical; min-height: 500px; } } + @media (min-width: 768px) and (max-width: 1023px) { + body { + background-color: #eeeeee; } .sidebar { width: 350px; } } @media (min-width: 1024px) and (max-width: 1299px) { @@ -33,17 +36,15 @@ width: 450px; max-height: 950px; } } .sidebar.collapsed { - width: 35px; } -.sidebar.collapsed .sidebar-pane.active .sidebar-body, .sidebar.collapsed #holidayImg { - opacity : 0; } + width: 35px; + resize: none; } +.sidebar.collapsed .sidebar-body { + opacity: 0; } @media (min-width: 1024px) { .sidebar.collapsed .sidebar-tabs { background-color: transparent !important; backdrop-filter: blur(7px); - transition: background-color 400ms ease-out; } - .sidebar.collapsed { - width: 35px; - resize: none; } } + transition: background-color 400ms ease-out; } } .sidebar-left { left: 0; } @media (min-width: 1024px) { @@ -53,7 +54,7 @@ top: 0; bottom: 0; height: 100%; - background-color: #ddd } + background-color: #e5e5e5 } .sidebar-left .sidebar-tabs { left: 0; } .sidebar-tabs, .sidebar-tabs > ul { @@ -100,12 +101,9 @@ position: absolute; top: 0; bottom: 0; - background-color: rgba(235, 235, 235, 0.8); + background-color: rgba(240, 240, 240, 0.8); overflow: hidden; backdrop-filter: blur(7px); } -@media (min-width: 768px) and (max-width: 1023px) { - .sidebar-content { - background-color: #ececec; } } .sidebar-left .sidebar-content { left: 35px; right: 0; } @@ -131,18 +129,19 @@ white-space: nowrap; margin: 0; font: normal 16pt BerlinSans, "Helvetica Neue", Arial, Helvetica, sans-serif; - color: #fff; background-color: var(--main-color); line-height: 45px; } .sidebar-header-text { - width: 100%; + color: #fff; padding: 0 15px; } #home .sidebar-header-text { - cursor: pointer; } + color: #fff; + text-decoration: none; } .sidebar-close::before { content: '\f0d9'; font: var(--fa-font-solid); } .sidebar-close { + color: #fff; position: absolute; right: 0; min-width: 8px; @@ -161,7 +160,8 @@ width: 94%; padding: 0 3%; min-width: 250px; - transition: opacity 300ms linear; } + opacity: 1; + transition: opacity 200ms linear; } .sidebar-left ~ .sidebar-map { margin-left: 35px; } @media (min-width: 768px) and (max-width: 1023px) { diff --git a/web/assets/css/site.css b/web/assets/css/site.css index 8b2c825..4cb37e0 100644 --- a/web/assets/css/site.css +++ b/web/assets/css/site.css @@ -5,12 +5,26 @@ --bg-hover-color: #f4f4f4; --scr-thumb: #cdcdcd; --scr-track: #f0f0f0; - --popup-long-desc-height: 200px; + --popup-tag-long-height: 200px; --scroll-shadow: 100, 100, 100; --scroll-shadow-popup: 200, 200, 200; } -.theme { - color: var(--main-color) !important; +#noscript { + color: #f4e6d3; + position: absolute; + width: 100%; + top: 50px; + text-align: center; + font-weight: bold; + font-size: calc(1vw + 75%); +} +@keyframes spinner { + from { transform: rotate(0deg) scale(0.8, -0.8); } + to { transform: rotate(1turn) scale(0.8, -0.8); } +} +@font-face { + font-family: BerlinSans; + src: url('../font/berlinsans.woff2') format('woff2'), url('../font/berlinsans.ttf') format('truetype'); } .spinner { position: fixed; @@ -34,36 +48,44 @@ animation: spinner 1s infinite linear; transform-origin: center; } -@keyframes spinner { - from { transform: rotate(0deg) scale(0.8, -0.8); } - to { transform: rotate(1turn) scale(0.8, -0.8); } -} -.nowrap { - white-space: nowrap; +.theme-color { color: var(--main-color) !important; } +.theme-dropshadow { filter: drop-shadow(0px 2px 1px black); } +.theme-nowrap { white-space: nowrap; } +.theme-scroll { + scroll-behavior: smooth; + scrollbar-width: thin; + background-repeat: no-repeat; + background-position: center bottom; + background-size: 100% 20px; } -#map { - background: var(--second-color); - transition: background 2.5s; +.theme-scroll::-webkit-scrollbar { + width: 7px; + background-color: var(--scr-track); } -@font-face { - font-family: BerlinSans; - src: url('../font/berlinsans.woff2') format('woff2'), url('../font/berlinsans.ttf') format("truetype"); +.theme-scroll::-webkit-scrollbar-thumb { + background-color: var(--scr-thumb); } body { padding: 0; margin: 0; + transition: background 2.5s; +} +body.preload { + background: var(--second-color); } - html, body, #map { height: 100%; font: normal 11pt Helvetica, Arial, sans-serif; color: var(--text-color); } +#map { + background: none; +} @media (min-width: 768px) and (max-width: 1299px), (max-width: 400px) { body { font-size: 10pt; } - #weather { font-size: 8.7pt; } - #weather .fa-2x { font-size: 1.8em; } + #home-weather { font-size: 8.7pt; } + #home-weather .fa-2x { font-size: 1.8em; } } @media (min-width: 768px) and (max-width: 1023px), (max-width: 400px) { #map { transition: margin-left 400ms ease-out; } @@ -102,137 +124,134 @@ input[type=text], input[type=date], input[type=number] { #home .sidebar-body { height: calc(100% - 70px); } -#homeBox, #xmasMsg { +#home-box, #holiday-xmas-msg { max-width: 500px; margin: 0 auto; background-color: rgba(255, 255, 255, 0.6); border-radius: 10px; transition: box-shadow 200ms linear; } -#weather { +#home-weather { display: table; min-height: 45px; width: 100%; cursor: pointer; } -#weather, #newFeed ul { +#home-weather, #home-new-feed ul { color: #51655f; } -#weather > span { +#home-weather > span { display: table-cell; vertical-align: middle; } -#weather > span:nth-child(odd) { +#home-weather > span:nth-child(odd) { text-align: center; padding: 0 5px; } -#weather > span:nth-child(even) { +#home-weather > span:nth-child(even) { text-align: left; line-height: 1; padding-top: 2px; } -#weather > span.wwind > span { +#home-weather > span.home-weather-wind > span { white-space: nowrap; } -#weather > span.wtide2 { +#home-weather > span.home-weather-tide:last-child { white-space: nowrap; line-height: 1.5; padding-right: 5px; } -#weather > span:nth-child(1) { +#home-weather > span:nth-child(1) { color: #bbbbbb; } -#weather > span:nth-child(3) { +#home-weather > span:nth-child(3) { color: #8795bd; } -#weather > span .fa-water, #weather > span .fa-turn-up, #weather > span .fa-turn-down { +#home-weather > span .fa-water, #home-weather > span .fa-turn-up, #home-weather > span .fa-turn-down { color: #61818a; } -#weather .comment { - text-align: center; -} -.wtooltip { +.weather-tooltip { line-height: 1.5; max-width: 150px !important; } -#minimap { +#home-minimap { text-align: center; padding: 2px 2px 0 2px; } -#minimap > img { +#home-minimap > img { max-width: 100%; } -#minimap > map > area { +#home-minimap > map > area { cursor: pointer; } -#tips { +#home-tips { display: table; width: 100%; height: 40px; } -#tipsText { +#home-tips-text { display: table-cell; vertical-align: middle; padding: 2px; } -#tipsText a { +#home-tips-text a { color: inherit; } -#tipsButton { +#home-tips-button { display: table-cell; text-align: right; padding: 10px 2px; } -#home .sidebar-body a i:hover, #devTools h3:hover::after, .popup-ohContainer .popup-tagValue:hover::after { +#home .sidebar-body a i:hover, #settings-devtools h3:hover::after, .popup-openhrs .popup-tag-value:hover::after { color: black !important; } -.easy-autocomplete + .leaflet-routing-remove-waypoint::after, #inputOverpass + .leaflet-routing-remove-waypoint::after { +.easy-autocomplete + .leaflet-routing-remove-waypoint::after, #settings-overpass-query + .leaflet-routing-remove-waypoint::after { font: var(--fa-font-solid); content: '\f002'; top: 6px; } -.navigateBg { +.popup-navigate-background { background-color: rgba(255, 255, 255, 0.75); border-radius: 5px; backdrop-filter: blur(7px); padding: 2px; } -.navigateItem { +.popup-navigate { display: none; font-size: 10pt; position: absolute; right: 25px; bottom: 18px; } -.navigateItem a:hover { +.popup-navigate a:hover { color: #333333; } -#newFeed { +#home-new-feed { font-size: 75%; color: #666666; text-align: left; margin: 5px 0; } -#newFeed ul { +#home-new-feed ul { margin-top: 5px; } -#newFeed li { +#home-new-feed li { font-family: monospace; } -#newFeed .fa-ul { +#home-new-feed .fa-ul { margin-left: 1.5em; } -#newFeed a:link, #newFeed a:hover, #newFeed a:visited { +#home-new-feed a:link, #home-new-feed a:hover, #home-new-feed a:visited { color: inherit; } -#newFeed li .co{ +#home-new-feed li .co{ font-family: monospace; } -#osmFeed { +#home-osm-feed { display: none; } -#osmFeed li .comment { +#home-osm-feed li .comment { display: block; width: 70%; text-overflow: ellipsis; @@ -241,7 +260,7 @@ input[type=text], input[type=date], input[type=number] { white-space: nowrap; opacity: 0.75; } -#osmFeed li:hover .comment { +#home-osm-feed li:hover .comment { width: 100%; white-space: normal; opacity: 1; @@ -250,7 +269,7 @@ footer { position: absolute; bottom: 0; line-height: 15px; - background-color: #dddddd; + background-color: #e5e5e5; width: 100%; min-width: 250px; text-align: center; @@ -268,7 +287,7 @@ footer > span { a { text-decoration: none; } -a:link, a:visited, a:hover, .leaflet-container a { +a:link, a:visited, a:hover, .leaflet-container a, #pois-results-sort:hover { color: var(--main-color); cursor: pointer; } @@ -287,11 +306,11 @@ h3 { margin-bottom: 10px; } -.anchor::before { +.sidebar-anchor::before { content: '\f062'; font: var(--fa-font-solid); } -.anchor { +.sidebar-anchor { display: block; position: sticky; position: -webkit-sticky; @@ -307,7 +326,7 @@ h3 { border-style: solid; text-align: center; } -.anchor:hover { +.sidebar-anchor:hover { text-decoration: none; color: black !important; } @@ -336,7 +355,7 @@ h3 { .ui-accordion-header:hover { color: var(--main-color); } -#devTools h3::after, .popup-ohContainer .popup-tagValue::after { +#settings-devtools h3::after, .popup-openhrs .popup-tag-value::after { position: absolute; font: var(--fa-font-solid); content: '\f0da'; @@ -345,7 +364,7 @@ h3 { transition: transform 150ms; padding-top: 2px; } -#devTools h3.ui-accordion-header-active::after, .popup-ohContainer .ui-accordion-header-active .popup-tagValue::after { +#settings-devtools h3.ui-accordion-header-active::after, .popup-openhrs .ui-accordion-header-active .popup-tag-value::after { transform: rotate(90deg); } @@ -448,7 +467,7 @@ h3 { line-height: 12px !important; text-align: center; } -#copyGeos { +#contextmenu-item-copygeos { font-size: 70%; pointer-events: none; } @@ -458,7 +477,7 @@ h3 { a{color:#2074B6} .leaflet-control-locate.active.following a{color:#20b674} -#msgStatus { +#modal { display: none; box-shadow: 0 1px 5px rgb(0 0 0 / 40%); font-size: 10pt; @@ -468,7 +487,7 @@ h3 { margin-bottom: 15vh; transition: margin-bottom 400ms ease-out; } -#msgStatusHead { +#modal-head { font-family: 'BerlinSans'; background-color: rgba(255, 255, 255, 0.95); border-radius: 10px 10px 0 0; @@ -476,15 +495,17 @@ h3 { color: #333333; font-size: 12pt; } -#msgStatusHead .fa-fw { +#modal-head .fa-fw { color: #555555; } -#msgStatusBody { +#modal-body:not(:has(.modal-body-addr)) { padding: 15px; min-height: 20px; } -#msgStatusBody .msgStatusBodyAddr { +#modal-body .modal-body-addr { display: block; + padding: 15px; + min-height: 20px; } @media (max-height: 350px) { .leaflet-control-zoom { @@ -523,29 +544,18 @@ h3 { transition: opacity 0.1s linear; } -#noscript { - color: #f4e6d3; - position: absolute; - width: 100%; - top: 50px; - text-align: center; - font-weight: bold; - font-size: calc(1vw + 75%); -} -#userLoc { +#popup-userloc { text-align: center; - line-height: 5; + line-height: 4; + padding-top: 10px; } -.state-onStLvl { +.control-mapillary-on-active { color: #2074B6; } -#modalT0.modalTutor { - display: block; -} -.modalTutor { +.tutorial { display: none; width: calc(100vw - 120px); min-width: 100px; @@ -562,7 +572,7 @@ h3 { z-index: 1200; position: absolute; } -.modalArrow { +.tutorial-arrow { top: 6px; background: inherit; position: absolute; @@ -570,13 +580,13 @@ h3 { height: 16px; transform: rotate(45deg); } -.modalText { +.tutorial-text { text-align: left; } -.modalText > span { +.tutorial-text > span { opacity: 0.6; } -button.modalButton { +button.tutorial-button { margin: 5px auto 0 auto; border: none; border-radius: 10px; @@ -588,15 +598,15 @@ button.modalButton { width: 70% !important; cursor: pointer; } -button.modalButton:hover { +button.tutorial-button:hover { background-color: var(--bg-hover-color); color: black; } -button.modalButton:nth-of-type(2) { +button.tutorial-button:nth-of-type(2) { width: 26px !important; } -#inputOpacity { +#control-opacity { display: none; height: 28px; width: 145px; @@ -605,7 +615,7 @@ button.modalButton:nth-of-type(2) { background-color: #ffffff; margin-top: 30px; } -#inputOpacity input[type=range] { +#control-opacity input[type=range] { background-image: linear-gradient(to right, #eee, #bbb); } input[type=range] { @@ -656,7 +666,7 @@ input[type=range]:-moz-focusring { outline: 1px solid white; outline-offset: -1px; } -#inputOpacity .leaflet-popup-close-button, #msgStatus .leaflet-popup-close-button { +#control-opacity .leaflet-popup-close-button, #modal .leaflet-popup-close-button { position: absolute; right: 5px; top: 0; @@ -666,23 +676,23 @@ input[type=range]:-moz-focusring { cursor: pointer; color: var(--main-color); } -.layerDropshadow { - filter: drop-shadow(0px 2px 1px black); -} .circleMarker { fill: #ffffff; stroke: var(--main-color); } -.poi-results-circleMarker { +.layer-visualclick { + transition: d ease 0.35s; +} +.pois-results-circleMarker { color: #ffffff; -webkit-text-stroke: 2px var(--main-color); } -.ww2radius { +.layer-ww2-radius { opacity: 0.4; } -#inputWw2 { +#control-ww2 { width: calc(100vw - 600px); height: 44px; text-align: center; @@ -691,7 +701,7 @@ input[type=range]:-moz-focusring { max-width: 800px; min-width: 300px; } -#inputWw2 a { +#control-ww2 a { position: absolute; display: table; margin: -10px; @@ -700,29 +710,26 @@ input[type=range]:-moz-focusring { width: 25px; height: 25px; } -#inputWw2 a i { +#control-ww2 a i { display: table-cell; vertical-align: middle; font-size: 20px; } -#inputWw2 div { +#control-ww2 div { font-size: 90%; font-weight: bold; margin: 4px 0; color: white; text-shadow: 0px 0px 3px black; } -#inputWw2 input { +#control-ww2 input { width: 97%; margin: auto; } -@media (min-width: 1024px) and (max-width: 1299px) { #inputWw2 { width: calc(100vw - 500px); } } -@media (min-width: 768px) and (max-width: 1023px) { #inputWw2 { width: calc(100vw - 400px); } } -@media (max-width: 767px) { #inputWw2 { width: calc(100vw - 60px); } } +@media (min-width: 1024px) and (max-width: 1299px) { #control-ww2 { width: calc(100vw - 500px); } } +@media (min-width: 768px) and (max-width: 1023px) { #control-ww2 { width: calc(100vw - 400px); } } +@media (max-width: 767px) { #control-ww2 { width: calc(100vw - 60px); } } -.sidebar-body { - scroll-behavior: smooth; -} .sidebar-body button { color: var(--main-color); border: 1px solid #cccccc; @@ -760,7 +767,7 @@ button:disabled ~ label { padding: 0; width: 100%; } -#poi-results { +#pois-results { display: none; height: auto; max-height: 65%; @@ -771,11 +778,11 @@ button:disabled ~ label { overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; - border: 2px solid #bbbbbb; + border: 2px solid #cccccc; background-color: rgba(0, 0, 0, 0.1); pointer-events: none; } -#poi-results button { +#pois-results button { display: block; position: sticky; position: -webkit-sticky; @@ -783,7 +790,6 @@ button:disabled ~ label { margin: -25px 0 5px 5px; top: 5px; } - select { padding-left: 5px; background-color: white; @@ -796,14 +802,14 @@ select:hover:enabled, button:hover:enabled:not(.fancybox-button) { background-color: var(--bg-hover-color); color: black !important; } -#poi-results-list { +#pois-results-list { display: none; font-size: 90%; height: auto; width: 100%; text-align: left; } -#poi-results-list img, .eac-category img[data-key="poi"] { +#pois-results-list img, .eac-category img[data-key='poi'] { height: 24px; display: block; object-fit: none; @@ -813,66 +819,69 @@ select:hover:enabled, button:hover:enabled:not(.fancybox-button) { outline: 1px solid rgba(0, 0, 0, 0.2); outline-offset: -1px; } -#poi-results-list td:first-child .fa-lg { +#pois-results-list td:first-child .fa-lg { opacity: 0.75; } -#poi-results-list table { +#pois-results-list table { width: 100%; border-collapse: collapse; margin-bottom: 3px; } -#poi-results-list td { +#pois-results-list td { padding: 3px 2px; } -#poi-results-list td:first-child { +#pois-results-list td:first-child { text-align: center; border-radius: 5px 0 0 5px; width: 10px; } -.popup-tagValue .fa-fw, #poi-results-list td:last-child .fa-fw { +.popup-tag-value .fa-fw, #pois-results-list td:last-child .fa-fw { font-size: 115%; width: 1.4em; } -#poi-results-list td:last-child .fa-fw { +#pois-results-list td:last-child .fa-fw { height: 1.4em; } -#poi-results-list td span { +#pois-results-list td span { display: block; padding: 0 !important; } -#poi-results-list tr { +#pois-results-list tr { border-bottom: 2px solid #ececec; } -#poi-results-list tr:last-child { +#pois-results-list tr:last-child { border-bottom: none !important; } -#poi-results-list tr:hover { +#pois-results-list tr:hover { background-color: rgba(190, 190, 190, 0.5); cursor: pointer; } -#poi-results-list .openColor-list-depends, #poi-results-list .openColor-list-undefined { +#pois-results-list .openhrs-color-depends, #pois-results-list .openhrs-color-undefined { background: linear-gradient(to right, rgba(153, 153, 153, 0.4), transparent); } -.poi-result-selected { +#pois-results-sort { + color: #777777; +} +.pois-result-selected { background-color: rgba(255, 255, 255, 0.5); } -#poi-filter { +#pois-filter { position: relative; top: 0px; height: 28px; margin: 14px 0; } -#poi-filter-in { +#pois-filter-in { border: 1px solid #cccccc; border-radius: 10px; line-height: 28px; padding: 0 24px 0 12px; width: calc(100% - 38px); } -#poi-group a { +#pois-group a { display: none; } -#poi-icons { +#pois-icons { height: auto; padding: 0 3%; overflow-y: auto; @@ -881,41 +890,28 @@ select:hover:enabled, button:hover:enabled:not(.fancybox-button) { flex: 1; position: relative; } -.custscroll { - scrollbar-width: thin; - background-repeat: no-repeat; - background-position: center bottom; - background-size: 100% 20px; -} -.custscroll::-webkit-scrollbar { - width: 7px; - background-color: var(--scr-track); -} -.custscroll::-webkit-scrollbar-thumb { - background-color: var(--scr-thumb); -} -#poi-bookm { +#pois-bookm { width: auto; position: absolute; margin: 12px; right: 2px; top: 36px; } -#poi-bookm label { +#pois-bookm label { width: auto; padding: 2px; } -.poi-checkbox { +.pois-checkbox { width: calc(50% - 4px); display: inline-block; margin: 2px; } @media (min-width: 600px) and (max-width: 767px) { - .poi-checkbox { + .pois-checkbox { width: calc(33% - 4px); } } -.poi-checkbox > label { +.pois-checkbox > label { display: inline-block; width: 100%; border-radius: 5px; @@ -923,10 +919,10 @@ select:hover:enabled, button:hover:enabled:not(.fancybox-button) { cursor: pointer; transition: background-color 100ms; } -.poi-checkbox > label:hover { +.pois-checkbox > label:hover { background-color: rgba(190, 190, 190, 0.5); } -.poi-checkbox > label > img { +.pois-checkbox > label > img { float: left; height: 24px; margin: 3px 4px 3px 2px; @@ -937,21 +933,21 @@ select:hover:enabled, button:hover:enabled:not(.fancybox-button) { outline: 2px solid rgba(0, 0, 0, 0.2); outline-offset: -1px; } -.poi-checkbox > label > input { +.pois-checkbox > label > input { display: none; } -.poi-checkbox > label > span { +.pois-checkbox > label > span { display: inline-block; overflow: hidden; width: calc(100% - 40px); height: 28px; line-height: 30px; } -.poi-checkbox-selected { +.pois-checkbox-selected { background-color: rgba(255, 255, 255, 0.8); font-weight: bold; } -.poi-loading { +.pois-loading { pointer-events: none; opacity: 0.5; } @@ -966,26 +962,26 @@ select:hover:enabled, button:hover:enabled:not(.fancybox-button) { border-radius: 20px; background-color: #ffffff; } -#walkContainer { +#walk-container { margin: 10px 0; } -#walkDesc figure { +#walk-desc figure { margin: 0 3%; } -#walkList { +#walk-list { width: calc(100% - 35px); margin: 0 5px 10px 0; } -#walkSelect { +#walk-select { position: absolute; } -#pdfContainer li { +#walk-container-pdf li { margin-bottom: 10px; } #thennow .sidebar-body { overflow-y: scroll; } -#walkDesc img, #thennow img { +#walk-desc img, #thennow img { width: 100%; max-width: 500px; border: 2px solid #cccccc; @@ -996,31 +992,31 @@ select:hover:enabled, button:hover:enabled:not(.fancybox-button) { #thennow figure { margin: 10px 3%; } -#thennow figcaption, #walkDesc figcaption { +#thennow figcaption, #walk-desc figcaption { margin-top: 5px; text-align: justify; - font-size: 90%; + font-style: normal; } #thennow img { cursor: zoom-in; } -.thennowTip { +.tooltip-thennow { text-align: center; padding: 0; } -.thennowTip img { +.tooltip-thennow img { width: 100%; min-width: 150px; filter: grayscale(1) sepia(0.3); border-radius: 10px 10px 0 0; } -.thennowTip span { +.tooltip-thennow span { padding: 0 5px; white-space: nowrap; } /* tour tab */ -#tourControls { +#tour-controls { display: inline-block; font-size: 10pt; white-space: nowrap; @@ -1028,16 +1024,16 @@ select:hover:enabled, button:hover:enabled:not(.fancybox-button) { width: 100%; padding: 8px 0; } -#tourList { +#tour-controls-list { width: calc(100% - 100px); margin: 0 5px; } -#tourFrame { +#tour-frame { height: calc(100% - 46px); width: 100%; border: none; } -#tourLoading, #thennowLoading { +#tour-loading, #thennow-loading { display: none; margin-top: 20px; position: absolute; @@ -1060,7 +1056,7 @@ select:hover:enabled, button:hover:enabled:not(.fancybox-button) { #settings .sidebar-body { text-align: left; } -#setOptions { +#settings-options { margin: 0 3%; font-size: 90%; } @@ -1105,61 +1101,61 @@ input:indeterminate + .slider::before { transform: translateX(13px); opacity: 0.5; } -.setLabel { +.settings-label { display: flex; width: 100%; border-bottom: 1px solid rgba(255, 255, 255, 0.6); margin: 7px 0 0 0; padding-bottom: 7px; } -.setLabel label:first-child { +.settings-label label:first-child { margin: auto 5px auto 0; flex: min-content; } -.setLabel:last-child { +.settings-label:last-child { border-bottom: none; } -.smallCheckbox { +.settings-checkbox-small { line-height: 20px; display: inline-block; margin-top: 5px; } -.smallCheckbox label { +.settings-checkbox-small label { margin-left: 5px; } -#inputOverpass { +#settings-overpass-query { width: calc(100% - 40px); max-width: 90%; padding-right: 22px !important; position: relative; margin: 0 !important; } -#inputAttic, #inputOverpass, #inputOpServer, #inputOpCache, #inputRevServer { +#settings-overpass-attic, #settings-overpass-query, #settings-overpass-server, #settings-overpass-cache, #settings-reverse-server { margin: 5px 0 5px 5px; } -#inputOverpass, #inputAttic, #inputOpCache { +#settings-overpass-query, #settings-overpass-attic, #settings-overpass-cache { border: 1px solid #cccccc; border-radius: 10px; padding: 0 10px; line-height: 28px; } -#inputOpCache { +#settings-overpass-cache { width: 50px; } -#devTools { +#settings-devtools { display: block; position: relative; top: 5px; border-top: 1px solid rgba(255, 255, 255, 0.6); } -#devTools > div { +#settings-devtools > div { margin: 0 3%; font-size: 90%; } -#devTools > div p { +#settings-devtools > div p { margin: 10px 0; } -#devTools > div p:first-child { +#settings-devtools > div p:first-child { margin-top: 0; } @@ -1168,7 +1164,7 @@ input:indeterminate + .slider::before { padding-left: 10px; list-style-type: none; } -#info #gotosoftware > ul { +#info-software > ul { margin: 5px 0; font-size: 90%; } @@ -1176,13 +1172,13 @@ input:indeterminate + .slider::before { filter: brightness(80%); transition: filter 100ms; } -#myprofile { +#info-profile { display: inline-block; } -#myprofile p { +#info-profile p { margin-top: 0; } -#myprofile img { +#info-profile img { cursor: pointer; width: 90px; float: left; @@ -1191,31 +1187,23 @@ input:indeterminate + .slider::before { border-radius: 100% 100% 10px 10px; shape-outside: margin-box; } -.mylinks { +.info-links { text-align: center; line-height: 20px; } -#gotoprivacy .fa-border { +#info-privacy .fa-border { border: 1px solid #cccccc; border-radius: 5px; background-color: white; } -#gotodonate table { - margin-top: 5px; - text-align: center; - width: 100%; -} -#gotodonate td { - padding: 5px 0; -} /* marker popups */ @media (max-width: 767px) { - .leaflet-control-layers-list, .leaflet-popup, #msgStatus, + .leaflet-control-layers-list, .leaflet-popup, #modal, .leaflet-control-geocoder-alternatives, .leaflet-control-geocoder-form-no-error { font-size: 9pt !important; } - .popup-imgContainer, .popup-imgContainer > a { + .popup-img-item { max-height: 175px !important; } .popup-fhrs > a > img { @@ -1239,21 +1227,21 @@ input:indeterminate + .slider::before { .leaflet-control-layers-expanded { box-shadow: 0 1px 5px rgb(0 0 0 / 40%) !important; } -.leaflet-control-layers-expanded, #msgStatus { - background-color: rgba(235, 235, 235, 0.8); +.leaflet-control-layers-expanded, #modal { + background-color: rgba(240, 240, 240, 0.8); border: none !important; backdrop-filter: blur(7px); } .leaflet-control-layers .hideLayer { display: none; } -.controlTitle { +.control-layers-title { font-weight: bold; color: var(--main-color); margin-top: 5px; } -a.controlTitle { +a.control-layers-title { display: block; text-align: right; margin-top: 0; @@ -1280,7 +1268,7 @@ a.controlTitle { color: var(--main-color); font-weight: bold; } -.leaflet-container a.leaflet-popup-close-button:hover, #msgStatus div.leaflet-popup-close-button:hover, #inputOpacity div.leaflet-popup-close-button:hover, .popup-header-button:hover { +.leaflet-container a.leaflet-popup-close-button:hover, #modal div.leaflet-popup-close-button:hover, #control-opacity div.leaflet-popup-close-button:hover, .popup-header-button:hover { color: #333333; } .popup-header-button { @@ -1290,7 +1278,7 @@ a.controlTitle { padding-left: 5px; top: -2px; } -.popup-bookm > .fa-solid { +.popup-bookmark > .fa-solid { color: goldenrod; } .popup-header { @@ -1328,25 +1316,25 @@ a.controlTitle { .popup-body { min-height: 5px; } -.popup-tagContainer { +.popup-tag { display: table; outline: none; } -.popup-tagIcon { +.popup-tag-icon { display: table-cell; padding-right: 3px; min-width: 17px; color: #555555; } -.popup-tagValue { +.popup-tag-value { display: table-cell; text-indent: -5px; padding-left: 5px; } -.popup-tagValue strong { +.popup-tag-value strong { margin-right: 4px; } -.popup-truncate { +.popup-tag-value-truncate { display: inline-block; overflow-x: hidden; text-overflow: ellipsis; @@ -1354,89 +1342,105 @@ a.controlTitle { margin-bottom: -5px; text-indent: 0; } -.popup-longDesc { +.popup-tag-long { display: block; overflow-y: auto; -webkit-overflow-scrolling: touch; - max-height: var(--popup-long-desc-height); + max-height: var(--popup-tag-long-height); text-align: justify; padding-right: 3px; } -.popup-longDesc .popup-tagIcon { +.popup-tag-long .popup-tag-icon { position: sticky; position: -webkit-sticky; top: 2px; display: block; } @media (max-height: 640px) { - .popup-longDesc { - max-height: calc(var(--popup-long-desc-height) / 2); + .popup-tag-long { + max-height: calc(var(--popup-tag-long-height) / 2); } } .popup-notes .fa-times { color: red; } .popup-notes .fa-check { color: green; } -.popup-streetSource { +.popup-comment { display: block; font-size: 80%; - padding: 2px 0 5px 25px; + text-align: right; + color: #666666; + font-style: italic; } -.popup-ohContainer .popup-tagValue { +.popup-openhrs .popup-tag-value { width: 100%; padding-right: 15px; cursor: pointer; } -.popup-ohTable, .popup-bsTable { +.popup-openhrs-table, .popup-bustime-table { text-align: center; } -.popup-ohTable { +.popup-openhrs-table { display: none; cursor: default; max-height: 170px; padding: 5px 0 5px 15px; } -.popup-bsTable { +.popup-bustime-table { border-collapse: collapse; margin: 5px 0; max-height: 108px; overflow-y: auto; -webkit-overflow-scrolling: touch; } -.popup-ohTable table { width: 100%; border-collapse: collapse; } -.popup-ohTable tr, .popup-bsTable tr { font: 80%/1.2 monospace; border: 1px solid white; } -.popup-ohTable td { padding: 2px 0; } -.popup-ohTable tr.today { font-weight: bold; } -.popup-ohTable td.weekend { background-color: #cccccc; } -.popup-ohTable td.workday { background-color: #dddddd; } -.popup-ohTable td.times, .popup-bsTable tr { background-color: #eeeeee; } -.popup-bsTable tr { text-align: left; } -.popup-bsTable tr:nth-child(1) { font-weight: bold; color: black; } -.popup-bsTable td { padding: 2px; } -.popup-bsTable td:nth-child(1) { font-weight: bold; } -.popup-bsTable td:nth-child(2) { width: 100%; } -.popup-bsTable td:nth-child(3) { white-space: nowrap; text-align: right; } +.popup-openhrs-table table { width: 100%; border-collapse: collapse; } +.popup-openhrs-table tr, .popup-bustime-table tr { font: 80%/1.2 monospace; border: 1px solid white; } +.popup-openhrs-table td { padding: 2px 0; } +.popup-openhrs-table tr.today { font-weight: bold; } +.popup-openhrs-table td.weekend { background-color: #cccccc; } +.popup-openhrs-table td.workday { background-color: #dddddd; } +.popup-openhrs-table td.times, .popup-bustime-table tr { background-color: #eeeeee; } +.popup-bustime-table tr { text-align: left; } +.popup-bustime-table tr:nth-child(1) { font-weight: bold; color: black; } +.popup-bustime-table td { padding: 2px; } +.popup-bustime-table td:nth-child(1) { font-weight: bold; } +.popup-bustime-table td:nth-child(2) { width: 100%; } +.popup-bustime-table td:nth-child(3) { white-space: nowrap; text-align: right; } #img0 { display: block; } -.popup-imgContainer { - display: none; - height: 200px; +.popup-img { margin-top: 5px; border: 2px solid #cccccc; border-radius: 5px; + text-align: center; overflow: hidden; - transition: height 200ms ease-in-out; + background-color: #dddddd; } -.popup-imgContainer.notloaded { +.popup-img-item.notloaded { height: 25px; } -.popup-imgContainer > a { +.popup-img-item { + display: none; + height: 200px; + transition: height 200ms ease-in-out; +} +.popup-img-item > a { height: inherit; - max-height: 200px; + max-height: inherit; display: block; outline: 0; cursor: zoom-in; } -.popup-imgContainer > a > img { +.popup-img-item:not(.notloaded) > a::after { + display: block; + position: sticky; + content: ''; + height: inherit; + bottom: 0; + pointer-events: none; + box-shadow: inset 0px 0px 20px rgba(0, 0, 0, 0.5); + max-height: inherit; +} +.popup-img-item > a > img { height: inherit; max-height: inherit; width: 100%; @@ -1444,17 +1448,17 @@ a.controlTitle { object-fit: cover; transition: transform 250ms ease-in-out; } -.popup-imgContainer > a > img:hover { +.popup-img-item > a:hover > img { transform: scale(1.1); } -.popup-imgAttrib { - position: relative; - bottom: 25px; +.popup-img-attrib { + position: sticky; + bottom: 0; background-color: rgba(255, 255, 255, 0.75); backdrop-filter: blur(5px); transition: padding-right 200ms ease-in-out; } -.popup-imgAttrib a, .popup-imgAttrib span { +.popup-img-attrib a, .popup-img-attrib span { height: 25px; line-height: 10px; display: flex; @@ -1463,30 +1467,26 @@ a.controlTitle { text-align: center; font-size: 6pt; } -.popup-imgAttrib, .popup-imgAttrib a, .navigateItem { +.popup-img-attrib, .popup-img-attrib a, .popup-navigate { color: #808080; } -.popup-imgAttrib .imgOpen { +.popup-img-attrib .imgOpen { color: var(--main-color); font-weight: bold; } -.popup-imgBooking { - width: 80px; - vertical-align: middle; -} .popup-facilities span { display: inline-block; } -.facYes, .openColor-true { color: #006400; } -.facLtd, .openColor-depends { color: #808000; } -.facNo, .openColor-false { color: #8b0000; } -.facGen { padding-left: 5px; white-space: nowrap; } -.facRecyc { padding-left: 5px; color: #62745f; } -.facPay { padding-left: 5px; color: #714b83; } -.facDiet { padding-left: 5px; color: #00a275; } -.openColor-list-true { background: linear-gradient(to right, rgba(0, 100, 0, 0.4), transparent); } -.openColor-list-false { background: linear-gradient(to right, rgba(139, 0, 0, 0.4), transparent); } +.popup-tag-value-yes, .popup-openhrs-color-true { color: #006400; } +.popup-tag-value-limited, .popup-openhrs-color-depends { color: #808000; } +.popup-tag-value-no, .popup-openhrs-color-false { color: #8b0000; } +.popup-tag-value-facility { padding-left: 5px; white-space: nowrap; } +.popup-tag-value-recycling { padding-left: 5px; color: #62745f; } +.popup-tag-value-payment { padding-left: 5px; color: #714b83; } +.popup-tag-value-diet { padding-left: 5px; color: #00a275; } +.openhrs-color-true { background: linear-gradient(to right, rgba(0, 100, 0, 0.4), transparent); } +.openhrs-color-false { background: linear-gradient(to right, rgba(139, 0, 0, 0.4), transparent); } .fancybox-button .fa-2x, .fancybox-close-small .fa-2x { opacity: 0.7; @@ -1539,7 +1539,7 @@ a.controlTitle { display: none; } -#bexhilldayImg { +#holiday-bexhillday { z-index: 1; position: absolute; top: 5px; @@ -1547,14 +1547,16 @@ a.controlTitle { width: 65px; filter: drop-shadow(1px 1px 2px #666); } -@keyframes xmas-anim { - 25% { transform: rotate(-5deg); } - 75% { transform: rotate(5deg); } -} -#xmasImg:hover { - animation: xmas-anim 0.5s 3 linear; +@keyframes holiday-xmas-hat-anim { + 10% { transform: rotate(10deg); } + 30% { transform: rotate(-8deg); } + 50% { transform: rotate(6deg); } + 70% { transform: rotate(-4deg); } + 90% { transform: rotate(2deg); } } -#xmasImg { +#holiday-xmas-hat:focus { animation: holiday-xmas-hat-anim 1.5s ease-out; } +#holiday-xmas-hat:active { animation: none; } +#holiday-xmas-hat { z-index: 1; position: absolute; top: 5px; @@ -1564,14 +1566,14 @@ a.controlTitle { filter: drop-shadow(0px 0px 3px #000000); transition: opacity 150ms linear; } -.xmasMapTree { +.holiday-xmas-tree { filter: drop-shadow(0px 10px 9px #ffffff); opacity: 0.9; } -@keyframes xmasMsg-anim { +@keyframes holiday-xmas-msg-anim { to { background-position: 0 500px; } } -#xmasMsg { +#holiday-xmas-msg { font-weight: bold; padding: 5px; margin-top: 10px; @@ -1579,29 +1581,29 @@ a.controlTitle { background-image: url('../../tour/itemXmas/img/popup-bg.png'); background-repeat: repeat-y; background-color: rgba(255, 255, 255, 0.6); - animation: xmasMsg-anim 15s linear infinite paused; + animation: holiday-xmas-msg-anim 15s linear infinite paused; } -.popup-xmas .leaflet-popup-content-wrapper, .leaflet-tooltip.popup-xmas, #xmasMsg { +.popup-xmas .leaflet-popup-content-wrapper, .leaflet-tooltip.popup-xmas, #holiday-xmas-msg { background-blend-mode: darken; } -#xmasMsg:hover { +#holiday-xmas-msg:hover { box-shadow: inset 0 0 4px darkred; animation-play-state: running; } -#xmasMsg > #xmasTitle { +#holiday-xmas-msg > #xmasTitle { display: flex; padding: 5px 0; text-align: center; justify-content: center; } -#xmasMsg > #xmasTitle, #xmasMsg > .comment { +#holiday-xmas-msg > #xmasTitle, #holiday-xmas-msg > .comment { color: darkgreen; } -#xmasMsg > #xmasTitle > span { +#holiday-xmas-msg > #xmasTitle > span { color: var(--main-color); padding: 0 5px; } -#xmasMsg .fa-solid { +#holiday-xmas-msg .fa-solid { margin: 15px auto; } .popup-xmas .leaflet-popup-content-wrapper, .leaflet-tooltip.popup-xmas { @@ -1616,17 +1618,17 @@ a.controlTitle { .popup-xmas .popup-header { background-color: rgba(0, 175, 0, 0.3); } -.popup-xmas .popup-imgContainer img { +.popup-xmas .popup-img img { border-color: #966464; } -.popup-xmas .popup-imgAttrib, .popup-xmas .popup-imgAttrib a { +.popup-xmas .popup-img-attrib, .popup-xmas .popup-img-attrib a { font-size: 8pt; color: green; } -.award { +.competition-award { text-shadow: 0.5px 0.5px 0 #555555; } -.leaflet-popup .award { +.leaflet-popup .competition-award { position: absolute; top: 30px; right: 15px; @@ -1634,11 +1636,11 @@ a.controlTitle { text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5), 0 0 15px white; -webkit-text-stroke: 2px rgba(0, 0, 0, 0.2); } -.commended0 { color: #800080; } -.commended1 { color: #ffd700; } -.commended2 { color: #bbbbbb; } -.commended3 { color: #d2b48c; } -.commended4, .commended5, .commended6 { color: #4d7480; } +.competition-commended0 { color: #800080; } +.competition-commended1 { color: #ffd700; } +.competition-commended2 { color: #bbbbbb; } +.competition-commended3 { color: #d2b48c; } +.competition-commended4, .competition-commended5, .competition-commended6 { color: #4d7480; } .fa-beat { --fa-animation-iteration-count: 1; @@ -1660,7 +1662,7 @@ a.controlTitle { pointer-events: none; } .leaflet-visualclick-icon:after { - content: ""; + content: ''; border-radius: 100%; height: 20px; width: 20px; diff --git a/web/assets/data/taginfo.json b/web/assets/data/taginfo.json index 337954d..8fa0af5 100644 --- a/web/assets/data/taginfo.json +++ b/web/assets/data/taginfo.json @@ -1,7 +1,7 @@ { "data_format": 1, "data_url": "https://bexhill-osm.org.uk/assets/data/taginfo.json", - "data_updated": "20231012T200000Z", + "data_updated": "20240121T200000Z", "project": { "name": "Bexhill OpenStreetMap", "description": "A highly detailed map of Bexhill-on-Sea, England. Discover art, shops, walks, history and a wealth of other information.", @@ -64,10 +64,10 @@ "key": "url:bexhillnature", "description": "URL path to an article on Bexhill Nature website, linked in an elements popup." }, { - "key": "url:booking_com", - "description": "URL path to accommodation on Booking.com, linked in an elements popup." + "key": "website:booking", + "description": "Full URL to accommodation on Booking.com, linked in an elements popup." }, { - "key": "url:ordering", + "key": "website:orders", "description": "Full URL to online food ordering for restaurants, linked in an elements popup." }, { "key": "naptan:AtcoCode", diff --git a/web/assets/img/booking_com.png b/web/assets/img/booking_com.png deleted file mode 100644 index 43e75991541085be993f77d5da0d9263179f1122..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2767 zcmV;=3NZDFP)X0{{R3pp41;meI-tVO}ghUQ-vNwZ8J@C7)E{>pxJPVo*zJMPp#1{Qhq|B z#xPNN9Yl9tc$sFn+BsW>NotrtUWG@e&qipEB~XSKpW7{)%qT)=3OIUVqP`hDaTP#y zd(iGhs?;!4gF0D&NM?>CqS!!Ti6ElfO|sh>LU<)kfF4A1HdlQ@s@Ex^%Ui0cElO)IQGO*!fIni68$fShca}0yeJPp9T(;B}nbS#Ym_Dr6KwX9}R)j66 z;!bRoJy&rapV>KGjWJVzI9h->TZvGs(=wyc3pj8Znao9Gj8LY_Mrn{UR)$2i;6Gr7 z1TSq;wcH7e#uJ;?6Q0{crOP*?))JlKiQ4*Ce5*8Ei&k`%c9XF@tJ#*Pw=t*G3p{TT zn9?Y#+6*&gO}pt9M1L4Xei%i35I%YoM12rJe-lE06G40zMS>Qd*c6@I5JG$yM1KxH zdJa8#1T}LCn%ovdeh-`451ifzICK`D+Y>~B44&KuI(HC1eFmJ{3OjlcpW6&Ob{I%~ z7o61>LVOiOdmBZ55S!QO-e<2Gp5OB#l|lt-ZR`5|6`LUH~!aouH7-+uIy_};vgXV0jyUwyzo zqPw=RU0R`UmUoWxJ*W6 znVB6~cdM(??(PvW|(L6N_ZX15#kOf zf=tVf#CjG=Ym}$XU1;glk;9XDuh-I`#fgypXd*Vc85V|plx}@KK;9>6U+lzdwMc?| z>s9QzkpT;)rT<9U%>iU91c{`Snv^7XiF{2>Vxuo7jD(~mlgX0g@nx9|KT~>_y!_6Z z-rfoT$S+X9D-LWwv}#u(q;Ea+WNTtGWaEh^hYm<-)uC0Xk`}rkEspS%bgoizrfC|D zY^VVVMR(Sa(RQSE$D9^P;3lptDgJAheDAma*sXwr#U)o1$}A2UL#ri?rsg5U2Wpi$ zfyqUXV9&A+)u7O^OmazY%@hVb{;I1ueE0pmc4*A>*r)CQ96RN=`^($07XLF4`Kpgq zJr zZd+nBvT@n~uhqTOI{VCJ_Sikst2}>ok z#Eh0dg2+d1%}89UQ50##gZ8ymcjXss37DP1fcLZ_NK>^S(ZxFVK~X>9(@;V5MJZq{eOycX2*=w# z(y|gtII38I<7!=ijBC{ogwLcxoc5?N_5dWxO@{L9_nxT?XT|VazsXe&B4vZ7Gh(%z z&4Bs6u5TI++xW>fQj{-cxf>M``uXobBF7mifg%k-Pz=utvaW$vpjhH%NTy<D+ko%MW&|<4!X_e6GrE}Gap^>;&hs$sZ5?l&f?LPsD zD*NE~@ZK{a6NdwW)g;ZYHRC2y`~|?A?(092R6}Xpm2;LlYpJaBwdkzs z>gtQdeWBrIfE-7}8LHgTUF@FLpO?chs5!%EIII@=N0?v%l=>{At`XXb{2!D%Z>&5VZuXh4m+za9oZ;`LXsp81LO@ke3qQ-`+C~g z1cy-&6@th~N^QaaK25bj%E{F>(*dzse}6Hc+5>RcZx}Fy2TZ1WVo*GoG1;F!b-DJp z1Hd=qf`AWpo!@NzC5V(o%~SCH28mC*GaydWmD;Y_k59EWZSrAxCm?U2Eb=imP+ VMYh%{_oV;;002ovPDHLkV1jM}GTQ(E diff --git a/web/assets/img/icons/bouddha.png b/web/assets/img/icons/bouddha.png new file mode 100644 index 0000000000000000000000000000000000000000..3e73feb3b39d5a7419a7e595966388e7c66bc9b4 GIT binary patch literal 493 zcmeAS@N?(olHy`uVBq!ia0vp^3P7yN!3-otGNns_lzo6th^vc>i+h0&kVFRm|NsB~ z;q8lS=kFfgd11}G!_!)KwG^#P^PlZ&u)u*~rX^FKK1-`AV;&!a{KDr~fJU*G1o;IE zGjOZunOoU&mCG|QFot=$IEGZ*s-1j$Qi}qQi{x>`n3f4!{{LS)dn=3AvAfBYjdoY} z34E{GJ1w=4|Hih~b4AbZ_0LFddiwtB=M%ro4oCj8{P!TaE%x=oApIjR?pLkZ-z4gh ztI>U}E#l~-Ih@Jdh3#L|gzxwYh$w|sH;ei+2?x4deWdxyzR6{gjd_QJR7Y6|tGL6v zCL`?$CyhnACjGdlz+vt6!NpE9Nh|QFp21Tm@mV%3r9w^1)Ka3aSaEh(nkc>#+#E1* z#beES?kG2(BfnHRKF#xADKWv*K;(gkTLQz^Xol*nCGBjE3mB7yTmn1T91TrB_?4JH zYx6O`bZ5b<&OLXZUl!ipR+n)wX2+YQDbY^fmK0gmf`#MB4D61c)I$ztaD0e0sv5J($)X~ literal 0 HcmV?d00001 diff --git a/web/assets/img/icons/church-2.png b/web/assets/img/icons/church-2.png new file mode 100644 index 0000000000000000000000000000000000000000..dbbd1e578fa757648cb1e64ca2f39bfe149fb1d0 GIT binary patch literal 372 zcmeAS@N?(olHy`uVBq!ia0vp^3P7yN!VDxY&iqyaq|^g^LR?*3T-*zMfFuO`|NsB# z#Z%{2&e>QRzrcZEk`Ysr56i4Pm(`vvS~&M+759?+Q!`FyEHMc^=KPaMS>SW|`^OhQ zI9sT@7Cc(=&tqj_iuBK!m-4g^Jz4A#Ex7A_saL&tOPSf>M3I!sOIL2Mx+9jbubt;u zMr~6x+j_Rz*7-d97i?wTdLyDKa7QB7j#^%B1HM0xy4aVuG4%w?)iBC2Eay=-XHNOi zK7%DZU4 z&bsO`8LxlH8mzf_`*3Y|p&Wzr(~>;a^9N?-9cks6V`hEOJ0au<>pzxdOW*qFhw1nO PgMh)))z4*}Q$iB}c;=N( literal 0 HcmV?d00001 diff --git a/web/assets/img/icons/mosquee.png b/web/assets/img/icons/mosquee.png new file mode 100644 index 0000000000000000000000000000000000000000..a931237a9e173d2955c78656d9d8974f32c1353d GIT binary patch literal 388 zcmeAS@N?(olHy`uVBq!ia0vp^3P7yN!3-otGNns_lv#jJh^q?*`2YX^k5BJEy?FBM z(y2QKw;!C;xGq0(VTAnxdxk!J<`xx(JU)iC1@C?XO<*et@(UJZRM9iHx^U#G6j0>5 zr;B4q#jUxM12;7*@VIJbII;NL_@5^KK_kL(+2zlRi~1jBtgBMJ!mO&jabA$f)S}#N znrfPn7ouwtF8{1cRhl1cF-zn*`yBowzW+5g%-JMz_?fcN^{4Y5p*#w*Jo$X;o9e=KQrjPWdG)sX$-MW~ zYvc6S8|G^Fy<9YP`&E0(iP`fG$NldLI;ydAm(Kn?x3laEB~9g9vsAL|INs*kPyfg8 YB}{Gim&FMpz#w4oboFyt=akR{0Pe%1R{#J2 literal 0 HcmV?d00001 diff --git a/web/assets/js/OverPassLayer.js b/web/assets/js/OverPassLayer.js index ec2b7b7..2de14b7 100644 --- a/web/assets/js/OverPassLayer.js +++ b/web/assets/js/OverPassLayer.js @@ -3,36 +3,36 @@ let eleCache = [], queryBbox = '', queryCustom = false; function show_overpass_layer(query, cacheId, options) { if (!query || query === '();') { setMsgStatus('fa-solid fa-circle-info', 'No Query', 'The OverpassAPI query string was empty.', 4); return; } - else if ($('#inputBbox').val() === 'screen' && !options.forceBbox && map.getZoom() < 15) { setMsgStatus('fa-solid fa-circle-info', 'Query Area Too Large', 'Please try zooming in to at least level 15.', 4); return; } + else if ($('#settings-bbox').val() === 'screen' && !options.forceBbox && map.getZoom() < 15) { setMsgStatus('fa-solid fa-circle-info', 'Query Area Too Large', 'Please try zooming in to at least level 15.', 4); return; } else { // show spinner, disable poi checkboxes $('.spinner').show(); - $('.poi-checkbox').addClass('poi-loading'); + $('.pois-checkbox').addClass('pois-loading'); queryBbox = '[out:json]'; - if ($('#inputAttic').val()) queryBbox += '[date:"' + new Date($('#inputAttic').val()).toISOString() + '"]'; + if ($('#settings-overpass-attic').val()) queryBbox += '[date:"' + new Date($('#settings-overpass-attic').val()).toISOString() + '"]'; // select within an area, bypassed for single poi if (options && options.bound) { - if ($('#inputBbox').val() === 'area_id' && !options.forceBbox) { + if ($('#settings-bbox').val() === 'area_id' && !options.forceBbox) { queryBbox += ';rel(' + osmRelation + ');map_to_area->.a'; - query = query.replace(/\[/g, '(area.a)['); + query = query.replaceAll('[', '(area.a)['); } - else if ($('#inputBbox').val() === 'bbox' || options.forceBbox) { + else if ($('#settings-bbox').val() === 'bbox' || options.forceBbox) { queryBbox += '[bbox:' + [mapBounds.south, mapBounds.west, mapBounds.north, mapBounds.east].join(',') + ']'; cacheId += cacheId ? 'BB' : ''; } - else if ($('#inputBbox').val() === 'screen' && !options.forceBbox) { + else if ($('#settings-bbox').val() === 'screen' && !options.forceBbox) { queryBbox += '[bbox:' + [map.getBounds()._southWest.lat, map.getBounds()._southWest.lng, map.getBounds()._northEast.lat, map.getBounds()._northEast.lng].join(',') + ']'; cacheId = ''; } } queryBbox += ';(' + query + ');'; queryCustom = options && options.custom ? true : false; - $('#btnExportQuery').prop('disabled', false); + $('#settings-overpass-export').prop('disabled', false); } const opl = new L.OverPassLayer({ - debug: $('#inputDebug').is(':checked'), + debug: $('#settings-debug').is(':checked'), query: queryBbox + 'out geom qt ' + maxOpResults + ';', - endpoint: 'https://' + $('#inputOpServer').val() + '/api/interpreter', + endpoint: 'https://' + $('#settings-overpass-server').val() + '/api/interpreter', callback: callback, cacheId: cacheId ? 'OPL' + cacheId : '', zoomTo: (options && options.zoomTo) || false @@ -59,18 +59,18 @@ L.OverPassLayer = L.FeatureGroup.extend({ const reference = { instance: self }; if (self.options.debug) console.debug('Overpass query:', encodeURI(url)); // check if cached in variable - if (eleCache[self.options.cacheId] && !$('#inputAttic').val() && $('#inputOpCache').val() > 0) { + if (eleCache[self.options.cacheId] && !$('#settings-overpass-attic').val() && $('#settings-overpass-cache').val() > 0) { self.options.callback.call(reference, eleCache[self.options.cacheId]); if (self.options.zoomTo) zoom_area(); - if (self.options.debug) console.debug('Query received from eleCache.', self.options.cacheId); + if (self.options.debug) console.debug('Query received from eleCache.' + self.options.cacheId); } // check if cached in localStorage and not expired - else if (noIframe && localStorageAvail() && !$('#inputAttic').val() && window.localStorage[self.options.cacheId] && $('#inputOpCache').val() > 0 && - (new Date(JSON.parse(window.localStorage[self.options.cacheId]).osm3s.timestamp_osm_base).getTime()+(parseInt($('#inputOpCache').val())*60*60*1000) > new Date().getTime())) { + else if (noIframe && localStorageAvail() && !$('#settings-overpass-attic').val() && window.localStorage[self.options.cacheId] && $('#settings-overpass-cache').val() > 0 && + (new Date(JSON.parse(window.localStorage[self.options.cacheId]).osm3s.timestamp_osm_base).getTime()+(parseInt($('#settings-overpass-cache').val())*60*60*1000) > new Date().getTime())) { eleCache[self.options.cacheId] = JSON.parse(window.localStorage[self.options.cacheId]); self.options.callback.call(reference, eleCache[self.options.cacheId]); if (self.options.zoomTo) zoom_area(); - if (self.options.debug) console.debug('Query received from localStorage.', self.options.cacheId); + if (self.options.debug) console.debug('Query received from localStorage.' + self.options.cacheId); } // get from overpass else $.ajax({ @@ -85,14 +85,14 @@ L.OverPassLayer = L.FeatureGroup.extend({ 'circle-info', 'No places found', 'Please try another area or query.' + - ($('#inputAttic').val() && ($('#inputBbox').val() === 'area_id') ? '
When using attic data, try changing the bounding box to something other than ' + $('#inputBbox option:selected').text() + '.' : '') + ($('#settings-overpass-attic').val() && ($('#settings-bbox').val() === 'area_id') ? '
When using attic data, try changing the bounding box to something other than ' + $('#settings-bbox option:selected').text() + '.' : '') ); // if not in iframe, cache to local storage - if (self.options.cacheId && poiList.length && !$('#inputAttic').val()) { + if (self.options.cacheId && poiList.length && !$('#settings-overpass-attic').val()) { eleCache[self.options.cacheId] = xml; if (noIframe && localStorageAvail()) window.localStorage[self.options.cacheId] = JSON.stringify(xml); } - if (self.options.debug) console.debug('Query received from ' + $('#inputOpServer').val()); + if (self.options.debug) console.debug('Query received from server ' + $('#settings-overpass-server option:selected').text()); } else self.options.statusMsg('face-frown', 'Error', 'Bad response from data server. Please try again later.'); }, @@ -109,11 +109,11 @@ L.OverPassLayer = L.FeatureGroup.extend({ return; } // fallback to main overpass server if failed on alternative - if ($('#inputOpServer').val() !== $('#inputOpServer option').eq(0).val()) { + if ($('#settings-overpass-server').val() !== $('#settings-overpass-server option').eq(0).val()) { const that = this; - that.url = this.url.replace($('#inputOpServer').val(), $('#inputOpServer option').eq(0).val()); + that.url = this.url.replace($('#settings-overpass-server').val(), $('#settings-overpass-server option').eq(0).val()); $.ajax(that); - $('#inputOpServer').prop('selectedIndex', 0); + $('#settings-overpass-server').prop('selectedIndex', 0); return; } else { @@ -134,7 +134,7 @@ L.OverPassLayer = L.FeatureGroup.extend({ } }, error: function() { - if ($('#inputDebug').is(':checked')) console.debug('ERROR OVERPASS:', encodeURI(this.url)); + if ($('#settings-debug').is(':checked')) console.debug('ERROR OVERPASS:', encodeURI(this.url)); } }); }, @@ -145,7 +145,7 @@ L.OverPassLayer = L.FeatureGroup.extend({ onRemove: function(map) { L.LayerGroup.prototype.onRemove.call(this, map); this._ids = {}; - $('#msgStatus').hide(); + $('#modal').hide(); map.off({ 'moveend': this.onMoveEnd }, this); this._map = null; } diff --git a/web/assets/js/plugins/jquery.min.js b/web/assets/js/plugins/jquery.min.js index e7e29d5..7f37b5d 100644 --- a/web/assets/js/plugins/jquery.min.js +++ b/web/assets/js/plugins/jquery.min.js @@ -1,2 +1,2 @@ -/*! jQuery v3.7.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */ -!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(ie,e){"use strict";var oe=[],r=Object.getPrototypeOf,ae=oe.slice,g=oe.flat?function(e){return oe.flat.call(e)}:function(e){return oe.concat.apply([],e)},s=oe.push,se=oe.indexOf,n={},i=n.toString,ue=n.hasOwnProperty,o=ue.toString,a=o.call(Object),le={},v=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},y=function(e){return null!=e&&e===e.window},C=ie.document,u={type:!0,src:!0,nonce:!0,noModule:!0};function m(e,t,n){var r,i,o=(n=n||C).createElement("script");if(o.text=e,t)for(r in u)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[i.call(e)]||"object":typeof e}var t="3.7.0",l=/HTML$/i,ce=function(e,t){return new ce.fn.init(e,t)};function c(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!v(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+ge+")"+ge+"*"),x=new RegExp(ge+"|>"),j=new RegExp(g),A=new RegExp("^"+t+"$"),D={ID:new RegExp("^#("+t+")"),CLASS:new RegExp("^\\.("+t+")"),TAG:new RegExp("^("+t+"|[*])"),ATTR:new RegExp("^"+p),PSEUDO:new RegExp("^"+g),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ge+"*(even|odd|(([+-]|)(\\d*)n|)"+ge+"*(?:([+-]|)"+ge+"*(\\d+)|))"+ge+"*\\)|)","i"),bool:new RegExp("^(?:"+f+")$","i"),needsContext:new RegExp("^"+ge+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ge+"*((?:-\\d)?\\d*)"+ge+"*\\)|)(?=[^-]|$)","i")},N=/^(?:input|select|textarea|button)$/i,q=/^h\d$/i,L=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,H=/[+~]/,O=new RegExp("\\\\[\\da-fA-F]{1,6}"+ge+"?|\\\\([^\\r\\n\\f])","g"),P=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},R=function(){V()},M=J(function(e){return!0===e.disabled&&fe(e,"fieldset")},{dir:"parentNode",next:"legend"});try{k.apply(oe=ae.call(ye.childNodes),ye.childNodes),oe[ye.childNodes.length].nodeType}catch(e){k={apply:function(e,t){me.apply(e,ae.call(t))},call:function(e){me.apply(e,ae.call(arguments,1))}}}function I(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(V(e),e=e||T,C)){if(11!==p&&(u=L.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return k.call(n,a),n}else if(f&&(a=f.getElementById(i))&&I.contains(e,a)&&a.id===i)return k.call(n,a),n}else{if(u[2])return k.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&e.getElementsByClassName)return k.apply(n,e.getElementsByClassName(i)),n}if(!(h[t+" "]||d&&d.test(t))){if(c=t,f=e,1===p&&(x.test(t)||m.test(t))){(f=H.test(t)&&z(e.parentNode)||e)==e&&le.scope||((s=e.getAttribute("id"))?s=ce.escapeSelector(s):e.setAttribute("id",s=S)),o=(l=Y(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+Q(l[o]);c=l.join(",")}try{return k.apply(n,f.querySelectorAll(c)),n}catch(e){h(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return re(t.replace(ve,"$1"),e,n,r)}function W(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function F(e){return e[S]=!0,e}function $(e){var t=T.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function B(t){return function(e){return fe(e,"input")&&e.type===t}}function _(t){return function(e){return(fe(e,"input")||fe(e,"button"))&&e.type===t}}function X(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&M(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function U(a){return F(function(o){return o=+o,F(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function z(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function V(e){var t,n=e?e.ownerDocument||e:ye;return n!=T&&9===n.nodeType&&n.documentElement&&(r=(T=n).documentElement,C=!ce.isXMLDoc(T),i=r.matches||r.webkitMatchesSelector||r.msMatchesSelector,ye!=T&&(t=T.defaultView)&&t.top!==t&&t.addEventListener("unload",R),le.getById=$(function(e){return r.appendChild(e).id=ce.expando,!T.getElementsByName||!T.getElementsByName(ce.expando).length}),le.disconnectedMatch=$(function(e){return i.call(e,"*")}),le.scope=$(function(){return T.querySelectorAll(":scope")}),le.cssHas=$(function(){try{return T.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}}),le.getById?(b.filter.ID=function(e){var t=e.replace(O,P);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(O,P);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},b.find.CLASS=function(e,t){if("undefined"!=typeof t.getElementsByClassName&&C)return t.getElementsByClassName(e)},d=[],$(function(e){var t;r.appendChild(e).innerHTML="",e.querySelectorAll("[selected]").length||d.push("\\["+ge+"*(?:value|"+f+")"),e.querySelectorAll("[id~="+S+"-]").length||d.push("~="),e.querySelectorAll("a#"+S+"+*").length||d.push(".#.+[+~]"),e.querySelectorAll(":checked").length||d.push(":checked"),(t=T.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),r.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&d.push(":enabled",":disabled"),(t=T.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||d.push("\\["+ge+"*name"+ge+"*="+ge+"*(?:''|\"\")")}),le.cssHas||d.push(":has"),d=d.length&&new RegExp(d.join("|")),l=function(e,t){if(e===t)return a=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!le.sortDetached&&t.compareDocumentPosition(e)===n?e===T||e.ownerDocument==ye&&I.contains(ye,e)?-1:t===T||t.ownerDocument==ye&&I.contains(ye,t)?1:o?se.call(o,e)-se.call(o,t):0:4&n?-1:1)}),T}for(e in I.matches=function(e,t){return I(e,null,null,t)},I.matchesSelector=function(e,t){if(V(e),C&&!h[t+" "]&&(!d||!d.test(t)))try{var n=i.call(e,t);if(n||le.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){h(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(O,P),e[3]=(e[3]||e[4]||e[5]||"").replace(O,P),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||I.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&I.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return D.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&j.test(n)&&(t=Y(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(O,P).toLowerCase();return"*"===e?function(){return!0}:function(e){return fe(e,t)}},CLASS:function(e){var t=s[e+" "];return t||(t=new RegExp("(^|"+ge+")"+e+"("+ge+"|$)"))&&s(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=I.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function T(e,n,r){return v(n)?ce.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?ce.grep(e,function(e){return e===n!==r}):"string"!=typeof n?ce.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(ce.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||k,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:S.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof ce?t[0]:t,ce.merge(this,ce.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:C,!0)),w.test(r[1])&&ce.isPlainObject(t))for(r in t)v(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=C.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==n.ready?n.ready(e):e(ce):ce.makeArray(e,this)}).prototype=ce.fn,k=ce(C);var E=/^(?:parents|prev(?:Until|All))/,j={children:!0,contents:!0,next:!0,prev:!0};function A(e,t){while((e=e[t])&&1!==e.nodeType);return e}ce.fn.extend({has:function(e){var t=ce(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,Ce=/^$|^module$|\/(?:java|ecma)script/i;xe=C.createDocumentFragment().appendChild(C.createElement("div")),(be=C.createElement("input")).setAttribute("type","radio"),be.setAttribute("checked","checked"),be.setAttribute("name","t"),xe.appendChild(be),le.checkClone=xe.cloneNode(!0).cloneNode(!0).lastChild.checked,xe.innerHTML="",le.noCloneChecked=!!xe.cloneNode(!0).lastChild.defaultValue,xe.innerHTML="",le.option=!!xe.lastChild;var ke={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function Se(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&fe(e,t)?ce.merge([e],n):n}function Ee(e,t){for(var n=0,r=e.length;n",""]);var je=/<|&#?\w+;/;function Ae(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function Me(e,t){return fe(e,"table")&&fe(11!==t.nodeType?t:t.firstChild,"tr")&&ce(e).children("tbody")[0]||e}function Ie(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function We(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Fe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(_.hasData(e)&&(s=_.get(e).events))for(i in _.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),C.head.appendChild(r[0])},abort:function(){i&&i()}}});var Jt,Kt=[],Zt=/(=)\?(?=&|$)|\?\?/;ce.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Kt.pop()||ce.expando+"_"+jt.guid++;return this[e]=!0,e}}),ce.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Zt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Zt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=v(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Zt,"$1"+r):!1!==e.jsonp&&(e.url+=(At.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||ce.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=ie[r],ie[r]=function(){o=arguments},n.always(function(){void 0===i?ce(ie).removeProp(r):ie[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Kt.push(r)),o&&v(i)&&i(o[0]),o=i=void 0}),"script"}),le.createHTMLDocument=((Jt=C.implementation.createHTMLDocument("").body).innerHTML="
",2===Jt.childNodes.length),ce.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(le.createHTMLDocument?((r=(t=C.implementation.createHTMLDocument("")).createElement("base")).href=C.location.href,t.head.appendChild(r)):t=C),o=!n&&[],(i=w.exec(e))?[t.createElement(i[1])]:(i=Ae([e],t,o),o&&o.length&&ce(o).remove(),ce.merge([],i.childNodes)));var r,i,o},ce.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(ce.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},ce.expr.pseudos.animated=function(t){return ce.grep(ce.timers,function(e){return t===e.elem}).length},ce.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=ce.css(e,"position"),c=ce(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=ce.css(e,"top"),u=ce.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),v(t)&&(t=t.call(e,n,ce.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},ce.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){ce.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===ce.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===ce.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=ce(e).offset()).top+=ce.css(e,"borderTopWidth",!0),i.left+=ce.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-ce.css(r,"marginTop",!0),left:t.left-i.left-ce.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===ce.css(e,"position"))e=e.offsetParent;return e||J})}}),ce.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;ce.fn[t]=function(e){return R(this,function(e,t,n){var r;if(y(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),ce.each(["top","left"],function(e,n){ce.cssHooks[n]=Ye(le.pixelPosition,function(e,t){if(t)return t=Ge(e,n),_e.test(t)?ce(e).position()[n]+"px":t})}),ce.each({Height:"height",Width:"width"},function(a,s){ce.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){ce.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return R(this,function(e,t,n){var r;return y(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?ce.css(e,t,i):ce.style(e,t,n,i)},s,n?e:void 0,n)}})}),ce.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ce.fn[t]=function(e){return this.on(t,e)}}),ce.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),ce.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){ce.fn[n]=function(e,t){return 0+~]|"+ge+")"+ge+"*"),x=new RegExp(ge+"|>"),j=new RegExp(g),A=new RegExp("^"+t+"$"),D={ID:new RegExp("^#("+t+")"),CLASS:new RegExp("^\\.("+t+")"),TAG:new RegExp("^("+t+"|[*])"),ATTR:new RegExp("^"+p),PSEUDO:new RegExp("^"+g),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ge+"*(even|odd|(([+-]|)(\\d*)n|)"+ge+"*(?:([+-]|)"+ge+"*(\\d+)|))"+ge+"*\\)|)","i"),bool:new RegExp("^(?:"+f+")$","i"),needsContext:new RegExp("^"+ge+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ge+"*((?:-\\d)?\\d*)"+ge+"*\\)|)(?=[^-]|$)","i")},N=/^(?:input|select|textarea|button)$/i,q=/^h\d$/i,L=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,H=/[+~]/,O=new RegExp("\\\\[\\da-fA-F]{1,6}"+ge+"?|\\\\([^\\r\\n\\f])","g"),P=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},M=function(){V()},R=J(function(e){return!0===e.disabled&&fe(e,"fieldset")},{dir:"parentNode",next:"legend"});try{k.apply(oe=ae.call(ye.childNodes),ye.childNodes),oe[ye.childNodes.length].nodeType}catch(e){k={apply:function(e,t){me.apply(e,ae.call(t))},call:function(e){me.apply(e,ae.call(arguments,1))}}}function I(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(V(e),e=e||T,C)){if(11!==p&&(u=L.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return k.call(n,a),n}else if(f&&(a=f.getElementById(i))&&I.contains(e,a)&&a.id===i)return k.call(n,a),n}else{if(u[2])return k.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&e.getElementsByClassName)return k.apply(n,e.getElementsByClassName(i)),n}if(!(h[t+" "]||d&&d.test(t))){if(c=t,f=e,1===p&&(x.test(t)||m.test(t))){(f=H.test(t)&&U(e.parentNode)||e)==e&&le.scope||((s=e.getAttribute("id"))?s=ce.escapeSelector(s):e.setAttribute("id",s=S)),o=(l=Y(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+Q(l[o]);c=l.join(",")}try{return k.apply(n,f.querySelectorAll(c)),n}catch(e){h(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return re(t.replace(ve,"$1"),e,n,r)}function W(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function F(e){return e[S]=!0,e}function $(e){var t=T.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function B(t){return function(e){return fe(e,"input")&&e.type===t}}function _(t){return function(e){return(fe(e,"input")||fe(e,"button"))&&e.type===t}}function z(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&R(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function X(a){return F(function(o){return o=+o,F(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function U(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function V(e){var t,n=e?e.ownerDocument||e:ye;return n!=T&&9===n.nodeType&&n.documentElement&&(r=(T=n).documentElement,C=!ce.isXMLDoc(T),i=r.matches||r.webkitMatchesSelector||r.msMatchesSelector,r.msMatchesSelector&&ye!=T&&(t=T.defaultView)&&t.top!==t&&t.addEventListener("unload",M),le.getById=$(function(e){return r.appendChild(e).id=ce.expando,!T.getElementsByName||!T.getElementsByName(ce.expando).length}),le.disconnectedMatch=$(function(e){return i.call(e,"*")}),le.scope=$(function(){return T.querySelectorAll(":scope")}),le.cssHas=$(function(){try{return T.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}}),le.getById?(b.filter.ID=function(e){var t=e.replace(O,P);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(O,P);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},b.find.CLASS=function(e,t){if("undefined"!=typeof t.getElementsByClassName&&C)return t.getElementsByClassName(e)},d=[],$(function(e){var t;r.appendChild(e).innerHTML="",e.querySelectorAll("[selected]").length||d.push("\\["+ge+"*(?:value|"+f+")"),e.querySelectorAll("[id~="+S+"-]").length||d.push("~="),e.querySelectorAll("a#"+S+"+*").length||d.push(".#.+[+~]"),e.querySelectorAll(":checked").length||d.push(":checked"),(t=T.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),r.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&d.push(":enabled",":disabled"),(t=T.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||d.push("\\["+ge+"*name"+ge+"*="+ge+"*(?:''|\"\")")}),le.cssHas||d.push(":has"),d=d.length&&new RegExp(d.join("|")),l=function(e,t){if(e===t)return a=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!le.sortDetached&&t.compareDocumentPosition(e)===n?e===T||e.ownerDocument==ye&&I.contains(ye,e)?-1:t===T||t.ownerDocument==ye&&I.contains(ye,t)?1:o?se.call(o,e)-se.call(o,t):0:4&n?-1:1)}),T}for(e in I.matches=function(e,t){return I(e,null,null,t)},I.matchesSelector=function(e,t){if(V(e),C&&!h[t+" "]&&(!d||!d.test(t)))try{var n=i.call(e,t);if(n||le.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){h(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(O,P),e[3]=(e[3]||e[4]||e[5]||"").replace(O,P),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||I.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&I.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return D.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&j.test(n)&&(t=Y(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(O,P).toLowerCase();return"*"===e?function(){return!0}:function(e){return fe(e,t)}},CLASS:function(e){var t=s[e+" "];return t||(t=new RegExp("(^|"+ge+")"+e+"("+ge+"|$)"))&&s(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=I.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function T(e,n,r){return v(n)?ce.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?ce.grep(e,function(e){return e===n!==r}):"string"!=typeof n?ce.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(ce.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||k,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:S.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof ce?t[0]:t,ce.merge(this,ce.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:C,!0)),w.test(r[1])&&ce.isPlainObject(t))for(r in t)v(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=C.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==n.ready?n.ready(e):e(ce):ce.makeArray(e,this)}).prototype=ce.fn,k=ce(C);var E=/^(?:parents|prev(?:Until|All))/,j={children:!0,contents:!0,next:!0,prev:!0};function A(e,t){while((e=e[t])&&1!==e.nodeType);return e}ce.fn.extend({has:function(e){var t=ce(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,Ce=/^$|^module$|\/(?:java|ecma)script/i;xe=C.createDocumentFragment().appendChild(C.createElement("div")),(be=C.createElement("input")).setAttribute("type","radio"),be.setAttribute("checked","checked"),be.setAttribute("name","t"),xe.appendChild(be),le.checkClone=xe.cloneNode(!0).cloneNode(!0).lastChild.checked,xe.innerHTML="",le.noCloneChecked=!!xe.cloneNode(!0).lastChild.defaultValue,xe.innerHTML="",le.option=!!xe.lastChild;var ke={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function Se(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&fe(e,t)?ce.merge([e],n):n}function Ee(e,t){for(var n=0,r=e.length;n",""]);var je=/<|&#?\w+;/;function Ae(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function Re(e,t){return fe(e,"table")&&fe(11!==t.nodeType?t:t.firstChild,"tr")&&ce(e).children("tbody")[0]||e}function Ie(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function We(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Fe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(_.hasData(e)&&(s=_.get(e).events))for(i in _.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),C.head.appendChild(r[0])},abort:function(){i&&i()}}});var Jt,Kt=[],Zt=/(=)\?(?=&|$)|\?\?/;ce.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Kt.pop()||ce.expando+"_"+jt.guid++;return this[e]=!0,e}}),ce.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Zt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Zt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=v(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Zt,"$1"+r):!1!==e.jsonp&&(e.url+=(At.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||ce.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=ie[r],ie[r]=function(){o=arguments},n.always(function(){void 0===i?ce(ie).removeProp(r):ie[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Kt.push(r)),o&&v(i)&&i(o[0]),o=i=void 0}),"script"}),le.createHTMLDocument=((Jt=C.implementation.createHTMLDocument("").body).innerHTML="
",2===Jt.childNodes.length),ce.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(le.createHTMLDocument?((r=(t=C.implementation.createHTMLDocument("")).createElement("base")).href=C.location.href,t.head.appendChild(r)):t=C),o=!n&&[],(i=w.exec(e))?[t.createElement(i[1])]:(i=Ae([e],t,o),o&&o.length&&ce(o).remove(),ce.merge([],i.childNodes)));var r,i,o},ce.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(ce.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},ce.expr.pseudos.animated=function(t){return ce.grep(ce.timers,function(e){return t===e.elem}).length},ce.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=ce.css(e,"position"),c=ce(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=ce.css(e,"top"),u=ce.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),v(t)&&(t=t.call(e,n,ce.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},ce.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){ce.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===ce.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===ce.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=ce(e).offset()).top+=ce.css(e,"borderTopWidth",!0),i.left+=ce.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-ce.css(r,"marginTop",!0),left:t.left-i.left-ce.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===ce.css(e,"position"))e=e.offsetParent;return e||J})}}),ce.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;ce.fn[t]=function(e){return M(this,function(e,t,n){var r;if(y(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),ce.each(["top","left"],function(e,n){ce.cssHooks[n]=Ye(le.pixelPosition,function(e,t){if(t)return t=Ge(e,n),_e.test(t)?ce(e).position()[n]+"px":t})}),ce.each({Height:"height",Width:"width"},function(a,s){ce.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){ce.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return M(this,function(e,t,n){var r;return y(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?ce.css(e,t,i):ce.style(e,t,n,i)},s,n?e:void 0,n)}})}),ce.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ce.fn[t]=function(e){return this.on(t,e)}}),ce.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)}}),ce.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){ce.fn[n]=function(e,t){return 0=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=_(t);var e=this.min,i=this.max,n=t.min,t=t.max,o=t.x>=e.x&&n.x<=i.x,t=t.y>=e.y&&n.y<=i.y;return o&&t},overlaps:function(t){t=_(t);var e=this.min,i=this.max,n=t.min,t=t.max,o=t.x>e.x&&n.xe.y&&n.y=n.lat&&i.lat<=o.lat&&e.lng>=n.lng&&i.lng<=o.lng},intersects:function(t){t=g(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),t=t.getNorthEast(),o=t.lat>=e.lat&&n.lat<=i.lat,t=t.lng>=e.lng&&n.lng<=i.lng;return o&&t},overlaps:function(t){t=g(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),t=t.getNorthEast(),o=t.lat>e.lat&&n.late.lng&&n.lng","http://www.w3.org/2000/svg"===(Wt.firstChild&&Wt.firstChild.namespaceURI));function y(t){return 0<=navigator.userAgent.toLowerCase().indexOf(t)}var b={ie:pt,ielt9:mt,edge:n,webkit:ft,android:gt,android23:vt,androidStock:yt,opera:xt,chrome:wt,gecko:bt,safari:Pt,phantom:Lt,opera12:o,win:Tt,ie3d:Mt,webkit3d:zt,gecko3d:_t,any3d:Ct,mobile:Zt,mobileWebkit:St,mobileWebkit3d:Et,msPointer:kt,pointer:Ot,touch:Bt,touchNative:At,mobileOpera:It,mobileGecko:Rt,retina:Nt,passiveEvents:Dt,canvas:jt,svg:Ht,vml:!Ht&&function(){try{var t=document.createElement("div"),e=(t.innerHTML='',t.firstChild);return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}(),inlineSvg:Wt,mac:0===navigator.platform.indexOf("Mac"),linux:0===navigator.platform.indexOf("Linux")},Ft=b.msPointer?"MSPointerDown":"pointerdown",Ut=b.msPointer?"MSPointerMove":"pointermove",Vt=b.msPointer?"MSPointerUp":"pointerup",qt=b.msPointer?"MSPointerCancel":"pointercancel",Gt={touchstart:Ft,touchmove:Ut,touchend:Vt,touchcancel:qt},Kt={touchstart:function(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&O(e);ee(t,e)},touchmove:ee,touchend:ee,touchcancel:ee},Yt={},Xt=!1;function Jt(t,e,i){return"touchstart"!==e||Xt||(document.addEventListener(Ft,$t,!0),document.addEventListener(Ut,Qt,!0),document.addEventListener(Vt,te,!0),document.addEventListener(qt,te,!0),Xt=!0),Kt[e]?(i=Kt[e].bind(this,i),t.addEventListener(Gt[e],i,!1),i):(console.warn("wrong event specified:",e),u)}function $t(t){Yt[t.pointerId]=t}function Qt(t){Yt[t.pointerId]&&(Yt[t.pointerId]=t)}function te(t){delete Yt[t.pointerId]}function ee(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){for(var i in e.touches=[],Yt)e.touches.push(Yt[i]);e.changedTouches=[e],t(e)}}var ie=200;function ne(t,i){t.addEventListener("dblclick",i);var n,o=0;function e(t){var e;1!==t.detail?n=t.detail:"mouse"===t.pointerType||t.sourceCapabilities&&!t.sourceCapabilities.firesTouchEvents||((e=Ne(t)).some(function(t){return t instanceof HTMLLabelElement&&t.attributes.for})&&!e.some(function(t){return t instanceof HTMLInputElement||t instanceof HTMLSelectElement})||((e=Date.now())-o<=ie?2===++n&&i(function(t){var e,i,n={};for(i in t)e=t[i],n[i]=e&&e.bind?e.bind(t):e;return(t=n).type="dblclick",n.detail=2,n.isTrusted=!1,n._simulated=!0,n}(t)):n=1,o=e))}return t.addEventListener("click",e),{dblclick:i,simDblclick:e}}var oe,se,re,ae,he,le,ue=we(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ce=we(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),de="webkitTransition"===ce||"OTransition"===ce?ce+"End":"transitionend";function _e(t){return"string"==typeof t?document.getElementById(t):t}function pe(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];return"auto"===(i=i&&"auto"!==i||!document.defaultView?i:(t=document.defaultView.getComputedStyle(t,null))?t[e]:null)?null:i}function P(t,e,i){t=document.createElement(t);return t.className=e||"",i&&i.appendChild(t),t}function T(t){var e=t.parentNode;e&&e.removeChild(t)}function me(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function fe(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function ge(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function ve(t,e){return void 0!==t.classList?t.classList.contains(e):0<(t=xe(t)).length&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(t)}function M(t,e){var i;if(void 0!==t.classList)for(var n=F(e),o=0,s=n.length;othis.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),t=this._limitCenter(i,this._zoom,g(t));return i.equals(t)||this.panTo(t,e),this._enforcingBounds=!1,this},panInside:function(t,e){var i=m((e=e||{}).paddingTopLeft||e.padding||[0,0]),n=m(e.paddingBottomRight||e.padding||[0,0]),o=this.project(this.getCenter()),t=this.project(t),s=this.getPixelBounds(),i=_([s.min.add(i),s.max.subtract(n)]),s=i.getSize();return i.contains(t)||(this._enforcingBounds=!0,n=t.subtract(i.getCenter()),i=i.extend(t).getSize().subtract(s),o.x+=n.x<0?-i.x:i.x,o.y+=n.y<0?-i.y:i.y,this.panTo(this.unproject(o),e),this._enforcingBounds=!1),this},invalidateSize:function(t){if(!this._loaded)return this;t=l({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize(),i=(this._sizeChanged=!0,this._lastCenter=null,this.getSize()),n=e.divideBy(2).round(),o=i.divideBy(2).round(),n=n.subtract(o);return n.x||n.y?(t.animate&&t.pan?this.panBy(n):(t.pan&&this._rawPanBy(n),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(a(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){var e,i;return t=this._locateOptions=l({timeout:1e4,watch:!1},t),"geolocation"in navigator?(e=a(this._handleGeolocationResponse,this),i=a(this._handleGeolocationError,this),t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t)):this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e;this._container._leaflet_id&&(e=t.code,t=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout"),this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+t+"."}))},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e,i,n=new v(t.coords.latitude,t.coords.longitude),o=n.toBounds(2*t.coords.accuracy),s=this._locateOptions,r=(s.setView&&(e=this.getBoundsZoom(o),this.setView(n,s.maxZoom?Math.min(e,s.maxZoom):e)),{latlng:n,bounds:o,timestamp:t.timestamp});for(i in t.coords)"number"==typeof t.coords[i]&&(r[i]=t.coords[i]);this.fire("locationfound",r)}},addHandler:function(t,e){return e&&(e=this[t]=new e(this),this._handlers.push(e),this.options[t]&&e.enable()),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}for(var t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),T(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(r(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)T(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){e=P("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=e),e},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new s(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=g(t),i=m(i||[0,0]);var n=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),r=t.getNorthWest(),t=t.getSouthEast(),i=this.getSize().subtract(i),t=_(this.project(t,n),this.project(r,n)).getSize(),r=b.any3d?this.options.zoomSnap:1,a=i.x/t.x,i=i.y/t.y,t=e?Math.max(a,i):Math.min(a,i),n=this.getScaleZoom(t,n);return r&&(n=Math.round(n/(r/100))*(r/100),n=e?Math.ceil(n/r)*r:Math.floor(n/r)*r),Math.max(o,Math.min(s,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new p(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){t=this._getTopLeftPoint(t,e);return new f(t,t.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var i=this.options.crs;return e=void 0===e?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs,t=(e=void 0===e?this._zoom:e,i.zoom(t*i.scale(e)));return isNaN(t)?1/0:t},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(w(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(m(t),e)},layerPointToLatLng:function(t){t=m(t).add(this.getPixelOrigin());return this.unproject(t)},latLngToLayerPoint:function(t){return this.project(w(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(w(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(g(t))},distance:function(t,e){return this.options.crs.distance(w(t),w(e))},containerPointToLayerPoint:function(t){return m(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return m(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){t=this.containerPointToLayerPoint(m(t));return this.layerPointToLatLng(t)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(w(t)))},mouseEventToContainerPoint:function(t){return De(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){t=this._container=_e(t);if(!t)throw new Error("Map container not found.");if(t._leaflet_id)throw new Error("Map container is already initialized.");S(t,"scroll",this._onScroll,this),this._containerId=h(t)},_initLayout:function(){var t=this._container,e=(this._fadeAnimated=this.options.fadeAnimation&&b.any3d,M(t,"leaflet-container"+(b.touch?" leaflet-touch":"")+(b.retina?" leaflet-retina":"")+(b.ielt9?" leaflet-oldie":"")+(b.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":"")),pe(t,"position"));"absolute"!==e&&"relative"!==e&&"fixed"!==e&&"sticky"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Z(this._mapPane,new p(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(M(t.markerPane,"leaflet-zoom-hide"),M(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e,i){Z(this._mapPane,new p(0,0));var n=!this._loaded,o=(this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset"),this._zoom!==e);this._moveStart(o,i)._move(t,e)._moveEnd(o),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,i,n){void 0===e&&(e=this._zoom);var o=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),n?i&&i.pinch&&this.fire("zoom",i):((o||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return r(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){Z(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={};var e=t?k:S;e((this._targets[h(this._container)]=this)._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),b.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){r(this._resizeRequest),this._resizeRequest=x(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var i,n=[],o="mouseout"===e||"mouseover"===e,s=t.target||t.srcElement,r=!1;s;){if((i=this._targets[h(s)])&&("click"===e||"preclick"===e)&&this._draggableMoved(i)){r=!0;break}if(i&&i.listens(e,!0)){if(o&&!We(s,t))break;if(n.push(i),o)break}if(s===this._container)break;s=s.parentNode}return n=n.length||r||o||!this.listens(e,!0)?n:[this]},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e,i=t.target||t.srcElement;!this._loaded||i._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(i)||("mousedown"===(e=t.type)&&Me(i),this._fireDOMEvent(t,e))},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,i){"click"===t.type&&((a=l({},t)).type="preclick",this._fireDOMEvent(a,a.type,i));var n=this._findEventTargets(t,e);if(i){for(var o=[],s=0;sthis.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),n=this._getCenterOffset(t)._divideBy(1-1/n);if(!0!==i.animate&&!this.getSize().contains(n))return!1;x(function(){this._moveStart(!0,i.noMoveStart||!1)._animateZoom(t,e,!0)},this)}return!0},_animateZoom:function(t,e,i,n){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,M(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:n}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(a(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&z(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function Ue(t){return new B(t)}var B=et.extend({options:{position:"topright"},initialize:function(t){c(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),t=t._controlCorners[i];return M(e,"leaflet-control"),-1!==i.indexOf("bottom")?t.insertBefore(e,t.firstChild):t.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map&&(T(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null),this},_refocusOnMap:function(t){this._map&&t&&0",e=document.createElement("div");return e.innerHTML=t,e.firstChild},_addItem:function(t){var e,i=document.createElement("label"),n=this._map.hasLayer(t.layer),n=(t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=n):e=this._createRadioElement("leaflet-base-layers_"+h(this),n),this._layerControlInputs.push(e),e.layerId=h(t.layer),S(e,"click",this._onInputClick,this),document.createElement("span")),o=(n.innerHTML=" "+t.name,document.createElement("div"));return i.appendChild(o),o.appendChild(e),o.appendChild(n),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(i),this._checkDisabledLayers(),i},_onInputClick:function(){if(!this._preventClick){var t,e,i=this._layerControlInputs,n=[],o=[];this._handlingClick=!0;for(var s=i.length-1;0<=s;s--)t=i[s],e=this._getLayer(t.layerId).layer,t.checked?n.push(e):t.checked||o.push(e);for(s=0;se.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section,e=(this._preventClick=!0,S(t,"click",O),this.expand(),this);setTimeout(function(){k(t,"click",O),e._preventClick=!1})}})),qe=B.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=P("div",e+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,i,n,o){i=P("a",i,n);return i.innerHTML=t,i.href="#",i.title=e,i.setAttribute("role","button"),i.setAttribute("aria-label",e),Ie(i),S(i,"click",Re),S(i,"click",o,this),S(i,"click",this._refocusOnMap,this),i},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";z(this._zoomInButton,e),z(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),!this._disabled&&t._zoom!==t.getMinZoom()||(M(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),!this._disabled&&t._zoom!==t.getMaxZoom()||(M(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}}),Ge=(A.mergeOptions({zoomControl:!0}),A.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new qe,this.addControl(this.zoomControl))}),B.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=P("div",e),n=this.options;return this._addScales(n,e+"-line",i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=P("div",e,i)),t.imperial&&(this._iScale=P("div",e,i))},_update:function(){var t=this._map,e=t.getSize().y/2,t=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(t)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t);this._updateScale(this._mScale,e<1e3?e+" m":e/1e3+" km",e/t)},_updateImperial:function(t){var e,i,t=3.2808399*t;5280Leaflet'},initialize:function(t){c(this,t),this._attributions={}},onAdd:function(t){for(var e in(t.attributionControl=this)._container=P("div","leaflet-control-attribution"),Ie(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",function(){this.removeAttribution(t.layer.getAttribution())},this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t&&(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update()),this},removeAttribution:function(t){return t&&this._attributions[t]&&(this._attributions[t]--,this._update()),this},_update:function(){if(this._map){var t,e=[];for(t in this._attributions)this._attributions[t]&&e.push(t);var i=[];this.options.prefix&&i.push(this.options.prefix),e.length&&i.push(e.join(", ")),this._container.innerHTML=i.join(' ')}}}),n=(A.mergeOptions({attributionControl:!0}),A.addInitHook(function(){this.options.attributionControl&&(new Ke).addTo(this)}),B.Layers=Ve,B.Zoom=qe,B.Scale=Ge,B.Attribution=Ke,Ue.layers=function(t,e,i){return new Ve(t,e,i)},Ue.zoom=function(t){return new qe(t)},Ue.scale=function(t){return new Ge(t)},Ue.attribution=function(t){return new Ke(t)},et.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled&&(this._enabled=!1,this.removeHooks()),this},enabled:function(){return!!this._enabled}})),ft=(n.addTo=function(t,e){return t.addHandler(e,this),this},{Events:e}),Ye=b.touch?"touchstart mousedown":"mousedown",Xe=it.extend({options:{clickTolerance:3},initialize:function(t,e,i,n){c(this,n),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(S(this._dragStartTarget,Ye,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Xe._dragging===this&&this.finishDrag(!0),k(this._dragStartTarget,Ye,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){var e,i;this._enabled&&(this._moved=!1,ve(this._element,"leaflet-zoom-anim")||(t.touches&&1!==t.touches.length?Xe._dragging===this&&this.finishDrag():Xe._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||((Xe._dragging=this)._preventOutline&&Me(this._element),Le(),re(),this._moving||(this.fire("down"),i=t.touches?t.touches[0]:t,e=Ce(this._element),this._startPoint=new p(i.clientX,i.clientY),this._startPos=Pe(this._element),this._parentScale=Ze(e),i="mousedown"===t.type,S(document,i?"mousemove":"touchmove",this._onMove,this),S(document,i?"mouseup":"touchend touchcancel",this._onUp,this)))))},_onMove:function(t){var e;this._enabled&&(t.touches&&1e&&(i.push(t[n]),o=n);oe.max.x&&(i|=2),t.ye.max.y&&(i|=8),i}function ri(t,e,i,n){var o=e.x,e=e.y,s=i.x-o,r=i.y-e,a=s*s+r*r;return 0this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()t.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(l=!l);return l||yi.prototype._containsPoint.call(this,t,!0)}});var wi=ci.extend({initialize:function(t,e){c(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,o=d(t)?t:t.features;if(o){for(e=0,i=o.length;es.x&&(r=i.x+a-s.x+o.x),i.x-r-n.x<(a=0)&&(r=i.x-n.x),i.y+e+o.y>s.y&&(a=i.y+e-s.y+o.y),i.y-a-n.y<0&&(a=i.y-n.y),(r||a)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([r,a]))))},_getAnchor:function(){return m(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}})),Ii=(A.mergeOptions({closePopupOnClick:!0}),A.include({openPopup:function(t,e,i){return this._initOverlay(Bi,t,e,i).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),o.include({bindPopup:function(t,e){return this._popup=this._initOverlay(Bi,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&(this instanceof ci||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e;this._popup&&this._map&&(Re(t),e=t.layer||t.target,this._popup._source!==e||e instanceof fi?(this._popup._source=e,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}}),Ai.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){Ai.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){Ai.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=Ai.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=P("div",t),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+h(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,i=this._map,n=this._container,o=i.latLngToContainerPoint(i.getCenter()),i=i.layerPointToContainerPoint(t),s=this.options.direction,r=n.offsetWidth,a=n.offsetHeight,h=m(this.options.offset),l=this._getAnchor(),i="top"===s?(e=r/2,a):"bottom"===s?(e=r/2,0):(e="center"===s?r/2:"right"===s?0:"left"===s?r:i.xthis.options.maxZoom||nthis.options.maxZoom||void 0!==this.options.minZoom&&oi.max.x)||!e.wrapLat&&(t.yi.max.y))return!1}return!this.options.bounds||(e=this._tileCoordsToBounds(t),g(this.options.bounds).overlaps(e))},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),i=n.add(i);return[e.unproject(n,t.z),e.unproject(i,t.z)]},_tileCoordsToBounds:function(t){t=this._tileCoordsToNwSe(t),t=new s(t[0],t[1]);return t=this.options.noWrap?t:this._map.wrapLatLngBounds(t)},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var t=t.split(":"),e=new p(+t[0],+t[1]);return e.z=+t[2],e},_removeTile:function(t){var e=this._tiles[t];e&&(T(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){M(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=u,t.onmousemove=u,b.ielt9&&this.options.opacity<1&&C(t,this.options.opacity)},_addTile:function(t,e){var i=this._getTilePos(t),n=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),a(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&x(a(this._tileReady,this,t,null,o)),Z(o,i),this._tiles[n]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var n=this._tileCoordsToKey(t);(i=this._tiles[n])&&(i.loaded=+new Date,this._map._fadeAnimated?(C(i.el,0),r(this._fadeFrame),this._fadeFrame=x(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(M(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),b.ielt9||!this._map._fadeAnimated?x(this._pruneTiles,this):setTimeout(a(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new p(this._wrapX?H(t.x,this._wrapX):t.x,this._wrapY?H(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new f(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});var Di=Ni.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,(e=c(this,e)).detectRetina&&b.retina&&0')}}catch(t){}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),zt={_initContainer:function(){this._container=P("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Wi.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=Vi("shape");M(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=Vi("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[h(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;T(e),t.removeInteractiveTarget(e),delete this._layers[h(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,o=t._container;o.stroked=!!n.stroke,o.filled=!!n.fill,n.stroke?(e=e||(t._stroke=Vi("stroke")),o.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=d(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(o.removeChild(e),t._stroke=null),n.fill?(i=i||(t._fill=Vi("fill")),o.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(o.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),n=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+n+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){fe(t._container)},_bringToBack:function(t){ge(t._container)}},qi=b.vml?Vi:ct,Gi=Wi.extend({_initContainer:function(){this._container=qi("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=qi("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){T(this._container),k(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){var t,e,i;this._map._animatingZoom&&this._bounds||(Wi.prototype._update.call(this),e=(t=this._bounds).getSize(),i=this._container,this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),Z(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update"))},_initPath:function(t){var e=t._path=qi("path");t.options.className&&M(e,t.options.className),t.options.interactive&&M(e,"leaflet-interactive"),this._updateStyle(t),this._layers[h(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){T(t._path),t.removeInteractiveTarget(t._path),delete this._layers[h(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,t=t.options;e&&(t.stroke?(e.setAttribute("stroke",t.color),e.setAttribute("stroke-opacity",t.opacity),e.setAttribute("stroke-width",t.weight),e.setAttribute("stroke-linecap",t.lineCap),e.setAttribute("stroke-linejoin",t.lineJoin),t.dashArray?e.setAttribute("stroke-dasharray",t.dashArray):e.removeAttribute("stroke-dasharray"),t.dashOffset?e.setAttribute("stroke-dashoffset",t.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),t.fill?(e.setAttribute("fill",t.fillColor||t.color),e.setAttribute("fill-opacity",t.fillOpacity),e.setAttribute("fill-rule",t.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,dt(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),n="a"+i+","+(Math.max(Math.round(t._radiusY),1)||i)+" 0 1,0 ",e=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+n+2*i+",0 "+n+2*-i+",0 ";this._setPath(t,e)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){fe(t._path)},_bringToBack:function(t){ge(t._path)}});function Ki(t){return b.svg||b.vml?new Gi(t):null}b.vml&&Gi.include(zt),A.include({getRenderer:function(t){t=(t=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer)||(this._renderer=this._createRenderer());return this.hasLayer(t)||this.addLayer(t),t},_getPaneRenderer:function(t){var e;return"overlayPane"!==t&&void 0!==t&&(void 0===(e=this._paneRenderers[t])&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e)},_createRenderer:function(t){return this.options.preferCanvas&&Ui(t)||Ki(t)}});var Yi=xi.extend({initialize:function(t,e){xi.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=g(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});Gi.create=qi,Gi.pointsToPath=dt,wi.geometryToLayer=bi,wi.coordsToLatLng=Li,wi.coordsToLatLngs=Ti,wi.latLngToCoords=Mi,wi.latLngsToCoords=zi,wi.getFeature=Ci,wi.asFeature=Zi,A.mergeOptions({boxZoom:!0});var _t=n.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){S(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){k(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){T(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),re(),Le(),this._startPoint=this._map.mouseEventToContainerPoint(t),S(document,{contextmenu:Re,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=P("div","leaflet-zoom-box",this._container),M(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var t=new f(this._point,this._startPoint),e=t.getSize();Z(this._box,t.min),this._box.style.width=e.x+"px",this._box.style.height=e.y+"px"},_finish:function(){this._moved&&(T(this._box),z(this._container,"leaflet-crosshair")),ae(),Te(),k(document,{contextmenu:Re,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){1!==t.which&&1!==t.button||(this._finish(),this._moved&&(this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(a(this._resetState,this),0),t=new s(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point)),this._map.fitBounds(t).fire("boxzoomend",{boxZoomBounds:t})))},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}}),Ct=(A.addInitHook("addHandler","boxZoom",_t),A.mergeOptions({doubleClickZoom:!0}),n.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom(),n=e.options.zoomDelta,i=t.originalEvent.shiftKey?i-n:i+n;"center"===e.options.doubleClickZoom?e.setZoom(i):e.setZoomAround(t.containerPoint,i)}})),Zt=(A.addInitHook("addHandler","doubleClickZoom",Ct),A.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0}),n.extend({addHooks:function(){var t;this._draggable||(t=this._map,this._draggable=new Xe(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))),M(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){z(this._map._container,"leaflet-grab"),z(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t,e=this._map;e._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity?(t=g(this._map.options.maxBounds),this._offsetLimit=_(this._map.latLngToContainerPoint(t.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(t.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))):this._offsetLimit=null,e.fire("movestart").fire("dragstart"),e.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){var e,i;this._map.options.inertia&&(e=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos,this._positions.push(i),this._times.push(e),this._prunePositions(e)),this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;1e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t))},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-e+i)%t+e-i,n=(n+e+i)%t-e-i,t=Math.abs(o+i)e.getMaxZoom()&&1' + $('.spinner').html() + '', @@ -68,32 +69,32 @@ $.extend($.fancybox.defaults, { // set swipe triggers for touch devices // close sidebar -$('.sidebar-header').on('swipeleft', function() { $('.sidebar-close:visible').click(); }); +$('.sidebar-header').on('swipeleft', function() { $('.sidebar-close:visible').trigger('click'); }); // prev/next tour iframe -$('#tourControls') - .on('swiperight', function() { $('#tourPrev').trigger('click'); }) - .on('swipeleft', function() { $('#tourNext').trigger('click'); }) +$('#tour-controls') + .on('swiperight', function() { $('#tour-controls-prev').trigger('click'); }) + .on('swipeleft', function() { $('#tour-controls-next').trigger('click'); }) .on('wheel', function(e) { - if (e.originalEvent.deltaY > 0) $('#tourNext').trigger('click'); - else if (e.originalEvent.deltaY < 0) $('#tourPrev').trigger('click'); + if (e.originalEvent.deltaY > 0) $('#tour-controls-next').trigger('click'); + else if (e.originalEvent.deltaY < 0) $('#tour-controls-prev').trigger('click'); e.preventDefault(); }); -$('.sidebar-tabs li').click(function() { +$('.sidebar-tabs li').on('click', function() { // get current sidebar-tab actTab = ($('.sidebar.collapsed').length || actTab === 'closing') ? 'none' : $('.sidebar-pane.active').attr('id'); // resize links on minimap if (actTab === 'home') { - if (!$('#weather:visible').length && noIframe) { showWeather(); showEditFeed(); } - setTimeout(function() { $('#minimap > map').imageMapResize(); }, 400); + if (!$('#home-weather:visible').length && noIframe) { showWeather(); showEditFeed(); } + setTimeout(function() { $('#home-minimap > map').imageMapResize(); }, 400); } - if (actTab === 'pois') $('#poi-filter-in').trigger('input'); + if (actTab === 'pois') $('#pois-filter-in').trigger('input'); if (actTab === 'tour') { - $('#tourList').trigger('change'); + $('#tour-controls-list').trigger('change'); $('.sidebar-tabs ul li [href="#tour"] .sidebar-notif:visible').hide(); } if (actTab === 'thennow' && actImgLayer !== 'thennow') tour('thennow', '', false); - setTimeout(function() { $('.custscroll').trigger('scroll'); }, 10); + setTimeout(function() { $('.theme-scroll').trigger('scroll'); }, 10); // animate map recentre on sidebar open/close, matches sidebar transition-duration of 400ms if ($(window).width() >= 768 && $(window).width() < 1024) { let x = 0, timer = setInterval(function() { @@ -104,9 +105,9 @@ $('.sidebar-tabs li').click(function() { permalinkSet(); }); // no sidebar-tab -$('.sidebar-close').click(function() { +$('.sidebar-close').on('click', function() { actTab = 'closing'; - $('.sidebar-tabs li.active').click(); + $('.sidebar-tabs li.active').trigger('click'); }); // ignore map single click in some cases @@ -119,19 +120,18 @@ L.Map.addInitHook(function() { function check_later(e) { clear_h(); // clear msg status box - if ($('#msgStatus:visible').length) { + if ($('#modal:visible').length) { clickOutline.clearLayers(); - $('#msgStatus').hide(); + $('#modal').hide(); } - // ignore map click if... low zoom / dragging walk markers / layerNoclick / overlay control is open / spinner is shown / popup is open on screen - else if (map.getZoom() >= 15 && !$('.leaflet-marker-draggable, .layerNoclick').length && $('.leaflet-control-layers').outerWidth() === 44 && !imageOverlay.getLayers().length && + // ignore map click if... low zoom / dragging walk markers / layer-noclick / overlay control is open / spinner is shown / popup is open on screen + else if (map.getZoom() >= 15 && !$('.leaflet-marker-draggable, .layer-noclick').length && ($('.leaflet-control-layers').outerWidth() <= 44) && !imageOverlay.getLayers().length && !$('.spinner:visible').length && !($('.leaflet-popup').length && map.getBounds().contains(map.layerPointToLatLng($('.leaflet-popup')[0]._leaflet_pos)))) { that.fire('visualclick', L.Util.extend(e, { type: 'visualclick' })); - console.log($('.leaflet-control-layers').outerWidth()); // drop marker and reverse lookup on single click h = setTimeout(function() { clickOutline.clearLayers().addLayer(L.circleMarker(e.latlng, { - className: 'circleMarker', + className: 'circleMarker layer-visualclick', radius: 10, weight: 2, opacity: 1, @@ -139,20 +139,20 @@ L.Map.addInitHook(function() { interactive: noTouch ? true : false, bubblingMouseEvents: false }).on('click' , function() { - if ($('#msgStatus .msgStatusBodyAddr').length) $('#msgStatus .msgStatusBodyAddr').click(); + if ($('#modal .modal-body-addr').length) $('#modal .modal-body-addr').trigger('click'); })); reverseQuery(e, 1); }, 350); } // highlight action to enable map click again else if (!$('.leaflet-popup, .leaflet-control-layers-expanded, .leaflet-marker-draggable').length) { - if (imageOverlay.getLayers().length) $('#btnClearmap .fa-solid').addClass('fa-beat-fade'); - else if ($('.layerNoclick').length) $('#inputOpacity .fa-solid').addClass('fa-beat-fade'); + if (imageOverlay.getLayers().length) $('#control-clearlayers .fa-solid').addClass('fa-beat-fade'); + else if ($('.layer-noclick').length) $('#control-opacity .fa-solid').addClass('fa-beat-fade'); else if (map.getZoom() < 15) $('.leaflet-control-zoom-in .fa-solid').addClass('fa-beat-fade'); } } function clear_h() { - $('#btnClearmap .fa-solid, #inputOpacity .fa-solid, .leaflet-control-zoom-in .fa-solid').removeClass('fa-beat-fade'); + $('#control-clearlayers .fa-solid, #control-opacity .fa-solid, .leaflet-control-zoom-in .fa-solid').removeClass('fa-beat-fade'); if (h !== null) { clearTimeout(h); h = null; @@ -199,38 +199,36 @@ const map = new L.map('map', { index: 6, callback: panoView }, '-', { - text: '', + text: '', index: 7, callback: copyGeos }] }).whenReady(function() { - map.attributionControl.setPrefix(''); + map.attributionControl.setPrefix(''); if (!noIframe) { - $('#devTools').hide(); + $('#settings-devtools').hide(); $('.leaflet-control-locate').hide(); - $('#btnBookm').parent().hide(); + $('#control-bookmarks').parent().hide(); map.attributionControl.addAttribution('Bexhill-OSM'); } if (!localStorageAvail()) { - $('#devTools').hide(); - $('#btnReset').parent().hide(); - $('#btnBookm').parent().hide(); + $('#settings-devtools').hide(); + $('#settings-cleardata').parent().hide(); + $('#control-bookmarks').parent().hide(); } // sidebar information sidebar.fadeIn(); - $('.sidebar-tabs, .sidebar-close, .leaflet-bar a, button, #setOptions .setLabel').tooltip(tooltipDef); + $('body').removeClass('preload'); + $('.sidebar-tabs, .sidebar-close, .leaflet-bar a, button, #settings-options .settings-label').tooltip(tooltipDef); getTips('random'); if (actTab === defTab && noIframe) { showWeather(); showEditFeed(); } - else $('#weather').hide(); - $('footer > span').append( - new Date().getFullYear() + ' | v' + - $('script').last().attr('src').split('v=')[1] + '' - ); - $('#walkList, #tourList').trigger('change'); - if (!noTouch) $('#pdfContainer a').removeAttr('data-fancybox'); + else $('#home-weather').hide(); + $('footer > span').append(new Date().getFullYear() + ' | v' + version + ''); + $('#walk-list, #tour-controls-list').trigger('change'); + if (!noTouch) $('#walk-container-pdf a').removeAttr('data-fancybox'); // metadata badges updated via cronjob.sh const dailyCache = '?d=' + new Date().getFullYear() + new Date().getMonth() + new Date().getDate(); - $('#info #gotoabout .mylinks').append('

' + + $('#info-about .info-links').append('

' + '
' + '

' + '
' + @@ -239,132 +237,137 @@ const map = new L.map('map', { ); // add overlay opacity slider to layer control $('.leaflet-top.leaflet-right').append( - '
' + + '
' + '' + '
' + '
' ); - $('.leaflet-bottom.leaflet-right').prepend('
'); + $('.leaflet-bottom.leaflet-right').prepend(''); // back to top button - $('.anchor') + $('.sidebar-anchor') .hide() .attr('title', 'Return to top') - .click(function() { - $(this).parent()[0].scroll({ top: 0, behavior: 'smooth' }); + .on('click', function() { + $(this).parent().scrollTop(0); }) - .parent().scroll(function() { - if ($(this).scrollTop() > 350) $(this).find('.anchor').fadeIn(200); - else $(this).find('.anchor').fadeOut(200); + .parent().on('scroll', function() { + if ($(this).scrollTop() > 350) $(this).find('.sidebar-anchor').fadeIn(200); + else $(this).find('.sidebar-anchor').fadeOut(200); }); // scroll shadow - $('.custscroll').scroll(function() { + $('.theme-scroll').on('scroll', function() { const scrollPos = Math.abs(this.scrollHeight - this.clientHeight - this.scrollTop); const scrollOpacity = scrollPos < 300 ? Math.round(scrollPos / 60) / 10 : 0.5; - $(this).css('background-image', 'linear-gradient(rgba(0, 0, 0, 0), rgba(var(--scroll-shadow), ' + scrollOpacity + '))'); + $(this).css('background-image', 'linear-gradient(transparent, rgba(var(--scroll-shadow), ' + scrollOpacity + '))'); }).trigger('scroll'); setTimeout(setOverlayLabel, 10); - // tutorial modals - if (localStorageAvail() && !window.localStorage.tutorial) window.localStorage.tutorial = ''; - if (noPermalink && noIframe && localStorageAvail() && window.localStorage.tutorial.indexOf('modals') === -1) { - const showModalTutor = function(txt, sty) { - $('#sidebar').before( - '
' + - '
' + - '
' + (sty.id+1) + '/0: ' + txt + '
' + - '' + - (!sty.last ? ' ' : '') + - '
' - ); - L.DomEvent.disableClickPropagation($('#modalT' + sty.id)[0]).disableScrollPropagation($('#modalT' + sty.id)[0]); - $('.modalText > span > span').text(sty.id+1); - $('#modalT' + sty.id + ' .modalButton').first().on('click', function() { - $(this).parent().fadeOut(100, function() { $(this).remove(); }); - if ($('#modalT' + (sty.id+1)).length) $('#modalT' + (sty.id+1)).fadeIn(100, function() { $(this).find('button').first().focus(); }); - else window.localStorage.tutorial += 'modals;'; - }); - if (!sty.last) $('#modalT' + sty.id + ' .modalButton').last().on('click', function() { - $(this).parent().fadeOut(100, function() { $('.modalTutor').remove(); }); - }); - $('#modalT' + sty.id).keydown(function(e) { - if (e.keyCode === 27) $('#modalT' + sty.id + ' .modalButton').last().click(); - }); - }; - showModalTutor( - 'Choose from a growing number of modern and historical maps.' + (noTouch ? '
Tapping CTRL will fade loaded overlays in and out.' : ''), - { id: 0, pos: [10, 70], dir: 'right' } - ); - showModalTutor( - 'Display articles on Bexhill\'s history; from dinosaurs, to Martello towers, to WWII incidents.', - { id: 1, pos: [140, 45], dir: 'left' } - ); - showModalTutor( - 'This button will clear any map markers.
Zoom in and ' + (noTouch ? 'click' : 'tap') + ' on the map to find information on almost any place.', - { id: 2, pos: [250, 65 + Math.round(sidebar.width())], dir: 'left', last: true } - ); - $('#modalT0 button').first().focus(); - } // easter holiday decorations if (new Date().getMonth() === 2 && new Date().getDate() >= 29 && new Date().getDate() <= 31) $('#home .sidebar-header-text').html($('#home .sidebar-header-text').html().replace('O', '🥚')); // bexhill day holiday decorations - else if (new Date().getMonth() === 7 && new Date().getDate() === 22) sidebar.append(''); + else if (new Date().getMonth() === 7 && new Date().getDate() === 22) sidebar.append(''); // halloween holiday decorations else if (new Date().getMonth() === 9 && new Date().getDate() >= 15 ) $('#home .sidebar-header-text').html($('#home .sidebar-header-text').html().replace('O', '🎃')); // xmas holiday decorations else if ((new Date().getMonth() === 10 && new Date().getDate() >= 30) || new Date().getMonth() === 11) { - $('html').css({ '--main-color': '#b00000', '--second-color': '#993c3c' }); + $('html').css({ '--main-color': '#ca3535', '--second-color': '#a23030' }); // central - L.imageOverlay('assets/img/holidays/xmasMapTree.svg', [[50.84090, 0.47320], [50.84055, 0.47370]], { className: 'xmasMapTree' }).addTo(map); + L.imageOverlay('assets/img/holidays/xmasMapTree.svg', [[50.84090, 0.47320], [50.84055, 0.47370]], { className: 'holiday-xmas-tree' }).addTo(map); // little common - L.imageOverlay('assets/img/holidays/xmasMapTree.svg', [[50.84545, 0.43400], [50.84510, 0.43350]], { className: 'xmasMapTree' }).addTo(map); - sidebar.append(''); - $('#homeBox').after('
' + + L.imageOverlay('assets/img/holidays/xmasMapTree.svg', [[50.84545, 0.43400], [50.84510, 0.43350]], { className: 'holiday-xmas-tree' }).addTo(map); + // sidley + L.imageOverlay('assets/img/holidays/xmasMapTree.svg', [[50.85600, 0.47330], [50.85570, 0.47280]], { className: 'holiday-xmas-tree' }).addTo(map); + // santa hat + sidebar.append(''); + // window competition + $('#home-box').after('
' + '
~ Christmas Window Display Competition ~
' + '
2023\'s theme is \'Christmas Celebrations\', in association with Bexhill Community Events Group
' + '
'); } // prevent click-through on map controls - L.DomEvent.disableClickPropagation($('#inputOpacity')[0]).disableScrollPropagation($('#inputOpacity')[0]); - L.DomEvent.disableClickPropagation($('#msgStatus')[0]).disableScrollPropagation($('#msgStatus')[0]); + L.DomEvent.disableClickPropagation($('#control-opacity')[0]).disableScrollPropagation($('#control-opacity')[0]); + L.DomEvent.disableClickPropagation($('#modal')[0]).disableScrollPropagation($('#modal')[0]); $('.leaflet-control, .leaflet-popup').on('contextmenu', function(e) { e.stopPropagation(); }); - $('.leaflet-control-geocoder-form').click(function(e) { e.stopPropagation(); }); + $('.leaflet-control-geocoder-form').on('click', function(e) { e.stopPropagation(); }); // refocus status message on mouseover - $('#msgStatus').on('mouseover tap', function() { if ($(this).is(':animated')) $(this).stop(true).css('opacity', 1); }); + $('#modal').on('mouseenter tap', function() { if ($(this).is(':animated')) $(this).stop(true).css('opacity', 1); }); // add delay after load for sidebar to animate open setTimeout(function() { - $('#minimap > map').imageMapResize(); + $('#home-minimap > map').imageMapResize(); if ($(window).width() >= 768 && $(window).width() < 1024) map.invalidateSize(); }, 500); // filter poi using keywords - $('#poi-filter-in').on('input', function() { - $('.poi-checkbox input').each(function() { - if ($(this).data('keyword').indexOf($('#poi-filter-in').val().toLowerCase()) != -1 || $(this).parent('.poi-checkbox-selected').length) $(this).parent().parent().show(); + $('#pois-filter-in').on('input', function() { + $('.pois-checkbox input').each(function() { + if ($(this).data('keyword').indexOf($('#pois-filter-in').val().toLowerCase()) != -1 || $(this).parent('.pois-checkbox-selected').length) $(this).parent().parent().show(); else $(this).parent().parent().hide(); }); - $('.poi-group').each(function() { + $('.pois-group').each(function() { $(this).show(); - if (!$(this).find('.poi-checkbox:visible').length) $(this).hide(); + if (!$(this).find('.pois-checkbox:visible').length) $(this).hide(); }); - $('#poi-filter').css('position', $('#poi-filter-in').val() ? 'sticky' : ''); - $('#poi-icons .comment').html(!$('.poi-group .poi-checkbox:visible').length ? 'No places found.' : 'Make up to ' + maxPOICheckbox + ' selections at a time.'); + $('#pois-filter').css('position', $('#pois-filter-in').val() ? 'sticky' : ''); + $('#pois-icons .comment').html(!$('.pois-group .pois-checkbox:visible').length ? 'No places found.' : 'Make up to ' + maxPOICheckbox + ' selections at a time.'); }); - $('#poi-filter .leaflet-routing-remove-waypoint').on('click', function() { $('#poi-filter-in').val('').trigger('input'); }); + $('#pois-filter .leaflet-routing-remove-waypoint').on('click', function() { $('#pois-filter-in').val('').trigger('input'); }); // set attic data max date - $('#inputAttic').prop('max', new Date().toISOString().substring(0,10)); + $('#settings-overpass-attic').prop('max', new Date().toISOString().substring(0,10)); // clear loading elements if (spinner > 0) spinner--; else $('.spinner').fadeOut(500); + // tutorial modals + if (localStorageAvail() && !window.localStorage.tutorial) window.localStorage.tutorial = ''; + if (noPermalink && noIframe && localStorageAvail() && window.localStorage.tutorial.indexOf('modals') === -1) { setTimeout(function() { + const showModalTutor = function(txt, sty) { + $('#sidebar').before( + '
' + + '
' + + '
' + (sty.id+1) + '/0: ' + txt + '
' + + '' + + (!sty.last ? ' ' : '') + + '
' + ); + L.DomEvent.disableClickPropagation($('#tutorial' + sty.id)[0]).disableScrollPropagation($('#tutorial' + sty.id)[0]); + $('.tutorial-text > span > span').text(sty.id+1); + $('#tutorial' + sty.id + ' .tutorial-button').first().on('click', function() { + $(this).parent().fadeOut(100, function() { $(this).remove(); }); + if ($('#tutorial' + (sty.id+1)).length) $('#tutorial' + (sty.id+1)).fadeIn(100, function() { $(this).find('button').first().trigger('focus'); }); + else window.localStorage.tutorial += 'modals;'; + }); + if (!sty.last) $('#tutorial' + sty.id + ' .tutorial-button').last().on('click', function() { + $(this).parent().fadeOut(100, function() { $('.tutorial').remove(); }); + }); + $('#tutorial' + sty.id).on('keydown', function(e) { + if (e.keyCode === 27) $('#tutorial' + sty.id + ' .tutorial-button').last().trigger('click'); + }); + }; + showModalTutor( + 'Choose from a growing number of modern and historical maps.' + (noTouch ? '
Tapping CTRL will fade loaded overlays in and out.' : ''), + { id: 0, pos: [10, 70], dir: 'right' } + ); + showModalTutor( + 'Display articles on Bexhill\'s history; from dinosaurs, to Martello towers, to WWII incidents.', + { id: 1, pos: [140, 45], dir: 'left' } + ); + showModalTutor( + 'This button will clear any map markers.
Zoom in and ' + (noTouch ? 'click' : 'tap') + ' on the map to find information on almost any place.', + { id: 2, pos: [250, 65 + Math.round(sidebar.width())], dir: 'left', last: true } + ); + $('#tutorial0').fadeIn(500); + $('#tutorial0 button').first().trigger('focus'); + }, 1000); } }).on('contextmenu.show', function(e) { - $('#copyGeos').html(L.Util.formatNum(e.latlng.lat, 3) + ', ' + L.Util.formatNum(e.latlng.lng, 3) + ' | ' + wgs84ToGridRef(e.latlng.lat, e.latlng.lng, 3) + ''); + $('#contextmenu-item-copygeos').html(L.Util.formatNum(e.latlng.lat, 3) + ', ' + L.Util.formatNum(e.latlng.lng, 3) + ' | ' + wgs84ToGridRef(e.latlng.lat, e.latlng.lng, 3) + ''); // https://www.opentopodata.org $.ajax({ url: 'https://bexhill-osm.opentopodata.org/v1/eudem25m?locations=' + e.latlng.lat + ',' + e.latlng.lng, dataType: 'json', mimeType: 'application/json', success: function(json) { - if (json.status === 'OK') $('#copyGeos .ele').html('
Elevation: ' + ($('#inputUnit').is(':checked') ? L.Util.formatNum(json.results[0].elevation, 2) + ' m' : L.Util.formatNum(json.results[0].elevation*3.280839895, 2) + ' ft')); + if (json.status === 'OK') $('#contextmenu-item-copygeos .ele').html('
Elevation: ' + ($('#settings-unit').is(':checked') ? L.Util.formatNum(json.results[0].elevation, 2) + ' m' : L.Util.formatNum(json.results[0].elevation*3.280839895, 2) + ' ft')); else this.error(); }, - error: function() { if ($('#inputDebug').is(':checked')) console.debug('ERROR OPENTOPODATA:', encodeURI(this.url)); } + error: function() { if ($('#settings-debug').is(':checked')) console.debug('ERROR OPENTOPODATA:', encodeURI(this.url)); } }); // show walkHere if user located within map and accuracy is high if (lc._active && lc._event && map.options.maxBounds && map.options.maxBounds.contains(lc._event.latlng) && map.getZoom() >= 14 && lc._circle.getRadius() <= 100) $('.leaflet-contextmenu-item').eq(1).show(); @@ -379,27 +382,27 @@ const map = new L.map('map', { // hide tooltip if (e.popup._source.getTooltip()) e.popup._source.getTooltip().setOpacity(0); // add/remove favourites - if ($('a.popup-bookm').length) { + if ($('a.popup-bookmark').length) { if (!window.localStorage.favourites) window.localStorage.favourites = ''; - if (window.localStorage.favourites.indexOf(elementType(osmId) + '(' + osmId.slice(1) + ');') >= 0) popupThis.find($('a.popup-bookm i').removeClass('fa-regular').addClass('fa-solid')); - $('a.popup-bookm').unbind('click').click(function() { - if ($('a.popup-bookm i.fa-solid').length) { + if (window.localStorage.favourites.indexOf(elementType(osmId) + '(' + osmId.slice(1) + ');') >= 0) popupThis.find($('a.popup-bookmark i').removeClass('fa-regular').addClass('fa-solid')); + $('a.popup-bookmark').off('click').on('click', function() { + if ($('a.popup-bookmark i.fa-solid').length) { window.localStorage.favourites = window.localStorage.favourites.replace(elementType(osmId) + '(' + osmId.slice(1) + ');', ''); - popupThis.find($('a.popup-bookm i').removeClass('fa-solid fa-beat').addClass('fa-regular')); + popupThis.find($('a.popup-bookmark i').removeClass('fa-solid fa-beat').addClass('fa-regular')); } else { window.localStorage.favourites = window.localStorage.favourites + elementType(osmId) + '(' + osmId.slice(1) + ');'; - popupThis.find($('a.popup-bookm i').removeClass('fa-regular').addClass('fa-solid fa-beat')); + popupThis.find($('a.popup-bookmark i').removeClass('fa-regular').addClass('fa-solid fa-beat')); } }); } // edit on osm.org - $('.popup-edit').unbind('click').click(function() { + $('.popup-edit').off('click').on('click', function() { popupWindow('popup', 'https://www.openstreetmap.org/edit?' + elementType(osmId) + '=' + osmId.slice(1) + '#map=19/' + e.popup._latlng.lat + '/' + e.popup._latlng.lng, 'editWindow'); }); - popupThis.find($('.popup-header > a, .popup-facilities i, .navigateItem a')).tooltip(tooltipDef); + popupThis.find($('.popup-header > a, .popup-facilities i, .popup-navigate [title]')).tooltip(tooltipDef); // opening-hours accordion - popupThis.find($('.popup-ohContainer')).accordion({ + popupThis.find($('.popup-openhrs')).accordion({ heightStyle: 'content', animate: 150, collapsible: true, @@ -418,16 +421,16 @@ const map = new L.map('map', { '' + 'Hygiene: ' + result.RatingValue + '' ).removeClass('notloaded'); - if ($('#inputDebug').is(':checked')) console.debug('Food Hygiene Rating:', result); + if ($('#settings-debug').is(':checked')) console.debug('Food Hygiene Rating:', result); }, error: function() { popupThis.find($('.popup-fhrs')).empty(); - if ($('#inputDebug').is(':checked')) console.debug('ERROR FHRS:', encodeURI(this.url)); + if ($('#settings-debug').is(':checked')) console.debug('ERROR FHRS:', encodeURI(this.url)); } }); // https://www.travelinedata.org.uk/traveline-open-data/nextbuses-api // show bus times - if (popupThis.find($('.popup-bsTable')).length) $.ajax({ + if (popupThis.find($('.popup-bustime-table')).length) $.ajax({ type: 'POST', url: 'https://cors.bridged.cc/' + 'https://nextbus.mxdata.co.uk/nextbuses/1.0/1', headers: { 'Authorization': 'Basic ' + btoa(window.BOSM.trvllneApi.u + ':' + window.BOSM.trvllneApi.p), 'x-cors-grida-api-key': window.BOSM.corsKey }, @@ -443,105 +446,104 @@ const map = new L.map('map', { '' + '' + new Date().toISOString() + '' + '12345' + - '' + popupThis.find($('.popup-bsTable')).data('naptan') + '' + + '' + popupThis.find($('.popup-bustime-table')).data('naptan') + '' + '' + '' + '', success: function(xml) { const numResults = $(xml).find('MonitoredVehicleJourney').length; if (numResults) { - popupThis.find($('.popup-bsTable')).empty(); + popupThis.find($('.popup-bustime-table')).empty(); for (let c = 0; c < numResults; c++) { const departTime = $(xml).find('ExpectedDepartureTime').eq(c).text() ? $(xml).find('ExpectedDepartureTime').eq(c).text() : $(xml).find('AimedDepartureTime').eq(c).text(); const departTimer = minToTime((new Date(departTime) - new Date()) / 60000); - popupThis.find($('.popup-bsTable')).append( + popupThis.find($('.popup-bustime-table')).append( '' + $(xml).find('PublishedLineName').eq(c).text() + '' + '' + $(xml).find('DirectionName').eq(c).text() + '' + '' + (departTimer === -1 ? 'Due' : (departTimer + ' (' + new Date(departTime).toLocaleTimeString(lang, { hour: '2-digit', minute: '2-digit' }) + ')')) + '' ); } - popupThis.find($('.popup-bsTable')).after(''); + popupThis.find($('.popup-bustime-table')).after(''); if (e.popup.options.autoPan) e.popup._adjustPan(); } - else popupThis.find($('.popup-bsTable')).html('No buses due at this time.'); - if ($('#inputDebug').is(':checked')) console.debug('Nextbus:', xml); + else popupThis.find($('.popup-bustime-table')).html('No buses due at this time.'); + if ($('#settings-debug').is(':checked')) console.debug('Nextbus:', xml); }, error: function() { - popupThis.find($('.popup-bsTable').empty()); - if ($('#inputDebug').is(':checked')) console.debug('ERROR BUSES:', encodeURI(this.url)); + popupThis.find($('.popup-bustime-table').empty()); + if ($('#settings-debug').is(':checked')) console.debug('ERROR BUSES:', encodeURI(this.url)); } }); highlightOutline(osmId, 1); // highlight in results list and add openpopup to permalink - if (poiList.length && !popupThis.find($('span#userLoc')).length && !$('#inputDebug').is(':checked')) { - popupThis.find($('#poi-results-list tr#' + osmId).addClass('poi-result-selected')); - if ($('.poi-result-selected').length) $('.poi-result-selected')[0].scrollIntoView({ behavior: 'smooth', block: 'center' }); + if (poiList.length && !popupThis.find($('#popup-userloc')).length && !$('#settings-debug').is(':checked')) { + popupThis.find($('#pois-results-list tr#' + osmId).addClass('pois-result-selected')); + if ($('.pois-result-selected').length) $('.pois-result-selected')[0].scrollIntoView({ block: 'center' }); markerId = osmId; permalinkSet(); } - if (popupThis.find($('.popup-imgContainer')).length) { + if (popupThis.find($('.popup-img')).length) { // reduce height of long descriptions if image exists - if (popupThis.find($('.popup-longDesc')).length) popupThis.find($('.popup-longDesc')).css('--popup-long-desc-height', '150px'); + if (popupThis.find($('.popup-tag-long')).length) popupThis.find($('.popup-tag-long')).css('--popup-tag-long-height', '150px'); setTimeout(function() { - popupThis.find($('.popup-imgContainer').each(function(i, element) { + popupThis.find($('.popup-img-item').each(function(i, element) { // dynamically load images and attribution $(element).find('img').attr('src', $(element).find('a').attr('href') + ($(element).find('a').data('srcset') ? '&width=320' : '')); - if (popupThis.find($(element).find('.popup-imgAttrib.notloaded')).length) getWikiAttrib(popupThis.find($(element))); + if (popupThis.find($(element).find('.popup-img-attrib.notloaded')).length) getWikiAttrib(popupThis.find($(element))); // save popup content - else if (!popupThis.find('.popup-imgAttrib.notloaded').length) map._layers[osmId].setPopupContent(); + else if (!popupThis.find('.popup-img-attrib.notloaded').length) map._layers[osmId].setPopupContent(); })); }, 200); - popupThis.find($('.popup-imgContainer img')) + popupThis.find($('.popup-img')) .on('swiperight', function() { navImg(0); }) .on('swipeleft', function() { navImg(1); }) + .on('dragstart', false) + .on('selectstart', false) .on('wheel', function(e) { if (e.originalEvent.deltaY < 0) navImg(0); else if (e.originalEvent.deltaY > 0) navImg(1); e.preventDefault(); - }) - .on('error', function(e) { + }); + popupThis.find($('.popup-img-item img')).on('error', function(e) { // error if image not found - if (!popupThis.find($('.popup-imgContainer:visible')).length) popupThis.find($('#img0')).show(); - if (!popupThis.find($('.navigateItem:visible')).length) popupThis.find($('.navigateItem')).show(); + if (!popupThis.find($('.popup-img-item:visible')).length) popupThis.find($('#img0')).show(); + if (!popupThis.find($('.popup-navigate:visible')).length) popupThis.find($('.popup-navigate')).show(); $(e.currentTarget).attr('alt', 'Error: Image not found'); $(e.currentTarget).parent().css('pointer-events', 'none'); $(e.currentTarget).parent().next().html('Error: Image not found'); }); - popupThis.find($('.popup-imgContainer, .navigateItem')) - .on('dragstart', false) - .on('selectstart', false); popupThis.find($('#img0 img')) .on('load', function() { try { // stop placeholder images from being zoomed - if (popupThis.find($('.popup-imgContainer img')).attr('src').indexOf('000placehldr') >= 0) popupThis.find($('.popup-imgContainer').css('pointer-events', 'none')); - popupThis.find($('.popup-imgContainer img')).attr('alt', 'Image of ' + popupThis.find($('.popup-header h3')).text()); - if (popupThis.find($('.navigateItem')).length) { + if (popupThis.find($('.popup-img-item img')).attr('src').indexOf('000placehldr') >= 0) popupThis.find($('.popup-img').css('pointer-events', 'none')); + popupThis.find($('.popup-img-item img')).attr('alt', 'Image of ' + popupThis.find($('.popup-header h3')).text()); + if (popupThis.find($('.popup-navigate')).length) { // apply background to navigation buttons if no attribution - if (!popupThis.find($('.popup-imgAttrib')).length && popupThis.find($('.navigateItem')).length) popupThis.find($('.navigateItem')).addClass('navigateBg'); + if (!popupThis.find($('.popup-img-attrib')).length && popupThis.find($('.popup-navigate')).length) popupThis.find($('.popup-navigate')).addClass('popup-navigate-background'); // add padding on attribution for navigation buttons - else popupThis.find($('.popup-imgAttrib')).css('padding-right', popupThis.find($('.navigateItem')).width()+5 + 'px'); - if (!popupThis.find($('.navigateItem:visible')).length) popupThis.find($('.navigateItem')).fadeIn(); + else popupThis.find($('.popup-img-attrib')).css('padding-right', popupThis.find($('.popup-navigate')).width()+5 + 'px'); + if (!popupThis.find($('.popup-navigate:visible')).length) popupThis.find($('.popup-navigate')).fadeIn(); } - popupThis.find($('.popup-imgContainer')).removeClass('notloaded'); + popupThis.find($('.popup-img-item')).removeClass('notloaded'); if (e.popup.options.autoPan && map.getBounds().contains(e.popup._latlng)) setTimeout(function() { e.popup._adjustPan(); }, 200); } catch(err) { - if ($('#inputDebug').is(':checked')) console.debug(err + '- Popup was probably closed.'); + if ($('#settings-debug').is(':checked')) console.debug(err + '- Popup was probably closed.'); } }); } // add padding for navigation icons without image - else if (popupThis.find($('.navigateItem')).length && !popupThis.find($('.popup-imgContainer')).length) { - popupThis.find($('.navigateItem')).css('bottom', 'auto').fadeIn(); + else if (popupThis.find($('.popup-navigate')).length && !popupThis.find($('.popup-img')).length) { + popupThis.find($('.popup-navigate')).css('bottom', 'auto').fadeIn(); popupThis.find($('.popup-body')).css('padding-bottom', '12px'); } // scroll shadow - if (popupThis.find($('.custscroll')).length) setTimeout(function() { - popupThis.find($('.custscroll')).scroll(function() { + if (popupThis.find($('.theme-scroll')).length) setTimeout(function() { + popupThis.find($('.theme-scroll')).on('scroll', function() { const scrollPos = Math.abs($(this)[0].scrollHeight - $(this)[0].clientHeight - $(this).scrollTop()); const scrollOpacity = scrollPos < 50 ? Math.round(scrollPos / 10) / 10 : 0.5; - $(this).css('background-image', 'linear-gradient(rgba(0, 0, 0, 0), rgba(var(--scroll-shadow-popup), ' + scrollOpacity + '))'); + $(this).css('background-image', 'linear-gradient(transparent, rgba(var(--scroll-shadow-popup), ' + scrollOpacity + '))'); }).trigger('scroll'); }, 10); // set that user has already seen bouncing navigation icons @@ -558,7 +560,7 @@ const map = new L.map('map', { } // unselect from poi list if (poiList.length) { - $('#poi-results-list tr').removeClass('poi-result-selected'); + $('#pois-results-list tr').removeClass('pois-result-selected'); if (!rQuery) markerId = undefined; permalinkSet(); } @@ -580,16 +582,16 @@ const map = new L.map('map', { tileOverlayLayers[tileOverlayLayer.xmas.name].setOpacity(tileOverlayLayer.xmas.opacity); } // set overlay opacity controls - $('#inputOpacity').show(100); - $('#inputOpacity input') + $('#control-opacity').show(100); + $('#control-opacity input') .val(tileOverlayLayers[tileOverlayLayer[actOverlayLayer].name].options.opacity) .on('input', function() { tileOverlayLayers[tileOverlayLayer[actOverlayLayer].name].setOpacity(this.value); $(this).attr('title', tileOverlayLayer[actOverlayLayer].name + '\n' + Math.floor(this.value*100) + '% opacity'); }) .on('change', permalinkSet) - .on('mouseover', function() { this.focus(); }) - .attr('title', tileOverlayLayer[actOverlayLayer].name + '\n' + Math.floor($('#inputOpacity input').val()*100) + '% opacity'); + .on('mouseenter', function() { $(this).trigger('focus'); }) + .attr('title', tileOverlayLayer[actOverlayLayer].name + '\n' + Math.floor($('#control-opacity input').val()*100) + '% opacity'); setOverlayLabel(); permalinkSet(); if (actOverlayLayer && tileOverlayLayer[actOverlayLayer].offset) { @@ -604,7 +606,7 @@ const map = new L.map('map', { if (tileOverlayLayer[actOverlayLayer].offset && tileOverlayLayer[actOverlayLayer].wmsOverlay) $(tileOverlayLayers[tileOverlayLayer[actOverlayLayer].name]).off('load'); if (!$('.leaflet-control-layers-overlays input:checked').length) { actOverlayLayer = undefined; - $('#inputOpacity').fadeOut(100); + $('#control-opacity').fadeOut(100); } setOverlayLabel(); permalinkSet(); @@ -623,15 +625,15 @@ function highlightOutline(i, on) { } function setOverlayLabel() { // adds titles and hides certain layers in control - if (!$('.controlTitle').length) { - $('.leaflet-control-layers-overlays label').first().before('
Overlays
'); - $('.leaflet-control-layers-overlays label:contains("Bing")').first().before('
Air photography
'); - $('.leaflet-control-layers-overlays label:contains("Ordnance")').first().before('
Historical maps
'); - $('.leaflet-control-layers-overlays label').last().after('
More...'); + if (!$('.control-layers-title').length) { + $('.leaflet-control-layers-overlays label').first().before('
Overlays
'); + $('.leaflet-control-layers-overlays label:contains("Bing")').first().before('
Air photography
'); + $('.leaflet-control-layers-overlays label:contains("Ordnance")').first().before('
Historical maps
'); + $('.leaflet-control-layers-overlays label').last().after('More...'); } for (let tileBase in tileBaseLayer) if (tileBaseLayer[tileBase].hide) $('.leaflet-control-layers-base label:contains("' + tileBaseLayer[tileBase].name + '")').addClass('hideLayer'); for (let tileOverlay in tileOverlayLayer) if (tileOverlayLayer[tileOverlay].hide) $('.leaflet-control-layers-overlays label:contains("' + tileOverlayLayer[tileOverlay].name + '")').addClass('hideLayer'); - if (!$('.leaflet-control-layers-list.custscroll').length) $('.leaflet-control-layers-list').addClass('custscroll'); + if (!$('.leaflet-control-layers-list.theme-scroll').length) $('.leaflet-control-layers-list').addClass('theme-scroll'); if (!$('.leaflet-control-layers-toggle span').length) $('.leaflet-control-layers-toggle').html(''); } function changeOffset(layer, container) { @@ -642,7 +644,7 @@ function changeOffset(layer, container) { } // https://github.com/davidjbradshaw/image-map-resizer -$('#minimap > map > area').click(function() { +$('#home-minimap > map > area').on('click', function() { // bounding coordinates for minimap const mBounds = { 'Bexhill-on-Sea': LBounds, @@ -661,13 +663,13 @@ $('#minimap > map > area').click(function() { }[$(this).attr('title')]; if (mBounds) { map.flyToBounds(L.latLngBounds(mBounds)); - if ($(window).width() < 768) $('.sidebar-close:visible').click(); + if ($(window).width() < 768) $('.sidebar-close:visible').trigger('click'); } }); let rQuery = false; function reverseQuery(e, singlemapclick) { - const geoServer = $('#inputRevServer').val(); + const geoServer = $('#settings-reverse-server').val(); let geocoder, geoMarker; if (singlemapclick) setMsgStatus('fa-solid fa-spinner fa-spin-pulse', '', ''); else $('.spinner').show(); @@ -678,40 +680,39 @@ function reverseQuery(e, singlemapclick) { geocoder.reverse(e.latlng, map.options.crs.scale(map.getZoom() > 16 ? 18 : 17), function(results) { if (geoServer === 'opencage') geoMarker = results[0]; else geoMarker = results[0] ? results[0].properties : ''; - if ($('#inputDebug').is(':checked') && results[0]) console.debug(titleCase(geoServer) + 'reverse search:', results[0]); + if ($('#settings-debug').is(':checked') && results[0]) console.debug(titleCase(geoServer) + 'reverse search:', results[0]); if (geoMarker.osm_id || (geoMarker.source_id && geoMarker.source_id.indexOf('/')) > 0) { - if (singlemapclick && $('#msgStatus:visible').length) { + if (singlemapclick && $('#modal:visible').length) { let msgStatusHead, msgStatusBody; if (geoServer === 'nominatim') { const geoName = geoMarker.namedetails ? geoMarker.namedetails.ref || geoMarker.namedetails.name || geoMarker.namedetails['addr:housename'] || '' : ''; const geoRoad = geoMarker.address ? geoMarker.address.road || geoMarker.address.footway || geoMarker.address.pedestrian || geoMarker.address.path || geoMarker.address.locality || '' : ''; msgStatusHead = titleCase(geoMarker.type === 'yes' || geoMarker.type === geoMarker.addresstype ? geoMarker.category : geoMarker.type + (geoMarker.addresstype === 'road' ? ' road' : '')); - msgStatusBody = '' + (geoName ? '' + geoName + '
' : '') + + msgStatusBody = '
' + (geoName ? '' + geoName + '
' : '') + (geoMarker.address.house_number ? geoMarker.address.house_number + ' ' : '') + (geoRoad ? geoRoad + (geoMarker.address.postcode ? ', ' + geoMarker.address.postcode + '
' : '') : '') + (geoMarker.address.retail ? geoMarker.address.retail : '') + '
'; } else if (geoServer === 'opencage') { msgStatusHead = titleCase(geoMarker.type); - msgStatusBody = '' + geoMarker.name.replace(',', '
').replace(', United Kingdom', '') + '
'; + msgStatusBody = '' + geoMarker.name.replace(',', '
').replace(', United Kingdom', '') + '
'; } else if (geoServer === 'photon') { msgStatusHead = geoMarker.osm_value !== 'yes' ? titleCase(geoMarker.osm_value + ' ' + geoMarker.osm_key) : ''; - msgStatusBody = '' + (geoMarker.name ? '' + geoMarker.name + '
' : '') + + msgStatusBody = '
' + (geoMarker.name ? '' + geoMarker.name + '
' : '') + (geoMarker.housenumber ? geoMarker.housenumber + ' ' : '') + (geoMarker.street + (geoMarker.postcode ? ', ' + geoMarker.postcode : '') ? geoMarker.street : '') + '
'; } else if (geoServer === 'openrouteservice') { msgStatusHead = titleCase(geoMarker.layer); - msgStatusBody = '' + '' + geoMarker.name + '
' + + msgStatusBody = '
' + '' + geoMarker.name + '
' + (geoMarker.postalcode ? geoMarker.postalcode : '') + '
'; } - if ($('#inputAttic').val()) msgStatusBody += '
Above result may differ to actual attic data.'; - if (actOverlayLayer === 'landreg') msgStatusBody += '
Land Registry Lookup '; + if ($('#settings-overpass-attic').val()) msgStatusBody += '
Above result may differ to actual attic data.'; + if (actOverlayLayer === 'landreg') msgStatusBody += '
Land Registry Lookup '; setMsgStatus('fa-solid fa-magnifying-glass-location', msgStatusHead, msgStatusBody); // move click location to address location on hover - if (noTouch) $('#msgStatus .msgStatusBodyAddr').hover( - function() { if (clickOutline.getLayers()[0]) clickOutline.getLayers()[0].setLatLng(results[0].center); }, - function() { if (clickOutline.getLayers()[0]) clickOutline.getLayers()[0].setLatLng(e.latlng); } - ); + $('#modal .modal-body-addr') + .on('mouseenter', function() { if (clickOutline.getLayers()[0]) clickOutline.getLayers()[0].setLatLng(results[0].center); }) + .on('mouseleave', function() { if (clickOutline.getLayers()[0]) clickOutline.getLayers()[0].setLatLng(e.latlng); }); } else reverseQueryOP(geoMarker.osm_type || geoMarker.source_id.charAt(0), geoMarker.osm_id || geoMarker.source_id.split('/')[1]); } @@ -726,11 +727,11 @@ function reverseQueryOP(type, id) { // pass reverse lookup to overpass clear_map('markers'); rQuery = true; - $('#msgStatus').fadeOut(200); + $('#modal').fadeOut(200); show_overpass_layer(elementType(type) + '(' + id + ');', type.charAt(0).toUpperCase() + id); } function walkPoint(e) { - if ($(window).width() >= 768 && actTab !== 'walking' && actTab !== 'none') $('a[href="#walking"]').click(); + if ($(window).width() >= 768 && actTab !== 'walking' && actTab !== 'none') $('a[href="#walking"]').trigger('click'); // drop a walk marker if one doesn't exist const wp = routingControl.getWaypoints(); for (let c in wp) if (!wp[c].name) { @@ -740,7 +741,7 @@ function walkPoint(e) { routingControl.spliceWaypoints(wp.length, 0, e.latlng); } function walkHere(e) { - if ($(window).width() >= 768 && actTab !== 'walking' && actTab !== 'none') $('a[href="#walking"]').click(); + if ($(window).width() >= 768 && actTab !== 'walking' && actTab !== 'none') $('a[href="#walking"]').trigger('click'); routingControl.setWaypoints([ [lc._event.latlng.lat, lc._event.latlng.lng], [e.latlng.lat, e.latlng.lng] @@ -768,14 +769,14 @@ function panoView(e, fromSequence) { success: function(json) { let imgId; if (json.data.length > 0) json.data.forEach(x => { if (x.camera_type === 'equirectangular') imgId = x.id; }); - if (imgId && ($('#inputStView').is(':checked') || fromSequence)) { + if (imgId && ($('#settings-mapillary').is(':checked') || fromSequence)) { $('.spinner').hide(); popupWindow('iframe', 'https://www.mapillary.com/embed?image_key=' + imgId + '&x=0.5&y=0.5&style=photo', '', 'Mapillary Street-Level'); } else this.error(); }, error: function() { - if ($('#inputDebug').is(':checked') && $('#inputStView').is(':checked')) console.debug('ERROR MAPILLARY IMAGES:', encodeURI(this.url)); + if ($('#settings-debug').is(':checked') && $('#settings-mapillary').is(':checked')) console.debug('ERROR MAPILLARY IMAGES:', encodeURI(this.url)); if (!fromSequence) { $('.spinner').hide(); popupWindow('iframe', 'https://www.google.com/maps/embed/v1/streetview?location=' + e.latlng.lat + ',' + e.latlng.lng + '&fov=90&key=' + window.BOSM.googleKey, '', 'Google Street View'); @@ -791,14 +792,14 @@ function copyGeos(e) { ); } -$('#walkList').change(function() { - $('#walkDesc').html('
Walk preview
' + suggestWalk($('#walkList').val(), 0) + '
'); +$('#walk-list').on('change', function() { + $('#walk-desc').html('
Walk preview
' + suggestWalk($('#walk-list').val(), 0) + '
'); }); -$('#walkSelect').click(function() { +$('#walk-select').on('click', function() { clear_map('walk'); routingControl.zoomBounds = true; - routingControl.setWaypoints(suggestWalk($('#walkList').val(), 1)); - if ($(window).width() < 768) $('.sidebar-close:visible').click(); + routingControl.setWaypoints(suggestWalk($('#walk-list').val(), 1)); + if ($(window).width() < 768) $('.sidebar-close:visible').trigger('click'); }); function suggestWalk(walkId, isWP) { return { @@ -812,7 +813,7 @@ function suggestWalk(walkId, isWP) { 'In May 1902 Bexhill-on-Sea became "The Birthplace of British Motor Racing". ' + 'Follow five seafront Motoring Heritage panels and two galleries dedicated to the story of those intrepid ' + 'early motoring pioneers (the 5th panel is situated outside ' + - 'Cooden Beach Hotel ).', + 'Cooden Beach Hotel ).', [[50.84059, 0.49121], [50.83729, 0.47612], [50.83647, 0.46637], [50.83732, 0.46639]] ], neye: [ @@ -836,7 +837,7 @@ function suggestWalk(walkId, isWP) { ad1066: [ 'The route commemorates the 1066 Battle of Hastings, linking the places and the people of that important time. ' + 'This is a section of the Bexhill - Battle link, the full route can be found on ' + - 'waymarkedtrails.org .', + 'waymarkedtrails.org .', [[50.84522, 0.48044], [50.85591, 0.49312], [50.87800, 0.50009]] ], bcr1: [ @@ -850,36 +851,36 @@ function suggestWalk(walkId, isWP) { } // navigation controls for history tour -$('#tourNext').click(function() { $('#tourList option:selected').nextAll(':enabled').eq(0).prop('selected', true).trigger('change'); }); -$('#tourPrev').click(function() { $('#tourList option:selected').prevAll(':enabled').eq(0).prop('selected', true).trigger('change'); }); -$('#tourList').change(function() { +$('#tour-controls-prev').on('click', function() { $('#tour-controls-list option:selected').prevAll(':enabled').eq(0).prop('selected', true).trigger('change'); }); +$('#tour-controls-list').on('change', function() { const tourVal = $(this).val(); // only load iframe on focus or a new item selected - if (actTab === 'tour' && $('#tourFrame')[0].contentWindow.location.href.indexOf('/list' + titleCase(tourVal)) === -1) { - $('#tourControls').children().prop('disabled', true); - $('#tourFrame').hide(); - $('#tourLoading').show(); - $('#tourFrame')[0].contentWindow.location.replace(window.location.origin + '/' + 'tour/list' + titleCase(tourVal) + '/index.html'); - $('#tourFrame').one('load', function() { - $('#tourLoading').hide(); + if (actTab === 'tour' && $('#tour-frame')[0].contentWindow.location.href.indexOf('/list' + titleCase(tourVal)) === -1) { + $('#tour-controls').children().prop('disabled', true); + $('#tour-frame').hide(); + $('#tour-loading').show(); + $('#tour-frame')[0].contentWindow.location.replace(window.location.origin + '/' + 'tour/list' + titleCase(tourVal) + '/index.html?v=' + version); + $('#tour-frame').one('load', function() { + $('#tour-loading').hide(); $(this).fadeIn(); // set theme - $('#inputTheme').trigger('change'); + $('#settings-theme').trigger('change'); // set reference links - $(this).contents().find('sup').click(function() { tourRef(tourVal, this.innerText); }); - $(this).contents().find('sup').each(function() { $(this).attr('title', $('#tourFrame')[0].contentWindow.tourRefs[tourVal][this.innerText].name); }); + $(this).contents().find('sup').on('click', function() { tourRef(tourVal, this.innerText); }); + $(this).contents().find('sup').each(function() { $(this).attr('title', $('#tour-frame')[0].contentWindow.tourRefs[tourVal][this.innerText].name); }); // create fancybox gallery from iframe images - const tourImg = $(this).contents().find('img').not('.maplink img'), tourGall = []; + const tourImg = $(this).contents().find('img').not('.link-map img'), tourGall = []; tourImg.each(function() { tourGall.push({ 'src': this.src, 'caption': $(this).parent('figure').find('figCaption').html() || this.alt }); }); - tourImg.off('click').click(function() { $.fancybox.open(tourGall, {}, tourImg.index(this)); }); - $('#tourControls').children().prop('disabled', false); - if ($('#tourList').prop('selectedIndex') === 0) $('#tourPrev').prop('disabled', true); - else if ($('#tourList').prop('selectedIndex') === $('#tourList option').length-1) $('#tourNext').prop('disabled', true); + tourImg.off('click').on('click', function() { $.fancybox.open(tourGall, {}, tourImg.index(this)); }); + $('#tour-controls').children().prop('disabled', false); + if ($('#tour-controls-list').prop('selectedIndex') === 0) $('#tour-controls-prev').prop('disabled', true); + else if ($('#tour-controls-list').prop('selectedIndex') === $('#tour-controls-list option').length-1) $('#tour-controls-next').prop('disabled', true); }); permalinkSet(); } - else $('#inputTheme').trigger('change'); + else $('#settings-theme').trigger('change'); }); +$('#tour-controls-next').on('click', function() { $('#tour-controls-list option:selected').nextAll(':enabled').eq(0).prop('selected', true).trigger('change'); }); // https://github.com/Leaflet/Leaflet const iconLayer = new L.featureGroup(), clickOutline = new L.featureGroup(), areaOutline = new L.featureGroup(), imageOverlay = new L.featureGroup(); @@ -921,26 +922,26 @@ function setLeaflet() { name: 'OpenStreetMap', url: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png', maxNativeZoom: 19, - className: 'layerDark' + className: 'theme-invert' }, bosm: { name: 'OSM Bexhill', url: 'https://api.mapbox.com/styles/v1/drmx/cjyfrglvo1v3c1cqqlcvzyd07/tiles/256/{z}/{x}/{y}@2x?access_token=' + window.BOSM.mapboxKey, attribution: attribution + ', MapBox', - className: 'layerDark' + className: 'theme-invert' }, osmtopo: { name: 'OSM Topo', url: 'https://tile.tracestrack.com/topo__/{z}/{x}/{y}.png?key=' + window.BOSM.tracestrackKey, attribution: attribution + ', Tracestrack', maxNativeZoom: 19, - className: 'layerDark' + className: 'theme-invert' }, osmuk: { name: 'OSM UK', url: 'https://map.atownsend.org.uk/hot/{z}/{x}/{y}.png', attribution: attribution + ', Andy Townsend', - className: 'layerDark', + className: 'theme-invert', hide: 1 }, general: { @@ -948,19 +949,19 @@ function setLeaflet() { url: 'https://tile-{s}.openstreetmap.fr/hot/{z}/{x}/{y}.png', attribution: attribution + ', HOTOSM', maxNativeZoom: 20, - className: 'layerDark' + className: 'theme-invert' }, cycle: { name: 'OSM OpenCycleMap', url: 'https://{s}.tile.thunderforest.com/cycle/{z}/{x}/{y}.png?apikey=' + window.BOSM.thuforKey, attribution: attribution + ', ThunderForest', - className: 'layerDark' + className: 'theme-invert' }, trnsprt: { name: 'OSM Public Transport', url: 'https://{s}.tile.thunderforest.com/transport/{z}/{x}/{y}.png?apikey=' + window.BOSM.thuforKey, attribution: attribution + ', ThunderForest', - className: 'layerDark' + className: 'theme-invert' }, bing: { name: 'Bing Aerial', @@ -998,13 +999,13 @@ function setLeaflet() { minNativeZoom: 18, maxNativeZoom: 20, minZoom: 16, - offset: [-1, 1] + offset: [-0.5, 0.5] }, lidar: { name: 'Lidar DTM 1m', - url: 'https://environment.data.gov.uk/spatialdata/lidar-composite-digital-terrain-model-dtm-1m-2022/wms', + url: 'https://environment.data.gov.uk/spatialdata/lidar-composite-digital-terrain-model-dtm-1m/wms', wms: { - layers: '1', + layers: 'Lidar_Composite_DTM_1m', format: 'image/png', transparent: true }, @@ -1021,14 +1022,14 @@ function setLeaflet() { }, attribution: 'Rother District Council', opacity: 1, - className: 'layerDropshadow' + className: 'theme-dropshadow' }, osm2012: { name: '2012 OpenStreetMap', url: 'https://map.fosm.org/default/{z}/{x}/{y}.png', opacity: 1, hide: 1, - className: 'layerNoclick layerDark' + className: 'layer-noclick theme-invert' }, osmlabels: { name: 'OSM Labels', @@ -1042,14 +1043,14 @@ function setLeaflet() { attribution: 'East Sussex County Council', opacity: 1, maxNativeZoom: 18, - className: 'layerDark layerDropshadow' + className: 'theme-invert theme-dropshadow' }, xmas: { name: 'Xmas Snow', url: 'tour/itemXmas/img/overlay-snow.gif', opacity: 0.5, hide: 1, - className: 'layerNoclick' + className: 'layer-noclick' }, // air photography bing: { @@ -1069,7 +1070,7 @@ function setLeaflet() { bounds: LBounds, opacity: 1, maxNativeZoom: 18, - className: 'layerNoclick' + className: 'layer-noclick' }, bm1967: { name: '1967 Aerial', @@ -1078,7 +1079,7 @@ function setLeaflet() { bounds: LBounds, opacity: 1, maxNativeZoom: 18, - className: 'layerNoclick' + className: 'layer-noclick' }, br1959: { name: '1959 Aerial (railway)', @@ -1087,7 +1088,7 @@ function setLeaflet() { bounds: L.latLngBounds([50.83722, 0.45732], [50.8907, 0.5134]), opacity: 1, maxNativeZoom: 18, - className: 'layerNoclick' + className: 'layer-noclick' }, os1950: { name: '1950 Aerial', @@ -1096,7 +1097,7 @@ function setLeaflet() { bounds: LBounds, opacity: 1, maxNativeZoom: 17, - className: 'layerNoclick' + className: 'layer-noclick' }, raf1959: { name: '1959 RAF (L.Common)', @@ -1107,7 +1108,7 @@ function setLeaflet() { minNativeZoom: 14, maxNativeZoom: 18, hide: 1, - className: 'layerNoclick' + className: 'layer-noclick' }, raf1946: { name: '1946 RAF', @@ -1117,7 +1118,7 @@ function setLeaflet() { minNativeZoom: 14, maxNativeZoom: 18, hide: 1, - className: 'layerNoclick' + className: 'layer-noclick' }, raf1941c: { name: '1941 RAF (central)', @@ -1128,7 +1129,7 @@ function setLeaflet() { minNativeZoom: 15, maxNativeZoom: 19, hide: 1, - className: 'layerNoclick' + className: 'layer-noclick' }, // historical maps os1962: { @@ -1139,7 +1140,7 @@ function setLeaflet() { opacity: 1, maxNativeZoom: 16, offset: [5, 3], - className: 'layerNoclick' + className: 'layer-noclick' }, os1955: { name: '1955 Ordnance Survey', @@ -1149,7 +1150,7 @@ function setLeaflet() { opacity: 1, maxNativeZoom: 19, offset: [1, 1], - className: 'layerNoclick' + className: 'layer-noclick' }, wl1950: { name: '1950 Ward Lock', @@ -1159,7 +1160,7 @@ function setLeaflet() { opacity: 1, maxNativeZoom: 18, hide: 1, - className: 'layerNoclick' + className: 'layer-noclick' }, ob1944: { name: '1944 Observer Bomb Map', @@ -1168,7 +1169,7 @@ function setLeaflet() { opacity: 1, maxNativeZoom: 16, hide: 1, - className: 'layerNoclick' + className: 'layer-noclick' }, arp1942: { name: '1942 Air Raid Precautions', @@ -1178,7 +1179,7 @@ function setLeaflet() { opacity: 1, maxNativeZoom: 18, hide: 1, - className: 'layerNoclick' + className: 'layer-noclick' }, wl1940: { name: '1940 Ward Lock', @@ -1188,7 +1189,7 @@ function setLeaflet() { opacity: 1, maxNativeZoom: 18, hide: 1, - className: 'layerNoclick' + className: 'layer-noclick' }, os1938: { name: '1938 Ordnance Survey', @@ -1197,7 +1198,7 @@ function setLeaflet() { bounds: L.latLngBounds([50.874, 0.380], [50.833, 0.518]), opacity: 1, maxNativeZoom: 17, - className: 'layerNoclick' + className: 'layer-noclick' }, os1930: { name: '1930 Ordnance Survey', @@ -1207,7 +1208,7 @@ function setLeaflet() { opacity: 1, maxNativeZoom: 17, offset: [-2, -2], - className: 'layerNoclick' + className: 'layer-noclick' }, mc1925: { name: '1925 Maynards Chronicle', @@ -1217,7 +1218,7 @@ function setLeaflet() { opacity: 1, maxNativeZoom: 17, hide: 1, - className: 'layerNoclick' + className: 'layer-noclick' }, wl1911: { name: '1911 Ward Lock', @@ -1227,7 +1228,7 @@ function setLeaflet() { opacity: 1, maxNativeZoom: 18, hide: 1, - className: 'layerNoclick' + className: 'layer-noclick' }, os1909: { name: '1909 Ordnance Survey', @@ -1237,7 +1238,7 @@ function setLeaflet() { opacity: 1, maxNativeZoom: 18, offset: [2, 2], - className: 'layerNoclick' + className: 'layer-noclick' }, mt1902: { name: '1902 Motor Track', @@ -1248,7 +1249,7 @@ function setLeaflet() { minNativeZoom: 12, maxNativeZoom: 19, hide: 1, - className: 'layerNoclick' + className: 'layer-noclick' }, os1899: { name: '1899 Ordnance Survey', @@ -1258,7 +1259,7 @@ function setLeaflet() { opacity: 1, maxNativeZoom: 17, offset: [7, 2], - className: 'layerNoclick' + className: 'layer-noclick' }, os1873: { name: '1873 Ordnance Survey', @@ -1268,7 +1269,7 @@ function setLeaflet() { opacity: 1, maxNativeZoom: 17, offset: [8, -4], - className: 'layerNoclick' + className: 'layer-noclick' }, bt1839: { name: '1839 Bexhill Tithe', @@ -1277,7 +1278,7 @@ function setLeaflet() { bounds: L.latLngBounds([50.815, 0.351], [50.890, 0.536]), opacity: 1, maxNativeZoom: 18, - className: 'layerNoclick' + className: 'layer-noclick' }, mb1805: { name: '1805 Manor of Bexhill', @@ -1286,7 +1287,7 @@ function setLeaflet() { bounds: L.latLngBounds([50.805, 0.376], [50.883, 0.511]), opacity: 1, maxNativeZoom: 17, - className: 'layerNoclick' + className: 'layer-noclick' }, yg1795: { name: '1795 Yeakell, Gardner & Gream', @@ -1296,7 +1297,7 @@ function setLeaflet() { opacity: 1, maxNativeZoom: 15, hide: 1, - className: 'layerNoclick' + className: 'layer-noclick' }, yg1778: { name: '1778 Yeakell & Gardner', @@ -1306,7 +1307,7 @@ function setLeaflet() { opacity: 1, maxNativeZoom: 16, hide: 1, - className: 'layerNoclick' + className: 'layer-noclick' } }; for (let tile in tileOverlayLayer) { @@ -1339,32 +1340,32 @@ $('.leaflet-control-zoom-out').html(''); // BUTTON full screen events const fcnFullscr = L.easyButton({ - id: 'btnFullscr', + id: 'control-fullscreen', states: [{ - stateName: 'normalScreen', + stateName: 'control-fullscreen-off', icon: 'fa-solid fa-expand', title: 'Full screen', onClick: function(control) { const viewer = $('html')[0]; const rFS = viewer.requestFullscreen || viewer.webkitRequestFullscreen; rFS.call(viewer); - control.state('fullScreen'); + control.state('control-fullscreen-on'); } }, { - stateName: 'fullScreen', + stateName: 'control-fullscreen-on', icon: 'fa-solid fa-compress', title: 'Exit full screen', onClick: function(control) { const cFS = document.exitFullscreen || document.webkitExitFullscreen; cFS.call(document); - control.state('normalScreen'); + control.state('control-fullscreen-off'); } }] }).addTo(map); $(document).on('fullscreenchange', btnFullscrState).on('webkitfullscreenchange', btnFullscrState); function btnFullscrState() { const fullscreenElement = document.fullscreenElement || document.webkitFullscreenElement; - if (!fullscreenElement) fcnFullscr.state('normalScreen'); + if (!fullscreenElement) fcnFullscr.state('control-fullscreen-off'); } // https://github.com/domoritz/leaflet-locatecontrol @@ -1382,7 +1383,7 @@ const lc = L.control.locate({ markerStyle: { radius: 8 }, strings: { title: 'Show your location', - popup: 'Accuracy: {distance} {unit}' + popup: '' }, locateOptions: { enableHighAccuracy: false @@ -1391,7 +1392,7 @@ const lc = L.control.locate({ setMsgStatus('fa-solid fa-triangle-exclamation', 'Location Error', 'Sorry, we could not locate you.', 4); }, onLocationOutsideMapBounds: function() { - setMsgStatus('fa-solid fa-circle-info', 'Out of Bounds', 'You appear to be located outside the map area. Come visit us!', 4); + setMsgStatus('fa-solid fa-circle-info', 'Out of Bounds', 'You appear to be located outside the map area.', 4); lc.stop(); } }).addTo(map); @@ -1414,7 +1415,7 @@ const geocode = L.Control.geocoder({ placeholder: 'Type address or place name...' }).on('markgeocode', function(e) { // pass nominatim address query to overpass - if ($('#inputDebug').is(':checked')) console.debug('Nominatim search:', e.geocode); + if ($('#settings-debug').is(':checked')) console.debug('Nominatim search:', e.geocode); const geoMarker = e.geocode.properties; if (geoMarker.osm_id) { clear_map('markers'); @@ -1423,7 +1424,7 @@ const geocode = L.Control.geocoder({ // hide geocoder controls setTimeout(function() { $('.leaflet-control-geocoder-alternatives').addClass('leaflet-control-geocoder-alternatives-minimized'); - $('.leaflet-control-geocoder-form input').blur(); + $('.leaflet-control-geocoder-form input').trigger('blur'); $('.leaflet-control-geocoder').removeClass('leaflet-control-geocoder-expanded'); }, 50); } @@ -1440,29 +1441,29 @@ function searchAddr(addr) { // BUTTON mapillary sequences const fcnStLvl = L.easyButton({ - id: 'btnStLvl', + id: 'control-mapillary', states: [{ - stateName: 'offStLvl', + stateName: 'control-mapillary-off', icon: 'fa-solid fa-street-view', - title: 'Photosphere views', + title: 'Show Mapillary street-level views', onClick: function() { tour('pano'); } }, { - stateName: 'onStLvl', + stateName: 'control-mapillary-on', icon: 'fa-solid fa-street-view', - title: 'Photosphere views', + title: 'Zoom Mapillary street-level views', onClick: function() { zoom_area(); } }] }).addTo(map); // BUTTON bookmarks L.easyButton({ - id: 'btnBookm', + id: 'control-bookmarks', states: [{ icon: 'fa-solid fa-bookmark', title: 'Show bookmarks', onClick: function() { if (window.localStorage.favourites) { - $('#inputOverpass').val('(' + window.localStorage.favourites + ')'); + $('#settings-overpass-query').val('(' + window.localStorage.favourites + ')'); customQuery('(' + window.localStorage.favourites + ')', true); } else setMsgStatus('fa-solid fa-circle-info', 'Bookmarks', 'Add your favourite places by clicking within a popup.', 4); @@ -1473,7 +1474,7 @@ L.easyButton({ // https://github.com/cliffcloud/Leaflet.EasyButton // BUTTON clear map L.easyButton({ - id: 'btnClearmap', + id: 'control-clearlayers', states: [{ icon: 'fa-solid fa-trash', title: 'Clear layers', @@ -1491,22 +1492,22 @@ $('.leaflet-control-loading').html(''); $('.leaflet-routing-reverse-waypoints').html('').attr('title', 'Reverse waypoints'); $('.leaflet-routing-add-waypoint').html('').attr('title', 'Add a waypoint'); @@ -1590,9 +1591,9 @@ function populatePoiTab() { // get unique category label for poi checkbox tab if (categoryList.indexOf(pois[poi].catName) === -1) categoryList.push(pois[poi].catName); } - for (c = 0; c < $('#tourList option').length - 1; c++) if ($('#tourList option:enabled').eq(c).data('keyword')) { - category.push({ listLocation: $('#tourList option').eq(c).text(), header: 'Tour - ' + $('#tourList option').eq(c).text() }); - poiTags[$('#tourList option').eq(c).text()] = $('#tourList option').eq(c).data('keyword').split(', '); + for (c = 0; c < $('#tour-controls-list option').length - 1; c++) if ($('#tour-controls-list option:enabled').eq(c).data('keyword')) { + category.push({ listLocation: $('#tour-controls-list option').eq(c).text(), header: 'Tour - ' + $('#tour-controls-list option').eq(c).text() }); + poiTags[$('#tour-controls-list option').eq(c).text()] = $('#tour-controls-list option').eq(c).data('keyword').split(', '); } // https://github.com/pawelczak/EasyAutocomplete const options = { @@ -1612,14 +1613,14 @@ function populatePoiTab() { if ($('#eac-container-autocomplete .selected').prevAll('.eac-category').eq(0).find('img').data('key') === 'poi') { // find selected items category and split it to get checkbox, then display clear_map('markers'); - $('a[href="#pois"]').click(); - $('.poi-checkbox label[title="' + $('#eac-container-autocomplete .selected').prevAll('.eac-category').eq(0).text().split(' - ')[1] + '"] input').prop('checked', true); + $('a[href="#pois"]').trigger('click'); + $('.pois-checkbox label[title="' + $('#eac-container-autocomplete .selected').prevAll('.eac-category').eq(0).text().split(' - ')[1] + '"] input').prop('checked', true); poi_changed(); } // select tour else switchTab('tour', $('#eac-container-autocomplete .selected').prevAll('.eac-category').eq(0).find('img').data('key')); $('#autocomplete').val(''); - if ($('#poi-filter-in').val().length) $('#poi-filter-in').val('').trigger('input'); + if ($('#pois-filter-in').val().length) $('#pois-filter-in').val('').trigger('input'); } }, categories: category @@ -1627,12 +1628,12 @@ function populatePoiTab() { $('#autocomplete').easyAutocomplete(options); $('div.easy-autocomplete').removeAttr('style'); // create checkbox tables using poi categories - let checkboxContent = '
' + + let checkboxContent = '
' + '
Make up to ' + maxPOICheckbox + ' selections at a time.
'; for (let c = 0; c < categoryList.length; c++) { - checkboxContent += '

' + categoryList[c] + '

'; + checkboxContent += '

' + categoryList[c] + '

'; for (let poi in pois) if (pois[poi].catName === categoryList[c]) checkboxContent += L.Util.template( - '
' + + '
' + '
'; } - $('#poi-icons').append(checkboxContent + ''); + $('#pois-icons').append(checkboxContent + ''); } populatePoiTab(); @@ -1663,7 +1664,7 @@ function localStorageAvail() { } // highlight textboxes on focus -$(':text').on('focus', function() { $(this).select(); }); +$(':text').on('focus', function() { $(this).trigger('select'); }); // iframe and popup window // type of popup, url, popup title, iframe caption, iframe animation @@ -1707,38 +1708,38 @@ function popupWindow(type, url, pTitle, iCap, iAni) { // keyboard shortcuts let oInterval; -$('html').keydown(function(e) { +$('html').on('keydown', function(e) { clearInterval(oInterval); // ALT-ENTER: full screen if (e.keyCode === $.ui.keyCode.ENTER && e.altKey) { - $('#btnFullscr').click(); + $('#control-fullscreen').trigger('click'); e.preventDefault(); } // CTRL-F: address search else if (e.keyCode === 70 && e.ctrlKey) { - $('.leaflet-control-geocoder-icon').click(); + $('.leaflet-control-geocoder-icon').trigger('click'); e.preventDefault(); } // CTRL-DEL: clear all layers else if (e.keyCode === $.ui.keyCode.DELETE && e.ctrlKey) { - $('#btnClearmap').click(); + $('#control-clearlayers').trigger('click'); e.preventDefault(); } -}).keyup(function(e) { +}).on('keyup', function(e) { // CTRL down: switch overlay transparency on if (e.keyCode === 17 && actOverlayLayer) { - if ($('#inputOpacity input').val() >= 0.5) oInterval = setInterval(() => { - $('#inputOpacity input').val(+$('#inputOpacity input').val() - 0.05).trigger('input'); - if ($('#inputOpacity input').val() == 0.05) { + if ($('#control-opacity input').val() >= 0.5) oInterval = setInterval(() => { + $('#control-opacity input').val(+$('#control-opacity input').val() - 0.05).trigger('input'); + if ($('#control-opacity input').val() == 0.05) { clearInterval(oInterval); - $('#inputOpacity input').trigger('change'); + $('#control-opacity input').trigger('change'); } }, 40); - else if ($('#inputOpacity input').val() < 0.5) oInterval = setInterval(() => { - $('#inputOpacity input').val(+$('#inputOpacity input').val() + 0.05).trigger('input'); - if ($('#inputOpacity input').val() == 1) { + else if ($('#control-opacity input').val() < 0.5) oInterval = setInterval(() => { + $('#control-opacity input').val(+$('#control-opacity input').val() + 0.05).trigger('input'); + if ($('#control-opacity input').val() == 1) { clearInterval(oInterval); - $('#inputOpacity input').trigger('change'); + $('#control-opacity input').trigger('change'); } }, 40); e.preventDefault(); @@ -1746,12 +1747,12 @@ $('html').keydown(function(e) { }); // if user presses ENTER instead of selecting a category on home search bar -$('#autocomplete').keydown(function(e) { +$('#autocomplete').on('keydown', function(e) { if (e.keyCode === $.ui.keyCode.ENTER && !$('#eac-container-autocomplete ul:visible').length) autocomplete(); }); function autocomplete() { if ($('#autocomplete').val()) { - if ($(window).width() < 768) $('.sidebar-close:visible').click(); + if ($(window).width() < 768) $('.sidebar-close:visible').trigger('click'); // grid reference lookup if ($('#autocomplete').val().startsWith('TQ')) { const latlngPoint = new GridRefToWgs84($('#autocomplete').val(), 5); @@ -1766,7 +1767,7 @@ function autocomplete() { } // address search else { - $('.leaflet-control-geocoder-icon').click(); + $('.leaflet-control-geocoder-icon').trigger('click'); $('.leaflet-control-geocoder-form input').val($('#autocomplete').val()); geocode._geocode(); } @@ -1775,26 +1776,24 @@ function autocomplete() { // map display options let darkMode, scaleControl; -$('#inputTheme').change(function() { +$('#settings-theme').on('change', function() { const cssVar = getComputedStyle($('html')[0],null); if ((window.matchMedia('(prefers-color-scheme: dark)').matches && $(this).val() === 'auto') || $(this).val() === 'dark') { $('#darkcss').prop('disabled', false); - $('#tourFrame').contents().find('html').css({ + $('#tour-frame').contents().find('html').css({ '--text-color': cssVar.getPropertyValue('--text-color'), '--bg-color': cssVar.getPropertyValue('--bg-color'), '--bg-color2': cssVar.getPropertyValue('--bg-color2') }); - $('#map').css('background', '#0f0f0f'); darkMode = true; } else { $('#darkcss').prop('disabled', true); - $('#tourFrame').contents().find('html').prop('style', ''); - $('#map').css('background', '#e6e6e6'); + $('#tour-frame').contents().find('html').prop('style', ''); darkMode = false; } // apply theme to iframes - $('#tourFrame').contents().find('html').css({ + $('#tour-frame').contents().find('html').css({ '--main-color': cssVar.getPropertyValue('--main-color'), '--scr-track': cssVar.getPropertyValue('--scr-track'), '--scr-thumb': cssVar.getPropertyValue('--scr-thumb'), @@ -1802,10 +1801,10 @@ $('#inputTheme').change(function() { }); if (noIframe && localStorageAvail()) window.localStorage.theme = $(this).prop('selectedIndex'); }); -$('#settings input').not('#inputDebug').change(function() { - if ($(this).attr('id') === 'inputUnit') { +$('#settings input').not('#settings-debug').on('change', function() { + if ($(this).attr('id') === 'settings-unit') { // change unit of measurement - if (routingControl) $('#btnClearmap').click(); + if (routingControl) $('#control-clearlayers').trigger('click'); if (scaleControl) scaleControl.remove(); if ($(this).is(':checked')) { scaleControl = L.control.scale({ imperial: false, position: 'bottomleft' }).addTo(map); @@ -1818,50 +1817,50 @@ $('#settings input').not('#inputDebug').change(function() { lc.options.metric = false; } } - else if ($(this).attr('id') === 'inputStView') { - if ($(this).is(':checked')) $('#btnStLvl').parent().show(); - else $('#btnStLvl').parent().hide(); + else if ($(this).attr('id') === 'settings-mapillary') { + if ($(this).is(':checked')) $('#control-mapillary').parent().show(); + else $('#control-mapillary').parent().hide(); } permalinkSet(); }); -$('#btnReset').click(function() { +$('#settings-cleardata').on('click', function() { window.localStorage.clear(); window.location.href = window.location.origin; return false; }); // developer tools -$('#devTools').accordion({ +$('#settings-devtools').accordion({ heightStyle: 'content', animate: 150, collapsible: true, - active: $('#inputDebug').is(':checked') ? 0 : false, - activate: function(e, ui) { if (ui.oldPanel[0]) $('#inputOverpass, #inputAttic').val(''); } + active: $('#settings-debug').is(':checked') ? 0 : false, + activate: function(e, ui) { if (ui.oldPanel[0]) $('#settings-overpass-query, #settings-overpass-attic').val(''); } }); -$('#btnExportQuery').click(function() { +$('#settings-overpass-export').on('click', function() { // https://wiki.openstreetmap.org/wiki/Overpass_turbo/Development window.open('https://overpass-turbo.eu/?Q=' + encodeURIComponent(queryBbox.replace('[out:json];', '') + '(._;>;);out meta qt;') + '&C=' + mapCentre.join(';') + ';' + mapZoom + '&R', '_blank'); }); -$('#btnDownloadBB').click(function() { +$('#settings-overpass-download').on('click', function() { // https://wiki.openstreetmap.org/wiki/Overpass_API/XAPI_Compatibility_Layer - window.location = 'https://' + $('#inputOpServer').val() + '/api/map?bbox=' + [mapBounds.west, mapBounds.south, mapBounds.east, mapBounds.north].join(','); + window.location = 'https://' + $('#settings-overpass-server').val() + '/api/map?bbox=' + [mapBounds.west, mapBounds.south, mapBounds.east, mapBounds.north].join(','); $(this).prop('disabled', true); - setTimeout(function() { $('#btnDownloadBB').prop('disabled', false); }, 20000); + setTimeout(function() { $('#settings-overpass-download').prop('disabled', false); }, 20000); }); -$('#inputOpCache').change(function() { +$('#settings-overpass-cache').on('change', function() { if ($(this).val() > 720) $(this).val(720); else if ($(this).val() < 0) $(this).val(0); else if ($(this).val() === '') $(this).val(120); if (window.localStorage) window.localStorage.OPLCacheDur = $(this).val(); eleCache = []; }); -$('#inputOverpass').keydown(function(e) { +$('#settings-overpass-query').on('keydown', function(e) { if (e.keyCode == $.ui.keyCode.ENTER && $(this).val()) customQuery($(this).val(), true); }); function customQuery(q, fromInput) { spinner++; if (fromInput) clear_map('all'); - if (q.charAt(0) === '[' && q.charAt(q.length-1) === ']') show_overpass_layer('(nw' + ($('#inputOverpassR input').is(':checked') ? 'r' : '') + q + ';);', '', { + if (q.charAt(0) === '[' && q.charAt(q.length-1) === ']') show_overpass_layer('(nw' + ($('#settings-overpass-relation').is(':checked') ? 'r' : '') + q + ';);', '', { custom: true, bound: true, forceBbox: false @@ -1874,84 +1873,84 @@ function customQuery(q, fromInput) { else setMsgStatus('fa-solid fa-circle-info', 'Incorrect Query', 'Enclose queries with [ ] for tags,
and ( ) for element ids.', 4); if (spinner > 0 && fromInput) spinner--; } -$('#inputRevServer').change(function() { if (window.localStorage) window.localStorage.RevServer = $(this).prop('selectedIndex'); }); -$('#inputOpServer').change(function() { if (window.localStorage) window.localStorage.OPServer = $(this).prop('selectedIndex'); }); -$('#inputDebug').change(function(e, init) { +$('#settings-reverse-server').on('change', function() { if (window.localStorage) window.localStorage.RevServer = $(this).prop('selectedIndex'); }); +$('#settings-overpass-server').on('change', function() { if (window.localStorage) window.localStorage.OPServer = $(this).prop('selectedIndex'); }); +$('#settings-debug').on('change', function(e, init) { if ($(this).is(':checked')) { - console.debug('%cDEBUG MODE%c\nAPI requests output to console, map bounds unlocked.', 'color:' + $('html').css('--main-color') + ';font-weight:bold;'); + console.debug('%cDEBUG MODE ON%c\nAPI requests output to console, map bounds unlocked.', 'color:' + $('html').css('--main-color') + ';font-weight:bold;'); setMsgStatus('fa-solid fa-bug', 'Debug Mode Enabled', 'Check web console for details.', 4); - $('#devTools').accordion({ collapsible: false }); + $('#settings-devtools').accordion({ collapsible: false }); $('.sidebar-tabs ul li [href="#settings"] .sidebar-notif').show(); map.setMaxBounds(); map.options.minZoom = 1; } else { - $('#devTools').accordion({ collapsible: true }); + $('#settings-devtools').accordion({ collapsible: true }); $('.sidebar-tabs ul li [href="#settings"] .sidebar-notif').hide(); map.setMaxBounds(LBounds.pad(1)); map.options.minZoom = mapMinZoom; if (!init) console.debug('%cDEBUG MODE OFF%c', 'color:' + $('html').css('--main-color') + ';font-weight:bold;'); } }); -$('#inputDebug').trigger('change', [true]); +$('#settings-debug').trigger('change', [true]); // clear layers function clear_map(layer) { if (layer === 'markers' || layer === 'all') { - $('.poi-checkbox input:checked').prop('checked', false); + $('.pois-checkbox input:checked').prop('checked', false); poi_changed(); - $('.poi-checkbox').removeClass('poi-loading'); + $('.pois-checkbox').removeClass('pois-loading'); queryBbox = undefined; - $('#btnExportQuery').prop('disabled', true); + $('#settings-overpass-export').prop('disabled', true); rQuery = false; imageOverlay.clearLayers(); - fcnStLvl.state('offStLvl'); + fcnStLvl.state('control-mapillary-off'); $('.sidebar-tabs ul li [href="#tour"] .sidebar-notif').hide(); actImgLayer = undefined; $('#thennow img').off('mouseenter mouseleave'); - $('#inputWw2').remove(); + $('#control-ww2').remove(); $('div[role="tooltip"]').remove(); if (actOverlayLayer && tileOverlayLayer[actOverlayLayer].hide) map.removeLayer(tileOverlayLayers[tileOverlayLayer[actOverlayLayer].name]); setPageTitle(); } - if (layer === 'all' && $('#poi-filter-in').val().length) $('#poi-filter-in').val('').trigger('input'); + if (layer === 'all' && $('#pois-filter-in').val().length) $('#pois-filter-in').val('').trigger('input'); if (layer === 'walk' || layer === 'all') routingControl.setWaypoints([]); spinner = 0; $('.spinner').hide(); - $('#msgStatus').hide(); + $('#modal').hide(); permalinkSet(); } // fly to bounds of layer function zoom_area(closeTab, layer) { let offset = 0, layers = layer || areaOutline.getBounds().extend(iconLayer.getBounds()).extend(imageOverlay.getBounds()); - if ($(window).width() < 768 && closeTab) $('.sidebar-close:visible').click(); + if ($(window).width() < 768 && closeTab) $('.sidebar-close:visible').trigger('click'); else if ($(window).width() >= 1024 && !$('.sidebar.collapsed').length) offset = Math.round(sidebar.width()); map.closePopup(); map.flyToBounds(layers, { paddingTopLeft: [offset, 0] } ); } function poi_changed(newcheckbox) { - const poiChk = $('.poi-checkbox input:checked'); + const poiChk = $('.pois-checkbox input:checked'); rQuery = false; // limit number of active checkboxes if (poiChk.length <= maxPOICheckbox) { // remove old poi markers and results - $('#poi-results').css('pointer-events', ''); - $('#poi-results button').prop('disabled', true); + $('#pois-results').css('pointer-events', ''); + $('#pois-results button').prop('disabled', true); map.closePopup(); iconLayer.clearLayers(); clickOutline.clearLayers(); areaOutline.clearLayers(); imageOverlay.clearLayers(); - fcnStLvl.state('offStLvl'); + fcnStLvl.state('control-mapillary-off'); actImgLayer = undefined; setPageTitle(); poiList = []; if (poiChk.is(':checked')) { - $('#poi-results h3').html('Results loading...'); - $('#poi-results-list').css('opacity', 0.5); - $('#poi-results').css('min-height', ''); + $('#pois-results h3').html('Results loading...'); + $('#pois-results-list').css('opacity', 0.5); + $('#pois-results').css('min-height', ''); //build overpass query let query = '', selectedPois = '', poiLabels = ''; poiChk.each(function(i, element) { @@ -1967,9 +1966,9 @@ function poi_changed(newcheckbox) { } else { markerId = undefined; - $('#poi-results h3').html('Results cleared.'); - $('#poi-results-list').fadeOut(250, function() { $(this).empty(); }); - $('#poi-results').css('min-height', 'unset').slideUp(400, function() { $(this).css('height', ''); }); + $('#pois-results h3').html('Results cleared.'); + $('#pois-results-list').fadeOut(250, function() { $(this).empty(); }); + $('#pois-results').css('min-height', 'unset').slideUp(400, function() { $(this).css('height', ''); }); $('.sidebar-tabs ul li [href="#pois"] .sidebar-notif').hide(); permalinkSet(); } @@ -1979,25 +1978,30 @@ function poi_changed(newcheckbox) { poiChk.parent().fadeTo(100, 0.3, function() { $(this).fadeTo(500, 1.0); }); $('#' + newcheckbox).prop('checked', false); } - $('.poi-checkbox input').trigger('change'); + $('.pois-checkbox input').trigger('change'); } -$('.poi-checkbox input').click(function() { +$('.pois-checkbox input').on('click', function() { poi_changed($(this).attr('id')); }); // checkbox highlight -$('.poi-checkbox input').change(function() { +$('.pois-checkbox input').on('change', function() { const that = this; // timeout fix for chrome not redrawing poi list setTimeout(function() { - if ($(that).prop('checked')) $(that).parent().addClass('poi-checkbox-selected'); - else $(that).parent().removeClass('poi-checkbox-selected'); + if ($(that).prop('checked')) $(that).parent().addClass('pois-checkbox-selected'); + else $(that).parent().removeClass('pois-checkbox-selected'); }, 500); }); +function poi_list_reverse(sortBy) { + sortBy = ($('#pois-results-sort.fa-arrow-down-' + sortBy).length ? sortBy : sortBy.split('').reverse().join('')); + $('#pois-results-sort').removeClass('fa-arrow-down-' + sortBy).addClass('fa-arrow-down-' + sortBy.split('').reverse().join('')); + $('#pois-results-list tbody').append($.makeArray($('tr', $('#pois-results-list tbody')).detach()).reverse()); +} // jump to next result item function poi_next() { $('#btnPoiResultsNext').prop('disabled', true); - if (!$('.poi-result-selected').length || $('#poi-results-list tr').last().hasClass('poi-result-selected')) $('#poi-results-list tr').eq(0).click(); - else $('#poi-results-list tr').eq($('#poi-results-list tr.poi-result-selected').index('tr')+1).click(); + if (!$('.pois-result-selected').length || $('#pois-results-list tr').last().hasClass('pois-result-selected')) $('#pois-results-list tr').eq(0).trigger('click'); + else $('#pois-results-list tr').eq($('#pois-results-list tr.pois-result-selected').index('tr')+1).trigger('click'); setTimeout(function() { $('#btnPoiResultsNext').prop('disabled', false); }, 1000); } @@ -2008,14 +2012,14 @@ function setPageTitle(subTitle) { // set status message modal function setMsgStatus(headerIco, headerTxt, msgBody, closeTime) { - $('#msgStatus').stop(true).html( - '
' + + $('#modal').stop(true).html( + '' + - '
' + msgBody + '
' + '' ).fadeIn(200); - if (closeTime > 0) $('#msgStatus').delay(closeTime*1000).fadeOut(3000); + if (closeTime > 0) $('#modal').delay(closeTime*1000).fadeOut(3000); } // show tips @@ -2039,9 +2043,9 @@ function getTips(tip) { 'We have a number of historical map overlays, select them using the top-right layer control .', 'Results in Places are coloured to show currently open (green) or closed (red).', 'Zoom into the map and click a postbox to see the next post collection.', - 'You can find booking information on accommodation under Leisure-Tourism.', - 'Get the latest food hygiene ratings on businesses under Amenities.', - 'Find your closest container and the materials it recycles under Amenities.', + 'You can find booking information on accommodation under Leisure-Tourism.', + 'Get the latest food hygiene ratings on businesses under Amenities.', + 'Find your closest container and the materials it recycles under Amenities.', 'Have a look at our WW2 Incident Map under History .', 'Some places have a photosphere view, click in a popup to view it.', 'View superimposed and colourised images of Bexhill past and present under Then and Now .', @@ -2052,10 +2056,10 @@ function getTips(tip) { 'Anyone can help with building the , visit OpenStreetMap.org on how to get started.' ]; if (tip === 'random') nextTip = Math.floor(Math.random() * tips.length); - else if (parseInt($('#tipsText').data('tip')) === tips.length - 1) nextTip = 0; - else nextTip = parseInt($('#tipsText').data('tip')) + 1; - $('#tipsText').stop(true).fadeOut(150, function() { $(this).html(tips[nextTip]).data('tip', nextTip); }).fadeIn(150); - $('#tipsButton').attr('title', 'Next tip (' + (nextTip + 1) + ' of ' + tips.length + ')'); + else if (parseInt($('#home-tips-text').data('tip')) === tips.length - 1) nextTip = 0; + else nextTip = parseInt($('#home-tips-text').data('tip')) + 1; + $('#home-tips-text').stop(true).fadeOut(150, function() { $(this).html(tips[nextTip]).data('tip', nextTip); }).fadeIn(150); + $('#home-tips-button').attr('title', 'Next tip (' + (nextTip + 1) + ' of ' + tips.length + ')'); } function showWeather() { @@ -2075,13 +2079,13 @@ function showWeather() { wtooltip += '
' + json[nextTide].EventType + ': ' + L.Util.formatNum(json[nextTide].Height, 2) + 'm
' + json[nextTide+1].EventType + ': ' + L.Util.formatNum(json[nextTide+1].Height, 2) + 'm'; tideData = - '' + + '' + ' ' + new Date(json[nextTide].DateTime + 'Z').toLocaleTimeString(lang, { hour: '2-digit', minute: '2-digit' }) + '
' + ' ' + new Date(json[nextTide+1].DateTime + 'Z').toLocaleTimeString(lang, { hour: '2-digit', minute: '2-digit' }) + '
'; } else this.error(); }, - error: function() { if ($('#inputDebug').is(':checked')) console.debug('ERROR TIDES:', encodeURI(this.url)); } + error: function() { if ($('#settings-debug').is(':checked')) console.debug('ERROR TIDES:', encodeURI(this.url)); } }); // get weather $.ajax({ @@ -2101,14 +2105,14 @@ function showWeather() { 'South', 'South-southwest', 'Southwest', 'West-southwest', 'West', 'West-northwest', 'Northwest', 'North-northwest' ], getWinddir = json.wind.deg ? windDir[(Math.floor((json.wind.deg / 22.5) + 0.5)) % 16] : 'Calm'; - $('#weather').html( - '' + - '' + + $('#home-weather').html( + '' + + '' + json.weather[0].description.charAt(0).toUpperCase() + json.weather[0].description.slice(1) + '
' + json.main.temp.toFixed(1) + '°C' + '
' + - '' + - '' + + '' + + '' + getWinddir + '
' + '' + (json.wind.speed * 2.236936).toFixed(1) + 'mph' + '
' + @@ -2120,8 +2124,8 @@ function showWeather() { 'Gust: ' + (json.wind.gust * 2.236936).toFixed(1) + 'mph
' + 'Cloud: ' + json.clouds.all + '%
' + 'Humidity: ' + json.main.humidity + '%' + wtooltip; - $('#weather').attr('title', '').tooltip({ - classes: { 'ui-tooltip': 'wtooltip' }, + $('#home-weather').attr('title', '').tooltip({ + classes: { 'ui-tooltip': 'weather-wtooltip' }, position: tooltipDef.position, content: wtooltip, disabled: noTouch ? false : true, @@ -2131,12 +2135,12 @@ function showWeather() { }); } else this.error(); - if ($('#inputDebug').is(':checked')) console.debug('Openweather:', json); + if ($('#settings-debug').is(':checked')) console.debug('Openweather:', json); }, error: function() { - if ($('#inputDebug').is(':checked')) console.debug('ERROR OPENWEATHER:', encodeURI(this.url)); - $('#weather').hide(); - $('#minimap').css('padding-top', '2px'); + if ($('#settings-debug').is(':checked')) console.debug('ERROR OPENWEATHER:', encodeURI(this.url)); + $('#home-weather').hide(); + $('#home-minimap').css('padding-top', '2px'); } }); } @@ -2181,62 +2185,63 @@ function showEditFeed() { ' - ' + itm.properties.user + '' + '' + itm.properties.comment + ''; }); - $('#osmFeed') + $('#home-osm-feed') .html('Recent map edits:
    ' + s + '
') .slideDown(); - $('#osmFeed a') + $('#home-osm-feed a') .attr({ 'onClick': 'return window.confirm("This link will open an external website to review.");', 'target': '_blank', 'rel': 'noopener' }); - if ($('#inputDebug').is(':checked')) console.debug('OSM feed:', data); + if ($('#settings-debug').is(':checked')) console.debug('OSM feed:', data); } else this.error(); }, - error: function() { if ($('#inputDebug').is(':checked')) console.debug('ERROR OSM-FEED:', encodeURI(this.url)); } + error: function() { if ($('#settings-debug').is(':checked')) console.debug('ERROR OSM-FEED:', encodeURI(this.url)); } }); } -// M = basemap, O = overlay, OP = overlay opacity, S = settings, T = tab, U = tour frame, G = image layer, P = grouped pois, I = single poi, W = walkpoints -// TN = thennow slideshow, QG = geocode query, QO = overpass query, QL = location query +// m = basemap, o = overlay, op = overlay opacity, s = settings, t = tab, u = tour frame, g = image layer, p = grouped pois, i = single poi, w = walkpoints +// tn = thennow slideshow, qg = geocode query, qo = overpass query, ql = location query function permalinkSet() { // get clean url without parameters and hash const uri = new URL(window.location.href.split('?')[0].split('#')[0]); let selectedPois = '', walkCoords = '', setChk, overlayOpacity, c; const walkWayp = routingControl ? routingControl.getWaypoints() : undefined; - if (actTab !== defTab) uri.searchParams.set('T', actTab); - if (actBaseTileLayer !== defBaseTileLayer) uri.searchParams.set('M', actBaseTileLayer); - if (actImgLayer && actTab !== 'thennow') uri.searchParams.set('G', actImgLayer); + if (actTab !== defTab) uri.searchParams.set('t', actTab); + if (actBaseTileLayer !== defBaseTileLayer) uri.searchParams.set('m', actBaseTileLayer); + if (actImgLayer && actTab !== 'thennow') uri.searchParams.set('g', actImgLayer); if (actOverlayLayer) { - uri.searchParams.set('O', actOverlayLayer); + uri.searchParams.set('q', actOverlayLayer); overlayOpacity = Math.floor(tileOverlayLayers[tileOverlayLayer[actOverlayLayer].name].options.opacity * 100); if (overlayOpacity === tileOverlayLayer[actOverlayLayer].opacity * 100) overlayOpacity = undefined; - if (overlayOpacity) uri.searchParams.set('OP', overlayOpacity); + if (overlayOpacity) uri.searchParams.set('op', overlayOpacity); } if (walkWayp) { for (c = 0; c < walkWayp.length; c++) if (walkWayp[c].latLng) walkCoords += L.Util.formatNum(walkWayp[c].latLng.lat, 5) + 'x' + L.Util.formatNum(walkWayp[c].latLng.lng, 5) + '_'; - if (walkCoords) uri.searchParams.set('W', walkCoords.slice(0, -1)); + if (walkCoords) uri.searchParams.set('w', walkCoords.slice(0, -1)); } - if (actTab === 'tour' && $('#tourList option').eq(0).val() !== $('#tourList option:selected').eq(0).val()) uri.searchParams.set('U', $('#tourList option:selected').val()); - if ($('[data-thennow]').length) uri.searchParams.set('TN', $('[data-thennow]').attr('data-thennow')); - $('.poi-checkbox input:checked').each(function(i, element) { selectedPois += element.id + '-'; }); - if (selectedPois && !$('#inputAttic').val()) uri.searchParams.set('P', selectedPois.slice(0, -1)); - else if (queryCustom && queryBbox && $('#inputOverpass').val() && ($('#inputBbox').val() !== 'screen') && !$('#inputAttic').val()) uri.searchParams.set('QO', ($('#inputOverpassR input').is(':checked') ? 'r' : '') + $('#inputOverpass').val()); + if (actTab === 'tour' && $('#tour-controls-list option').eq(0).val() !== $('#tour-controls-list option:selected').eq(0).val()) uri.searchParams.set('u', $('#tour-controls-list option:selected').val()); + if ($('[data-thennow]').length) uri.searchParams.set('tn', $('[data-thennow]').attr('data-thennow')); + $('.pois-checkbox input:checked').each(function(i, element) { selectedPois += element.id + '-'; }); + if (selectedPois && !$('#settings-overpass-attic').val()) uri.searchParams.set('p', selectedPois.slice(0, -1)); + else if (queryCustom && queryBbox && $('#settings-overpass-query').val() && ($('#settings-bbox').val() !== 'screen') && !$('#settings-overpass-attic').val()) uri.searchParams.set('qo', ($('#settings-overpass-relation').is(':checked') ? 'r' : '') + $('#settings-overpass-query').val()); if ($('#settings input[data-uri]:checkbox:checked').length) { setChk = ''; for (c = 0; c < $('#settings input[data-uri]:checkbox').length; c++) setChk += $('#settings input[data-uri]:checkbox').eq(c).is(':checked') ? '1' : '0'; - uri.searchParams.set('S', setChk); + uri.searchParams.set('s', setChk); } if (noIframe && localStorageAvail()) { window.localStorage.setChk = ''; for (c = 0; c < $('#settings input[data-cache]:checkbox').length; c++) window.localStorage.setChk += $('#settings input[data-cache]:checkbox').eq(c).is(':checked') ? '1' : '0'; } - if (markerId && !(rQuery && actImgLayer) && !$('#inputAttic').val()) uri.searchParams.set('I', markerId); + if (markerId && !(rQuery && actImgLayer) && !$('#settings-overpass-attic').val()) uri.searchParams.set('i', markerId); window.history.replaceState(null, null, uri + window.location.hash); } function permalinkReturn() { - let uri = new URL(window.location.href).searchParams, junkQ = window.location.href.split('?'); + let uri = new URLSearchParams(Array.from(new URL(window.location.href).searchParams, ([key, value]) => [key.toLowerCase(), value])); + let junkQ = window.location.href.split('?'); let c; // split fix for facebook and other junk trackers adding ?fbclid etc and busting queries if (junkQ.length > 2) { @@ -2246,60 +2251,60 @@ function permalinkReturn() { // check localstorage for settings if (noIframe && localStorageAvail()) { // set theme - if (parseInt(window.localStorage.theme) >= 0 && parseInt(window.localStorage.theme) < $('#inputTheme option').length) $('#inputTheme').prop('selectedIndex', window.localStorage.theme); + if (parseInt(window.localStorage.theme) >= 0 && parseInt(window.localStorage.theme) < $('#settings-theme option').length) $('#settings-theme').prop('selectedIndex', window.localStorage.theme); // set checkboxes if (window.localStorage.setChk) for (c = 0; c < window.localStorage.setChk.length; c++) $('#settings input[data-cache]:checkbox').eq(c).prop('checked', parseInt(window.localStorage.setChk.charAt(c))); // set basemap if none specified if (window.localStorage.baseLayer) actBaseTileLayer = window.localStorage.baseLayer; // set cache duration - if (parseInt(window.localStorage.OPLCacheDur) >= 0 && parseInt(window.localStorage.OPLCacheDur) <= 240) $('#inputOpCache').val(parseInt(window.localStorage.OPLCacheDur)); - else $('#inputOpCache').val($('#inputOpCache').attr('value')); + if (parseInt(window.localStorage.OPLCacheDur) >= 0 && parseInt(window.localStorage.OPLCacheDur) <= 240) $('#settings-overpass-cache').val(parseInt(window.localStorage.OPLCacheDur)); + else $('#settings-overpass-cache').val($('#settings-overpass-cache').attr('value')); // set servers - if (parseInt(window.localStorage.RevServer) >= 0 && parseInt(window.localStorage.RevServer) < $('#inputRevServer option').length) $('#inputRevServer').prop('selectedIndex', window.localStorage.RevServer); - if (parseInt(window.localStorage.OPServer) >= 0 && parseInt(window.localStorage.OPServer) < $('#inputOpServer option').length) $('#inputOpServer').prop('selectedIndex', window.localStorage.OPServer); + if (parseInt(window.localStorage.RevServer) >= 0 && parseInt(window.localStorage.RevServer) < $('#settings-reverse-server option').length) $('#settings-reverse-server').prop('selectedIndex', window.localStorage.RevServer); + if (parseInt(window.localStorage.OPServer) >= 0 && parseInt(window.localStorage.OPServer) < $('#settings-overpass-server option').length) $('#settings-overpass-server').prop('selectedIndex', window.localStorage.OPServer); } - else if (!noIframe) $('#inputTheme').val('light'); - $('#inputTheme, #inputUnit, #inputStView').trigger('change'); + else if (!noIframe) $('#settings-theme').val('light'); + $('#settings-theme, #settings-unit, #settings-mapillary').trigger('change'); if (!osmRelation) { - $('#inputBbox option[value="area_id"]').prop('disabled', true); - $('#inputBbox option[value="bbox"]').prop('selected', true); + $('#settings-bbox option[value="area_id"]').prop('disabled', true); + $('#settings-bbox option[value="bbox"]').prop('selected', true); } if (!noPermalink) { - if (uri.has('M') && tileBaseLayer[uri.get('M')]) actBaseTileLayer = uri.get('M'); - if (uri.has('O') && tileOverlayLayer[uri.get('O')]) { - actOverlayLayer = uri.get('O'); + if (uri.has('m') && tileBaseLayer[uri.get('m')]) actBaseTileLayer = uri.get('m'); + if (uri.has('o') && tileOverlayLayer[uri.get('o')]) { + actOverlayLayer = uri.get('o'); tileOverlayLayers[tileOverlayLayer[actOverlayLayer].name].addTo(map); - if (uri.has('OP')) tileOverlayLayers[tileOverlayLayer[actOverlayLayer].name].setOpacity(uri.get('OP') / 100); + if (uri.has('op')) tileOverlayLayers[tileOverlayLayer[actOverlayLayer].name].setOpacity(uri.get('op') / 100); } - if (uri.has('S')) { - const setChk = uri.get('S'); + if (uri.has('s')) { + const setChk = uri.get('s'); for (c = 0; c < setChk.length; c++) $('#settings input[data-uri]:checkbox').eq(c).prop('checked', parseInt(setChk.charAt(c))); - if ($('#inputDebug').is(':checked')) $('#inputDebug').trigger('change'); + if ($('#settings-debug').is(':checked')) $('#settings-debug').trigger('change'); } - if (uri.has('T')) actTab = uri.get('T'); - if (uri.has('U')) { - const tourVal = uri.get('U'); - if ($('#tourList option[value=' + tourVal + ']').length && !$('#tourList option[value=' + tourVal + ']')[0].disabled) - $('#tourList').val(tourVal).trigger('change'); + if (uri.has('t')) actTab = uri.get('t'); + if (uri.has('u')) { + const tourVal = uri.get('u'); + if ($('#tour-controls-list option[value=' + tourVal + ']').length && !$('#tour-controls-list option[value=' + tourVal + ']')[0].disabled) + $('#tour-controls-list').val(tourVal).trigger('change'); } - if (uri.has('W')) { - let walkPoints = uri.get('W'); + if (uri.has('w')) { + let walkPoints = uri.get('w'); walkPoints = walkPoints.split('_'); for (c = 0; c < walkPoints.length; c++) { walkPoints[c] = walkPoints[c].replace('x', ', '); routingControl.spliceWaypoints(c, 1, JSON.parse('[' + walkPoints[c] + ']')); } } - if (uri.has('G')) { + if (uri.has('g')) { // if no latlng tell tour function to zoom to area - if (window.location.hash.indexOf('/') !== 3) tour(uri.get('G'), '', false); - else if (uri.get('G') === 'thennow') tour('thennow', uri.has('TN') ? uri.get('TN') : '', true); - else setTimeout(function() { tour(uri.get('G'), uri.has('I') ? uri.get('I') : '', true); }, 100); + if (window.location.hash.indexOf('/') !== 3) tour(uri.get('g'), '', false); + else if (uri.get('g') === 'thennow') tour('thennow', uri.has('tn') ? uri.get('tn') : '', true); + else setTimeout(function() { tour(uri.get('g'), uri.has('i') ? uri.get('i') : '', true); }, 100); } - else if (uri.has('P')) { - let groupedPoi = uri.get('P'); + else if (uri.has('p')) { + let groupedPoi = uri.get('p'); if (groupedPoi.indexOf('-') !== -1) groupedPoi = groupedPoi.split('-'); - if (uri.has('I')) markerId = uri.get('I'); + if (uri.has('i')) markerId = uri.get('i'); setTimeout(function() { if (!Array.isArray(groupedPoi)) $('#' + groupedPoi).prop('checked', true); // the last poi has a '/' on it because leaflet-hash @@ -2308,37 +2313,37 @@ function permalinkReturn() { }, 500); spinner++; } - else if (uri.has('QO')) { - let QO = decodeURIComponent(uri.get('QO')); + else if (uri.has('qo')) { + let QO = decodeURIComponent(uri.get('qo')); if (QO.charAt(0) === 'r') { - QO = uri.get('QO').slice(1); - $('#inputOverpassR input').prop('checked', true); + QO = uri.get('qo').slice(1); + $('#settings-overpass-relation').prop('checked', true); } - else $('#inputOverpassR').prop('checked', false); - $('#inputOverpass').val(QO); + else $('#settings-overpass-relation').prop('checked', false); + $('#settings-overpass-query').val(QO); customQuery(QO); - if (uri.has('I')) markerId = uri.get('I'); - $('#devTools').accordion({ active: 0 }); + if (uri.has('i')) markerId = uri.get('i'); + $('#settings-devtools').accordion({ active: 0 }); } - else if (uri.has('I')) { - const singlePoi = uri.get('I'); + else if (uri.has('i')) { + const singlePoi = uri.get('i'); rQuery = true; spinner++; setTimeout(function() { show_overpass_layer(elementType(singlePoi) + '(' + singlePoi.slice(1) + ');', singlePoi.toUpperCase()); }, 500); } - else if (uri.has('QG')) searchAddr(decodeURIComponent(uri.get('QG'))); - if (uri.has('QL')) setTimeout(function() { lc.start(); }, 500); + else if (uri.has('qg')) searchAddr(decodeURIComponent(uri.get('qg'))); + if (uri.has('ql')) setTimeout(function() { lc.start(); }, 500); } - else if (uri.has('T')) actTab = uri.get('T'); + else if (uri.has('t')) actTab = uri.get('t'); tileBaseLayers[tileBaseLayer[actBaseTileLayer].name].addTo(map); if (window.location.hash.indexOf('/') !== 3) map.setView(mapCentre, mapZoom); if ($('.sidebar-pane#' + actTab).length) { sidebar.open(actTab); - if (actTab === 'thennow' && !uri.has('I')) tour('thennow', uri.has('TN') ? uri.get('TN') : '', true); + if (actTab === 'thennow' && !uri.has('i')) tour('thennow', uri.has('tn') ? uri.get('tn') : '', true); } else actTab = 'none'; // animate sidebar close button on smaller devices if layers underneath - if ($('.sidebar-pane#' + actTab).length && $(window).width() < 768 && (uri.has('O') || uri.has('G') || uri.has('P') || uri.has('I') || uri.has('W'))) + if ($('.sidebar-pane#' + actTab).length && $(window).width() < 768 && (uri.has('o') || uri.has('g') || uri.has('p') || uri.has('i') || uri.has('w'))) $('.sidebar-close').addClass('fa-fade'); } permalinkReturn(); diff --git a/web/assets/js/tags-parsers.js b/web/assets/js/tags-parsers.js index e1b4511..93ba91d 100644 --- a/web/assets/js/tags-parsers.js +++ b/web/assets/js/tags-parsers.js @@ -20,7 +20,7 @@ function parse_tags(element, titlePopup, poiParser) { if (tags['addr:suburb']) addrVal += ', ' + tags['addr:suburb'] + ''; else if (tags['addr:hamlet']) addrVal += ', ' + tags['addr:hamlet'] + ''; if (tags['addr:city'] && tags['addr:city'] !== 'Bexhill-on-Sea') addrVal += ', ' + tags['addr:city'] + ''; - if (tags['addr:postcode']) addrVal += ', ' + tags['addr:postcode'] + ''; + if (tags['addr:postcode']) addrVal += ', ' + tags['addr:postcode'] + ''; markerPopup += L.Util.template(tagTmpl, { key: 'Address', keyVal: addrVal, iconName: 'fa-solid fa-location-pin' }); } return markerPopup; @@ -41,7 +41,7 @@ function parse_tags(element, titlePopup, poiParser) { if (websiteTag) { websiteVal = (websiteTag.indexOf('://www.') > 0) ? websiteTag.split('://www.')[1] : ((websiteTag.indexOf('://') > 0) ? websiteTag.split('://')[1] : websiteTag); websiteVal = websiteVal.endsWith('/') ? websiteVal.slice(0, -1) : websiteVal; - websiteVal = '' + websiteVal + ''; + websiteVal = '' + websiteVal + ''; markerPopup += L.Util.template(tagTmpl, { key: 'Website', keyVal: websiteVal, iconName: 'fa-solid fa-globe' }); } return markerPopup; @@ -78,8 +78,8 @@ function parse_tags(element, titlePopup, poiParser) { if (tags['wreck:date_sunk']) siteVal += 'Sunk: ' + dateFormat(tags['wreck:date_sunk'], 'short') + '; '; if (tags['ref:planningapp']) planningVal = '' + tags['ref:planningapp'] + ''; else if (tags['ref:historicplanningapp']) planningVal = '' + tags['ref:historicplanningapp'] + ''; - if (planningVal) siteVal += '' + planningVal + '; '; - if (tags.HE_ref) siteVal += 'Listed ' + (tags.listed_status || tags.HE_ref) + '; '; + if (planningVal) siteVal += '' + planningVal + '; '; + if (tags.HE_ref) siteVal += 'Listed ' + (tags.listed_status || tags.HE_ref) + '; '; if (tags.disused) siteVal += 'Currently disused; '; if (tags.building) { if (tags.building === 'garage') siteType = ['Garage', 'warehouse']; @@ -95,36 +95,36 @@ function parse_tags(element, titlePopup, poiParser) { const facility_parser = function(tags) { let facVal = ''; markerPopup = ''; - if (tags.indoor === 'yes') facVal += ''; - if (tags.wheelchair === 'yes') facVal += ''; - else if (tags.wheelchair === 'limited') facVal += ''; - else if (tags.wheelchair === 'no') facVal += ''; - if (tags.elevator === 'yes') facVal += ''; - if (tags['hearing_impaired:induction_loop'] === 'yes') facVal += ''; - if (tags['tactile_writing:braille'] === 'yes') facVal += ''; - if (tags.dog === 'yes') facVal += ''; - else if (tags.dog === 'no') facVal += ''; - else if (tags.dog === 'leashed') facVal += ''; - if (tags.internet_access === 'wlan') facVal += ''; - else if (tags.internet_access === 'terminal') facVal += ''; + if (tags.indoor === 'yes') facVal += ''; + if (tags.wheelchair === 'yes') facVal += ''; + else if (tags.wheelchair === 'limited') facVal += ''; + else if (tags.wheelchair === 'no') facVal += ''; + if (tags.elevator === 'yes') facVal += ''; + if (tags['hearing_impaired:induction_loop'] === 'yes') facVal += ''; + if (tags['tactile_writing:braille'] === 'yes') facVal += ''; + if (tags.dog === 'yes') facVal += ''; + else if (tags.dog === 'no') facVal += ''; + else if (tags.dog === 'leashed') facVal += ''; + if (tags.internet_access === 'wlan') facVal += ''; + else if (tags.internet_access === 'terminal') facVal += ''; if (tags['drinking_water:refill'] === 'yes') facVal += ''; - if (tags.live_music === 'yes') facVal += ''; - if (tags.shelter === 'yes' || tags.covered === 'yes' || tags.covered === 'booth') facVal += ''; + if (tags.live_music === 'yes') facVal += ''; + if (tags.shelter === 'yes' || tags.covered === 'yes' || tags.covered === 'booth') facVal += ''; if (tags.highway === 'bus_stop') { - if (tags.bench === 'yes') facVal += ''; - if (tags.bin === 'yes') facVal += ''; + if (tags.bench === 'yes') facVal += ''; + if (tags.bin === 'yes') facVal += ''; } if (tags.amenity === 'telephone') { - if (tags.internet_access === 'yes') facVal += ''; - if (tags.sms === 'yes') facVal += ''; + if (tags.internet_access === 'yes') facVal += ''; + if (tags.sms === 'yes') facVal += ''; } if (tags.amenity === 'toilets') { - if (tags.unisex === 'yes') facVal += ''; - if (tags.male === 'yes') facVal += ''; - if (tags.female === 'yes') facVal += ''; - if (tags.changing_table === 'yes') facVal += ''; + if (tags.unisex === 'yes') facVal += ''; + if (tags.male === 'yes') facVal += ''; + if (tags.female === 'yes') facVal += ''; + if (tags.changing_table === 'yes') facVal += ''; } - if (facVal) facVal = '' + facVal + ''; + if (facVal) facVal = '' + facVal + ''; if (tags.amenity === 'recycling') { let recycTag = '', recycList = ''; const recycIcon = { @@ -175,7 +175,7 @@ function parse_tags(element, titlePopup, poiParser) { if (recycIcon[recyc]) recycTag += ''; } if (recycList) markerPopup += L.Util.template(tagTmpl, { key: 'Recycling options', keyVal: listTidy(recycList, true), iconName: 'fa-solid fa-recycle' }); - if (recycTag) facVal += '' + recycTag + ''; + if (recycTag) facVal += '' + recycTag + ''; } if (Object.keys(tags).some(function(k){ return ~k.indexOf('payment:'); })) { let payTag = '', payList = ''; @@ -208,7 +208,7 @@ function parse_tags(element, titlePopup, poiParser) { if (payIcon[pay]) payTag += ''; } if (payList) markerPopup += L.Util.template(tagTmpl, { key: 'Payment options', keyVal: listTidy(payList, true), iconName: 'fa-solid fa-cash-register' }); - if (payTag) facVal += '' + payTag + ''; + if (payTag) facVal += '' + payTag + ''; } if (tags.fee) { let feeTag = ''; @@ -233,7 +233,7 @@ function parse_tags(element, titlePopup, poiParser) { if (dietKey.startsWith('diet:') && tags[dietKey] === 'yes') diet = dietKey.split(':')[1]; if (dietIcon[diet]) dietTag += ''; } - if (dietTag) facVal += '' + dietTag + ''; + if (dietTag) facVal += '' + dietTag + ''; } if (facVal) markerPopup += L.Util.template(tagTmpl, { key: 'Facilities', keyVal: '' + facVal + '', iconName: 'fa-solid fa-circle-info' }); return markerPopup; @@ -253,11 +253,12 @@ function parse_tags(element, titlePopup, poiParser) { const streetDate = $('date', street).text(); const streetDesc = $('desc', street).text(); if (streetDate && !tags.start_date) markerPopup += L.Util.template(tagTmpl, { key: 'Start date', keyVal: streetDate, iconName: 'fa-solid fa-calendar' }); - if (streetDesc) markerPopup += '' + L.Util.template(tagTmpl, { key: 'Etymology', keyVal: '' + streetDesc + '', iconName: 'fa-solid fa-book' }) + ''; - if (markerPopup) markerPopup += '- ' + $(xml).find('title').text() + ''; - if ($('#inputDebug').is(':checked')) console.debug('Street-names:', xml); + if (streetDesc) markerPopup += '' + L.Util.template(tagTmpl, { key: 'Etymology', keyVal: '' + streetDesc + '', iconName: 'fa-solid fa-book' }) + + '' + $(xml).find('title').text() + '' + + ''; + if ($('#settings-debug').is(':checked')) console.debug('Street-names:', xml); }, - error: function() { if ($('#inputDebug').is(':checked')) console.debug('ERROR STREET-NAMES:', encodeURI(this.url)); } + error: function() { if ($('#settings-debug').is(':checked')) console.debug('ERROR STREET-NAMES:', encodeURI(this.url)); } }); if (tags.maxspeed) streetVal += tags.maxspeed + '; '; if (tags.maxwidth) streetVal += tags.maxwidth + '; '; @@ -278,34 +279,34 @@ function parse_tags(element, titlePopup, poiParser) { return markerPopup; }; const furtherreading_parser = function(tags) { - const streetDirs = 'https://www.bexhillmuseum.org.uk/access-centre/research/street-directories-3/?wdt_column_filter[3]='; + const streetDirs = 'https://www.bexhillmuseum.org.uk/access-centre/bexhill-street-directories/?wdt_column_filter[road]='; let readingVal = ''; markerPopup = ''; if ((tags.building === 'apartments' || tags.building === 'bungalow' || tags.building === 'house') && tags['addr:street'] && LBounds.contains(element.center)) { readingVal += 'Street history; '; - // readingVal += 'Street directories; '; + readingVal += 'Street directories; '; } - // if (tags.highway && eName && element.type === 'way' && LBounds.contains(element.center)) readingVal += 'Street directories; '; + if (tags.highway && eName && element.type === 'way' && LBounds.contains(element.center)) readingVal += 'Street directories; '; if (tags.wikipedia || tags['site:wikipedia']) { const w = tags.wikipedia || tags['site:wikipedia']; readingVal += 'Wikipedia; '; } if (tags['ref:esher']) - readingVal += 'ESHER; '; + readingVal += 'ESHER; '; if (tags['ref:publicsculpturesofsussex']) - readingVal += 'Public Sculptures; '; + readingVal += 'Public Sculptures; '; if (tags['ref:iwm']) - readingVal += 'IWM; '; + readingVal += 'IWM; '; if (tags['url:bexhillhistorytrail']) - readingVal += 'History Trail; '; + readingVal += 'History Trail; '; if (tags['url:bexhillnature']) - readingVal += 'Bexhill Nature; '; + readingVal += 'Bexhill Nature; '; if (tags['ref:edubase']) - readingVal += 'URN ' + tags['ref:edubase'] + '; '; + readingVal += 'URN ' + tags['ref:edubase'] + '; '; if (tags['ref:charity']) - readingVal += 'Charity ' + tags['ref:charity'] + '; '; + readingVal += 'Charity ' + tags['ref:charity'] + '; '; if (tags.tpuk_ref) - readingVal += 'TrigpointingUK; '; + readingVal += 'TrigpointingUK; '; if (readingVal) { readingVal = readingVal.substring(0, readingVal.length - 2); markerPopup = L.Util.template(tagTmpl, { key: 'Further reading', keyVal: readingVal, iconName: 'fa-solid fa-book' }); @@ -352,9 +353,9 @@ function parse_tags(element, titlePopup, poiParser) { markerPopup += generic_img_parser(result.query.categorymembers[x].title, imgCount, ''); imgCount++; } - if ($('#inputDebug').is(':checked')) console.debug('Wikimedia-categories:', result); + if ($('#settings-debug').is(':checked')) console.debug('Wikimedia-categories:', result); }, - error: function() { if ($('#inputDebug').is(':checked')) console.debug('ERROR WIKIMEDIA-CATEGORIES:', encodeURI(this.url)); } + error: function() { if ($('#settings-debug').is(':checked')) console.debug('ERROR WIKIMEDIA-CATEGORIES:', encodeURI(this.url)); } }); } else */ for (let x = 0; x < multiCommons.length; x++) if (multiCommons[x].startsWith('File:')) { @@ -377,6 +378,7 @@ function parse_tags(element, titlePopup, poiParser) { ).split(';'); } if (imgCount > 1 || multiPano.length || multiVid.length) markerPopup += show_img_controls(imgCount, multiPano, multiVid); + if (imgCount > 0) markerPopup = ''; return markerPopup; }; // https://github.com/opening-hours/opening_hours.js @@ -461,23 +463,23 @@ function parse_tags(element, titlePopup, poiParser) { } // create readable table let ohTable = drawTable(oh, new Date()); - if (tags.opening_hours.indexOf('PH ') === -1 && ohTable) ohTable += '
Holiday periods may differ.
'; + if (tags.opening_hours.indexOf('PH ') === -1 && ohTable) ohTable += ''; // show tag and collapsible accordion if (ohState === true) openhrsState = 'Open until'; else if (ohState === false) openhrsState = 'Closed until'; else if (ohState === 'depends') openhrsState = 'Depends on'; if (openhrsState) { markerPopup = - '