From 0de7e1bf971f49c23a149254b058f1e30edc9ca3 Mon Sep 17 00:00:00 2001 From: Mark7625 <72366279+Mark7625@users.noreply.github.com> Date: Sun, 14 Jul 2024 18:53:03 +0100 Subject: [PATCH] Map Updates --- css/external/leaflet.css | 962 ++++++++++-------- css/main.css | 29 +- js/bot_api_converters/117hd/AABB.js | 44 + .../117hd/HD117_areas_converter.js | 151 +++ js/bot_api_converters/117hd/RegionBox.js | 31 + .../dreambot/dreambot_areas_converter.js | 6 +- .../dreambot/dreambot_path_converter.js | 2 +- .../dreambot/dreambot_polyarea_converter.js | 4 +- .../osbot/osbot_areas_converter.js | 36 +- .../osbot/osbot_converter.js | 2 +- .../osbot/osbot_polyarea_converter.js | 2 +- .../quantumbot/quantumbot_areas_converter.js | 6 +- .../quantumbot/quantumbot_path_converter.js | 2 +- .../quantumbot_polyarea_converter.js | 4 +- .../rspeer/rspeer_areas_converter.js | 2 +- .../rspeer/rspeer_polyarea_converter.js | 4 +- .../runelite/runelite_areas_converter.js | 12 +- .../runelite/runelite_path_converter.js | 4 +- .../runemate/runemate_areas_converter.js | 4 +- .../runemate/runemate_polyarea_converter.js | 4 +- .../tribot/tribot_areas_converter.js | 2 +- .../tribot/tribot_polyarea_converter.js | 2 +- js/controls/collection_control.js | 58 +- js/controls/control_map_type.js | 41 + js/controls/region_labels_control.js | 21 +- js/controls/title_label.js | 4 +- js/external/leaflet.js | 7 +- js/map.js | 7 +- js/model/Area.js | 2 +- js/model/Locations.js | 2 +- js/model/PolyArea.js | 2 +- js/model/Region.js | 6 +- map.html | 14 +- resources/locations.json | 398 -------- 34 files changed, 951 insertions(+), 926 deletions(-) create mode 100644 js/bot_api_converters/117hd/AABB.js create mode 100644 js/bot_api_converters/117hd/HD117_areas_converter.js create mode 100644 js/bot_api_converters/117hd/RegionBox.js create mode 100644 js/controls/control_map_type.js delete mode 100644 resources/locations.json diff --git a/css/external/leaflet.css b/css/external/leaflet.css index 9ade8dc..c2ec63f 100644 --- a/css/external/leaflet.css +++ b/css/external/leaflet.css @@ -10,233 +10,274 @@ .leaflet-zoom-box, .leaflet-image-layer, .leaflet-layer { - position: absolute; - left: 0; - top: 0; - } + position: absolute; + left: 0; + top: 0; +} + .leaflet-container { - overflow: hidden; - } + overflow: hidden; +} + .leaflet-tile, .leaflet-marker-icon, .leaflet-marker-shadow { - -webkit-user-select: none; - -moz-user-select: none; - user-select: none; - -webkit-user-drag: none; - } -/* Prevents IE11 from highlighting tiles in blue */ -.leaflet-tile::selection { - background: transparent; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + -webkit-user-drag: none; } + /* Safari renders non-retina tile on retina better with this, but Chrome is worse */ .leaflet-safari .leaflet-tile { - image-rendering: -webkit-optimize-contrast; - } + image-rendering: -webkit-optimize-contrast; +} + /* hack that prevents hw layers "stretching" when loading new tiles */ .leaflet-safari .leaflet-tile-container { - width: 1600px; - height: 1600px; - -webkit-transform-origin: 0 0; - } + width: 1600px; + height: 1600px; + -webkit-transform-origin: 0 0; +} + .leaflet-marker-icon, .leaflet-marker-shadow { - display: block; - } + display: block; +} + /* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */ /* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */ -.leaflet-container .leaflet-overlay-pane svg { - max-width: none !important; - max-height: none !important; - } +.leaflet-container .leaflet-overlay-pane svg, .leaflet-container .leaflet-marker-pane img, .leaflet-container .leaflet-shadow-pane img, .leaflet-container .leaflet-tile-pane img, -.leaflet-container img.leaflet-image-layer, -.leaflet-container .leaflet-tile { - max-width: none !important; - max-height: none !important; - width: auto; - padding: 0; - } - -.leaflet-container img.leaflet-tile { - /* See: https://bugs.chromium.org/p/chromium/issues/detail?id=600120 */ - mix-blend-mode: plus-lighter; +.leaflet-container img.leaflet-image-layer { + max-width: none !important; } .leaflet-container.leaflet-touch-zoom { - -ms-touch-action: pan-x pan-y; - touch-action: pan-x pan-y; - } + -ms-touch-action: pan-x pan-y; + touch-action: pan-x pan-y; +} + .leaflet-container.leaflet-touch-drag { - -ms-touch-action: pinch-zoom; - /* Fallback for FF which doesn't support pinch-zoom */ - touch-action: none; - touch-action: pinch-zoom; + -ms-touch-action: pinch-zoom; } + .leaflet-container.leaflet-touch-drag.leaflet-touch-zoom { - -ms-touch-action: none; - touch-action: none; + -ms-touch-action: none; + touch-action: none; } + .leaflet-container { - -webkit-tap-highlight-color: transparent; + -webkit-tap-highlight-color: transparent; } + .leaflet-container a { - -webkit-tap-highlight-color: rgba(51, 181, 229, 0.4); + -webkit-tap-highlight-color: rgba(51, 181, 229, 0.4); } + .leaflet-tile { - filter: inherit; - visibility: hidden; - } + filter: inherit; + visibility: hidden; +} + .leaflet-tile-loaded { - visibility: inherit; - } + visibility: inherit; +} + .leaflet-zoom-box { - width: 0; - height: 0; - -moz-box-sizing: border-box; - box-sizing: border-box; - z-index: 800; - } + width: 0; + height: 0; + -moz-box-sizing: border-box; + box-sizing: border-box; + z-index: 800; +} + /* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */ .leaflet-overlay-pane svg { - -moz-user-select: none; - } + -moz-user-select: none; +} + +.leaflet-pane { + z-index: 400; +} + +.leaflet-tile-pane { + z-index: 200; +} + +.leaflet-overlay-pane { + z-index: 400; +} + +.leaflet-shadow-pane { + z-index: 500; +} + +.leaflet-marker-pane { + z-index: 600; +} -.leaflet-pane { z-index: 400; } +.leaflet-tooltip-pane { + z-index: 650; +} -.leaflet-tile-pane { z-index: 200; } -.leaflet-overlay-pane { z-index: 400; } -.leaflet-shadow-pane { z-index: 500; } -.leaflet-marker-pane { z-index: 600; } -.leaflet-tooltip-pane { z-index: 650; } -.leaflet-popup-pane { z-index: 700; } +.leaflet-popup-pane { + z-index: 700; +} -.leaflet-map-pane canvas { z-index: 100; } -.leaflet-map-pane svg { z-index: 200; } +.leaflet-map-pane canvas { + z-index: 100; +} + +.leaflet-map-pane svg { + z-index: 200; +} .leaflet-vml-shape { - width: 1px; - height: 1px; - } -.lvml { - behavior: url(#default#VML); - display: inline-block; - position: absolute; - } + width: 1px; + height: 1px; +} +.lvml { + behavior: url(#default#VML); + display: inline-block; + position: absolute; +} /* control positioning */ .leaflet-control { - position: relative; - z-index: 800; - pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */ - pointer-events: auto; - } + position: relative; + z-index: 800; + pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */ + pointer-events: auto; +} + .leaflet-top, .leaflet-bottom { - position: absolute; - z-index: 1000; - pointer-events: none; - } + position: absolute; + z-index: 1000; + pointer-events: none; +} + .leaflet-top { - top: 0; - } + top: 0; +} + .leaflet-right { - right: 0; - } + right: 0; +} + .leaflet-bottom { - bottom: 0; - } + bottom: 0; +} + .leaflet-left { - left: 0; - } + left: 0; +} + .leaflet-control { - float: left; - clear: both; - } + float: left; + clear: both; +} + .leaflet-right .leaflet-control { - float: right; - } + float: right; +} + .leaflet-top .leaflet-control { - margin-top: 10px; - } + margin-top: 10px; +} + .leaflet-bottom .leaflet-control { - margin-bottom: 10px; - } + margin-bottom: 10px; +} + .leaflet-left .leaflet-control { - margin-left: 10px; - } -.leaflet-right .leaflet-control { - margin-right: 10px; - } + margin-left: 10px; +} +.leaflet-right .leaflet-control { + margin-right: 10px; +} /* zoom and fade animations */ +.leaflet-fade-anim .leaflet-tile { + will-change: opacity; +} + .leaflet-fade-anim .leaflet-popup { - opacity: 0; - -webkit-transition: opacity 0.2s linear; - -moz-transition: opacity 0.2s linear; - transition: opacity 0.2s linear; - } + opacity: 0; + -webkit-transition: opacity 0.2s linear; + -moz-transition: opacity 0.2s linear; + -o-transition: opacity 0.2s linear; + transition: opacity 0.2s linear; +} + .leaflet-fade-anim .leaflet-map-pane .leaflet-popup { - opacity: 1; - } + opacity: 1; +} + .leaflet-zoom-animated { - -webkit-transform-origin: 0 0; - -ms-transform-origin: 0 0; - transform-origin: 0 0; - } -svg.leaflet-zoom-animated { - will-change: transform; + -webkit-transform-origin: 0 0; + -ms-transform-origin: 0 0; + transform-origin: 0 0; +} + +.leaflet-zoom-anim .leaflet-zoom-animated { + will-change: transform; } .leaflet-zoom-anim .leaflet-zoom-animated { - -webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1); - -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1); - transition: transform 0.25s cubic-bezier(0,0,0.25,1); - } + -webkit-transition: -webkit-transform 0.25s cubic-bezier(0, 0, 0.25, 1); + -moz-transition: -moz-transform 0.25s cubic-bezier(0, 0, 0.25, 1); + -o-transition: -o-transform 0.25s cubic-bezier(0, 0, 0.25, 1); + transition: transform 0.25s cubic-bezier(0, 0, 0.25, 1); +} + .leaflet-zoom-anim .leaflet-tile, .leaflet-pan-anim .leaflet-tile { - -webkit-transition: none; - -moz-transition: none; - transition: none; - } + -webkit-transition: none; + -moz-transition: none; + -o-transition: none; + transition: none; +} .leaflet-zoom-anim .leaflet-zoom-hide { - visibility: hidden; - } - + visibility: hidden; +} /* cursors */ .leaflet-interactive { - cursor: pointer; - } + cursor: pointer; +} + .leaflet-grab { - cursor: -webkit-grab; - cursor: -moz-grab; - cursor: grab; - } + cursor: -webkit-grab; + cursor: -moz-grab; +} + .leaflet-crosshair, .leaflet-crosshair .leaflet-interactive { - cursor: crosshair; - } + cursor: crosshair; +} + .leaflet-popup-pane, .leaflet-control { - cursor: auto; - } + cursor: auto; +} + .leaflet-dragging .leaflet-grab, .leaflet-dragging .leaflet-grab .leaflet-interactive, .leaflet-dragging .leaflet-marker-draggable { - cursor: move; - cursor: -webkit-grabbing; - cursor: -moz-grabbing; - cursor: grabbing; - } + cursor: move; + cursor: -webkit-grabbing; + cursor: -moz-grabbing; +} /* marker & overlays interactivity */ .leaflet-marker-icon, @@ -244,418 +285,451 @@ svg.leaflet-zoom-animated { .leaflet-image-layer, .leaflet-pane > svg path, .leaflet-tile-container { - pointer-events: none; - } + pointer-events: none; +} .leaflet-marker-icon.leaflet-interactive, .leaflet-image-layer.leaflet-interactive, -.leaflet-pane > svg path.leaflet-interactive, -svg.leaflet-image-layer.leaflet-interactive path { - pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */ - pointer-events: auto; - } +.leaflet-pane > svg path.leaflet-interactive { + pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */ + pointer-events: auto; +} /* visual tweaks */ .leaflet-container { - background: #ddd; - outline-offset: 1px; - } + background: #ddd; + outline: 0; +} + .leaflet-container a { - color: #0078A8; - } -.leaflet-zoom-box { - border: 2px dotted #38f; - background: rgba(255,255,255,0.5); - } + color: #0078A8; +} +.leaflet-container a.leaflet-active { + outline: 2px solid orange; +} + +.leaflet-zoom-box { + border: 2px dotted #38f; + background: rgba(255, 255, 255, 0.5); +} /* general typography */ .leaflet-container { - font-family: "Helvetica Neue", Arial, Helvetica, sans-serif; - font-size: 12px; - font-size: 0.75rem; - line-height: 1.5; - } - + font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif; +} /* general toolbar styles */ .leaflet-bar { - box-shadow: 0 1px 5px rgba(0,0,0,0.65); - border-radius: 4px; - } -.leaflet-bar a { - background-color: #fff; - border-bottom: 1px solid #ccc; - width: 26px; - height: 26px; - line-height: 26px; - display: block; - text-align: center; - text-decoration: none; - color: black; - } + box-shadow: 0 1px 5px rgba(0, 0, 0, 0.65); + border-radius: 4px; +} + +.leaflet-bar a, +.leaflet-bar a:hover { + background-color: #fff; + border-bottom: 1px solid #ccc; + width: 26px; + height: 26px; + line-height: 26px; + display: block; + text-align: center; + text-decoration: none; + color: black; +} + .leaflet-bar a, .leaflet-control-layers-toggle { - background-position: 50% 50%; - background-repeat: no-repeat; - display: block; - } -.leaflet-bar a:hover, -.leaflet-bar a:focus { - background-color: #f4f4f4; - } + background-position: 50% 50%; + background-repeat: no-repeat; + display: block; +} + +.leaflet-bar a:hover { + background-color: #f4f4f4; +} + .leaflet-bar a:first-child { - border-top-left-radius: 4px; - border-top-right-radius: 4px; - } + border-top-left-radius: 4px; + border-top-right-radius: 4px; +} + .leaflet-bar a:last-child { - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; - border-bottom: none; - } + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + border-bottom: none; +} + .leaflet-bar a.leaflet-disabled { - cursor: default; - background-color: #f4f4f4; - color: #bbb; - } + cursor: default; + background-color: #f4f4f4; + color: #bbb; +} .leaflet-touch .leaflet-bar a { - width: 30px; - height: 30px; - line-height: 30px; - } + width: 30px; + height: 30px; + line-height: 30px; +} + .leaflet-touch .leaflet-bar a:first-child { - border-top-left-radius: 2px; - border-top-right-radius: 2px; - } + border-top-left-radius: 2px; + border-top-right-radius: 2px; +} + .leaflet-touch .leaflet-bar a:last-child { - border-bottom-left-radius: 2px; - border-bottom-right-radius: 2px; - } + border-bottom-left-radius: 2px; + border-bottom-right-radius: 2px; +} /* zoom control */ .leaflet-control-zoom-in, .leaflet-control-zoom-out { - font: bold 18px 'Lucida Console', Monaco, monospace; - text-indent: 1px; - } - -.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out { - font-size: 22px; - } + font: bold 18px 'Lucida Console', Monaco, monospace; + text-indent: 1px; +} +.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out { + font-size: 22px; +} /* layers control */ .leaflet-control-layers { - box-shadow: 0 1px 5px rgba(0,0,0,0.4); - background: #fff; - border-radius: 5px; - } + box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4); + background: #fff; + border-radius: 5px; +} + .leaflet-control-layers-toggle { - background-image: url(images/layers.png); - width: 36px; - height: 36px; - } + background-image: url(images/layers.png); + width: 36px; + height: 36px; +} + .leaflet-retina .leaflet-control-layers-toggle { - background-image: url(images/layers-2x.png); - background-size: 26px 26px; - } + background-image: url(images/layers-2x.png); + background-size: 26px 26px; +} + .leaflet-touch .leaflet-control-layers-toggle { - width: 44px; - height: 44px; - } + width: 44px; + height: 44px; +} + .leaflet-control-layers .leaflet-control-layers-list, .leaflet-control-layers-expanded .leaflet-control-layers-toggle { - display: none; - } + display: none; +} + .leaflet-control-layers-expanded .leaflet-control-layers-list { - display: block; - position: relative; - } + display: block; + position: relative; +} + .leaflet-control-layers-expanded { - padding: 6px 10px 6px 6px; - color: #333; - background: #fff; - } + padding: 6px 10px 6px 6px; + color: #333; + background: #fff; +} + .leaflet-control-layers-scrollbar { - overflow-y: scroll; - overflow-x: hidden; - padding-right: 5px; - } + overflow-y: scroll; + overflow-x: hidden; + padding-right: 5px; +} + .leaflet-control-layers-selector { - margin-top: 2px; - position: relative; - top: 1px; - } + margin-top: 2px; + position: relative; + top: 1px; +} + .leaflet-control-layers label { - display: block; - font-size: 13px; - font-size: 1.08333em; - } + display: block; +} + .leaflet-control-layers-separator { - height: 0; - border-top: 1px solid #ddd; - margin: 5px -10px 5px -6px; - } + height: 0; + border-top: 1px solid #ddd; + margin: 5px -10px 5px -6px; +} /* Default icon URLs */ -.leaflet-default-icon-path { /* used only in path-guessing heuristic, see L.Icon.Default */ - background-image: url(images/marker-icon.png); - } - +.leaflet-default-icon-path { + background-image: url(images/marker-icon.png); +} /* attribution and scale controls */ .leaflet-container .leaflet-control-attribution { - background: #fff; - background: rgba(255, 255, 255, 0.8); - margin: 0; - } + background: #fff; + background: rgba(255, 255, 255, 0.7); + margin: 0; +} + .leaflet-control-attribution, .leaflet-control-scale-line { - padding: 0 5px; - color: #333; - line-height: 1.4; - } + padding: 0 5px; + color: #333; +} + .leaflet-control-attribution a { - text-decoration: none; - } -.leaflet-control-attribution a:hover, -.leaflet-control-attribution a:focus { - text-decoration: underline; - } -.leaflet-attribution-flag { - display: inline !important; - vertical-align: baseline !important; - width: 1em; - height: 0.6669em; - } + text-decoration: none; +} + +.leaflet-control-attribution a:hover { + text-decoration: underline; +} + +.leaflet-container .leaflet-control-attribution, +.leaflet-container .leaflet-control-scale { + font-size: 11px; +} + .leaflet-left .leaflet-control-scale { - margin-left: 5px; - } + margin-left: 5px; +} + .leaflet-bottom .leaflet-control-scale { - margin-bottom: 5px; - } + margin-bottom: 5px; +} + .leaflet-control-scale-line { - border: 2px solid #777; - border-top: none; - line-height: 1.1; - padding: 2px 5px 1px; - white-space: nowrap; - -moz-box-sizing: border-box; - box-sizing: border-box; - background: rgba(255, 255, 255, 0.8); - text-shadow: 1px 1px #fff; - } + border: 2px solid #777; + border-top: none; + line-height: 1.1; + padding: 2px 5px 1px; + font-size: 11px; + white-space: nowrap; + overflow: hidden; + -moz-box-sizing: border-box; + box-sizing: border-box; + + background: #fff; + background: rgba(255, 255, 255, 0.5); +} + .leaflet-control-scale-line:not(:first-child) { - border-top: 2px solid #777; - border-bottom: none; - margin-top: -2px; - } + border-top: 2px solid #777; + border-bottom: none; + margin-top: -2px; +} + .leaflet-control-scale-line:not(:first-child):not(:last-child) { - border-bottom: 2px solid #777; - } + border-bottom: 2px solid #777; +} .leaflet-touch .leaflet-control-attribution, .leaflet-touch .leaflet-control-layers, .leaflet-touch .leaflet-bar { - box-shadow: none; - } + box-shadow: none; +} + .leaflet-touch .leaflet-control-layers, .leaflet-touch .leaflet-bar { - border: 2px solid rgba(0,0,0,0.2); - background-clip: padding-box; - } - + border: 2px solid rgba(0, 0, 0, 0.2); + background-clip: padding-box; +} /* popup */ .leaflet-popup { - position: absolute; - text-align: center; - margin-bottom: 20px; - } + position: absolute; + text-align: center; + margin-bottom: 20px; +} + .leaflet-popup-content-wrapper { - padding: 1px; - text-align: left; - border-radius: 12px; - } + padding: 1px; + text-align: left; + border-radius: 12px; +} + .leaflet-popup-content { - margin: 13px 24px 13px 20px; - line-height: 1.3; - font-size: 13px; - font-size: 1.08333em; - min-height: 1px; - } + margin: 13px 19px; + line-height: 1.4; +} + .leaflet-popup-content p { - margin: 17px 0; - margin: 1.3em 0; - } + margin: 18px 0; +} + .leaflet-popup-tip-container { - width: 40px; - height: 20px; - position: absolute; - left: 50%; - margin-top: -1px; - margin-left: -20px; - overflow: hidden; - pointer-events: none; - } + width: 40px; + height: 20px; + position: absolute; + left: 50%; + margin-left: -20px; + overflow: hidden; + pointer-events: none; +} + .leaflet-popup-tip { - width: 17px; - height: 17px; - padding: 1px; - - margin: -10px auto 0; - pointer-events: auto; - - -webkit-transform: rotate(45deg); - -moz-transform: rotate(45deg); - -ms-transform: rotate(45deg); - transform: rotate(45deg); - } + width: 17px; + height: 17px; + padding: 1px; + + margin: -10px auto 0; + + -webkit-transform: rotate(45deg); + -moz-transform: rotate(45deg); + -ms-transform: rotate(45deg); + -o-transform: rotate(45deg); + transform: rotate(45deg); +} + .leaflet-popup-content-wrapper, .leaflet-popup-tip { - background: white; - color: #333; - box-shadow: 0 3px 14px rgba(0,0,0,0.4); - } + background: white; + color: #333; + box-shadow: 0 3px 14px rgba(0, 0, 0, 0.4); +} + .leaflet-container a.leaflet-popup-close-button { - position: absolute; - top: 0; - right: 0; - border: none; - text-align: center; - width: 24px; - height: 24px; - font: 16px/24px Tahoma, Verdana, sans-serif; - color: #757575; - text-decoration: none; - background: transparent; - } -.leaflet-container a.leaflet-popup-close-button:hover, -.leaflet-container a.leaflet-popup-close-button:focus { - color: #585858; - } + position: absolute; + top: 0; + right: 0; + padding: 4px 4px 0 0; + border: none; + text-align: center; + width: 18px; + height: 14px; + font: 16px/14px Tahoma, Verdana, sans-serif; + color: #c3c3c3; + text-decoration: none; + font-weight: bold; + background: transparent; +} + +.leaflet-container a.leaflet-popup-close-button:hover { + color: #999; +} + .leaflet-popup-scrolled { - overflow: auto; - } + overflow: auto; + border-bottom: 1px solid #ddd; + border-top: 1px solid #ddd; +} .leaflet-oldie .leaflet-popup-content-wrapper { - -ms-zoom: 1; - } + zoom: 1; +} + .leaflet-oldie .leaflet-popup-tip { - width: 24px; - margin: 0 auto; + width: 24px; + margin: 0 auto; - -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)"; - filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678); - } + -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)"; + filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678); +} + +.leaflet-oldie .leaflet-popup-tip-container { + margin-top: -1px; +} .leaflet-oldie .leaflet-control-zoom, .leaflet-oldie .leaflet-control-layers, .leaflet-oldie .leaflet-popup-content-wrapper, .leaflet-oldie .leaflet-popup-tip { - border: 1px solid #999; - } - + border: 1px solid #999; +} /* div icon */ .leaflet-div-icon { - background: #fff; - border: 1px solid #666; - } - + background: #fff; + border: 1px solid #666; +} /* Tooltip */ /* Base styles for the element that has a tooltip */ .leaflet-tooltip { - position: absolute; - padding: 6px; - background-color: #fff; - border: 1px solid #fff; - border-radius: 3px; - color: #222; - white-space: nowrap; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - pointer-events: none; - box-shadow: 0 1px 3px rgba(0,0,0,0.4); - } -.leaflet-tooltip.leaflet-interactive { - cursor: pointer; - pointer-events: auto; - } + position: absolute; + padding: 6px; + background-color: #fff; + border: 1px solid #fff; + border-radius: 3px; + color: #222; + white-space: nowrap; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + pointer-events: none; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); +} + +.leaflet-tooltip.leaflet-clickable { + cursor: pointer; + pointer-events: auto; +} + .leaflet-tooltip-top:before, .leaflet-tooltip-bottom:before, .leaflet-tooltip-left:before, .leaflet-tooltip-right:before { - position: absolute; - pointer-events: none; - border: 6px solid transparent; - background: transparent; - content: ""; - } + position: absolute; + pointer-events: none; + border: 6px solid transparent; + background: transparent; + content: ""; +} /* Directions */ .leaflet-tooltip-bottom { - margin-top: 6px; + margin-top: 6px; } + .leaflet-tooltip-top { - margin-top: -6px; + margin-top: -6px; } + .leaflet-tooltip-bottom:before, .leaflet-tooltip-top:before { - left: 50%; - margin-left: -6px; - } + left: 50%; + margin-left: -6px; +} + .leaflet-tooltip-top:before { - bottom: 0; - margin-bottom: -12px; - border-top-color: #fff; - } + bottom: 0; + margin-bottom: -12px; + border-top-color: #fff; +} + .leaflet-tooltip-bottom:before { - top: 0; - margin-top: -12px; - margin-left: -6px; - border-bottom-color: #fff; - } + top: 0; + margin-top: -12px; + margin-left: -6px; + border-bottom-color: #fff; +} + .leaflet-tooltip-left { - margin-left: -6px; + margin-left: -6px; } + .leaflet-tooltip-right { - margin-left: 6px; + margin-left: 6px; } + .leaflet-tooltip-left:before, .leaflet-tooltip-right:before { - top: 50%; - margin-top: -6px; - } + top: 50%; + margin-top: -6px; +} + .leaflet-tooltip-left:before { - right: 0; - margin-right: -12px; - border-left-color: #fff; - } + right: 0; + margin-right: -12px; + border-left-color: #fff; +} + .leaflet-tooltip-right:before { - left: 0; - margin-left: -12px; - border-right-color: #fff; - } - -/* Printing */ - -@media print { - /* Prevent printers from removing background-images of controls. */ - .leaflet-control { - -webkit-print-color-adjust: exact; - print-color-adjust: exact; - } - } + left: 0; + margin-left: -12px; + border-right-color: #fff; +} diff --git a/css/main.css b/css/main.css index 19f4f82..83713b7 100644 --- a/css/main.css +++ b/css/main.css @@ -3,6 +3,13 @@ src: url(fonts/zrnic.ttf); } +{ + margin: 0; + padding: 0; + box-sizing: border-box; +} + + html, body { padding: 0; margin: 0; @@ -11,6 +18,26 @@ html, body { overflow: hidden; } +.leaflet-bar.leaflet-control.leaflet-control-custom.dropdown-dark { + background-color: #2b2b2b; + color: #ffffff; + border: 1px solid #444444; + padding: 5px; + border-radius: 4px; +} + +.leaflet-bar.leaflet-control.leaflet-control-custom.dropdown-dark option { + background-color: #2b2b2b; + color: #ffffff; +} + +.leaflet-bar.leaflet-control.leaflet-control-custom.dropdown-dark select { + background-color: #2b2b2b; + color: #ffffff; + border: 1px solid #444444; + padding: 5px; + border-radius: 4px; +} #map-container, #output-container { height: 100%; } @@ -54,7 +81,7 @@ html, body { } #titleLabel { - font-size: 28px; + font-size: 15px; padding-left: 15px; padding-right: 15px; padding-top: 10px; diff --git a/js/bot_api_converters/117hd/AABB.js b/js/bot_api_converters/117hd/AABB.js new file mode 100644 index 0000000..c7cfec7 --- /dev/null +++ b/js/bot_api_converters/117hd/AABB.js @@ -0,0 +1,44 @@ +export class AABB { + constructor(x1, y1, z1, x2, y2, z2) { + if (arguments.length === 1) { + let regionId = arguments[0]; + this.minX = (regionId >>> 8) << 6; + this.minY = (regionId & 0xFF) << 6; + this.maxX = this.minX + 63; + this.maxY = this.minY + 63; + this.minZ = Number.MIN_SAFE_INTEGER; + this.maxZ = Number.MAX_SAFE_INTEGER; + } else if (arguments.length === 2) { + this.minX = this.maxX = x1; + this.minY = this.maxY = y1; + this.minZ = Number.MIN_SAFE_INTEGER; + this.maxZ = Number.MAX_SAFE_INTEGER; + } else if (arguments.length === 3) { + this.minX = this.maxX = x1; + this.minY = this.maxY = y1; + this.minZ = this.maxZ = z1; + } else if (arguments.length === 4) { + this.minX = Math.min(x1, x2); + this.minY = Math.min(y1, y2); + this.maxX = Math.max(x1, x2); + this.maxY = Math.max(y1, y2); + this.minZ = Number.MIN_SAFE_INTEGER; + this.maxZ = Number.MAX_SAFE_INTEGER; + } else if (arguments.length === 5) { + this.minX = Math.min(x1, x2); + this.minY = Math.min(y1, y2); + this.maxX = Math.max(x1, x2); + this.maxY = Math.max(y1, y2); + this.minZ = this.maxZ = z1; + } else if (arguments.length === 6) { + this.minX = Math.min(x1, x2); + this.minY = Math.min(y1, y2); + this.minZ = Math.min(z1, z2); + this.maxX = Math.max(x1, x2); + this.maxY = Math.max(y1, y2); + this.maxZ = Math.max(z1, z2); + } else { + throw new Error('Invalid number of arguments for AABB constructor'); + } + } +} \ No newline at end of file diff --git a/js/bot_api_converters/117hd/HD117_areas_converter.js b/js/bot_api_converters/117hd/HD117_areas_converter.js new file mode 100644 index 0000000..f44807f --- /dev/null +++ b/js/bot_api_converters/117hd/HD117_areas_converter.js @@ -0,0 +1,151 @@ +'use strict'; + +import {Area} from '../../model/Area.js'; +import {Position} from '../../model/Position.js'; +import {OSBotAreasConverter} from '../osbot/osbot_areas_converter.js'; +import {AABB} from './AABB.js'; +import {RegionBox} from './RegionBox.js'; + +export class HD117AreasConverter extends OSBotAreasConverter { + + constructor() { + super(); + this.javaArea = "AABB"; + this.javaPosition = "AABB"; + } + + + + parseSections(jsonStrings, keys) { + let parsedSectionsArray = []; + + // Ensure jsonStrings is an array (if it's not already) + if (!Array.isArray(jsonStrings)) { + jsonStrings = [jsonStrings]; + } + + // Loop through each JSON string + jsonStrings.forEach(jsonString => { + let sections = {}; + + // Trim whitespace from JSON string + jsonString = jsonString.trim(); + + // Parse the JSON string into an object + let jsonObject = JSON.parse(jsonString); + + // Loop through each key and extract the corresponding section + keys.forEach(key => { + if (jsonObject.hasOwnProperty(key)) { + // Check if the value is an array or a single element + if (Array.isArray(jsonObject[key][0])) { + // It's an array of arrays + sections[key] = jsonObject[key]; + } else { + // Wrap single element in an array + sections[key] = [jsonObject[key]]; + } + } + }); + + // Push parsed sections object into array + parsedSectionsArray.push(sections); + }); + + return parsedSectionsArray; + } + + fromJava(text, areas) { + areas.removeAll(); + let keys = ["regionBoxes", "aabbs", "regions"]; + + try { + const formattedText = `{${text}}`; + let parsedSections = this.parseSections(formattedText, keys); + + parsedSections.forEach((sections, index) => { + // Process aabbs + if (sections.aabbs && Array.isArray(sections.aabbs)) { + sections.aabbs.forEach(aabb => { + let aabbData; + + switch (aabb.length) { + case 4: + aabbData = new AABB(aabb[0], aabb[1], 0, aabb[2], aabb[3], 0); + break; + case 6: + aabbData = new AABB(aabb[0], aabb[1], aabb[2], aabb[3], aabb[4], aabb[5]); + break; + default: + console.log(`Unexpected format for AABB: ${aabb}`); + return; // Exit the current iteration if format is unexpected + } + + // Add the area after switch cases + areas.add(new Area( + new Position(aabbData.minX, aabbData.minY, aabbData.minZ), + new Position(aabbData.maxX, aabbData.maxY, aabbData.maxZ) + )); + }); + } + + // Process regions + if (sections.regions && Array.isArray(sections.regions)) { + sections.regions.forEach(regionId => { + let regionData = new AABB(regionId); + areas.add(new Area( + new Position(regionData.minX, regionData.minY, regionData.minZ), + new Position(regionData.maxX, regionData.maxY, regionData.maxZ) + )); + }); + } else if (sections.regions) { + console.log('Regions field is not an array:', sections.regions); + } + + // Process regionBoxes + if (sections.regionBoxes && Array.isArray(sections.regionBoxes)) { + sections.regionBoxes.forEach(box => { + const from = box[0]; + const to = box[1]; + + const regionBox = new RegionBox(from, to); + const aabb = regionBox.toAabb(); + + areas.add(new Area( + new Position(aabb.minX, aabb.minY, aabb.minZ), + new Position(aabb.maxX, aabb.maxY, aabb.maxZ) + )); + }); + } else if (sections.regionBoxes) { + console.log('RegionBoxes field is not an array:', sections.regionBoxes); + } + }); + + } catch (error) { + console.error('Error parsing or processing input:', error); + } + } + + toJavaArray(areas) { + if (areas.areas.length === 1) { + let singleArea = this.toJavaSingle(areas.areas[0]); + return `"aabbs": [\n [ ${singleArea.join(', ')} ]\n ]`; + } else if (areas.areas.length > 1) { + let aabbs = areas.areas.map(area => this.toJavaSingle(area)); + let formattedAABBs = aabbs.map(arr => ` [ ${arr.join(', ')} ]`).join(',\n'); + return `"aabbs": [\n${formattedAABBs}\n]`; + } + return ""; + } + + toJavaSingle(area) { + let startX = Math.min(area.startPosition.x, area.endPosition.x); + let endX = Math.max(area.startPosition.x, area.endPosition.x); + let startY = Math.min(area.startPosition.y, area.endPosition.y); + let endY = Math.max(area.startPosition.y, area.endPosition.y); + + let plane = area.startPosition.z; + + return plane > 0 ? [startX, startY, plane, endX, endY, plane] : [startX, startY, endX, endY]; + } +} \ No newline at end of file diff --git a/js/bot_api_converters/117hd/RegionBox.js b/js/bot_api_converters/117hd/RegionBox.js new file mode 100644 index 0000000..adf9808 --- /dev/null +++ b/js/bot_api_converters/117hd/RegionBox.js @@ -0,0 +1,31 @@ +import {AABB} from './AABB.js'; + +export class RegionBox { + constructor(from, to) { + this.from = from; + this.to = to; + } + + toAabb() { + let x1 = this.from >>> 8; + let y1 = this.from & 0xFF; + let x2 = this.to >>> 8; + let y2 = this.to & 0xFF; + + if (x1 > x2) { + [x1, x2] = [x2, x1]; // Swap values + } + if (y1 > y2) { + [y1, y2] = [y2, y1]; // Swap values + } + + return new AABB( + (x1 << 6), + (y1 << 6), + 0, + ((x2 + 1) << 6) - 1, + ((y2 + 1) << 6) - 1, + 0 + ); + } +} \ No newline at end of file diff --git a/js/bot_api_converters/dreambot/dreambot_areas_converter.js b/js/bot_api_converters/dreambot/dreambot_areas_converter.js index 095e1da..7be14f1 100644 --- a/js/bot_api_converters/dreambot/dreambot_areas_converter.js +++ b/js/bot_api_converters/dreambot/dreambot_areas_converter.js @@ -9,7 +9,7 @@ export class DreamBotAreasConverter extends OSBotAreasConverter { constructor() { super(); - this.javaArea = "AABB"; + this.javaArea = "Area"; this.javaPosition = "Tile"; } @@ -53,8 +53,8 @@ export class DreamBotAreasConverter extends OSBotAreasConverter { toJavaSingle(area) { if (area.startPosition.z == 0) { - return `AreaName(${area.startPosition.x}, ${area.startPosition.y}, ${area.endPosition.x}, ${area.endPosition.y})`; + return `new ${this.javaArea}(${area.startPosition.x}, ${area.startPosition.y}, ${area.endPosition.x}, ${area.endPosition.y})`; } - return `AreaName(${area.startPosition.x}, ${area.startPosition.y}, ${area.endPosition.x}, ${area.endPosition.y}, ${area.endPosition.z})`; + return `new ${this.javaArea}(${area.startPosition.x}, ${area.startPosition.y}, ${area.endPosition.x}, ${area.endPosition.y}, ${area.endPosition.z})`; } } \ No newline at end of file diff --git a/js/bot_api_converters/dreambot/dreambot_path_converter.js b/js/bot_api_converters/dreambot/dreambot_path_converter.js index 7865a2f..7125320 100644 --- a/js/bot_api_converters/dreambot/dreambot_path_converter.js +++ b/js/bot_api_converters/dreambot/dreambot_path_converter.js @@ -8,7 +8,7 @@ export class DreamBotPathConverter extends OSBotPathConverter { constructor() { super(); - this.javaArea = "AABB"; + this.javaArea = "Area"; this.javaPosition = "Tile"; } diff --git a/js/bot_api_converters/dreambot/dreambot_polyarea_converter.js b/js/bot_api_converters/dreambot/dreambot_polyarea_converter.js index ea6927d..2768ddd 100644 --- a/js/bot_api_converters/dreambot/dreambot_polyarea_converter.js +++ b/js/bot_api_converters/dreambot/dreambot_polyarea_converter.js @@ -8,7 +8,7 @@ export class DreamBotPolyAreaConverter extends OSBotPolyAreaConverter { constructor() { super(); - this.javaArea = "AABB"; + this.javaArea = "Area"; this.javaPosition = "Tile"; } @@ -40,7 +40,7 @@ export class DreamBotPolyAreaConverter extends OSBotPolyAreaConverter { if (polyarea.positions.length == 0) { return ""; } - var output = `AreaName((\n new ${this.javaPosition}[] {`; + var output = `${this.javaArea} area = new ${this.javaArea}(\n new ${this.javaPosition}[] {`; for (var i = 0; i < polyarea.positions.length; i++) { var position = polyarea.positions[i]; output += `\n new ${this.javaPosition}(${position.x}, ${position.y}, ${position.z})`; diff --git a/js/bot_api_converters/osbot/osbot_areas_converter.js b/js/bot_api_converters/osbot/osbot_areas_converter.js index 4fa8c96..4d9a855 100644 --- a/js/bot_api_converters/osbot/osbot_areas_converter.js +++ b/js/bot_api_converters/osbot/osbot_areas_converter.js @@ -10,17 +10,7 @@ export class OSBotAreasConverter extends OSBotConverter { constructor() { super(); } - - /* - API Doc: - https://osbot.org/api/org/osbot/rs07/api/map/Position.html - https://osbot.org/api/org/osbot/rs07/api/map/Area.html - - Area(int x1, int y1, int x2, int y2) - Area(Position southWest, Position northEast) - - Position(int x, int y, int z) - */ + fromJava(text, areas) { areas.removeAll(); text = text.replace(/\s/g, ''); @@ -51,16 +41,8 @@ export class OSBotAreasConverter extends OSBotConverter { return output; } - toJavaSingle1(area) { - var areaDef = `AABB(${area.startPosition.x}, ${area.startPosition.y}, ${area.endPosition.x}, ${area.endPosition.y})`; - if (area.startPosition.z > 0) { - areaDef += `.setPlane(${area.startPosition.z})`; - } - return areaDef; - } - toJavaSingle(area) { - var areaDef = `AreaName(${area.startPosition.x}, ${area.startPosition.y}, ${area.endPosition.x}, ${area.endPosition.y})`; + var areaDef = `new ${this.javaArea}(${area.startPosition.x}, ${area.startPosition.y}, ${area.endPosition.x}, ${area.endPosition.y})`; if (area.startPosition.z > 0) { areaDef += `.setPlane(${area.startPosition.z})`; } @@ -69,17 +51,17 @@ export class OSBotAreasConverter extends OSBotConverter { toJavaArray(areas) { if (areas.areas.length === 1) { - return ` ` + this.toJavaSingle(areas.areas[0]) + `;`; + return `${this.javaArea} area = ` + this.toJavaSingle(areas.areas[0]) + `;`; } else if (areas.areas.length > 1) { - var output = `AreaName(\n`; + var output = `${this.javaArea}[] area = {\n`; for (var i = 0; i < areas.areas.length; i++) { - output += " " + this.toJavaSingle1(areas.areas[i]); + output += " " + this.toJavaSingle(areas.areas[i]); if (i !== areas.areas.length - 1) { output += ","; } output += "\n"; } - output += "),"; + output += "};"; return output; } return ""; @@ -87,7 +69,7 @@ export class OSBotAreasConverter extends OSBotConverter { toJavaList(areas) { if (areas.areas.length === 1) { - return ` ` + this.toJavaSingle(areas.areas[0]) + ";"; + return `${this.javaArea} area = ` + this.toJavaSingle(areas.areas[0]) + ";"; } else if (areas.areas.length > 1) { var output = `List<${this.javaArea}> area = new ArrayList<>();\n`; for (var i = 0; i < areas.areas.length; i++) { @@ -100,10 +82,10 @@ export class OSBotAreasConverter extends OSBotConverter { toJavaArraysAsList(areas) { if (areas.areas.length === 1) { - return ` ` + this.toJavaSingle(areas.areas[0]) + ";"; + return `${this.javaArea} area = ` + this.toJavaSingle(areas.areas[0]) + ";"; } else if (areas.areas.length > 1) { var output = `List<${this.javaArea}> area = Arrays.asList(\n` + - ` AreaName[]{\n`; + ` new ${this.javaArea}[]{\n`; for (var i = 0; i < areas.areas.length; i++) { output += " " + this.toJavaSingle(areas.areas[i]); diff --git a/js/bot_api_converters/osbot/osbot_converter.js b/js/bot_api_converters/osbot/osbot_converter.js index 0592345..42f4d75 100644 --- a/js/bot_api_converters/osbot/osbot_converter.js +++ b/js/bot_api_converters/osbot/osbot_converter.js @@ -6,7 +6,7 @@ export class OSBotConverter extends Converter { constructor() { super(); - this.javaArea = "AABB"; + this.javaArea = "Area"; this.javaPosition = "Position"; } } \ No newline at end of file diff --git a/js/bot_api_converters/osbot/osbot_polyarea_converter.js b/js/bot_api_converters/osbot/osbot_polyarea_converter.js index 53fe9cd..1d348c1 100644 --- a/js/bot_api_converters/osbot/osbot_polyarea_converter.js +++ b/js/bot_api_converters/osbot/osbot_polyarea_converter.js @@ -40,7 +40,7 @@ export class OSBotPolyAreaConverter extends OSBotConverter { if (polyarea.positions.length == 0) { return ""; } - var output = `AreaName((\n new int[][]{`; + var output = `${this.javaArea} area = new ${this.javaArea}(\n new int[][]{`; for (var i = 0; i < polyarea.positions.length; i++) { output += `\n { ${polyarea.positions[i].x}, ${polyarea.positions[i].y} }`; if (i !== polyarea.positions.length - 1) { diff --git a/js/bot_api_converters/quantumbot/quantumbot_areas_converter.js b/js/bot_api_converters/quantumbot/quantumbot_areas_converter.js index 00702bf..b77c25f 100644 --- a/js/bot_api_converters/quantumbot/quantumbot_areas_converter.js +++ b/js/bot_api_converters/quantumbot/quantumbot_areas_converter.js @@ -9,7 +9,7 @@ export class QuantumBotAreasConverter extends OSBotAreasConverter { constructor() { super(); - this.javaArea = "AABB"; + this.javaArea = "Area"; this.javaPosition = "Tile"; } @@ -55,8 +55,8 @@ export class QuantumBotAreasConverter extends OSBotAreasConverter { toJavaSingle(area) { if (area.startPosition.z == 0) { - return `AreaName(${area.startPosition.x}, ${area.startPosition.y}, ${area.endPosition.x}, ${area.endPosition.y})`; + return `new ${this.javaArea}(${area.startPosition.x}, ${area.startPosition.y}, ${area.endPosition.x}, ${area.endPosition.y})`; } - return `AreaName(${area.startPosition.x}, ${area.startPosition.y}, ${area.endPosition.x}, ${area.endPosition.y}, ${area.endPosition.z})`; + return `new ${this.javaArea}(${area.startPosition.x}, ${area.startPosition.y}, ${area.endPosition.x}, ${area.endPosition.y}, ${area.endPosition.z})`; } } \ No newline at end of file diff --git a/js/bot_api_converters/quantumbot/quantumbot_path_converter.js b/js/bot_api_converters/quantumbot/quantumbot_path_converter.js index 12ab941..d386c75 100644 --- a/js/bot_api_converters/quantumbot/quantumbot_path_converter.js +++ b/js/bot_api_converters/quantumbot/quantumbot_path_converter.js @@ -8,7 +8,7 @@ export class QuantumBotPathConverter extends OSBotPathConverter { constructor() { super(); - this.javaArea = "AABB"; + this.javaArea = "Area"; this.javaPosition = "Tile"; } } \ No newline at end of file diff --git a/js/bot_api_converters/quantumbot/quantumbot_polyarea_converter.js b/js/bot_api_converters/quantumbot/quantumbot_polyarea_converter.js index 46c3acf..17600ee 100644 --- a/js/bot_api_converters/quantumbot/quantumbot_polyarea_converter.js +++ b/js/bot_api_converters/quantumbot/quantumbot_polyarea_converter.js @@ -8,7 +8,7 @@ export class QuantumBotPolyAreaConverter extends OSBotPolyAreaConverter { constructor() { super(); - this.javaArea = "AABB"; + this.javaArea = "Area"; this.javaPosition = "Tile"; } @@ -39,7 +39,7 @@ export class QuantumBotPolyAreaConverter extends OSBotPolyAreaConverter { if (polyarea.positions.length == 0) { return ""; } - var output = `AreaName((\n new int[][]{`; + var output = `${this.javaArea} area = new ${this.javaArea}(\n new int[][]{`; for (var i = 0; i < polyarea.positions.length; i++) { output += `\n { ${polyarea.positions[i].x}, ${polyarea.positions[i].y} }`; if (i !== polyarea.positions.length - 1) { diff --git a/js/bot_api_converters/rspeer/rspeer_areas_converter.js b/js/bot_api_converters/rspeer/rspeer_areas_converter.js index 00bef5e..43959fe 100644 --- a/js/bot_api_converters/rspeer/rspeer_areas_converter.js +++ b/js/bot_api_converters/rspeer/rspeer_areas_converter.js @@ -9,7 +9,7 @@ export class RSPeerAreasConverter extends OSBotAreasConverter { constructor() { super(); - this.javaArea = "AABB"; + this.javaArea = "Area"; this.javaPosition = "Position"; } diff --git a/js/bot_api_converters/rspeer/rspeer_polyarea_converter.js b/js/bot_api_converters/rspeer/rspeer_polyarea_converter.js index 2a81e1c..3fd13f0 100644 --- a/js/bot_api_converters/rspeer/rspeer_polyarea_converter.js +++ b/js/bot_api_converters/rspeer/rspeer_polyarea_converter.js @@ -8,7 +8,7 @@ export class RSPeerPolyAreaConverter extends OSBotPolyAreaConverter { constructor() { super(); - this.javaArea = "AABB"; + this.javaArea = "Area"; this.javaPosition = "Position"; } @@ -57,7 +57,7 @@ export class RSPeerPolyAreaConverter extends OSBotPolyAreaConverter { if (polyarea.positions.length == 0) { return ""; } - var output = ` ${this.javaArea}.polygonal(\n new ${this.javaPosition}[] {`; + var output = `${this.javaArea} area = ${this.javaArea}.polygonal(\n new ${this.javaPosition}[] {`; for (var i = 0; i < polyarea.positions.length; i++) { var position = polyarea.positions[i]; output += `\n new ${this.javaPosition}(${position.x}, ${position.y}, ${position.z})`; diff --git a/js/bot_api_converters/runelite/runelite_areas_converter.js b/js/bot_api_converters/runelite/runelite_areas_converter.js index a6644eb..a4b609b 100644 --- a/js/bot_api_converters/runelite/runelite_areas_converter.js +++ b/js/bot_api_converters/runelite/runelite_areas_converter.js @@ -9,10 +9,10 @@ export class RuneLiteAreasConverter extends OSBotAreasConverter { constructor() { super(); - this.javaArea = "AABB"; - this.javaPosition = "AABB"; + this.javaArea = "WorldArea"; + this.javaPosition = "WorldPoint"; } - + fromJava(text, areas) { areas.removeAll(); text = text.replace(/\s/g, ''); @@ -37,17 +37,17 @@ export class RuneLiteAreasConverter extends OSBotAreasConverter { var pos2Values = match[3].split(","); var pos2Z = match[4] !== undefined ? match[4] : pos2Values[2]; - + areas.add(new Area(new Position(pos1Values[0], pos1Values[1], pos1Z), new Position(pos2Values[0], pos2Values[1], pos2Z))); } } } - + toJavaSingle(area) { var start = area.startPosition.x < area.endPosition.x ? area.startPosition.x : area.endPosition.x; var end = area.startPosition.y < area.endPosition.y ? area.startPosition.y : area.endPosition.y; - return `AreaName(${start}, ${end}, ${Math.abs(area.startPosition.x - area.endPosition.x) + 1}, ${Math.abs(area.startPosition.y - area.endPosition.y) + 1}, ${area.endPosition.z})`; + return `new ${this.javaArea}(${start}, ${end}, ${Math.abs(area.startPosition.x - area.endPosition.x) + 1}, ${Math.abs(area.startPosition.y - area.endPosition.y) + 1}, ${area.endPosition.z})`; } } \ No newline at end of file diff --git a/js/bot_api_converters/runelite/runelite_path_converter.js b/js/bot_api_converters/runelite/runelite_path_converter.js index b98afce..bcde47a 100644 --- a/js/bot_api_converters/runelite/runelite_path_converter.js +++ b/js/bot_api_converters/runelite/runelite_path_converter.js @@ -8,7 +8,7 @@ export class RuneLitePathConverter extends DreamBotPathConverter { constructor() { super(); - this.javaArea = "AABB"; - this.javaPosition = "AABB"; + this.javaArea = "WorldArea"; + this.javaPosition = "WorldPoint"; } } \ No newline at end of file diff --git a/js/bot_api_converters/runemate/runemate_areas_converter.js b/js/bot_api_converters/runemate/runemate_areas_converter.js index 57cff8b..67985bb 100644 --- a/js/bot_api_converters/runemate/runemate_areas_converter.js +++ b/js/bot_api_converters/runemate/runemate_areas_converter.js @@ -9,7 +9,7 @@ export class RuneMateAreasConverter extends OSBotAreasConverter { constructor() { super(); - this.javaArea = "AABB"; + this.javaArea = "Area"; this.javaPosition = "Coordinate"; } @@ -43,7 +43,7 @@ export class RuneMateAreasConverter extends OSBotAreasConverter { } toJavaSingle(area) { - return `AreaName.Rectangular(` + + return `new ${this.javaArea}.Rectangular(` + `new ${this.javaPosition}(${area.startPosition.x}, ${area.startPosition.y}, ${area.startPosition.z}), ` + `new ${this.javaPosition}(${area.endPosition.x}, ${area.endPosition.y}, ${area.endPosition.z})` + `)`; diff --git a/js/bot_api_converters/runemate/runemate_polyarea_converter.js b/js/bot_api_converters/runemate/runemate_polyarea_converter.js index 5168759..18be9ea 100644 --- a/js/bot_api_converters/runemate/runemate_polyarea_converter.js +++ b/js/bot_api_converters/runemate/runemate_polyarea_converter.js @@ -8,7 +8,7 @@ export class RuneMatePolyAreaConverter extends OSBotPolyAreaConverter { constructor() { super(); - this.javaArea = "AABB"; + this.javaArea = "Area"; this.javaPosition = "Coordinate"; } @@ -32,7 +32,7 @@ export class RuneMatePolyAreaConverter extends OSBotPolyAreaConverter { if (polyarea.positions.length == 0) { return ""; } - var output = `AreaName(.Polygonal(`; + var output = `${this.javaArea} area = new ${this.javaArea}.Polygonal(`; for (var i = 0; i < polyarea.positions.length; i++) { var position = polyarea.positions[i]; output += `\n new ${this.javaPosition}(${position.x}, ${position.y}, ${position.z})`; diff --git a/js/bot_api_converters/tribot/tribot_areas_converter.js b/js/bot_api_converters/tribot/tribot_areas_converter.js index cfd5f56..b9bab2e 100644 --- a/js/bot_api_converters/tribot/tribot_areas_converter.js +++ b/js/bot_api_converters/tribot/tribot_areas_converter.js @@ -37,6 +37,6 @@ export class TRiBotAreasConverter extends OSBotAreasConverter { } toJavaSingle(area) { - return `AreaName(new ${this.javaPosition}(${area.startPosition.x}, ${area.startPosition.y}, ${area.startPosition.z}), new ${this.javaPosition}(${area.endPosition.x}, ${area.endPosition.y}, ${area.endPosition.z}))`; + return `new ${this.javaArea}(new ${this.javaPosition}(${area.startPosition.x}, ${area.startPosition.y}, ${area.startPosition.z}), new ${this.javaPosition}(${area.endPosition.x}, ${area.endPosition.y}, ${area.endPosition.z}))`; } } \ No newline at end of file diff --git a/js/bot_api_converters/tribot/tribot_polyarea_converter.js b/js/bot_api_converters/tribot/tribot_polyarea_converter.js index 3a6d099..b658f41 100644 --- a/js/bot_api_converters/tribot/tribot_polyarea_converter.js +++ b/js/bot_api_converters/tribot/tribot_polyarea_converter.js @@ -35,7 +35,7 @@ export class TRiBotPolyAreaConverter extends OSBotPolyAreaConverter { if (polyarea.positions.length == 0) { return ""; } - var output = `AreaName((\n new ${this.javaPosition}[] {`; + var output = `${this.javaArea} area = new ${this.javaArea}(\n new ${this.javaPosition}[] {`; for (var i = 0; i < polyarea.positions.length; i++) { var position = polyarea.positions[i]; output += `\n new ${this.javaPosition}(${position.x}, ${position.y}, ${position.z})`; diff --git a/js/controls/collection_control.js b/js/controls/collection_control.js index ef90f1e..841d2a3 100644 --- a/js/controls/collection_control.js +++ b/js/controls/collection_control.js @@ -36,11 +36,48 @@ import {RuneMatePolyAreaConverter} from '../bot_api_converters/runemate/runemate import {RuneLiteAreasConverter} from '../bot_api_converters/runelite/runelite_areas_converter.js'; import {RuneLitePathConverter} from '../bot_api_converters/runelite/runelite_path_converter.js'; +import {HD117AreasConverter} from "../bot_api_converters/117hd/HD117_areas_converter.js"; + var converters = { - "HD": { + "OSBot": { "areas_converter": new OSBotAreasConverter(), "path_converter": new OSBotPathConverter(), "polyarea_converter": new OSBotPolyAreaConverter() + }, + "TRiBot": { + "areas_converter": new TRiBotAreasConverter(), + "path_converter": new TRiBotPathConverter(), + "polyarea_converter": new TRiBotPolyAreaConverter() + }, + "DreamBot": { + "areas_converter": new DreamBotAreasConverter(), + "path_converter": new DreamBotPathConverter(), + "polyarea_converter": new DreamBotPolyAreaConverter() + }, + "RSPeer": { + "areas_converter": new RSPeerAreasConverter(), + "path_converter": new RSPeerPathConverter(), + "polyarea_converter": new RSPeerPolyAreaConverter() + }, + "QuantumBot": { + "areas_converter": new QuantumBotAreasConverter(), + "path_converter": new QuantumBotPathConverter(), + "polyarea_converter": new QuantumBotPolyAreaConverter() + }, + "RuneMate": { + "areas_converter": new RuneMateAreasConverter(), + "path_converter": new RuneMatePathConverter(), + "polyarea_converter": new RuneMatePolyAreaConverter() + }, + "RuneLite": { + "areas_converter": new RuneLiteAreasConverter(), + "path_converter": new RuneLitePathConverter(), + "polyarea_converter": new RuneLitePathConverter() + }, + "117HD": { + "areas_converter": new HD117AreasConverter(), + "path_converter": new RuneLitePathConverter(), + "polyarea_converter": new RuneLitePathConverter() } }; @@ -76,7 +113,18 @@ export var CollectionControl = L.Control.extend({ }); // Settings control + this._createControl('', container, function(e) { + if ($("#settings-panel").is(":visible")) { + $("#settings-panel").hide("slide", {direction: "right"}, 300); + } else { + if (this._currentDrawable !== undefined) { + this._toggleCollectionMode(); + } + $("#settings-panel").css('display', 'flex').hide(); + $("#settings-panel").show("slide", {direction: "right"}, 300); + } + }); // Area control this._createControl('Area', container, function(e) { @@ -253,11 +301,15 @@ export var CollectionControl = L.Control.extend({ $("#code-output").html(output); }, - + _loadFromText: function() { if (this._currentDrawable !== undefined) { var botAPI = $("#bot-api option:selected").text(); - converters[botAPI][this._currentConverter].fromJava($("#code-output").text(), this._currentDrawable); + // Get plain text without formatting + var plainText = $("#code-output").text(); + // Replace newlines and tabs with spaces to standardize formatting + plainText = plainText.replace(/\n/g, ' ').replace(/\t/g, ' '); + converters[botAPI][this._currentConverter].fromJava(plainText, this._currentDrawable); } }, diff --git a/js/controls/control_map_type.js b/js/controls/control_map_type.js new file mode 100644 index 0000000..36911a0 --- /dev/null +++ b/js/controls/control_map_type.js @@ -0,0 +1,41 @@ +'use strict'; + +export var ControlMapType = L.Control.extend({ + options: { + position: 'topleft' + }, + + onAdd: function (map) { + var container = L.DomUtil.create('div', 'leaflet-bar leaflet-control'); + container.id = 'location-lookup'; + container.style.background = 'none'; + container.style.fontSize = '16px'; + container.style.width = '180px'; + container.style.height = 'auto'; + L.DomEvent.disableClickPropagation(container); + + var dropdown = L.DomUtil.create('select', 'leaflet-bar leaflet-control leaflet-control-custom dropdown-dark', container); + + var option1 = L.DomUtil.create('option', '', dropdown); + option1.value = 'normal'; + option1.text = 'Normal View'; + + var option2 = L.DomUtil.create('option', '', dropdown); + option2.value = 'objects'; + option2.text = 'Object View'; + + var option2 = L.DomUtil.create('option', '', dropdown); + option2.value = 'height'; + option2.text = 'Height Map'; + + L.DomEvent.on(dropdown, 'change', (e) => this._onDropdownChange(e, map), this); + + return container; + }, + + _onDropdownChange: function(e, map) { + console.log('Selected value:', e.target.value); + this._map.mapType = e.target.value + this._map.updateMapPath(); + } +}); \ No newline at end of file diff --git a/js/controls/region_labels_control.js b/js/controls/region_labels_control.js index 0a173f2..edd9cba 100644 --- a/js/controls/region_labels_control.js +++ b/js/controls/region_labels_control.js @@ -14,15 +14,28 @@ var RegionLabelsCanvas = CanvasLayer.extend({ onDrawLayer: function (info) { var zoom = this._map.getZoom(); - - var fontSize = 0.15 * Math.pow(2, zoom); - + + var fontSize = 0.12 * Math.pow(2, zoom); + + var ctx = info.canvas.getContext('2d'); ctx.clearRect(0, 0, info.canvas.width, info.canvas.height); ctx.font = fontSize + 'px Calibri'; ctx.fillStyle = 'white'; ctx.textAlign = "center"; + ctx.strokeStyle = 'black'; // Outline color + ctx.lineWidth = 3; // Outline width + ctx.textAlign = "center"; + + function drawText(text, x, y) { + // Draw black outline + ctx.strokeText(text, x, y); + + // Draw white text over the black outline + ctx.fillText(text, x, y); + } + for (var x = MIN_X; x < MAX_X; x += REGION_WIDTH) { for (var y = MIN_Y; y < MAX_Y; y += REGION_HEIGHT) { @@ -33,7 +46,7 @@ var RegionLabelsCanvas = CanvasLayer.extend({ var canvasPoint = info.layer._map.latLngToContainerPoint(latLng); - ctx.fillText(region.id.toString(), canvasPoint.x, canvasPoint.y); + drawText(region.id.toString() + ' (' + region.regionX.toString() + ' , ' + region.regionY.toString() + ')', canvasPoint.x + 10, canvasPoint.y + 10); } } } diff --git a/js/controls/title_label.js b/js/controls/title_label.js index 428aa64..e7a226c 100644 --- a/js/controls/title_label.js +++ b/js/controls/title_label.js @@ -8,8 +8,8 @@ export var TitleLabel = L.Control.extend({ onAdd: function (map) { var container = L.DomUtil.create('div'); container.id = 'titleLabel'; - container.href = 'http://osbot.org/forum/user/192661-explv/'; - container.innerHTML = "Explv's Map"; + container.href = 'https://github.com/117HD/RLHD'; + container.innerHTML = "117HD's Map"; L.DomEvent.disableClickPropagation(container); return container; diff --git a/js/external/leaflet.js b/js/external/leaflet.js index a3bf693..1de4ee1 100644 --- a/js/external/leaflet.js +++ b/js/external/leaflet.js @@ -1,6 +1,5 @@ /* @preserve - * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com - * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade + * Leaflet 1.2.0+Detached: 1ac320ba232cb85b73ac81f3d82780c9d07f0d4e.1ac320b, a JS library for interactive maps. http://leafletjs.com + * (c) 2010-2017 Vladimir Agafonkin, (c) 2010-2011 CloudMade */ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).leaflet={})}(this,function(t){"use strict";function l(t){for(var e,i,n=1,o=arguments.length;n=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("span"));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;5280'+(b.inlineSvg?' ':"")+"Leaflet"},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=0}function I(t,i,e,n){return"touchstart"===i?O(t,e,n):"touchmove"===i?W(t,e,n):"touchend"===i&&H(t,e,n),this}function A(t,i,e){var n=t["_leaflet_"+i+e];return"touchstart"===i?t.removeEventListener(Xi,n,!1):"touchmove"===i?t.removeEventListener(Ji,n,!1):"touchend"===i&&(t.removeEventListener($i,n,!1),t.removeEventListener(Qi,n,!1)),this}function O(t,i,n){var o=e(function(t){if("mouse"!==t.pointerType&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE){if(!(te.indexOf(t.target.tagName)<0))return;$(t)}j(t,i)});t["_leaflet_touchstart"+n]=o,t.addEventListener(Xi,o,!1),ee||(document.documentElement.addEventListener(Xi,R,!0),document.documentElement.addEventListener(Ji,D,!0),document.documentElement.addEventListener($i,N,!0),document.documentElement.addEventListener(Qi,N,!0),ee=!0)}function R(t){ie[t.pointerId]=t,ne++}function D(t){ie[t.pointerId]&&(ie[t.pointerId]=t)}function N(t){delete ie[t.pointerId],ne--}function j(t,i){t.touches=[];for(var e in ie)t.touches.push(ie[e]);t.changedTouches=[t],i(t)}function W(t,i,e){var n=function(t){(t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&"mouse"!==t.pointerType||0!==t.buttons)&&j(t,i)};t["_leaflet_touchmove"+e]=n,t.addEventListener(Ji,n,!1)}function H(t,i,e){var n=function(t){j(t,i)};t["_leaflet_touchend"+e]=n,t.addEventListener($i,n,!1),t.addEventListener(Qi,n,!1)}function F(t,i,e){function n(t){var i;if(Wi){if(!Li||"mouse"===t.pointerType)return;i=ne}else i=t.touches.length;if(!(i>1)){var e=Date.now(),n=e-(s||e);r=t.touches?t.touches[0]:t,a=n>0&&n<=h,s=e}}function o(t){if(a&&!r.cancelBubble){if(Wi){if(!Li||"mouse"===t.pointerType)return;var e,n,o={};for(n in r)e=r[n],o[n]=e&&e.bind?e.bind(r):e;r=o}r.type="dblclick",i(r),s=null}}var s,r,a=!1,h=250;return t[re+oe+e]=n,t[re+se+e]=o,t[re+"dblclick"+e]=i,t.addEventListener(oe,n,!1),t.addEventListener(se,o,!1),t.addEventListener("dblclick",i,!1),this}function U(t,i){var e=t[re+oe+i],n=t[re+se+i],o=t[re+"dblclick"+i];return t.removeEventListener(oe,e,!1),t.removeEventListener(se,n,!1),Li||t.removeEventListener("dblclick",o,!1),this}function V(t,i,e,n){if("object"==typeof i)for(var o in i)q(t,o,i[o],e);else for(var s=0,r=(i=u(i)).length;s100&&n<500||t.target._simulatedClick&&!t._simulated?Q(t):(di=e,i(t))}function rt(t){return"string"==typeof t?document.getElementById(t):t}function at(t,i){var e=t.style[i]||t.currentStyle&&t.currentStyle[i];if((!e||"auto"===e)&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);e=n?n[i]:null}return"auto"===e?null:e}function ht(t,i,e){var n=document.createElement(t);return n.className=i||"",e&&e.appendChild(n),n}function ut(t){var i=t.parentNode;i&&i.removeChild(t)}function lt(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function ct(t){var i=t.parentNode;i.lastChild!==t&&i.appendChild(t)}function _t(t){var i=t.parentNode;i.firstChild!==t&&i.insertBefore(t,i.firstChild)}function dt(t,i){if(void 0!==t.classList)return t.classList.contains(i);var e=gt(t);return e.length>0&&new RegExp("(^|\\s)"+i+"(\\s|$)").test(e)}function pt(t,i){if(void 0!==t.classList)for(var e=u(i),n=0,o=e.length;nh&&(s=r,h=a);h>e&&(i[s]=1,St(t,i,e,n,s),St(t,i,e,s,o))}function kt(t,i){for(var e=[t[0]],n=1,o=0,s=t.length;ni&&(e.push(t[n]),o=n);return oi.max.x&&(e|=2),t.yi.max.y&&(e|=8),e}function Ot(t,i){var e=i.x-t.x,n=i.y-t.y;return e*e+n*n}function Rt(t,i,e,n){var o,s=i.x,r=i.y,a=e.x-s,h=e.y-r,u=a*a+h*h;return u>0&&((o=((t.x-s)*a+(t.y-r)*h)/u)>1?(s=e.x,r=e.y):o>0&&(s+=a*o,r+=h*o)),a=t.x-s,h=t.y-r,n?a*a+h*h:new x(s,r)}function Dt(t){return!ei(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function Nt(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Dt(t)}function jt(t,i,e){var n,o,s,r,a,h,u,l,c,_=[1,4,2,8];for(o=0,u=t.length;o=this.min.x&&e.x<=this.max.x&&i.y>=this.min.y&&e.y<=this.max.y},intersects:function(t){t=P(t);var i=this.min,e=this.max,n=t.min,o=t.max,s=o.x>=i.x&&n.x<=e.x,r=o.y>=i.y&&n.y<=e.y;return s&&r},overlaps:function(t){t=P(t);var i=this.min,e=this.max,n=t.min,o=t.max,s=o.x>i.x&&n.xi.y&&n.y=n.lat&&e.lat<=o.lat&&i.lng>=n.lng&&e.lng<=o.lng},intersects:function(t){t=z(t);var i=this._southWest,e=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>=i.lat&&n.lat<=e.lat,r=o.lng>=i.lng&&n.lng<=e.lng;return s&&r},overlaps:function(t){t=z(t);var i=this._southWest,e=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>i.lat&&n.lati.lng&&n.lng1,Gi=!!document.createElement("canvas").getContext,qi=!(!document.createElementNS||!S("svg").createSVGRect),Ki=!qi&&function(){try{var t=document.createElement("div");t.innerHTML='';var i=t.firstChild;return i.style.behavior="url(#default#VML)",i&&"object"==typeof i.adj}catch(t){return!1}}(),Yi=(Object.freeze||Object)({ie:xi,ielt9:wi,edge:Li,webkit:bi,android:Pi,android23:Ti,opera:zi,chrome:Mi,gecko:Ci,safari:Zi,phantom:Ei,opera12:Si,win:ki,ie3d:Bi,webkit3d:Ii,gecko3d:Ai,any3d:Oi,mobile:Ri,mobileWebkit:Di,mobileWebkit3d:Ni,msPointer:ji,pointer:Wi,touch:Hi,mobileOpera:Fi,mobileGecko:Ui,retina:Vi,canvas:Gi,svg:qi,vml:Ki}),Xi=ji?"MSPointerDown":"pointerdown",Ji=ji?"MSPointerMove":"pointermove",$i=ji?"MSPointerUp":"pointerup",Qi=ji?"MSPointerCancel":"pointercancel",te=["INPUT","SELECT","OPTION"],ie={},ee=!1,ne=0,oe=ji?"MSPointerDown":Wi?"pointerdown":"touchstart",se=ji?"MSPointerUp":Wi?"pointerup":"touchend",re="_leaflet_",ae="_leaflet_events",he=ki&&Mi?2*window.devicePixelRatio:Ci?window.devicePixelRatio:1,ue={},le=(Object.freeze||Object)({on:V,off:G,stopPropagation:Y,disableScrollPropagation:X,disableClickPropagation:J,preventDefault:$,stop:Q,getMousePosition:tt,getWheelDelta:it,fakeStop:et,skipped:nt,isExternalTarget:ot,addListener:V,removeListener:G}),ce=xt(["transform","WebkitTransform","OTransform","MozTransform","msTransform"]),_e=xt(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),de="webkitTransition"===_e||"OTransition"===_e?_e+"End":"transitionend";if("onselectstart"in document)pi=function(){V(window,"selectstart",$)},mi=function(){G(window,"selectstart",$)};else{var pe=xt(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);pi=function(){if(pe){var t=document.documentElement.style;fi=t[pe],t[pe]="none"}},mi=function(){pe&&(document.documentElement.style[pe]=fi,fi=void 0)}}var me,fe,ge=(Object.freeze||Object)({TRANSFORM:ce,TRANSITION:_e,TRANSITION_END:de,get:rt,getStyle:at,create:ht,remove:ut,empty:lt,toFront:ct,toBack:_t,hasClass:dt,addClass:pt,removeClass:mt,setClass:ft,getClass:gt,setOpacity:vt,testProp:xt,setTransform:wt,setPosition:Lt,getPosition:bt,disableTextSelection:pi,enableTextSelection:mi,disableImageDrag:Pt,enableImageDrag:Tt,preventOutline:zt,restoreOutline:Mt}),ve=ui.extend({run:function(t,i,e,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=e||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=bt(t),this._offset=i.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=f(this._animate,this),this._step()},_step:function(t){var i=+new Date-this._startTime,e=1e3*this._duration;ithis.options.maxZoom?this.setZoom(t):this},panInsideBounds:function(t,i){this._enforcingBounds=!0;var e=this.getCenter(),n=this._limitCenter(e,this._zoom,z(t));return e.equals(n)||this.panTo(n,i),this._enforcingBounds=!1,this},invalidateSize:function(t){if(!this._loaded)return this;t=i({animate:!1,pan:!0},!0===t?{animate:!0}:t);var n=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var o=this.getSize(),s=n.divideBy(2).round(),r=o.divideBy(2).round(),a=s.subtract(r);return a.x||a.y?(t.animate&&t.pan?this.panBy(a):(t.pan&&this._rawPanBy(a),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(e(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:n,newSize:o})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=i({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var n=e(this._handleGeolocationResponse,this),o=e(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(n,o,t):navigator.geolocation.getCurrentPosition(n,o,t),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 i=t.code,e=t.message||(1===i?"permission denied":2===i?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:i,message:"Geolocation error: "+e+"."})},_handleGeolocationResponse:function(t){var i=new M(t.coords.latitude,t.coords.longitude),e=i.toBounds(t.coords.accuracy),n=this._locateOptions;if(n.setView){var o=this.getBoundsZoom(e);this.setView(i,n.maxZoom?Math.min(o,n.maxZoom):o)}var s={latlng:i,bounds:e,timestamp:t.timestamp};for(var r in t.coords)"number"==typeof t.coords[r]&&(s[r]=t.coords[r]);this.fire("locationfound",s)},addHandler:function(t,i){if(!i)return this;var e=this[t]=new i(this);return this._handlers.push(e),this.options[t]&&e.enable(),this},remove:function(){if(this._initEvents(!0),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}ut(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._clearHandlers(),this._loaded&&this.fire("unload");var t;for(t in this._layers)this._layers[t].remove();for(t in this._panes)ut(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,i){var e=ht("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),i||this._mapPane);return t&&(this._panes[t]=e),e},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new T(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,i,e){t=z(t),e=w(e||[0,0]);var n=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),r=t.getNorthWest(),a=t.getSouthEast(),h=this.getSize().subtract(e),u=P(this.project(a,n),this.project(r,n)).getSize(),l=Oi?this.options.zoomSnap:1,c=h.x/u.x,_=h.y/u.y,d=i?Math.max(c,_):Math.min(c,_);return n=this.getScaleZoom(d,n),l&&(n=Math.round(n/(l/100))*(l/100),n=i?Math.ceil(n/l)*l:Math.floor(n/l)*l),Math.max(o,Math.min(s,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new x(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,i){var e=this._getTopLeftPoint(t,i);return new b(e,e.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,i){var e=this.options.crs;return i=void 0===i?this._zoom:i,e.scale(t)/e.scale(i)},getScaleZoom:function(t,i){var e=this.options.crs;i=void 0===i?this._zoom:i;var n=e.zoom(t*e.scale(i));return isNaN(n)?1/0:n},project:function(t,i){return i=void 0===i?this._zoom:i,this.options.crs.latLngToPoint(C(t),i)},unproject:function(t,i){return i=void 0===i?this._zoom:i,this.options.crs.pointToLatLng(w(t),i)},layerPointToLatLng:function(t){var i=w(t).add(this.getPixelOrigin());return this.unproject(i)},latLngToLayerPoint:function(t){return this.project(C(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(C(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(z(t))},distance:function(t,i){return this.options.crs.distance(C(t),C(i))},containerPointToLayerPoint:function(t){return w(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return w(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var i=this.containerPointToLayerPoint(w(t));return this.layerPointToLatLng(i)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(C(t)))},mouseEventToContainerPoint:function(t){return tt(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var i=this._container=rt(t);if(!i)throw new Error("Map container not found.");if(i._leaflet_id)throw new Error("Map container is already initialized.");V(i,"scroll",this._onScroll,this),this._containerId=n(i)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&Oi,pt(t,"leaflet-container"+(Hi?" leaflet-touch":"")+(Vi?" leaflet-retina":"")+(wi?" leaflet-oldie":"")+(Zi?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var i=at(t,"position");"absolute"!==i&&"relative"!==i&&"fixed"!==i&&(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),Lt(this._mapPane,new x(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(pt(t.markerPane,"leaflet-zoom-hide"),pt(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,i){Lt(this._mapPane,new x(0,0));var e=!this._loaded;this._loaded=!0,i=this._limitZoom(i),this.fire("viewprereset");var n=this._zoom!==i;this._moveStart(n)._move(t,i)._moveEnd(n),this.fire("viewreset"),e&&this.fire("load")},_moveStart:function(t){return t&&this.fire("zoomstart"),this.fire("movestart")},_move:function(t,i,e){void 0===i&&(i=this._zoom);var n=this._zoom!==i;return this._zoom=i,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(n||e&&e.pinch)&&this.fire("zoom",e),this.fire("move",e)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return g(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){Lt(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={},this._targets[n(this._container)]=this;var i=t?G:V;i(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress",this._handleDOMEvent,this),this.options.trackResize&&i(window,"resize",this._onResize,this),Oi&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){g(this._resizeRequest),this._resizeRequest=f(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,i){for(var e,o=[],s="mouseout"===i||"mouseover"===i,r=t.target||t.srcElement,a=!1;r;){if((e=this._targets[n(r)])&&("click"===i||"preclick"===i)&&!t._simulated&&this._draggableMoved(e)){a=!0;break}if(e&&e.listens(i,!0)){if(s&&!ot(r,t))break;if(o.push(e),s)break}if(r===this._container)break;r=r.parentNode}return o.length||a||s||!ot(r,t)||(o=[this]),o},_handleDOMEvent:function(t){if(this._loaded&&!nt(t)){var i=t.type;"mousedown"!==i&&"keypress"!==i||zt(t.target||t.srcElement),this._fireDOMEvent(t,i)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,n){if("click"===t.type){var o=i({},t);o.type="preclick",this._fireDOMEvent(o,o.type,n)}if(!t._stopped&&(n=(n||[]).concat(this._findEventTargets(t,e))).length){var s=n[0];"contextmenu"===e&&s.listens(e,!0)&&$(t);var r={originalEvent:t};if("keypress"!==t.type){var a=s.options&&"icon"in s.options;r.containerPoint=a?this.latLngToContainerPoint(s.getLatLng()):this.mouseEventToContainerPoint(t),r.layerPoint=this.containerPointToLayerPoint(r.containerPoint),r.latlng=a?s.getLatLng():this.layerPointToLatLng(r.layerPoint)}for(var h=0;h0?Math.round(t-i)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(i))},_limitZoom:function(t){var i=this.getMinZoom(),e=this.getMaxZoom(),n=Oi?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(i,Math.min(e,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){mt(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,i){var e=this._getCenterOffset(t)._floor();return!(!0!==(i&&i.animate)&&!this.getSize().contains(e))&&(this.panBy(e,i),!0)},_createAnimProxy:function(){var t=this._proxy=ht("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(t){var i=ce,e=this._proxy.style[i];wt(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),e===this._proxy.style[i]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",function(){var t=this.getCenter(),i=this.getZoom();wt(this._proxy,this.project(t,i),this.getZoomScale(i,1))},this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){ut(this._proxy),delete this._proxy},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,i,e){if(this._animatingZoom)return!0;if(e=e||{},!this._zoomAnimated||!1===e.animate||this._nothingToAnimate()||Math.abs(i-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(i),o=this._getCenterOffset(t)._divideBy(1-1/n);return!(!0!==e.animate&&!this.getSize().contains(o))&&(f(function(){this._moveStart(!0)._animateZoom(t,i,!0)},this),!0)},_animateZoom:function(t,i,n,o){n&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=i,pt(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:i,noUpdate:o}),setTimeout(e(this._onZoomTransitionEnd,this),250)},_onZoomTransitionEnd:function(){this._animatingZoom&&(mt(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),f(function(){this._moveEnd(!0)},this))}}),xe=v.extend({options:{position:"topright"},initialize:function(t){l(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var i=this._map;return i&&i.removeControl(this),this.options.position=t,i&&i.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var i=this._container=this.onAdd(t),e=this.getPosition(),n=t._controlCorners[e];return pt(i,"leaflet-control"),-1!==e.indexOf("bottom")?n.insertBefore(i,n.firstChild):n.appendChild(i),this},remove:function(){return this._map?(ut(this._container),this.onRemove&&this.onRemove(this._map),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),we=function(t){return new xe(t)};ye.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){function t(t,o){var s=e+t+" "+e+o;i[t+o]=ht("div",s,n)}var i=this._controlCorners={},e="leaflet-",n=this._controlContainer=ht("div",e+"control-container",this._container);t("top","left"),t("top","right"),t("bottom","left"),t("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)ut(this._controlCorners[t]);ut(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Le=xe.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,i,e,n){return e1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=i&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var i=this._getLayer(n(t.target)),e=i.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;e&&this._map.fire(e,i)},_createRadioElement:function(t,i){var e='",n=document.createElement("div");return n.innerHTML=e,n.firstChild},_addItem:function(t){var i,e=document.createElement("label"),o=this._map.hasLayer(t.layer);t.overlay?((i=document.createElement("input")).type="checkbox",i.className="leaflet-control-layers-selector",i.defaultChecked=o):i=this._createRadioElement("leaflet-base-layers",o),this._layerControlInputs.push(i),i.layerId=n(t.layer),V(i,"click",this._onInputClick,this);var s=document.createElement("span");s.innerHTML=" "+t.name;var r=document.createElement("div");return e.appendChild(r),r.appendChild(i),r.appendChild(s),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(e),this._checkDisabledLayers(),e},_onInputClick:function(){var t,i,e=this._layerControlInputs,n=[],o=[];this._handlingClick=!0;for(var s=e.length-1;s>=0;s--)t=e[s],i=this._getLayer(t.layerId).layer,t.checked?n.push(i):t.checked||o.push(i);for(s=0;s=0;o--)t=e[o],i=this._getLayer(t.layerId).layer,t.disabled=void 0!==i.options.minZoom&&ni.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),be=xe.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"−",zoomOutTitle:"Zoom out"},onAdd:function(t){var i="leaflet-control-zoom",e=ht("div",i+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,i+"-in",e,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,i+"-out",e,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),e},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,i,e,n,o){var s=ht("a",e,n);return s.innerHTML=t,s.href="#",s.title=i,s.setAttribute("role","button"),s.setAttribute("aria-label",i),J(s),V(s,"click",Q),V(s,"click",o,this),V(s,"click",this._refocusOnMap,this),s},_updateDisabled:function(){var t=this._map,i="leaflet-disabled";mt(this._zoomInButton,i),mt(this._zoomOutButton,i),(this._disabled||t._zoom===t.getMinZoom())&&pt(this._zoomOutButton,i),(this._disabled||t._zoom===t.getMaxZoom())&&pt(this._zoomInButton,i)}});ye.mergeOptions({zoomControl:!0}),ye.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new be,this.addControl(this.zoomControl))});var Pe=xe.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var i=ht("div","leaflet-control-scale"),e=this.options;return this._addScales(e,"leaflet-control-scale-line",i),t.on(e.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,i,e){t.metric&&(this._mScale=ht("div",i,e)),t.imperial&&(this._iScale=ht("div",i,e))},_update:function(){var t=this._map,i=t.getSize().y/2,e=t.distance(t.containerPointToLatLng([0,i]),t.containerPointToLatLng([this.options.maxWidth,i]));this._updateScales(e)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var i=this._getRoundNum(t),e=i<1e3?i+" m":i/1e3+" km";this._updateScale(this._mScale,e,i/t)},_updateImperial:function(t){var i,e,n,o=3.2808399*t;o>5280?(i=o/5280,e=this._getRoundNum(i),this._updateScale(this._iScale,e+" mi",e/i)):(n=this._getRoundNum(o),this._updateScale(this._iScale,n+" ft",n/o))},_updateScale:function(t,i,e){t.style.width=Math.round(this.options.maxWidth*e)+"px",t.innerHTML=i},_getRoundNum:function(t){var i=Math.pow(10,(Math.floor(t)+"").length-1),e=t/i;return e=e>=10?10:e>=5?5:e>=3?3:e>=2?2:1,i*e}}),Te=xe.extend({options:{position:"bottomright",prefix:'Leaflet'},initialize:function(t){l(this,t),this._attributions={}},onAdd:function(t){t.attributionControl=this,this._container=ht("div","leaflet-control-attribution"),J(this._container);for(var i in t._layers)t._layers[i].getAttribution&&this.addAttribution(t._layers[i].getAttribution());return this._update(),this._container},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):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var i in this._attributions)this._attributions[i]&&t.push(i);var e=[];this.options.prefix&&e.push(this.options.prefix),t.length&&e.push(t.join(", ")),this._container.innerHTML=e.join(" | ")}}});ye.mergeOptions({attributionControl:!0}),ye.addInitHook(function(){this.options.attributionControl&&(new Te).addTo(this)});xe.Layers=Le,xe.Zoom=be,xe.Scale=Pe,xe.Attribution=Te,we.layers=function(t,i,e){return new Le(t,i,e)},we.zoom=function(t){return new be(t)},we.scale=function(t){return new Pe(t)},we.attribution=function(t){return new Te(t)};var ze,Me=v.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}}),Ce={Events:hi},Ze=Hi?"touchstart mousedown":"mousedown",Ee={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},Se={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},ke=ui.extend({options:{clickTolerance:3},initialize:function(t,i,e,n){l(this,n),this._element=t,this._dragStartTarget=i||t,this._preventOutline=e},enable:function(){this._enabled||(V(this._dragStartTarget,Ze,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(ke._dragging===this&&this.finishDrag(),G(this._dragStartTarget,Ze,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(!t._simulated&&this._enabled&&(this._moved=!1,!dt(this._element,"leaflet-zoom-anim")&&!(ke._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(ke._dragging=this,this._preventOutline&&zt(this._element),Pt(),pi(),this._moving)))){this.fire("down");var i=t.touches?t.touches[0]:t;this._startPoint=new x(i.clientX,i.clientY),V(document,Se[t.type],this._onMove,this),V(document,Ee[t.type],this._onUp,this)}},_onMove:function(t){if(!t._simulated&&this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var i=t.touches&&1===t.touches.length?t.touches[0]:t,e=new x(i.clientX,i.clientY).subtract(this._startPoint);(e.x||e.y)&&(Math.abs(e.x)+Math.abs(e.y)1e-7;h++)i=s*Math.sin(a),i=Math.pow((1-i)/(1+i),s/2),a+=u=Math.PI/2-2*Math.atan(r*i)-a;return new M(a*e,t.x*e/n)}},Re=(Object.freeze||Object)({LonLat:Ae,Mercator:Oe,SphericalMercator:_i}),De=i({},ci,{code:"EPSG:3395",projection:Oe,transformation:function(){var t=.5/(Math.PI*Oe.R);return E(t,.5,-t,.5)}()}),Ne=i({},ci,{code:"EPSG:4326",projection:Ae,transformation:E(1/180,1,-1/180,.5)}),je=i({},li,{projection:Ae,transformation:E(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,i){var e=i.lng-t.lng,n=i.lat-t.lat;return Math.sqrt(e*e+n*n)},infinite:!0});li.Earth=ci,li.EPSG3395=De,li.EPSG3857=gi,li.EPSG900913=vi,li.EPSG4326=Ne,li.Simple=je;var We=ui.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[n(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[n(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var i=t.target;if(i.hasLayer(this)){if(this._map=i,this._zoomAnimated=i._zoomAnimated,this.getEvents){var e=this.getEvents();i.on(e,this),this.once("remove",function(){i.off(e,this)},this)}this.onAdd(i),this.getAttribution&&i.attributionControl&&i.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),i.fire("layeradd",{layer:this})}}});ye.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var i=n(t);return this._layers[i]?this:(this._layers[i]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t),this)},removeLayer:function(t){var i=n(t);return this._layers[i]?(this._loaded&&t.onRemove(this),t.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(t.getAttribution()),delete this._layers[i],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return!!t&&n(t)in this._layers},eachLayer:function(t,i){for(var e in this._layers)t.call(i,this._layers[e]);return this},_addLayers:function(t){for(var i=0,e=(t=t?ei(t)?t:[t]:[]).length;ithis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()i)return r=(n-i)/e,this._map.layerPointToLatLng([s.x-r*(s.x-o.x),s.y-r*(s.y-o.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,i){return i=i||this._defaultShape(),t=C(t),i.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new T,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return Dt(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var i=[],e=Dt(t),n=0,o=t.length;n=2&&i[0]instanceof M&&i[0].equals(i[e-1])&&i.pop(),i},_setLatLngs:function(t){Je.prototype._setLatLngs.call(this,t),Dt(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Dt(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,i=this.options.weight,e=new x(i,i);if(t=new b(t.min.subtract(e),t.max.add(e)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var n,o=0,s=this._rings.length;ot.y!=n.y>t.y&&t.x<(n.x-e.x)*(t.y-e.y)/(n.y-e.y)+e.x&&(u=!u);return u||Je.prototype._containsPoint.call(this,t,!0)}}),Qe=Fe.extend({initialize:function(t,i){l(this,i),this._layers={},t&&this.addData(t)},addData:function(t){var i,e,n,o=ei(t)?t:t.features;if(o){for(i=0,e=o.length;io?(i.height=o+"px",pt(t,"leaflet-popup-scrolled")):mt(t,"leaflet-popup-scrolled"),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var i=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),e=this._getAnchor();Lt(this._container,i.add(e))},_adjustPan:function(){if(!(!this.options.autoPan||this._map._panAnim&&this._map._panAnim._inProgress)){var t=this._map,i=parseInt(at(this._container,"marginBottom"),10)||0,e=this._container.offsetHeight+i,n=this._containerWidth,o=new x(this._containerLeft,-e-this._containerBottom);o._add(bt(this._container));var s=t.layerPointToContainerPoint(o),r=w(this.options.autoPanPadding),a=w(this.options.autoPanPaddingTopLeft||r),h=w(this.options.autoPanPaddingBottomRight||r),u=t.getSize(),l=0,c=0;s.x+n+h.x>u.x&&(l=s.x+n-u.x+h.x),s.x-l-a.x<0&&(l=s.x-a.x),s.y+e+h.y>u.y&&(c=s.y+e-u.y+h.y),s.y-c-a.y<0&&(c=s.y-a.y),(l||c)&&t.fire("autopanstart").panBy([l,c])}},_onCloseButtonClick:function(t){this._close(),Q(t)},_getAnchor:function(){return w(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});ye.mergeOptions({closePopupOnClick:!0}),ye.include({openPopup:function(t,i,e){return t instanceof rn||(t=new rn(e).setContent(t)),i&&t.setLatLng(i),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),We.include({bindPopup:function(t,i){return t instanceof rn?(l(t,i),this._popup=t,t._source=this):(this._popup&&!i||(this._popup=new rn(i,this)),this._popup.setContent(t)),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,i){if(t instanceof We||(i=t,t=this),t instanceof Fe)for(var e in this._layers){t=this._layers[e];break}return i||(i=t.getCenter?t.getCenter():t.getLatLng()),this._popup&&this._map&&(this._popup._source=t,this._popup.update(),this._map.openPopup(this._popup,i)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),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 i=t.layer||t.target;this._popup&&this._map&&(Q(t),i instanceof Ke?this.openPopup(t.layer||t.target,t.latlng):this._map.hasLayer(this._popup)&&this._popup._source===i?this.closePopup():this.openPopup(i,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var an=sn.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){sn.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(t){sn.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=sn.prototype.getEvents.call(this);return Hi&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=ht("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var i=this._map,e=this._container,n=i.latLngToContainerPoint(i.getCenter()),o=i.layerPointToContainerPoint(t),s=this.options.direction,r=e.offsetWidth,a=e.offsetHeight,h=w(this.options.offset),u=this._getAnchor();"top"===s?t=t.add(w(-r/2+h.x,-a+h.y+u.y,!0)):"bottom"===s?t=t.subtract(w(r/2-h.x,-h.y,!0)):"center"===s?t=t.subtract(w(r/2+h.x,a/2-u.y+h.y,!0)):"right"===s||"auto"===s&&o.xthis.options.maxZoom||en&&this._retainParent(o,s,r,n))},_retainChildren:function(t,i,e,n){for(var o=2*t;o<2*t+2;o++)for(var s=2*i;s<2*i+2;s++){var r=new x(o,s);r.z=e+1;var a=this._tileCoordsToKey(r),h=this._tiles[a];h&&h.active?h.retain=!0:(h&&h.loaded&&(h.retain=!0),e+1this.options.maxZoom||void 0!==this.options.minZoom&&o1)this._setView(t,e);else{for(var c=o.min.y;c<=o.max.y;c++)for(var _=o.min.x;_<=o.max.x;_++){var d=new x(_,c);d.z=this._tileZoom,this._isValidTile(d)&&(this._tiles[this._tileCoordsToKey(d)]||r.push(d))}if(r.sort(function(t,i){return t.distanceTo(s)-i.distanceTo(s)}),0!==r.length){this._loading||(this._loading=!0,this.fire("loading"));var p=document.createDocumentFragment();for(_=0;_e.max.x)||!i.wrapLat&&(t.ye.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return z(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToBounds:function(t){var i=this._map,e=this.getTileSize(),n=t.scaleBy(e),o=n.add(e),s=new T(i.unproject(n,t.z),i.unproject(o,t.z));return this.options.noWrap||i.wrapLatLngBounds(s),s},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var i=t.split(":"),e=new x(+i[0],+i[1]);return e.z=+i[2],e},_removeTile:function(t){var i=this._tiles[t];i&&(ut(i.el),delete this._tiles[t],this.fire("tileunload",{tile:i.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){pt(t,"leaflet-tile");var i=this.getTileSize();t.style.width=i.x+"px",t.style.height=i.y+"px",t.onselectstart=r,t.onmousemove=r,wi&&this.options.opacity<1&&vt(t,this.options.opacity),Pi&&!Ti&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,i){var n=this._getTilePos(t),o=this._tileCoordsToKey(t),s=this.createTile(this._wrapCoords(t),e(this._tileReady,this,t));this._initTile(s),this.createTile.length<2&&f(e(this._tileReady,this,t,null,s)),Lt(s,n),this._tiles[o]={el:s,coords:t,current:!0},i.appendChild(s),this.fire("tileloadstart",{tile:s,coords:t})},_tileReady:function(t,i,n){if(this._map){i&&this.fire("tileerror",{error:i,tile:n,coords:t});var o=this._tileCoordsToKey(t);(n=this._tiles[o])&&(n.loaded=+new Date,this._map._fadeAnimated?(vt(n.el,0),g(this._fadeFrame),this._fadeFrame=f(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),i||(pt(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),wi||!this._map._fadeAnimated?f(this._pruneTiles,this):setTimeout(e(this._pruneTiles,this),250)))}},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var i=new x(this._wrapX?s(t.x,this._wrapX):t.x,this._wrapY?s(t.y,this._wrapY):t.y);return i.z=t.z,i},_pxBoundsToTileRange:function(t){var i=this.getTileSize();return new b(t.min.unscaleBy(i).floor(),t.max.unscaleBy(i).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}}),ln=un.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,i){this._url=t,(i=l(this,i)).detectRetina&&Vi&&i.maxZoom>0&&(i.tileSize=Math.floor(i.tileSize/2),i.zoomReverse?(i.zoomOffset--,i.minZoom++):(i.zoomOffset++,i.maxZoom--),i.minZoom=Math.max(0,i.minZoom)),"string"==typeof i.subdomains&&(i.subdomains=i.subdomains.split("")),Pi||this.on("tileunload",this._onTileRemove)},setUrl:function(t,i){return this._url=t,i||this.redraw(),this},createTile:function(t,i){var n=document.createElement("img");return V(n,"load",e(this._tileOnLoad,this,i,n)),V(n,"error",e(this._tileOnError,this,i,n)),this.options.crossOrigin&&(n.crossOrigin=""),n.alt="",n.setAttribute("role","presentation"),n.src=this.getTileUrl(t),n},getTileUrl:function(t){var e={r:Vi?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var n=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=n),e["-y"]=n}return _(this._url,i(e,this.options))},_tileOnLoad:function(t,i){wi?setTimeout(e(t,this,null,i),0):t(null,i)},_tileOnError:function(t,i,e){var n=this.options.errorTileUrl;n&&i.src!==n&&(i.src=n),t(e,i)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,i=this.options.maxZoom,e=this.options.zoomReverse,n=this.options.zoomOffset;return e&&(t=i-t),t+n},_getSubdomain:function(t){var i=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[i]},_abortLoading:function(){var t,i;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&((i=this._tiles[t].el).onload=r,i.onerror=r,i.complete||(i.src=ni,ut(i)))}}),cn=ln.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var n=i({},this.defaultWmsParams);for(var o in e)o in this.options||(n[o]=e[o]);e=l(this,e),n.width=n.height=e.tileSize*(e.detectRetina&&Vi?2:1),this.wmsParams=n},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var i=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[i]=this._crs.code,ln.prototype.onAdd.call(this,t)},getTileUrl:function(t){var i=this._tileCoordsToBounds(t),e=this._crs.project(i.getNorthWest()),n=this._crs.project(i.getSouthEast()),o=(this._wmsVersion>=1.3&&this._crs===Ne?[n.y,e.x,e.y,n.x]:[e.x,n.y,n.x,e.y]).join(","),s=ln.prototype.getTileUrl.call(this,t);return s+c(this.wmsParams,s,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+o},setParams:function(t,e){return i(this.wmsParams,t),e||this.redraw(),this}});ln.WMS=cn,Yt.wms=function(t,i){return new cn(t,i)};var _n=We.extend({options:{padding:.1},initialize:function(t){l(this,t),n(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&pt(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,i){var e=this._map.getZoomScale(i,this._zoom),n=bt(this._container),o=this._map.getSize().multiplyBy(.5+this.options.padding),s=this._map.project(this._center,i),r=this._map.project(t,i).subtract(s),a=o.multiplyBy(-e).add(n).add(o).subtract(r);Oi?wt(this._container,a,e):Lt(this._container,a)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var t in this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,i=this._map.getSize(),e=this._map.containerPointToLayerPoint(i.multiplyBy(-t)).round();this._bounds=new b(e,e.add(i.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),dn=_n.extend({getEvents:function(){var t=_n.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){_n.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");V(t,"mousemove",o(this._onMouseMove,32,this),this),V(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),V(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_destroyContainer:function(){delete this._ctx,ut(this._container),G(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){this._redrawBounds=null;for(var t in this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){this._drawnLayers={},_n.prototype._update.call(this);var t=this._bounds,i=this._container,e=t.getSize(),n=Vi?2:1;Lt(i,t.min),i.width=n*e.x,i.height=n*e.y,i.style.width=e.x+"px",i.style.height=e.y+"px",Vi&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){_n.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[n(t)]=t;var i=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=i),this._drawLast=i,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var i=t._order,e=i.next,n=i.prev;e?e.prev=n:this._drawLast=n,n?n.next=e:this._drawFirst=e,delete t._order,delete this._layers[L.stamp(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if(t.options.dashArray){var i,e=t.options.dashArray.split(","),n=[];for(i=0;i')}}catch(t){return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),mn={_initContainer:function(){this._container=ht("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(_n.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var i=t._container=pn("shape");pt(i,"leaflet-vml-shape "+(this.options.className||"")),i.coordsize="1 1",t._path=pn("path"),i.appendChild(t._path),this._updateStyle(t),this._layers[n(t)]=t},_addPath:function(t){var i=t._container;this._container.appendChild(i),t.options.interactive&&t.addInteractiveTarget(i)},_removePath:function(t){var i=t._container;ut(i),t.removeInteractiveTarget(i),delete this._layers[n(t)]},_updateStyle:function(t){var i=t._stroke,e=t._fill,n=t.options,o=t._container;o.stroked=!!n.stroke,o.filled=!!n.fill,n.stroke?(i||(i=t._stroke=pn("stroke")),o.appendChild(i),i.weight=n.weight+"px",i.color=n.color,i.opacity=n.opacity,n.dashArray?i.dashStyle=ei(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):i.dashStyle="",i.endcap=n.lineCap.replace("butt","flat"),i.joinstyle=n.lineJoin):i&&(o.removeChild(i),t._stroke=null),n.fill?(e||(e=t._fill=pn("fill")),o.appendChild(e),e.color=n.fillColor||n.color,e.opacity=n.fillOpacity):e&&(o.removeChild(e),t._fill=null)},_updateCircle:function(t){var i=t._point.round(),e=Math.round(t._radius),n=Math.round(t._radiusY||e);this._setPath(t,t._empty()?"M0 0":"AL "+i.x+","+i.y+" "+e+","+n+" 0,23592600")},_setPath:function(t,i){t._path.v=i},_bringToFront:function(t){ct(t._container)},_bringToBack:function(t){_t(t._container)}},fn=Ki?pn:S,gn=_n.extend({getEvents:function(){var t=_n.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=fn("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=fn("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ut(this._container),G(this._container),delete this._container,delete this._rootGroup},_onZoomStart:function(){this._update()},_update:function(){if(!this._map._animatingZoom||!this._bounds){_n.prototype._update.call(this);var t=this._bounds,i=t.getSize(),e=this._container;this._svgSize&&this._svgSize.equals(i)||(this._svgSize=i,e.setAttribute("width",i.x),e.setAttribute("height",i.y)),Lt(e,t.min),e.setAttribute("viewBox",[t.min.x,t.min.y,i.x,i.y].join(" ")),this.fire("update")}},_initPath:function(t){var i=t._path=fn("path");t.options.className&&pt(i,t.options.className),t.options.interactive&&pt(i,"leaflet-interactive"),this._updateStyle(t),this._layers[n(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){ut(t._path),t.removeInteractiveTarget(t._path),delete this._layers[n(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var i=t._path,e=t.options;i&&(e.stroke?(i.setAttribute("stroke",e.color),i.setAttribute("stroke-opacity",e.opacity),i.setAttribute("stroke-width",e.weight),i.setAttribute("stroke-linecap",e.lineCap),i.setAttribute("stroke-linejoin",e.lineJoin),e.dashArray?i.setAttribute("stroke-dasharray",e.dashArray):i.removeAttribute("stroke-dasharray"),e.dashOffset?i.setAttribute("stroke-dashoffset",e.dashOffset):i.removeAttribute("stroke-dashoffset")):i.setAttribute("stroke","none"),e.fill?(i.setAttribute("fill",e.fillColor||e.color),i.setAttribute("fill-opacity",e.fillOpacity),i.setAttribute("fill-rule",e.fillRule||"evenodd")):i.setAttribute("fill","none"))},_updatePoly:function(t,i){this._setPath(t,k(t._parts,i))},_updateCircle:function(t){var i=t._point,e=t._radius,n="a"+e+","+(t._radiusY||e)+" 0 1,0 ",o=t._empty()?"M0 0":"M"+(i.x-e)+","+i.y+n+2*e+",0 "+n+2*-e+",0 ";this._setPath(t,o)},_setPath:function(t,i){t._path.setAttribute("d",i)},_bringToFront:function(t){ct(t._path)},_bringToBack:function(t){_t(t._path)}});Ki&&gn.include(mn),ye.include({getRenderer:function(t){var i=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return i||(i=this._renderer=this.options.preferCanvas&&Xt()||Jt()),this.hasLayer(i)||this.addLayer(i),i},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var i=this._paneRenderers[t];return void 0===i&&(i=gn&&Jt({pane:t})||dn&&Xt({pane:t}),this._paneRenderers[t]=i),i}});var vn=$e.extend({initialize:function(t,i){$e.prototype.initialize.call(this,this._boundsToLatLngs(t),i)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=z(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});gn.create=fn,gn.pointsToPath=k,Qe.geometryToLayer=Wt,Qe.coordsToLatLng=Ht,Qe.coordsToLatLngs=Ft,Qe.latLngToCoords=Ut,Qe.latLngsToCoords=Vt,Qe.getFeature=Gt,Qe.asFeature=qt,ye.mergeOptions({boxZoom:!0});var yn=Me.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(){V(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){G(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ut(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(),pi(),Pt(),this._startPoint=this._map.mouseEventToContainerPoint(t),V(document,{contextmenu:Q,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=ht("div","leaflet-zoom-box",this._container),pt(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var i=new b(this._point,this._startPoint),e=i.getSize();Lt(this._box,i.min),this._box.style.width=e.x+"px",this._box.style.height=e.y+"px"},_finish:function(){this._moved&&(ut(this._box),mt(this._container,"leaflet-crosshair")),mi(),Tt(),G(document,{contextmenu:Q,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(e(this._resetState,this),0);var i=new T(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(i).fire("boxzoomend",{boxZoomBounds:i})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}});ye.addInitHook("addHandler","boxZoom",yn),ye.mergeOptions({doubleClickZoom:!0});var xn=Me.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var i=this._map,e=i.getZoom(),n=i.options.zoomDelta,o=t.originalEvent.shiftKey?e-n:e+n;"center"===i.options.doubleClickZoom?i.setZoom(o):i.setZoomAround(t.containerPoint,o)}});ye.addInitHook("addHandler","doubleClickZoom",xn),ye.mergeOptions({dragging:!0,inertia:!Ti,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var wn=Me.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new ke(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))}pt(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){mt(this._map._container,"leaflet-grab"),mt(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=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var i=z(this._map.options.maxBounds);this._offsetLimit=P(this._map.latLngToContainerPoint(i.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(i.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var i=this._lastTime=+new Date,e=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(e),this._times.push(i),i-this._times[0]>50&&(this._positions.shift(),this._times.shift())}this._map.fire("move",t).fire("drag",t)},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),i=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=i.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,i){return t-(t-i)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),i=this._offsetLimit;t.xi.max.x&&(t.x=this._viscousLimit(t.x,i.max.x)),t.y>i.max.y&&(t.y=this._viscousLimit(t.y,i.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,i=Math.round(t/2),e=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-i+e)%t+i-e,s=(n+i+e)%t-i-e,r=Math.abs(o+e)0?s:-s))-i;this._delta=0,this._startTime=null,r&&("center"===t.options.scrollWheelZoom?t.setZoom(i+r):t.setZoomAround(this._lastMousePos,i+r))}});ye.addInitHook("addHandler","scrollWheelZoom",bn),ye.mergeOptions({tap:!0,tapTolerance:15});var Pn=Me.extend({addHooks:function(){V(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){G(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if($(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var i=t.touches[0],n=i.target;this._startPos=this._newPos=new x(i.clientX,i.clientY),n.tagName&&"a"===n.tagName.toLowerCase()&&pt(n,"leaflet-active"),this._holdTimeout=setTimeout(e(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",i))},this),1e3),this._simulateEvent("mousedown",i),V(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),G(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches){var i=t.changedTouches[0],e=i.target;e&&e.tagName&&"a"===e.tagName.toLowerCase()&&mt(e,"leaflet-active"),this._simulateEvent("mouseup",i),this._isTapValid()&&this._simulateEvent("click",i)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var i=t.touches[0];this._newPos=new x(i.clientX,i.clientY),this._simulateEvent("mousemove",i)},_simulateEvent:function(t,i){var e=document.createEvent("MouseEvents");e._simulated=!0,i.target._simulatedClick=!0,e.initMouseEvent(t,!0,!0,window,1,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null),i.target.dispatchEvent(e)}});Hi&&!Wi&&ye.addInitHook("addHandler","tap",Pn),ye.mergeOptions({touchZoom:Hi&&!Ti,bounceAtZoomLimits:!0});var Tn=Me.extend({addHooks:function(){pt(this._map._container,"leaflet-touch-zoom"),V(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){mt(this._map._container,"leaflet-touch-zoom"),G(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var i=this._map;if(t.touches&&2===t.touches.length&&!i._animatingZoom&&!this._zooming){var e=i.mouseEventToContainerPoint(t.touches[0]),n=i.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=i.getSize()._divideBy(2),this._startLatLng=i.containerPointToLatLng(this._centerPoint),"center"!==i.options.touchZoom&&(this._pinchStartLatLng=i.containerPointToLatLng(e.add(n)._divideBy(2))),this._startDist=e.distanceTo(n),this._startZoom=i.getZoom(),this._moved=!1,this._zooming=!0,i._stop(),V(document,"touchmove",this._onTouchMove,this),V(document,"touchend",this._onTouchEnd,this),$(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var i=this._map,n=i.mouseEventToContainerPoint(t.touches[0]),o=i.mouseEventToContainerPoint(t.touches[1]),s=n.distanceTo(o)/this._startDist;if(this._zoom=i.getScaleZoom(s,this._startZoom),!i.options.bounceAtZoomLimits&&(this._zoomi.getMaxZoom()&&s>1)&&(this._zoom=i._limitZoom(this._zoom)),"center"===i.options.touchZoom){if(this._center=this._startLatLng,1===s)return}else{var r=n._add(o)._divideBy(2)._subtract(this._centerPoint);if(1===s&&0===r.x&&0===r.y)return;this._center=i.unproject(i.project(this._pinchStartLatLng,this._zoom).subtract(r),this._zoom)}this._moved||(i._moveStart(!0),this._moved=!0),g(this._animRequest);var a=e(i._move,i,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=f(a,this,!0),$(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,g(this._animRequest),G(document,"touchmove",this._onTouchMove),G(document,"touchend",this._onTouchEnd),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});ye.addInitHook("addHandler","touchZoom",Tn),ye.BoxZoom=yn,ye.DoubleClickZoom=xn,ye.Drag=wn,ye.Keyboard=Ln,ye.ScrollWheelZoom=bn,ye.Tap=Pn,ye.TouchZoom=Tn;var zn=window.L;window.L=t,Object.freeze=$t,t.version="1.2.0+HEAD.1ac320b",t.noConflict=function(){return window.L=zn,this},t.Control=xe,t.control=we,t.Browser=Yi,t.Evented=ui,t.Mixin=Ce,t.Util=ai,t.Class=v,t.Handler=Me,t.extend=i,t.bind=e,t.stamp=n,t.setOptions=l,t.DomEvent=le,t.DomUtil=ge,t.PosAnimation=ve,t.Draggable=ke,t.LineUtil=Be,t.PolyUtil=Ie,t.Point=x,t.point=w,t.Bounds=b,t.bounds=P,t.Transformation=Z,t.transformation=E,t.Projection=Re,t.LatLng=M,t.latLng=C,t.LatLngBounds=T,t.latLngBounds=z,t.CRS=li,t.GeoJSON=Qe,t.geoJSON=Kt,t.geoJson=en,t.Layer=We,t.LayerGroup=He,t.layerGroup=function(t){return new He(t)},t.FeatureGroup=Fe,t.featureGroup=function(t){return new Fe(t)},t.ImageOverlay=nn,t.imageOverlay=function(t,i,e){return new nn(t,i,e)},t.VideoOverlay=on,t.videoOverlay=function(t,i,e){return new on(t,i,e)},t.DivOverlay=sn,t.Popup=rn,t.popup=function(t,i){return new rn(t,i)},t.Tooltip=an,t.tooltip=function(t,i){return new an(t,i)},t.Icon=Ue,t.icon=function(t){return new Ue(t)},t.DivIcon=hn,t.divIcon=function(t){return new hn(t)},t.Marker=qe,t.marker=function(t,i){return new qe(t,i)},t.TileLayer=ln,t.tileLayer=Yt,t.GridLayer=un,t.gridLayer=function(t){return new un(t)},t.SVG=gn,t.svg=Jt,t.Renderer=_n,t.Canvas=dn,t.canvas=Xt,t.Path=Ke,t.CircleMarker=Ye,t.circleMarker=function(t,i){return new Ye(t,i)},t.Circle=Xe,t.circle=function(t,i,e){return new Xe(t,i,e)},t.Polyline=Je,t.polyline=function(t,i){return new Je(t,i)},t.Polygon=$e,t.polygon=function(t,i){return new $e(t,i)},t.Rectangle=vn,t.rectangle=function(t,i){return new vn(t,i)},t.Map=ye,t.map=function(t,i){return new ye(t,i)}}); \ No newline at end of file diff --git a/js/map.js b/js/map.js index f4d7884..732392c 100644 --- a/js/map.js +++ b/js/map.js @@ -15,6 +15,7 @@ import { RegionLabelsControl } from './controls/region_labels_control.js'; import { RegionLookupControl } from './controls/region_lookup_control.js'; import { TitleLabel } from './controls/title_label.js'; import { Region } from './model/Region.js'; +import {ControlMapType} from "./controls/control_map_type.js"; $(document).ready(function () { @@ -33,13 +34,14 @@ $(document).ready(function () { renderer: L.canvas() }); + map.mapType = 'normal'; map.plane = 0; map.updateMapPath = function () { if (map.tile_layer !== undefined) { map.removeLayer(map.tile_layer); } - map.tile_layer = L.tileLayer('https://raw.githubusercontent.com/Mark7625/osrs_map_tiles/master/' + map.plane + '/{z}/{x}/{y}.png', { + map.tile_layer = L.tileLayer('https://raw.githubusercontent.com/Mark7625/osrs_map_tiles/master/' + map.mapType + '/' + map.plane + '/{z}/{x}/{y}.png', { minZoom: 4, maxZoom: 11, attribution: 'Map data', @@ -53,7 +55,8 @@ $(document).ready(function () { map.updateMapPath(); map.getContainer().focus(); - + map.addControl(new TitleLabel()); + map.addControl(new ControlMapType()); map.addControl(new CoordinatesControl()); map.addControl(new RegionBaseCoordinatesControl()); map.addControl(new LocalCoordinatesControl()); diff --git a/js/model/Area.js b/js/model/Area.js index a9953f3..9384c6f 100644 --- a/js/model/Area.js +++ b/js/model/Area.js @@ -46,6 +46,6 @@ export class Area { } getName() { - return "AABB"; + return "Area"; } } \ No newline at end of file diff --git a/js/model/Locations.js b/js/model/Locations.js index 837243c..b2d14fb 100644 --- a/js/model/Locations.js +++ b/js/model/Locations.js @@ -15,7 +15,7 @@ class Locations { } $.ajax({ - url: "resources/locations.json", + url: "https://raw.githubusercontent.com/Mark7625/osrs_map_tiles/master/locations.json", dataType: "json", context: this, success: function( data ) { diff --git a/js/model/PolyArea.js b/js/model/PolyArea.js index 284d050..27b4ec6 100644 --- a/js/model/PolyArea.js +++ b/js/model/PolyArea.js @@ -75,6 +75,6 @@ export class PolyArea { } getName() { - return "AABB"; + return "Area"; } }; \ No newline at end of file diff --git a/js/model/Region.js b/js/model/Region.js index 36d8d74..edebab2 100644 --- a/js/model/Region.js +++ b/js/model/Region.js @@ -2,8 +2,8 @@ import {Position} from './Position.js'; -export const MIN_X = 1152, MAX_X = 3904; -export const MIN_Y = 2496, MAX_Y = 10432; +export const MIN_X = 1024, MAX_X = 4224; +export const MIN_Y = 1216, MAX_Y = 12608; export const REGION_WIDTH = 64; export const REGION_HEIGHT = 64; @@ -11,6 +11,8 @@ export class Region { constructor(id) { this.id = id; + this.regionX = (id >> 8) & 0xFF; + this.regionY = id & 0xFF; } static fromPosition(position) { diff --git a/map.html b/map.html index 6dee001..43dcae8 100644 --- a/map.html +++ b/map.html @@ -12,7 +12,7 @@ - 117HD Map + 117HD's Map @@ -34,7 +34,7 @@ - + @@ -64,8 +64,8 @@ - + @@ -92,6 +92,9 @@
@@ -99,7 +102,8 @@
diff --git a/resources/locations.json b/resources/locations.json deleted file mode 100644 index 666a05f..0000000 --- a/resources/locations.json +++ /dev/null @@ -1,398 +0,0 @@ -{ - "locations": [ - { "name": "Abandoned Mine", "coords": [3441, 3236, 0], "size": "default" }, - { "name": "Agility Arena", "coords": [2809, 3191, 0], "size": "default" }, - { "name": "Agility Pyramid", "coords": [3364, 2840, 0], "size": "default" }, - { "name": "Agility Training Area", "coords": [2481, 3424, 0], "size": "default" }, - { "name": "Agility Training Area", "coords": [2533, 3538, 0], "size": "default" }, - { "name": "Agility Training Area", "coords": [2998, 3952, 0], "size": "default" }, - { "name": "Al Kharid", "coords": [3293, 3151, 0], "size": "medium" }, - { "name": "Ancient Cavern", "coords": [1762, 5346, 0], "size": "default" }, - { "name": "Ape Atoll", "coords": [2747, 2751, 0], "size": "large" }, - { "name": "Arandar", "coords": [2342, 3294, 0], "size": "medium" }, - { "name": "Arceuus", "coords": [1688, 3745, 0], "size": "medium" }, - { "name": "Ardougne Sewers", "coords": [2567, 9682, 0], "size": "default" }, - { "name": "Ardougne Sewers Mine", "coords": [2655, 9677, 0], "size": "default" }, - { "name": "Ardougne Zoo", "coords": [2612, 3275, 0], "size": "default" }, - { "name": "Asgarnian Ice Dungeon", "coords": [3038, 9580, 0], "size": "default" }, - { "name": "Ah Za Rhoon", "coords": [2908, 9336, 0], "size": "default" }, - { "name": "Avatar of Creation", "coords": [2126, 2891, 0], "size": "default" }, - { "name": "Avatar of Destruction", "coords": [2286, 2931, 0], "size": "default" }, - { "name": "Bandit Camp", "coords": [3037, 3699, 0], "size": "default" }, - { "name": "Bandit Camp", "coords": [3171, 2979, 0], "size": "default" }, - { "name": "Barbarian Assault", "coords": [2523, 3574, 0], "size": "default" }, - { "name": "Barbarian Outpost", "coords": [2552, 3561, 0], "size": "default" }, - { "name": "Barbarian Village", "coords": [3080, 3419, 0], "size": "medium" }, - { "name": "Barrows", "coords": [3564, 3288, 0], "size": "default" }, - { "name": "Barrows Crypt", "coords": [3551, 9695, 0], "size": "default" }, - { "name": "Battlefield", "coords": [2520, 3232, 0], "size": "default" }, - { "name": "Battlefront", "coords": [1368, 3716, 0], "size": "default" }, - { "name": "Baxtorian Falls", "coords": [2513, 3461, 0], "size": "default" }, - { "name": "Bear", "coords": [3285, 3838, 0], "size": "default" }, - { "name": "Bedabin Camp", "coords": [3169, 3036, 0], "size": "default" }, - { "name": "Beehives", "coords": [2759, 3442, 0], "size": "default" }, - { "name": "Black Knights' Fortress", "coords": [3025, 3514, 0], "size": "default" }, - { "name": "Blast mine", "coords": [1493, 3848, 0], "size": "default" }, - { "name": "Blue Base", "coords": [2125, 2914, 0], "size": "default" }, - { "name": "Bone Yard", "coords": [3236, 3746, 0], "size": "default" }, - { "name": "Brimhaven", "coords": [2773, 3176, 0], "size": "medium" }, - { "name": "Brimhaven Dungeon", "coords": [2668, 9520, 0], "size": "default" }, - { "name": "Brine Rat Cavern", "coords": [2718, 10143, 0], "size": "default" }, - { "name": "Burgh de Rott", "coords": [3495, 3218, 0], "size": "medium" }, - { "name": "Burthorpe", "coords": [2893, 3541, 0], "size": "medium" }, - { "name": "Cairn Isle", "coords": [2765, 2976, 0], "size": "default" }, - { "name": "Cairn Island Dungeon", "coords": [2764, 9376, 0], "size": "default" }, - { "name": "Camelot Castle", "coords": [2758, 3507, 0], "size": "default" }, - { "name": "Canifis", "coords": [3495, 3487, 0], "size": "medium" }, - { "name": "Castle Drakan", "coords": [3554, 3357, 0], "size": "default" }, - { "name": "Castle Wars", "coords": [2430, 3104, 0], "size": "default" }, - { "name": "Catacombs of Kourend", "coords": [1664, 10046, 0], "size": "default" }, - { "name": "Catherby", "coords": [2821, 3433, 0], "size": "default" }, - { "name": "Champions' Guild", "coords": [3191, 3360, 0], "size": "default" }, - { "name": "Chapel", "coords": [1497, 3566, 0], "size": "default" }, - { "name": "Chaos Druid Tower Dungeon", "coords": [2580, 9743, 0], "size": "default" }, - { "name": "Chaos Temple", "coords": [2933, 3514, 0], "size": "default" }, - { "name": "Chaos Temple", "coords": [3240, 3608, 0], "size": "default" }, - { "name": "Charcoal burners", "coords": [1738, 3468, 0], "size": "default" }, - { "name": "Chasm of Fire", "coords": [1438, 3677, 0], "size": "default" }, - { "name": "Clan Wars", "coords": [3371, 3162, 0], "size": "default" }, - { "name": "Clan Wars", "coords": [3422, 4735, 0], "size": "default" }, - { "name": "Clocktower", "coords": [2571, 3240, 0], "size": "default" }, - { "name": "Clocktower Dungeon", "coords": [2590, 9630, 0], "size": "default" }, - { "name": "Coal Trucks", "coords": [2598, 3489, 0], "size": "default" }, - { "name": "Combat Training Camp", "coords": [2515, 3369, 0], "size": "default" }, - { "name": "Combat ring", "coords": [1543, 3623, 0], "size": "default" }, - { "name": "Cooks' Guild", "coords": [3143, 3447, 0], "size": "default" }, - { "name": "Corsair Cove", "coords": [2567, 2856, 0], "size": "medium" }, - { "name": "Cosmic entity's plane", "coords": [2079, 4828, 0], "size": "default" }, - { "name": "Crabclaw Isle", "coords": [1759, 3421, 0], "size": "default" }, - { "name": "Crabclaw Caves", "coords": [1674, 9824, 0], "size": "default" }, - { "name": "Crafting Guild", "coords": [2926, 3281, 0], "size": "default" }, - { "name": "Crandor", "coords": [2836, 3271, 0], "size": "large" }, - { "name": "Crandor Dungeon", "coords": [2849, 9636, 0], "size": "default" }, - { "name": "Crash Island", "coords": [2914, 2720, 0], "size": "default" }, - { "name": "Creature Creation", "coords": [3038, 4384, 0], "size": "default" }, - { "name": "Crombwick Manor", "coords": [3725, 3358, 0], "size": "default" }, - { "name": "Dark Altar", "coords": [1689, 3877, 0], "size": "default" }, - { "name": "Dark Warriors' Fortress", "coords": [3029, 3630, 0], "size": "default" }, - { "name": "Dark Wizards' Tower", "coords": [2908, 3334, 0], "size": "default" }, - { "name": "Darkmeyer", "coords": [3624, 3363, 0], "size": "medium" }, - { "name": "Death Plateau", "coords": [2863, 3590, 0], "size": "default" }, - { "name": "Deep Wilderness Dungeon", "coords": [3040, 10336, 0], "size": "default" }, - { "name": "Demonic Ruins", "coords": [3289, 3885, 0], "size": "default" }, - { "name": "Desert Mining Camp", "coords": [3288, 3021, 0], "size": "default" }, - { "name": "Deserted Keep", "coords": [3153, 3931, 0], "size": "default" }, - { "name": "Digsite", "coords": [3362, 3417, 0], "size": "default" }, - { "name": "Distilleries", "coords": [3787, 2997, 0], "size": "default" }, - { "name": "Doors of Dinh", "coords": [1630, 3964, 0], "size": "default" }, - { "name": "Dorgesh-Kaan", "coords": [2717, 5319, 0], "size": "default" }, - { "name": "Dragontooth Island", "coords": [3806, 3554, 0], "size": "default" }, - { "name": "Draynor Manor", "coords": [3104, 3341, 0], "size": "medium" }, - { "name": "Draynor Sewers", "coords": [3107, 9672, 0], "size": "default" }, - { "name": "Draynor Village", "coords": [3105, 3258, 0], "size": "medium" }, - { "name": "Druids' Circle", "coords": [2925, 3482, 0], "size": "default" }, - { "name": "Duel Arena", "coords": [3361, 3232, 0], "size": "medium" }, - { "name": "Dwarven Mine", "coords": [3015, 3445, 0], "size": "default" }, - { "name": "Dwarven Mine Dungeon", "coords": [3024, 9791, 0], "size": "default" }, - { "name": "Eagles' Peak", "coords": [2332, 3486, 0], "size": "medium" }, - { "name": "East Ardougne", "coords": [2598, 3295, 0], "size": "medium" }, - { "name": "Eastern Graveyard", "coords": [2251, 2924, 0], "size": "default" }, - { "name": "Ectofuntus", "coords": [3659, 3519, 0], "size": "default" }, - { "name": "Edgeville Dungeon", "coords": [3114, 9917, 0], "size": "default" }, - { "name": "Edgeville", "coords": [3086, 3497, 0], "size": "medium" }, - { "name": "Elemental Workshop", "coords": [1963, 5149, 0], "size": "default" }, - { "name": "Elf Camp", "coords": [2196, 3251, 0], "size": "default" }, - { "name": "Enakhra's Temple Bottom Floor", "coords": [3104, 9312, 0], "size": "default" }, - { "name": "Entrana", "coords": [2843, 3378, 0], "size": "large" }, - { "name": "Etceteria", "coords": [2609, 3874, 0], "size": "medium" }, - { "name": "Exam Centre", "coords": [3363, 3339, 0], "size": "default" }, - { "name": "Falador", "coords": [3004, 3361, 0], "size": "medium" }, - { "name": "Falador Mole Lair", "coords": [1760, 5190, 0], "size": "default" }, - { "name": "Falconer", "coords": [2374, 3604, 0], "size": "default" }, - { "name": "Farming Guild", "coords": [1248, 3731, 0], "size": "default" }, - { "name": "Feldip Hills", "coords": [2556, 2982, 0], "size": "large" }, - { "name": "Ferox Enclave", "coords": [3141, 3629, 0], "size": "default" }, - { "name": "Fenkenstrain's Castle", "coords": [3548, 3554, 0], "size": "default" }, - { "name": "Fenkenstrain's Dungeon", "coords": [3519, 9952, 0], "size": "default" }, - { "name": "Fight Arena", "coords": [2592, 3161, 0], "size": "default" }, - { "name": "Fishing Guild", "coords": [2604, 3400, 0], "size": "default" }, - { "name": "Fishing Hamlet", "coords": [1693, 3933, 0], "size": "default" }, - { "name": "Fishing Platform", "coords": [2772, 3283, 0], "size": "default" }, - { "name": "Flax", "coords": [2744, 3443, 0], "size": "default" }, - { "name": "Foodhall", "coords": [1842, 3746, 0], "size": "default" }, - { "name": "Fountain of Rune", "coords": [3378, 3891, 0], "size": "default" }, - { "name": "Forthos Ruin", "coords": [1674, 3574, 0], "size": "default" }, - { "name": "Forthos Dungeon", "coords": [1819, 9951, 0], "size": "default" }, - { "name": "Fossil Island", "coords": [3718, 3774, 0], "size": "large" }, - { "name": "Fremennik Isles", "coords": [2349, 3880, 0], "size": "large" }, - { "name": "Fremennik Province", "coords": [2666, 3632, 0], "size": "medium" }, - { "name": "Fremennik Slayer Dungeon", "coords": [2805, 10001, 0], "size": "default" }, - { "name": "Frozen Waste Plateau", "coords": [2962, 3917, 0], "size": "default" }, - { "name": "Glarial's Tomb", "coords": [2543, 9827, 0], "size": "default" }, - { "name": "Gnome Ball Field", "coords": [2395, 3486, 0], "size": "default" }, - { "name": "Goblin Cave", "coords": [2587, 9830, 0], "size": "default" }, - { "name": "Goblin Village", "coords": [2956, 3505, 0], "size": "default" }, - { "name": "God Wars Dungeon", "coords": [2916, 3751, 0], "size": "default" }, - { "name": "Golden Apple Tree", "coords": [2766, 3607, 0], "size": "default" }, - { "name": "Grand Exchange", "coords": [3164, 3481, 0], "size": "default" }, - { "name": "Grand Tree", "coords": [2464, 3501, 0], "size": "default" }, - { "name": "Grand Tree Tunnels", "coords": [2463, 9887, 0], "size": "default" }, - { "name": "Graveyard of Heroes", "coords": [1481, 3558, 0], "size": "default" }, - { "name": "Graveyard of Shadows", "coords": [3164, 3672, 0], "size": "default" }, - { "name": "Graveyard", "coords": [3569, 3404, 0], "size": "default" }, - { "name": "Gu'Tanoth", "coords": [2521, 3043, 0], "size": "default" }, - { "name": "Harmony", "coords": [3801, 2858, 0], "size": "medium" }, - { "name": "Haunted Woods", "coords": [3564, 3490, 0], "size": "default" }, - { "name": "Hemenster", "coords": [2634, 3437, 0], "size": "default" }, - { "name": "Here be penguins", "coords": [2615, 3958, 0], "size": "default" }, - { "name": "Heroes' Guild", "coords": [2896, 3510, 0], "size": "default" }, - { "name": "Hosidius", "coords": [1746, 3597, 0], "size": "default" }, - { "name": "House on the Hill", "coords": [3779, 3873, 0], "size": "default" }, - { "name": "Iban's Lair Lower Level", "coords": [2335, 9855, 0], "size": "default" }, - { "name": "Ice Mountain", "coords": [3007, 3481, 0], "size": "medium" }, - { "name": "Ice path", "coords": [2854, 3808, 0], "size": "default" }, - { "name": "Iceberg", "coords": [2676, 4034, 0], "size": "medium" }, - { "name": "Ice Queen's lair", "coords": [2865, 9954, 0], "size": "default" }, - { "name": "Infirmary", "coords": [1519, 3619, 0], "size": "default" }, - { "name": "Isafdar", "coords": [2244, 3180, 0], "size": "default" }, - { "name": "Isle of Souls", "coords": [2209, 2875, 0], "size": "large" }, - { "name": "Jail", "coords": [3125, 3242, 0], "size": "default" }, - { "name": "Jatizso", "coords": [2391, 3814, 0], "size": "medium" }, - { "name": "Jiggig", "coords": [2465, 3045, 0], "size": "default" }, - { "name": "Jiggig Dungeon (bottom level)", "coords": [2465, 9441, 0], "size": "default" }, - { "name": "Jiggig Dungeon (middle level)", "coords": [2465, 9441, 2], "size": "default" }, - { "name": "Kalphite Lair", "coords": [3226, 3106, 0], "size": "default" }, - { "name": "Karamja", "coords": [2859, 3043, 0], "size": "large" }, - { "name": "Karamja Dungeon", "coords": [2840, 9571, 0], "size": "default" }, - { "name": "Kebos Lowlands", "coords": [1258, 3645, 0], "size": "large" }, - { "name": "Kebos Swamp", "coords": [1254, 3619, 0], "size": "medium" }, - { "name": "Keep Le Faye", "coords": [2769, 3399, 0], "size": "default" }, - { "name": "Keldagrim Entrance", "coords": [2725, 3712, 0], "size": "default" }, - { "name": "Keldagrim", "coords": [2855, 10175, 0], "size": "medium" }, - { "name": "Kharazi Jungle", "coords": [2833, 2922, 0], "size": "default" }, - { "name": "Kharidian Desert", "coords": [3264, 2960, 0], "size": "large" }, - { "name": "Kingdom of Asgarnia", "coords": [2991, 3405, 0], "size": "large" }, - { "name": "Kingdom of Great Kourend", "coords": [1604, 3692, 0], "size": "large" }, - { "name": "Kingdom of Kandarin", "coords": [2572, 3445, 0], "size": "large" }, - { "name": "Kingdom of Misthalin", "coords": [3215, 3318, 0], "size": "large" }, - { "name": "Kourend Castle", "coords": [1624, 3672, 0], "size": "default" }, - { "name": "Kourend Woodland", "coords": [1543, 3466, 0], "size": "medium" }, - { "name": "Lacerta Falls", "coords": [1383, 3473, 0], "size": "default" }, - { "name": "Land's End", "coords": [1509, 3428, 0], "size": "default" }, - { "name": "Lake Molch", "coords": [1369, 3650, 0], "size": "default" }, - { "name": "Last Man Standing", "coords": [3456, 5824, 0], "size": "default" }, - { "name": "Lava Dragon Isle", "coords": [3197, 3825, 0], "size": "default" }, - { "name": "Lava Maze", "coords": [3075, 3845, 0], "size": "default" }, - { "name": "Lava Maze Dungeon", "coords": [3040, 10272, 0], "size": "default" }, - { "name": "Legends' Guild", "coords": [2730, 3377, 0], "size": "default" }, - { "name": "Legends' Guild Dungeon", "coords": [2720, 9754, 0], "size": "default" }, - { "name": "Library", "coords": [1619, 3821, 0], "size": "default" }, - { "name": "Lighthouse", "coords": [2510, 3626, 0], "size": "default" }, - { "name": "Lighthouse Dungeon", "coords": [2518, 10021, 0], "size": "default" }, - { "name": "Lithkren", "coords": [3565, 4000, 0], "size": "default" }, - { "name": "Lizardman Canyon", "coords": [1518, 3693, 0], "size": "default" }, - { "name": "Lizardman Settlement", "coords": [1309, 3540, 0], "size": "default" }, - { "name": "Lizardman Temple", "coords": [1312, 10078, 0], "size": "default" }, - { "name": "Lizards", "coords": [3421, 3041, 0], "size": "default" }, - { "name": "Lletya", "coords": [2346, 3177, 0], "size": "default" }, - { "name": "Lovakengj", "coords": [1503, 3800, 0], "size": "medium" }, - { "name": "Lovakengj Assembly", "coords": [1483, 3751, 0], "size": "default" }, - { "name": "Lovakite mine", "coords": [1426, 3833, 0], "size": "default" }, - { "name": "Lumber Yard", "coords": [3305, 3505, 0], "size": "default" }, - { "name": "Lumbridge Swamp Caves", "coords": [3169, 9571, 0], "size": "default" }, - { "name": "Lumbridge Swamp", "coords": [3184, 3179, 0], "size": "default" }, - { "name": "Lumbridge Basement", "coords": [3213, 9620, 0], "size": "default" }, - { "name": "Lumbridge", "coords": [3224, 3218, 0], "size": "medium" }, - { "name": "Lunar Isle", "coords": [2130, 3873, 0], "size": "large" }, - { "name": "Mage Arena", "coords": [3105, 3932, 0], "size": "default" }, - { "name": "Mage Training Arena Rooms", "coords": [3357, 9666, 0], "size": "default" }, - { "name": "Mage Training Arena", "coords": [3363, 3304, 0], "size": "default" }, - { "name": "Marim", "coords": [2760, 2783, 0], "size": "default" }, - { "name": "Market", "coords": [3082, 3246, 0], "size": "default" }, - { "name": "Mausoleum", "coords": [3503, 3572, 0], "size": "default" }, - { "name": "McGrubor's Wood", "coords": [2641, 3480, 0], "size": "default" }, - { "name": "Meiyerditch", "coords": [3618, 3259, 0], "size": "medium" }, - { "name": "Melzar's Maze", "coords": [2933, 3248, 0], "size": "default" }, - { "name": "Menaphos", "coords": [3233, 2780, 0], "size": "medium" }, - { "name": "Mess", "coords": [1641, 3617, 0], "size": "default" }, - { "name": "Miscellania", "coords": [2537, 3875, 0], "size": "large" }, - { "name": "Miscellania and Etceteria dungeon", "coords": [2558, 10276, 0], "size": "default" }, - { "name": "Mogre Camp", "coords": [2974, 9496, 1], "size": "default" }, - { "name": "Molch", "coords": [1313, 3669, 0], "size": "medium" }, - { "name": "Monastery", "coords": [2602, 3215, 0], "size": "default" }, - { "name": "Monastery", "coords": [3052, 3487, 0], "size": "default" }, - { "name": "Mort Myre Swamp", "coords": [3440, 3380, 0], "size": "medium" }, - { "name": "Mort'ton", "coords": [3487, 3283, 0], "size": "medium" }, - { "name": "Morytania", "coords": [3467, 3441, 0], "size": "large" }, - { "name": "Mor Ul Rek", "coords": [2494, 5124, 0], "size": "default" }, - { "name": "Mos Le'Harmless", "coords": [3709, 3029, 0], "size": "medium" }, - { "name": "Motherlode Mine", "coords": [3745, 5665, 0], "size": "default" }, - { "name": "Mount Karuulm", "coords": [1311, 3807, 0], "size": "medium" }, - { "name": "Mount Quidamortem", "coords": [1244, 3558, 0], "size": "medium" }, - { "name": "Mountain Camp", "coords": [2801, 3670, 0], "size": "default" }, - { "name": "Mouse Hole", "coords": [2280, 5535, 0], "size": "default" }, - { "name": "Mudskipper Point", "coords": [2992, 3116, 0], "size": "default" }, - { "name": "Musa Point", "coords": [2897, 3161, 0], "size": "default" }, - { "name": "Museum Camp", "coords": [3730, 3819, 0], "size": "default" }, - { "name": "Mushroom Forest", "coords": [3688, 3860, 0], "size": "default" }, - { "name": "Myth's Guild", "coords": [2457, 2843, 0], "size": "default" }, - { "name": "Myth's Guild Basement", "coords": [1977, 9021, 1], "size": "default" }, - { "name": "Nardah", "coords": [3427, 2903, 0], "size": "default" }, - { "name": "Necromancer", "coords": [2669, 3241, 0], "size": "default" }, - { "name": "Necropolis", "coords": [3334, 2732, 0], "size": "default" }, - { "name": "Neitiznot", "coords": [2317, 3818, 0], "size": "medium" }, - { "name": "Nightmare Zone", "coords": [2603, 3115, 0], "size": "default" }, - { "name": "Observatory", "coords": [2441, 3157, 0], "size": "default" }, - { "name": "Observatory Dungeon", "coords": [2334, 9375, 0], "size": "default" }, - { "name": "Ogre Enclave", "coords": [2592, 9444, 0], "size": "default" }, - { "name": "Otto's Grotto", "coords": [2502, 3488, 0], "size": "default" }, - { "name": "Ourania Cave", "coords": [3036, 5610, 0], "size": "default" }, - { "name": "Outpost", "coords": [2441, 3345, 0], "size": "default" }, - { "name": "Palace", "coords": [3212, 3479, 0], "size": "default" }, - { "name": "Pest Control", "coords": [2656, 2593, 0], "size": "default" }, - { "name": "Pirate's Cove", "coords": [2205, 3817, 0], "size": "default" }, - { "name": "Pirates' Hideout", "coords": [3041, 3950, 0], "size": "default" }, - { "name": "Port Piscarilius", "coords": [1825, 3700, 0], "size": "medium" }, - { "name": "Piscatoris Fishing Colony", "coords": [2343, 3690, 0], "size": "default" }, - { "name": "Poision Waste", "coords": [2232, 3096, 0], "size": "default" }, - { "name": "Pollnivneach", "coords": [3352, 2977, 0], "size": "medium" }, - { "name": "Port Khazard", "coords": [2655, 3185, 0], "size": "medium" }, - { "name": "Port Phasmatys", "coords": [3674, 3486, 0], "size": "medium" }, - { "name": "Port Sarim", "coords": [3044, 3218, 0], "size": "medium" }, - { "name": "Port Tyras", "coords": [2150, 3122, 0], "size": "default" }, - { "name": "Pothole Dungeon", "coords": [2845, 9505, 0], "size": "default" }, - { "name": "Prifddinas", "coords": [3263, 6082, 0], "size": "medium" }, - { "name": "Puro-Puro", "coords": [2592, 4319, 0], "size": "default" }, - { "name": "Pyramid", "coords": [3233, 2896, 0], "size": "default" }, - { "name": "Quarry", "coords": [3172, 2908, 0], "size": "default" }, - { "name": "Raids", "coords": [3312, 5295, 0], "size": "default" }, - { "name": "Ranging Guild", "coords": [2666, 3429, 0], "size": "default" }, - { "name": "Ratcatchers Mansion", "coords": [2847, 5086, 0], "size": "default" }, - { "name": "Red Base", "coords": [2287, 2907, 0], "size": "default" }, - { "name": "Rellekka", "coords": [2668, 3676, 0], "size": "medium" }, - { "name": "Resource Area", "coords": [3185, 3934, 0], "size": "default" }, - { "name": "Revenant Caves", "coords": [3211, 10150, 0], "size": "default" }, - { "name": "Rimmington", "coords": [2957, 3215, 0], "size": "default" }, - { "name": "River Elid", "coords": [3372, 3074, 0], "size": "default" }, - { "name": "River Lum", "coords": [3167, 3346, 0], "size": "default" }, - { "name": "River Molch", "coords": [1255, 3671, 0], "size": "default" }, - { "name": "River Salve", "coords": [3403, 3442, 0], "size": "default" }, - { "name": "Rogue's Den", "coords": [3047, 4976, 1], "size": "default" }, - { "name": "Rogues' Castle", "coords": [3286, 3931, 0], "size": "default" }, - { "name": "Ruins of Camdozaal", "coords": [2973, 5799, 0], "size": "default" }, - { "name": "Ruins of Morra", "coords": [1447, 3510, 0], "size": "default" }, - { "name": "Ruins of Ullek", "coords": [3408, 2830, 0], "size": "medium" }, - { "name": "Ruins of Unkah", "coords": [3171, 2842, 0], "size": "medium" }, - { "name": "Ruins of Uzer", "coords": [3479, 3098, 0], "size": "default" }, - { "name": "Ruins", "coords": [2967, 3695, 0], "size": "default" }, - { "name": "Ruins", "coords": [3164, 3734, 0], "size": "default" }, - { "name": "Saltpetre", "coords": [1713, 3517, 0], "size": "default" }, - { "name": "Scorpion Pit", "coords": [3232, 3942, 0], "size": "default" }, - { "name": "Sea Spirit Dock", "coords": [3131, 2839, 0], "size": "default" }, - { "name": "Secret Hangar", "coords": [2391, 9890, 0], "size": "default" }, - { "name": "Seers' Village", "coords": [2701, 3483, 0], "size": "medium" }, - { "name": "Settlement Ruins", "coords": [1558, 3891, 0], "size": "default" }, - { "name": "Shadow Dungeon", "coords": [2687, 5088, 0], "size": "default" }, - { "name": "Shamans", "coords": [1433, 3708, 0], "size": "default" }, - { "name": "Shantay Pass", "coords": [3304, 3122, 0], "size": "default" }, - { "name": "Shayzien", "coords": [1524, 3562, 0], "size": "default" }, - { "name": "Shayzien Prison", "coords": [1439, 9959, 0], "size": "default" }, - { "name": "Shayzien's Wall", "coords": [1403, 3535, 0], "size": "default" }, - { "name": "Shilo Village", "coords": [2844, 2982, 0], "size": "medium" }, - { "name": "Ship Yard", "coords": [2987, 3055, 0], "size": "default" }, - { "name": "Sinclair Mansion", "coords": [2742, 3549, 0], "size": "default" }, - { "name": "Slayer Tower", "coords": [3428, 3554, 0], "size": "default" }, - { "name": "Slepe", "coords": [3719, 3328, 0], "size": "medium" }, - { "name": "Smoke Dungeon", "coords": [3265, 9373, 0], "size": "default" }, - { "name": "Sophanem", "coords": [3296, 2780, 0], "size": "medium" }, - { "name": "Sophanem Slayer Dungeon (1)", "coords": [3262, 9245, 0], "size": "default" }, - { "name": "Sophanem Slayer Dungeon (2)", "coords": [3294, 9246, 2], "size": "default" }, - { "name": "Sorcerer's Tower", "coords": [2702, 3404, 0], "size": "default" }, - { "name": "Sorceress's Garden", "coords": [2909, 5472, 0], "size": "default" }, - { "name": "Soul Obelisk", "coords": [2206, 2910, 0], "size": "default" }, - { "name": "Soul Wars Arena", "coords": [2204, 2934, 0], "size": "medium" }, - { "name": "Soul Wars Lobby", "coords": [2209, 2846, 0], "size": "medium" }, - { "name": "Spider", "coords": [3320, 3756, 0], "size": "default" }, - { "name": "Stronghold of Security - Catacomb of Famine", "coords": [2016, 5215, 0], "size": "default" }, - { "name": "Stronghold of Security - Pit of Pestilence", "coords": [2144, 5280, 0], "size": "default" }, - { "name": "Stronghold of Security - Sepulchre of Death", "coords": [2333, 5219, 0], "size": "default" }, - { "name": "Stronghold of Security - Vault of War", "coords": [1884, 5218, 0], "size": "default" }, - { "name": "Stronghold Slayer Cave", "coords": [2435, 9806, 0], "size": "default" }, - { "name": "Sulphur mine", "coords": [1447, 3879, 0], "size": "default" }, - { "name": "Swamp", "coords": [2418, 3511, 0], "size": "default" }, - { "name": "Tai Bwo Wannai", "coords": [2789, 3063, 0], "size": "default" }, - { "name": "Tar Swamp", "coords": [3679, 3778, 0], "size": "default" }, - { "name": "Taverley Dungeon", "coords": [2886, 9811, 0], "size": "default" }, - { "name": "Taverley", "coords": [2896, 3455, 0], "size": "default" }, - { "name": "Temple", "coords": [3414, 3487, 0], "size": "default" }, - { "name": "Temple of Ikov", "coords": [2649, 9854, 0], "size": "default" }, - { "name": "Temple of Marimbo Dungeon", "coords": [2784, 9184, 0], "size": "default" }, - { "name": "The Forgotten Cemetery", "coords": [2976, 3750, 0], "size": "default" }, - { "name": "The Forsaken Tower", "coords": [1382, 3823, 0], "size": "default" }, - { "name": "The Hollows", "coords": [3498, 3381, 0], "size": "default" }, - { "name": "The Inferno", "coords": [2272, 5343, 0], "size": "default" }, - { "name": "The Node", "coords": [3105, 3027, 0], "size": "default" }, - { "name": "The Warrens", "coords": [1776, 10143, 0], "size": "default" }, - { "name": "Tirannwn", "coords": [2240, 3263, 0], "size": "large" }, - { "name": "Tithe farm", "coords": [1806, 3507, 0], "size": "default" }, - { "name": "Toll Gate", "coords": [3271, 3226, 0], "size": "default" }, - { "name": "Tower of Life", "coords": [2648, 3215, 0], "size": "default" }, - { "name": "Tower of Magic", "coords": [1579, 3818, 0], "size": "default" }, - { "name": "Trawler", "coords": [2683, 3166, 0], "size": "default" }, - { "name": "Tree Gnome Stronghold", "coords": [2430, 3447, 0], "size": "medium" }, - { "name": "Tree Gnome Village", "coords": [2527, 3166, 0], "size": "default" }, - { "name": "Troll Stronghold", "coords": [2832, 3682, 0], "size": "default" }, - { "name": "Trollheim", "coords": [2891, 3676, 0], "size": "default" }, - { "name": "Trollweiss Mountain", "coords": [2782, 3862, 0], "size": "default" }, - { "name": "Tutorial Island", "coords": [3101, 3094, 0], "size": "default" }, - { "name": "Tyras Camp", "coords": [2186, 3146, 0], "size": "default" }, - { "name": "TzHaar City", "coords": [2451, 5146, 0], "size": "default" }, - { "name": "Underground Pass", "coords": [2449, 3312, 0], "size": "default" }, - { "name": "Underground Pass Area 1", "coords": [2464, 9700, 0], "size": "default" }, - { "name": "Underground Pass Area 2", "coords": [2399, 9637, 0], "size": "default" }, - { "name": "Underground Pass Area 3", "coords": [2398, 9710, 0], "size": "default" }, - { "name": "Unmarked Grave", "coords": [1576, 3938, 0], "size": "default" }, - { "name": "Ungael", "coords": [2271, 4065, 0], "size": "default" }, - { "name": "Varrock Sewers", "coords": [3225, 9887, 0], "size": "default" }, - { "name": "Varrock", "coords": [3213, 3449, 0], "size": "medium" }, - { "name": "Ver Sinhaza", "coords": [3662, 3218, 0], "size": "default" }, - { "name": "Vinery", "coords": [1814, 3544, 0], "size": "default" }, - { "name": "Viyeldi caves", "coords": [2398, 4717, 0], "size": "default" }, - { "name": "Viyeldi caves (2)", "coords": [2782, 9315, 0], "size": "default" }, - { "name": "Void Knights' Outpost", "coords": [2639, 2674, 0], "size": "default" }, - { "name": "Volcano", "coords": [3778, 3778, 0], "size": "default" }, - { "name": "Vultures", "coords": [3337, 2868, 0], "size": "default" }, - { "name": "Warriors' Guild", "coords": [2855, 3543, 0], "size": "default" }, - { "name": "Warriors' Guild Basement", "coords": [2920, 9964, 0], "size": "default" }, - { "name": "War Tent", "coords": [1484, 3636, 0], "size": "default" }, - { "name": "Waterbirth Island", "coords": [2521, 3757, 0], "size": "default" }, - { "name": "Waterbirth Dungeon (1)", "coords": [2495, 10144, 0], "size": "default" }, - { "name": "Waterbirth Dungeon (2)", "coords": [1895, 4367, 0], "size": "default" }, - { "name": "Waterbirth Dungeon (3)", "coords": [1895, 4367, 1], "size": "default" }, - { "name": "Waterbirth Dungeon (4)", "coords": [1895, 4367, 2], "size": "default" }, - { "name": "Waterbirth Dungeon (5)", "coords": [1895, 4367, 3], "size": "default" }, - { "name": "Waterbirth Dungeon (6)", "coords": [2912, 4448, 0], "size": "default" }, - { "name": "Waterfall Dungeon", "coords": [2577, 9890, 0], "size": "default" }, - { "name": "West Ardougne", "coords": [2524, 3305, 0], "size": "medium" }, - { "name": "Western Graveyard", "coords": [2161, 2898, 0], "size": "default" }, - { "name": "White Knights' Castle", "coords": [2969, 3341, 0], "size": "default" }, - { "name": "White Wolf Mountain", "coords": [2847, 3494, 0], "size": "default" }, - { "name": "Wilderness", "coords": [3144, 3775, 0], "size": "large" }, - { "name": "Wilderness Slayer Cave", "coords": [3392, 10102, 0], "size": "default"}, - { "name": "Wintertodt", "coords": [1630, 4004, 0], "size": "medium" }, - { "name": "Witchaven", "coords": [2709, 3289, 0], "size": "default" }, - { "name": "Witchaven Dungeon", "coords": [2722, 9689, 0], "size": "default" }, - { "name": "Witchaven Dungeon (2)", "coords": [2329, 5097, 0], "size": "default" }, - { "name": "Wizards' Guild", "coords": [2583, 3078, 0], "size": "default" }, - { "name": "Wizards' Tower", "coords": [3110, 3157, 0], "size": "default" }, - { "name": "Woodcutting Guild", "coords": [1612, 3492, 0], "size": "default" }, - { "name": "Xeric's Look out", "coords": [1590, 3530, 0], "size": "default" }, - { "name": "Xeric's Shrine", "coords": [1310, 3619, 0], "size": "default" }, - { "name": "Yanille", "coords": [2554, 3089, 0], "size": "medium" }, - { "name": "Yanille Agility Dungeon", "coords": [2581, 9499, 0], "size": "default" }, - { "name": "Yanille Agility Dungeon (2)", "coords": [2580, 9577, 0], "size": "default" }, - { "name": "Zanaris", "coords": [2415, 4455, 0], "size": "medium" }, - { "name": "Zul-Andra", "coords": [2204, 3064, 0], "size": "default" }, - { "name": "Zulrah's shrine", "coords": [2267, 3074, 0] } - ] -}