@hpcc-js/map 2.76.1 → 2.76.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es6.js +1037 -968
- package/dist/index.es6.js.map +1 -1
- package/dist/index.js +1037 -968
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +4 -19
- package/dist/index.min.js.map +1 -1
- package/package.json +12 -12
- package/src/__package__.ts +2 -2
- package/types/__package__.d.ts +2 -2
- package/types-3.4/__package__.d.ts +2 -2
package/dist/index.es6.js
CHANGED
|
@@ -21,10 +21,10 @@ function _mergeNamespaces(n, m) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
var PKG_NAME = "@hpcc-js/map";
|
|
24
|
-
var PKG_VERSION = "2.76.
|
|
25
|
-
var BUILD_VERSION = "2.104.
|
|
24
|
+
var PKG_VERSION = "2.76.2";
|
|
25
|
+
var BUILD_VERSION = "2.104.2";
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
/******************************************************************************
|
|
28
28
|
Copyright (c) Microsoft Corporation.
|
|
29
29
|
|
|
30
30
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -7886,7 +7886,7 @@ var ___CSS_LOADER_URL_REPLACEMENT_0___ = _css_loader_dist_runtime_getUrl_js__WEB
|
|
|
7886
7886
|
var ___CSS_LOADER_URL_REPLACEMENT_1___ = _css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default()(___CSS_LOADER_URL_IMPORT_1___);
|
|
7887
7887
|
var ___CSS_LOADER_URL_REPLACEMENT_2___ = _css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default()(___CSS_LOADER_URL_IMPORT_2___);
|
|
7888
7888
|
// Module
|
|
7889
|
-
___CSS_LOADER_EXPORT___.push([module.id, "/* required styles */\r\n\r\n.leaflet-pane,\r\n.leaflet-tile,\r\n.leaflet-marker-icon,\r\n.leaflet-marker-shadow,\r\n.leaflet-tile-container,\r\n.leaflet-pane > svg,\r\n.leaflet-pane > canvas,\r\n.leaflet-zoom-box,\r\n.leaflet-image-layer,\r\n.leaflet-layer {\r\n\tposition: absolute;\r\n\tleft: 0;\r\n\ttop: 0;\r\n\t}\r\n.leaflet-container {\r\n\toverflow: hidden;\r\n\t}\r\n.leaflet-tile,\r\n.leaflet-marker-icon,\r\n.leaflet-marker-shadow {\r\n\t-webkit-user-select: none;\r\n\t -moz-user-select: none;\r\n\t user-select: none;\r\n\t -webkit-user-drag: none;\r\n\t}\r\n/* Prevents IE11 from highlighting tiles in blue */\r\n.leaflet-tile::selection {\r\n\tbackground: transparent;\r\n}\r\n/* Safari renders non-retina tile on retina better with this, but Chrome is worse */\r\n.leaflet-safari .leaflet-tile {\r\n\timage-rendering: -webkit-optimize-contrast;\r\n\t}\r\n/* hack that prevents hw layers \"stretching\" when loading new tiles */\r\n.leaflet-safari .leaflet-tile-container {\r\n\twidth: 1600px;\r\n\theight: 1600px;\r\n\t-webkit-transform-origin: 0 0;\r\n\t}\r\n.leaflet-marker-icon,\r\n.leaflet-marker-shadow {\r\n\tdisplay: block;\r\n\t}\r\n/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */\r\n/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */\r\n.leaflet-container .leaflet-overlay-pane svg,\r\n.leaflet-container .leaflet-marker-pane img,\r\n.leaflet-container .leaflet-shadow-pane img,\r\n.leaflet-container .leaflet-tile-pane img,\r\n.leaflet-container img.leaflet-image-layer,\r\n.leaflet-container .leaflet-tile {\r\n\tmax-width: none !important;\r\n\tmax-height: none !important;\r\n\t}\r\n\r\n.leaflet-container.leaflet-touch-zoom {\r\n\t-ms-touch-action: pan-x pan-y;\r\n\ttouch-action: pan-x pan-y;\r\n\t}\r\n.leaflet-container.leaflet-touch-drag {\r\n\t-ms-touch-action: pinch-zoom;\r\n\t/* Fallback for FF which doesn't support pinch-zoom */\r\n\ttouch-action: none;\r\n\ttouch-action: pinch-zoom;\r\n}\r\n.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {\r\n\t-ms-touch-action: none;\r\n\ttouch-action: none;\r\n}\r\n.leaflet-container {\r\n\t-webkit-tap-highlight-color: transparent;\r\n}\r\n.leaflet-container a {\r\n\t-webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);\r\n}\r\n.leaflet-tile {\r\n\tfilter: inherit;\r\n\tvisibility: hidden;\r\n\t}\r\n.leaflet-tile-loaded {\r\n\tvisibility: inherit;\r\n\t}\r\n.leaflet-zoom-box {\r\n\twidth: 0;\r\n\theight: 0;\r\n\t-moz-box-sizing: border-box;\r\n\t box-sizing: border-box;\r\n\tz-index: 800;\r\n\t}\r\n/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */\r\n.leaflet-overlay-pane svg {\r\n\t-moz-user-select: none;\r\n\t}\r\n\r\n.leaflet-pane { z-index: 400; }\r\n\r\n.leaflet-tile-pane { z-index: 200; }\r\n.leaflet-overlay-pane { z-index: 400; }\r\n.leaflet-shadow-pane { z-index: 500; }\r\n.leaflet-marker-pane { z-index: 600; }\r\n.leaflet-tooltip-pane { z-index: 650; }\r\n.leaflet-popup-pane { z-index: 700; }\r\n\r\n.leaflet-map-pane canvas { z-index: 100; }\r\n.leaflet-map-pane svg { z-index: 200; }\r\n\r\n.leaflet-vml-shape {\r\n\twidth: 1px;\r\n\theight: 1px;\r\n\t}\r\n.lvml {\r\n\tbehavior: url(#default#VML);\r\n\tdisplay: inline-block;\r\n\tposition: absolute;\r\n\t}\r\n\r\n\r\n/* control positioning */\r\n\r\n.leaflet-control {\r\n\tposition: relative;\r\n\tz-index: 800;\r\n\tpointer-events: visiblePainted; /* IE 9-10 doesn't have auto */\r\n\tpointer-events: auto;\r\n\t}\r\n.leaflet-top,\r\n.leaflet-bottom {\r\n\tposition: absolute;\r\n\tz-index: 1000;\r\n\tpointer-events: none;\r\n\t}\r\n.leaflet-top {\r\n\ttop: 0;\r\n\t}\r\n.leaflet-right {\r\n\tright: 0;\r\n\t}\r\n.leaflet-bottom {\r\n\tbottom: 0;\r\n\t}\r\n.leaflet-left {\r\n\tleft: 0;\r\n\t}\r\n.leaflet-control {\r\n\tfloat: left;\r\n\tclear: both;\r\n\t}\r\n.leaflet-right .leaflet-control {\r\n\tfloat: right;\r\n\t}\r\n.leaflet-top .leaflet-control {\r\n\tmargin-top: 10px;\r\n\t}\r\n.leaflet-bottom .leaflet-control {\r\n\tmargin-bottom: 10px;\r\n\t}\r\n.leaflet-left .leaflet-control {\r\n\tmargin-left: 10px;\r\n\t}\r\n.leaflet-right .leaflet-control {\r\n\tmargin-right: 10px;\r\n\t}\r\n\r\n\r\n/* zoom and fade animations */\r\n\r\n.leaflet-fade-anim .leaflet-tile {\r\n\twill-change: opacity;\r\n\t}\r\n.leaflet-fade-anim .leaflet-popup {\r\n\topacity: 0;\r\n\t-webkit-transition: opacity 0.2s linear;\r\n\t -moz-transition: opacity 0.2s linear;\r\n\t transition: opacity 0.2s linear;\r\n\t}\r\n.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {\r\n\topacity: 1;\r\n\t}\r\n.leaflet-zoom-animated {\r\n\t-webkit-transform-origin: 0 0;\r\n\t -ms-transform-origin: 0 0;\r\n\t transform-origin: 0 0;\r\n\t}\r\n.leaflet-zoom-anim .leaflet-zoom-animated {\r\n\twill-change: transform;\r\n\t}\r\n.leaflet-zoom-anim .leaflet-zoom-animated {\r\n\t-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);\r\n\t -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);\r\n\t transition: transform 0.25s cubic-bezier(0,0,0.25,1);\r\n\t}\r\n.leaflet-zoom-anim .leaflet-tile,\r\n.leaflet-pan-anim .leaflet-tile {\r\n\t-webkit-transition: none;\r\n\t -moz-transition: none;\r\n\t transition: none;\r\n\t}\r\n\r\n.leaflet-zoom-anim .leaflet-zoom-hide {\r\n\tvisibility: hidden;\r\n\t}\r\n\r\n\r\n/* cursors */\r\n\r\n.leaflet-interactive {\r\n\tcursor: pointer;\r\n\t}\r\n.leaflet-grab {\r\n\tcursor: -webkit-grab;\r\n\tcursor: -moz-grab;\r\n\tcursor: grab;\r\n\t}\r\n.leaflet-crosshair,\r\n.leaflet-crosshair .leaflet-interactive {\r\n\tcursor: crosshair;\r\n\t}\r\n.leaflet-popup-pane,\r\n.leaflet-control {\r\n\tcursor: auto;\r\n\t}\r\n.leaflet-dragging .leaflet-grab,\r\n.leaflet-dragging .leaflet-grab .leaflet-interactive,\r\n.leaflet-dragging .leaflet-marker-draggable {\r\n\tcursor: move;\r\n\tcursor: -webkit-grabbing;\r\n\tcursor: -moz-grabbing;\r\n\tcursor: grabbing;\r\n\t}\r\n\r\n/* marker & overlays interactivity */\r\n.leaflet-marker-icon,\r\n.leaflet-marker-shadow,\r\n.leaflet-image-layer,\r\n.leaflet-pane > svg path,\r\n.leaflet-tile-container {\r\n\tpointer-events: none;\r\n\t}\r\n\r\n.leaflet-marker-icon.leaflet-interactive,\r\n.leaflet-image-layer.leaflet-interactive,\r\n.leaflet-pane > svg path.leaflet-interactive,\r\nsvg.leaflet-image-layer.leaflet-interactive path {\r\n\tpointer-events: visiblePainted; /* IE 9-10 doesn't have auto */\r\n\tpointer-events: auto;\r\n\t}\r\n\r\n/* visual tweaks */\r\n\r\n.leaflet-container {\r\n\tbackground: #ddd;\r\n\toutline: 0;\r\n\t}\r\n.leaflet-container a {\r\n\tcolor: #0078A8;\r\n\t}\r\n.leaflet-container a.leaflet-active {\r\n\toutline: 2px solid orange;\r\n\t}\r\n.leaflet-zoom-box {\r\n\tborder: 2px dotted #38f;\r\n\tbackground: rgba(255,255,255,0.5);\r\n\t}\r\n\r\n\r\n/* general typography */\r\n.leaflet-container {\r\n\tfont: 12px/1.5 \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n\t}\r\n\r\n\r\n/* general toolbar styles */\r\n\r\n.leaflet-bar {\r\n\tbox-shadow: 0 1px 5px rgba(0,0,0,0.65);\r\n\tborder-radius: 4px;\r\n\t}\r\n.leaflet-bar a,\r\n.leaflet-bar a:hover {\r\n\tbackground-color: #fff;\r\n\tborder-bottom: 1px solid #ccc;\r\n\twidth: 26px;\r\n\theight: 26px;\r\n\tline-height: 26px;\r\n\tdisplay: block;\r\n\ttext-align: center;\r\n\ttext-decoration: none;\r\n\tcolor: black;\r\n\t}\r\n.leaflet-bar a,\r\n.leaflet-control-layers-toggle {\r\n\tbackground-position: 50% 50%;\r\n\tbackground-repeat: no-repeat;\r\n\tdisplay: block;\r\n\t}\r\n.leaflet-bar a:hover {\r\n\tbackground-color: #f4f4f4;\r\n\t}\r\n.leaflet-bar a:first-child {\r\n\tborder-top-left-radius: 4px;\r\n\tborder-top-right-radius: 4px;\r\n\t}\r\n.leaflet-bar a:last-child {\r\n\tborder-bottom-left-radius: 4px;\r\n\tborder-bottom-right-radius: 4px;\r\n\tborder-bottom: none;\r\n\t}\r\n.leaflet-bar a.leaflet-disabled {\r\n\tcursor: default;\r\n\tbackground-color: #f4f4f4;\r\n\tcolor: #bbb;\r\n\t}\r\n\r\n.leaflet-touch .leaflet-bar a {\r\n\twidth: 30px;\r\n\theight: 30px;\r\n\tline-height: 30px;\r\n\t}\r\n.leaflet-touch .leaflet-bar a:first-child {\r\n\tborder-top-left-radius: 2px;\r\n\tborder-top-right-radius: 2px;\r\n\t}\r\n.leaflet-touch .leaflet-bar a:last-child {\r\n\tborder-bottom-left-radius: 2px;\r\n\tborder-bottom-right-radius: 2px;\r\n\t}\r\n\r\n/* zoom control */\r\n\r\n.leaflet-control-zoom-in,\r\n.leaflet-control-zoom-out {\r\n\tfont: bold 18px 'Lucida Console', Monaco, monospace;\r\n\ttext-indent: 1px;\r\n\t}\r\n\r\n.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out {\r\n\tfont-size: 22px;\r\n\t}\r\n\r\n\r\n/* layers control */\r\n\r\n.leaflet-control-layers {\r\n\tbox-shadow: 0 1px 5px rgba(0,0,0,0.4);\r\n\tbackground: #fff;\r\n\tborder-radius: 5px;\r\n\t}\r\n.leaflet-control-layers-toggle {\r\n\tbackground-image: url(" + ___CSS_LOADER_URL_REPLACEMENT_0___ + ");\r\n\twidth: 36px;\r\n\theight: 36px;\r\n\t}\r\n.leaflet-retina .leaflet-control-layers-toggle {\r\n\tbackground-image: url(" + ___CSS_LOADER_URL_REPLACEMENT_1___ + ");\r\n\tbackground-size: 26px 26px;\r\n\t}\r\n.leaflet-touch .leaflet-control-layers-toggle {\r\n\twidth: 44px;\r\n\theight: 44px;\r\n\t}\r\n.leaflet-control-layers .leaflet-control-layers-list,\r\n.leaflet-control-layers-expanded .leaflet-control-layers-toggle {\r\n\tdisplay: none;\r\n\t}\r\n.leaflet-control-layers-expanded .leaflet-control-layers-list {\r\n\tdisplay: block;\r\n\tposition: relative;\r\n\t}\r\n.leaflet-control-layers-expanded {\r\n\tpadding: 6px 10px 6px 6px;\r\n\tcolor: #333;\r\n\tbackground: #fff;\r\n\t}\r\n.leaflet-control-layers-scrollbar {\r\n\toverflow-y: scroll;\r\n\toverflow-x: hidden;\r\n\tpadding-right: 5px;\r\n\t}\r\n.leaflet-control-layers-selector {\r\n\tmargin-top: 2px;\r\n\tposition: relative;\r\n\ttop: 1px;\r\n\t}\r\n.leaflet-control-layers label {\r\n\tdisplay: block;\r\n\t}\r\n.leaflet-control-layers-separator {\r\n\theight: 0;\r\n\tborder-top: 1px solid #ddd;\r\n\tmargin: 5px -10px 5px -6px;\r\n\t}\r\n\r\n/* Default icon URLs */\r\n.leaflet-default-icon-path {\r\n\tbackground-image: url(" + ___CSS_LOADER_URL_REPLACEMENT_2___ + ");\r\n\t}\r\n\r\n\r\n/* attribution and scale controls */\r\n\r\n.leaflet-container .leaflet-control-attribution {\r\n\tbackground: #fff;\r\n\tbackground: rgba(255, 255, 255, 0.7);\r\n\tmargin: 0;\r\n\t}\r\n.leaflet-control-attribution,\r\n.leaflet-control-scale-line {\r\n\tpadding: 0 5px;\r\n\tcolor: #333;\r\n\t}\r\n.leaflet-control-attribution a {\r\n\ttext-decoration: none;\r\n\t}\r\n.leaflet-control-attribution a:hover {\r\n\ttext-decoration: underline;\r\n\t}\r\n.leaflet-container .leaflet-control-attribution,\r\n.leaflet-container .leaflet-control-scale {\r\n\tfont-size: 11px;\r\n\t}\r\n.leaflet-left .leaflet-control-scale {\r\n\tmargin-left: 5px;\r\n\t}\r\n.leaflet-bottom .leaflet-control-scale {\r\n\tmargin-bottom: 5px;\r\n\t}\r\n.leaflet-control-scale-line {\r\n\tborder: 2px solid #777;\r\n\tborder-top: none;\r\n\tline-height: 1.1;\r\n\tpadding: 2px 5px 1px;\r\n\tfont-size: 11px;\r\n\twhite-space: nowrap;\r\n\toverflow: hidden;\r\n\t-moz-box-sizing: border-box;\r\n\t box-sizing: border-box;\r\n\r\n\tbackground: #fff;\r\n\tbackground: rgba(255, 255, 255, 0.5);\r\n\t}\r\n.leaflet-control-scale-line:not(:first-child) {\r\n\tborder-top: 2px solid #777;\r\n\tborder-bottom: none;\r\n\tmargin-top: -2px;\r\n\t}\r\n.leaflet-control-scale-line:not(:first-child):not(:last-child) {\r\n\tborder-bottom: 2px solid #777;\r\n\t}\r\n\r\n.leaflet-touch .leaflet-control-attribution,\r\n.leaflet-touch .leaflet-control-layers,\r\n.leaflet-touch .leaflet-bar {\r\n\tbox-shadow: none;\r\n\t}\r\n.leaflet-touch .leaflet-control-layers,\r\n.leaflet-touch .leaflet-bar {\r\n\tborder: 2px solid rgba(0,0,0,0.2);\r\n\tbackground-clip: padding-box;\r\n\t}\r\n\r\n\r\n/* popup */\r\n\r\n.leaflet-popup {\r\n\tposition: absolute;\r\n\ttext-align: center;\r\n\tmargin-bottom: 20px;\r\n\t}\r\n.leaflet-popup-content-wrapper {\r\n\tpadding: 1px;\r\n\ttext-align: left;\r\n\tborder-radius: 12px;\r\n\t}\r\n.leaflet-popup-content {\r\n\tmargin: 13px 19px;\r\n\tline-height: 1.4;\r\n\t}\r\n.leaflet-popup-content p {\r\n\tmargin: 18px 0;\r\n\t}\r\n.leaflet-popup-tip-container {\r\n\twidth: 40px;\r\n\theight: 20px;\r\n\tposition: absolute;\r\n\tleft: 50%;\r\n\tmargin-left: -20px;\r\n\toverflow: hidden;\r\n\tpointer-events: none;\r\n\t}\r\n.leaflet-popup-tip {\r\n\twidth: 17px;\r\n\theight: 17px;\r\n\tpadding: 1px;\r\n\r\n\tmargin: -10px auto 0;\r\n\r\n\t-webkit-transform: rotate(45deg);\r\n\t -moz-transform: rotate(45deg);\r\n\t -ms-transform: rotate(45deg);\r\n\t transform: rotate(45deg);\r\n\t}\r\n.leaflet-popup-content-wrapper,\r\n.leaflet-popup-tip {\r\n\tbackground: white;\r\n\tcolor: #333;\r\n\tbox-shadow: 0 3px 14px rgba(0,0,0,0.4);\r\n\t}\r\n.leaflet-container a.leaflet-popup-close-button {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tright: 0;\r\n\tpadding: 4px 4px 0 0;\r\n\tborder: none;\r\n\ttext-align: center;\r\n\twidth: 18px;\r\n\theight: 14px;\r\n\tfont: 16px/14px Tahoma, Verdana, sans-serif;\r\n\tcolor: #c3c3c3;\r\n\ttext-decoration: none;\r\n\tfont-weight: bold;\r\n\tbackground: transparent;\r\n\t}\r\n.leaflet-container a.leaflet-popup-close-button:hover {\r\n\tcolor: #999;\r\n\t}\r\n.leaflet-popup-scrolled {\r\n\toverflow: auto;\r\n\tborder-bottom: 1px solid #ddd;\r\n\tborder-top: 1px solid #ddd;\r\n\t}\r\n\r\n.leaflet-oldie .leaflet-popup-content-wrapper {\r\n\t-ms-zoom: 1;\r\n\t}\r\n.leaflet-oldie .leaflet-popup-tip {\r\n\twidth: 24px;\r\n\tmargin: 0 auto;\r\n\r\n\t-ms-filter: \"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)\";\r\n\tfilter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);\r\n\t}\r\n.leaflet-oldie .leaflet-popup-tip-container {\r\n\tmargin-top: -1px;\r\n\t}\r\n\r\n.leaflet-oldie .leaflet-control-zoom,\r\n.leaflet-oldie .leaflet-control-layers,\r\n.leaflet-oldie .leaflet-popup-content-wrapper,\r\n.leaflet-oldie .leaflet-popup-tip {\r\n\tborder: 1px solid #999;\r\n\t}\r\n\r\n\r\n/* div icon */\r\n\r\n.leaflet-div-icon {\r\n\tbackground: #fff;\r\n\tborder: 1px solid #666;\r\n\t}\r\n\r\n\r\n/* Tooltip */\r\n/* Base styles for the element that has a tooltip */\r\n.leaflet-tooltip {\r\n\tposition: absolute;\r\n\tpadding: 6px;\r\n\tbackground-color: #fff;\r\n\tborder: 1px solid #fff;\r\n\tborder-radius: 3px;\r\n\tcolor: #222;\r\n\twhite-space: nowrap;\r\n\t-webkit-user-select: none;\r\n\t-moz-user-select: none;\r\n\t-ms-user-select: none;\r\n\tuser-select: none;\r\n\tpointer-events: none;\r\n\tbox-shadow: 0 1px 3px rgba(0,0,0,0.4);\r\n\t}\r\n.leaflet-tooltip.leaflet-clickable {\r\n\tcursor: pointer;\r\n\tpointer-events: auto;\r\n\t}\r\n.leaflet-tooltip-top:before,\r\n.leaflet-tooltip-bottom:before,\r\n.leaflet-tooltip-left:before,\r\n.leaflet-tooltip-right:before {\r\n\tposition: absolute;\r\n\tpointer-events: none;\r\n\tborder: 6px solid transparent;\r\n\tbackground: transparent;\r\n\tcontent: \"\";\r\n\t}\r\n\r\n/* Directions */\r\n\r\n.leaflet-tooltip-bottom {\r\n\tmargin-top: 6px;\r\n}\r\n.leaflet-tooltip-top {\r\n\tmargin-top: -6px;\r\n}\r\n.leaflet-tooltip-bottom:before,\r\n.leaflet-tooltip-top:before {\r\n\tleft: 50%;\r\n\tmargin-left: -6px;\r\n\t}\r\n.leaflet-tooltip-top:before {\r\n\tbottom: 0;\r\n\tmargin-bottom: -12px;\r\n\tborder-top-color: #fff;\r\n\t}\r\n.leaflet-tooltip-bottom:before {\r\n\ttop: 0;\r\n\tmargin-top: -12px;\r\n\tmargin-left: -6px;\r\n\tborder-bottom-color: #fff;\r\n\t}\r\n.leaflet-tooltip-left {\r\n\tmargin-left: -6px;\r\n}\r\n.leaflet-tooltip-right {\r\n\tmargin-left: 6px;\r\n}\r\n.leaflet-tooltip-left:before,\r\n.leaflet-tooltip-right:before {\r\n\ttop: 50%;\r\n\tmargin-top: -6px;\r\n\t}\r\n.leaflet-tooltip-left:before {\r\n\tright: 0;\r\n\tmargin-right: -12px;\r\n\tborder-left-color: #fff;\r\n\t}\r\n.leaflet-tooltip-right:before {\r\n\tleft: 0;\r\n\tmargin-left: -12px;\r\n\tborder-right-color: #fff;\r\n\t}\r\n", ""]);
|
|
7889
|
+
___CSS_LOADER_EXPORT___.push([module.id, "/* required styles */\r\n\r\n.leaflet-pane,\r\n.leaflet-tile,\r\n.leaflet-marker-icon,\r\n.leaflet-marker-shadow,\r\n.leaflet-tile-container,\r\n.leaflet-pane > svg,\r\n.leaflet-pane > canvas,\r\n.leaflet-zoom-box,\r\n.leaflet-image-layer,\r\n.leaflet-layer {\r\n\tposition: absolute;\r\n\tleft: 0;\r\n\ttop: 0;\r\n\t}\r\n.leaflet-container {\r\n\toverflow: hidden;\r\n\t}\r\n.leaflet-tile,\r\n.leaflet-marker-icon,\r\n.leaflet-marker-shadow {\r\n\t-webkit-user-select: none;\r\n\t -moz-user-select: none;\r\n\t user-select: none;\r\n\t -webkit-user-drag: none;\r\n\t}\r\n/* Prevents IE11 from highlighting tiles in blue */\r\n.leaflet-tile::selection {\r\n\tbackground: transparent;\r\n}\r\n/* Safari renders non-retina tile on retina better with this, but Chrome is worse */\r\n.leaflet-safari .leaflet-tile {\r\n\timage-rendering: -webkit-optimize-contrast;\r\n\t}\r\n/* hack that prevents hw layers \"stretching\" when loading new tiles */\r\n.leaflet-safari .leaflet-tile-container {\r\n\twidth: 1600px;\r\n\theight: 1600px;\r\n\t-webkit-transform-origin: 0 0;\r\n\t}\r\n.leaflet-marker-icon,\r\n.leaflet-marker-shadow {\r\n\tdisplay: block;\r\n\t}\r\n/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */\r\n/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */\r\n.leaflet-container .leaflet-overlay-pane svg {\r\n\tmax-width: none !important;\r\n\tmax-height: none !important;\r\n\t}\r\n.leaflet-container .leaflet-marker-pane img,\r\n.leaflet-container .leaflet-shadow-pane img,\r\n.leaflet-container .leaflet-tile-pane img,\r\n.leaflet-container img.leaflet-image-layer,\r\n.leaflet-container .leaflet-tile {\r\n\tmax-width: none !important;\r\n\tmax-height: none !important;\r\n\twidth: auto;\r\n\tpadding: 0;\r\n\t}\r\n\r\n.leaflet-container.leaflet-touch-zoom {\r\n\t-ms-touch-action: pan-x pan-y;\r\n\ttouch-action: pan-x pan-y;\r\n\t}\r\n.leaflet-container.leaflet-touch-drag {\r\n\t-ms-touch-action: pinch-zoom;\r\n\t/* Fallback for FF which doesn't support pinch-zoom */\r\n\ttouch-action: none;\r\n\ttouch-action: pinch-zoom;\r\n}\r\n.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {\r\n\t-ms-touch-action: none;\r\n\ttouch-action: none;\r\n}\r\n.leaflet-container {\r\n\t-webkit-tap-highlight-color: transparent;\r\n}\r\n.leaflet-container a {\r\n\t-webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);\r\n}\r\n.leaflet-tile {\r\n\tfilter: inherit;\r\n\tvisibility: hidden;\r\n\t}\r\n.leaflet-tile-loaded {\r\n\tvisibility: inherit;\r\n\t}\r\n.leaflet-zoom-box {\r\n\twidth: 0;\r\n\theight: 0;\r\n\t-moz-box-sizing: border-box;\r\n\t box-sizing: border-box;\r\n\tz-index: 800;\r\n\t}\r\n/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */\r\n.leaflet-overlay-pane svg {\r\n\t-moz-user-select: none;\r\n\t}\r\n\r\n.leaflet-pane { z-index: 400; }\r\n\r\n.leaflet-tile-pane { z-index: 200; }\r\n.leaflet-overlay-pane { z-index: 400; }\r\n.leaflet-shadow-pane { z-index: 500; }\r\n.leaflet-marker-pane { z-index: 600; }\r\n.leaflet-tooltip-pane { z-index: 650; }\r\n.leaflet-popup-pane { z-index: 700; }\r\n\r\n.leaflet-map-pane canvas { z-index: 100; }\r\n.leaflet-map-pane svg { z-index: 200; }\r\n\r\n.leaflet-vml-shape {\r\n\twidth: 1px;\r\n\theight: 1px;\r\n\t}\r\n.lvml {\r\n\tbehavior: url(#default#VML);\r\n\tdisplay: inline-block;\r\n\tposition: absolute;\r\n\t}\r\n\r\n\r\n/* control positioning */\r\n\r\n.leaflet-control {\r\n\tposition: relative;\r\n\tz-index: 800;\r\n\tpointer-events: visiblePainted; /* IE 9-10 doesn't have auto */\r\n\tpointer-events: auto;\r\n\t}\r\n.leaflet-top,\r\n.leaflet-bottom {\r\n\tposition: absolute;\r\n\tz-index: 1000;\r\n\tpointer-events: none;\r\n\t}\r\n.leaflet-top {\r\n\ttop: 0;\r\n\t}\r\n.leaflet-right {\r\n\tright: 0;\r\n\t}\r\n.leaflet-bottom {\r\n\tbottom: 0;\r\n\t}\r\n.leaflet-left {\r\n\tleft: 0;\r\n\t}\r\n.leaflet-control {\r\n\tfloat: left;\r\n\tclear: both;\r\n\t}\r\n.leaflet-right .leaflet-control {\r\n\tfloat: right;\r\n\t}\r\n.leaflet-top .leaflet-control {\r\n\tmargin-top: 10px;\r\n\t}\r\n.leaflet-bottom .leaflet-control {\r\n\tmargin-bottom: 10px;\r\n\t}\r\n.leaflet-left .leaflet-control {\r\n\tmargin-left: 10px;\r\n\t}\r\n.leaflet-right .leaflet-control {\r\n\tmargin-right: 10px;\r\n\t}\r\n\r\n\r\n/* zoom and fade animations */\r\n\r\n.leaflet-fade-anim .leaflet-popup {\r\n\topacity: 0;\r\n\t-webkit-transition: opacity 0.2s linear;\r\n\t -moz-transition: opacity 0.2s linear;\r\n\t transition: opacity 0.2s linear;\r\n\t}\r\n.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {\r\n\topacity: 1;\r\n\t}\r\n.leaflet-zoom-animated {\r\n\t-webkit-transform-origin: 0 0;\r\n\t -ms-transform-origin: 0 0;\r\n\t transform-origin: 0 0;\r\n\t}\r\nsvg.leaflet-zoom-animated {\r\n\twill-change: transform;\r\n}\r\n\r\n.leaflet-zoom-anim .leaflet-zoom-animated {\r\n\t-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);\r\n\t -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);\r\n\t transition: transform 0.25s cubic-bezier(0,0,0.25,1);\r\n\t}\r\n.leaflet-zoom-anim .leaflet-tile,\r\n.leaflet-pan-anim .leaflet-tile {\r\n\t-webkit-transition: none;\r\n\t -moz-transition: none;\r\n\t transition: none;\r\n\t}\r\n\r\n.leaflet-zoom-anim .leaflet-zoom-hide {\r\n\tvisibility: hidden;\r\n\t}\r\n\r\n\r\n/* cursors */\r\n\r\n.leaflet-interactive {\r\n\tcursor: pointer;\r\n\t}\r\n.leaflet-grab {\r\n\tcursor: -webkit-grab;\r\n\tcursor: -moz-grab;\r\n\tcursor: grab;\r\n\t}\r\n.leaflet-crosshair,\r\n.leaflet-crosshair .leaflet-interactive {\r\n\tcursor: crosshair;\r\n\t}\r\n.leaflet-popup-pane,\r\n.leaflet-control {\r\n\tcursor: auto;\r\n\t}\r\n.leaflet-dragging .leaflet-grab,\r\n.leaflet-dragging .leaflet-grab .leaflet-interactive,\r\n.leaflet-dragging .leaflet-marker-draggable {\r\n\tcursor: move;\r\n\tcursor: -webkit-grabbing;\r\n\tcursor: -moz-grabbing;\r\n\tcursor: grabbing;\r\n\t}\r\n\r\n/* marker & overlays interactivity */\r\n.leaflet-marker-icon,\r\n.leaflet-marker-shadow,\r\n.leaflet-image-layer,\r\n.leaflet-pane > svg path,\r\n.leaflet-tile-container {\r\n\tpointer-events: none;\r\n\t}\r\n\r\n.leaflet-marker-icon.leaflet-interactive,\r\n.leaflet-image-layer.leaflet-interactive,\r\n.leaflet-pane > svg path.leaflet-interactive,\r\nsvg.leaflet-image-layer.leaflet-interactive path {\r\n\tpointer-events: visiblePainted; /* IE 9-10 doesn't have auto */\r\n\tpointer-events: auto;\r\n\t}\r\n\r\n/* visual tweaks */\r\n\r\n.leaflet-container {\r\n\tbackground: #ddd;\r\n\toutline-offset: 1px;\r\n\t}\r\n.leaflet-container a {\r\n\tcolor: #0078A8;\r\n\t}\r\n.leaflet-zoom-box {\r\n\tborder: 2px dotted #38f;\r\n\tbackground: rgba(255,255,255,0.5);\r\n\t}\r\n\r\n\r\n/* general typography */\r\n.leaflet-container {\r\n\tfont-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\r\n\tfont-size: 12px;\r\n\tfont-size: 0.75rem;\r\n\tline-height: 1.5;\r\n\t}\r\n\r\n\r\n/* general toolbar styles */\r\n\r\n.leaflet-bar {\r\n\tbox-shadow: 0 1px 5px rgba(0,0,0,0.65);\r\n\tborder-radius: 4px;\r\n\t}\r\n.leaflet-bar a {\r\n\tbackground-color: #fff;\r\n\tborder-bottom: 1px solid #ccc;\r\n\twidth: 26px;\r\n\theight: 26px;\r\n\tline-height: 26px;\r\n\tdisplay: block;\r\n\ttext-align: center;\r\n\ttext-decoration: none;\r\n\tcolor: black;\r\n\t}\r\n.leaflet-bar a,\r\n.leaflet-control-layers-toggle {\r\n\tbackground-position: 50% 50%;\r\n\tbackground-repeat: no-repeat;\r\n\tdisplay: block;\r\n\t}\r\n.leaflet-bar a:hover,\r\n.leaflet-bar a:focus {\r\n\tbackground-color: #f4f4f4;\r\n\t}\r\n.leaflet-bar a:first-child {\r\n\tborder-top-left-radius: 4px;\r\n\tborder-top-right-radius: 4px;\r\n\t}\r\n.leaflet-bar a:last-child {\r\n\tborder-bottom-left-radius: 4px;\r\n\tborder-bottom-right-radius: 4px;\r\n\tborder-bottom: none;\r\n\t}\r\n.leaflet-bar a.leaflet-disabled {\r\n\tcursor: default;\r\n\tbackground-color: #f4f4f4;\r\n\tcolor: #bbb;\r\n\t}\r\n\r\n.leaflet-touch .leaflet-bar a {\r\n\twidth: 30px;\r\n\theight: 30px;\r\n\tline-height: 30px;\r\n\t}\r\n.leaflet-touch .leaflet-bar a:first-child {\r\n\tborder-top-left-radius: 2px;\r\n\tborder-top-right-radius: 2px;\r\n\t}\r\n.leaflet-touch .leaflet-bar a:last-child {\r\n\tborder-bottom-left-radius: 2px;\r\n\tborder-bottom-right-radius: 2px;\r\n\t}\r\n\r\n/* zoom control */\r\n\r\n.leaflet-control-zoom-in,\r\n.leaflet-control-zoom-out {\r\n\tfont: bold 18px 'Lucida Console', Monaco, monospace;\r\n\ttext-indent: 1px;\r\n\t}\r\n\r\n.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out {\r\n\tfont-size: 22px;\r\n\t}\r\n\r\n\r\n/* layers control */\r\n\r\n.leaflet-control-layers {\r\n\tbox-shadow: 0 1px 5px rgba(0,0,0,0.4);\r\n\tbackground: #fff;\r\n\tborder-radius: 5px;\r\n\t}\r\n.leaflet-control-layers-toggle {\r\n\tbackground-image: url(" + ___CSS_LOADER_URL_REPLACEMENT_0___ + ");\r\n\twidth: 36px;\r\n\theight: 36px;\r\n\t}\r\n.leaflet-retina .leaflet-control-layers-toggle {\r\n\tbackground-image: url(" + ___CSS_LOADER_URL_REPLACEMENT_1___ + ");\r\n\tbackground-size: 26px 26px;\r\n\t}\r\n.leaflet-touch .leaflet-control-layers-toggle {\r\n\twidth: 44px;\r\n\theight: 44px;\r\n\t}\r\n.leaflet-control-layers .leaflet-control-layers-list,\r\n.leaflet-control-layers-expanded .leaflet-control-layers-toggle {\r\n\tdisplay: none;\r\n\t}\r\n.leaflet-control-layers-expanded .leaflet-control-layers-list {\r\n\tdisplay: block;\r\n\tposition: relative;\r\n\t}\r\n.leaflet-control-layers-expanded {\r\n\tpadding: 6px 10px 6px 6px;\r\n\tcolor: #333;\r\n\tbackground: #fff;\r\n\t}\r\n.leaflet-control-layers-scrollbar {\r\n\toverflow-y: scroll;\r\n\toverflow-x: hidden;\r\n\tpadding-right: 5px;\r\n\t}\r\n.leaflet-control-layers-selector {\r\n\tmargin-top: 2px;\r\n\tposition: relative;\r\n\ttop: 1px;\r\n\t}\r\n.leaflet-control-layers label {\r\n\tdisplay: block;\r\n\tfont-size: 13px;\r\n\tfont-size: 1.08333em;\r\n\t}\r\n.leaflet-control-layers-separator {\r\n\theight: 0;\r\n\tborder-top: 1px solid #ddd;\r\n\tmargin: 5px -10px 5px -6px;\r\n\t}\r\n\r\n/* Default icon URLs */\r\n.leaflet-default-icon-path { /* used only in path-guessing heuristic, see L.Icon.Default */\r\n\tbackground-image: url(" + ___CSS_LOADER_URL_REPLACEMENT_2___ + ");\r\n\t}\r\n\r\n\r\n/* attribution and scale controls */\r\n\r\n.leaflet-container .leaflet-control-attribution {\r\n\tbackground: #fff;\r\n\tbackground: rgba(255, 255, 255, 0.8);\r\n\tmargin: 0;\r\n\t}\r\n.leaflet-control-attribution,\r\n.leaflet-control-scale-line {\r\n\tpadding: 0 5px;\r\n\tcolor: #333;\r\n\tline-height: 1.4;\r\n\t}\r\n.leaflet-control-attribution a {\r\n\ttext-decoration: none;\r\n\t}\r\n.leaflet-control-attribution a:hover,\r\n.leaflet-control-attribution a:focus {\r\n\ttext-decoration: underline;\r\n\t}\r\n.leaflet-control-attribution svg {\r\n\tdisplay: inline !important;\r\n\t}\r\n.leaflet-left .leaflet-control-scale {\r\n\tmargin-left: 5px;\r\n\t}\r\n.leaflet-bottom .leaflet-control-scale {\r\n\tmargin-bottom: 5px;\r\n\t}\r\n.leaflet-control-scale-line {\r\n\tborder: 2px solid #777;\r\n\tborder-top: none;\r\n\tline-height: 1.1;\r\n\tpadding: 2px 5px 1px;\r\n\twhite-space: nowrap;\r\n\toverflow: hidden;\r\n\t-moz-box-sizing: border-box;\r\n\t box-sizing: border-box;\r\n\r\n\tbackground: #fff;\r\n\tbackground: rgba(255, 255, 255, 0.5);\r\n\t}\r\n.leaflet-control-scale-line:not(:first-child) {\r\n\tborder-top: 2px solid #777;\r\n\tborder-bottom: none;\r\n\tmargin-top: -2px;\r\n\t}\r\n.leaflet-control-scale-line:not(:first-child):not(:last-child) {\r\n\tborder-bottom: 2px solid #777;\r\n\t}\r\n\r\n.leaflet-touch .leaflet-control-attribution,\r\n.leaflet-touch .leaflet-control-layers,\r\n.leaflet-touch .leaflet-bar {\r\n\tbox-shadow: none;\r\n\t}\r\n.leaflet-touch .leaflet-control-layers,\r\n.leaflet-touch .leaflet-bar {\r\n\tborder: 2px solid rgba(0,0,0,0.2);\r\n\tbackground-clip: padding-box;\r\n\t}\r\n\r\n\r\n/* popup */\r\n\r\n.leaflet-popup {\r\n\tposition: absolute;\r\n\ttext-align: center;\r\n\tmargin-bottom: 20px;\r\n\t}\r\n.leaflet-popup-content-wrapper {\r\n\tpadding: 1px;\r\n\ttext-align: left;\r\n\tborder-radius: 12px;\r\n\t}\r\n.leaflet-popup-content {\r\n\tmargin: 13px 24px 13px 20px;\r\n\tline-height: 1.3;\r\n\tfont-size: 13px;\r\n\tfont-size: 1.08333em;\r\n\tmin-height: 1px;\r\n\t}\r\n.leaflet-popup-content p {\r\n\tmargin: 17px 0;\r\n\tmargin: 1.3em 0;\r\n\t}\r\n.leaflet-popup-tip-container {\r\n\twidth: 40px;\r\n\theight: 20px;\r\n\tposition: absolute;\r\n\tleft: 50%;\r\n\tmargin-top: -1px;\r\n\tmargin-left: -20px;\r\n\toverflow: hidden;\r\n\tpointer-events: none;\r\n\t}\r\n.leaflet-popup-tip {\r\n\twidth: 17px;\r\n\theight: 17px;\r\n\tpadding: 1px;\r\n\r\n\tmargin: -10px auto 0;\r\n\tpointer-events: auto;\r\n\r\n\t-webkit-transform: rotate(45deg);\r\n\t -moz-transform: rotate(45deg);\r\n\t -ms-transform: rotate(45deg);\r\n\t transform: rotate(45deg);\r\n\t}\r\n.leaflet-popup-content-wrapper,\r\n.leaflet-popup-tip {\r\n\tbackground: white;\r\n\tcolor: #333;\r\n\tbox-shadow: 0 3px 14px rgba(0,0,0,0.4);\r\n\t}\r\n.leaflet-container a.leaflet-popup-close-button {\r\n\tposition: absolute;\r\n\ttop: 0;\r\n\tright: 0;\r\n\tborder: none;\r\n\ttext-align: center;\r\n\twidth: 24px;\r\n\theight: 24px;\r\n\tfont: 16px/24px Tahoma, Verdana, sans-serif;\r\n\tcolor: #757575;\r\n\ttext-decoration: none;\r\n\tbackground: transparent;\r\n\t}\r\n.leaflet-container a.leaflet-popup-close-button:hover,\r\n.leaflet-container a.leaflet-popup-close-button:focus {\r\n\tcolor: #585858;\r\n\t}\r\n.leaflet-popup-scrolled {\r\n\toverflow: auto;\r\n\tborder-bottom: 1px solid #ddd;\r\n\tborder-top: 1px solid #ddd;\r\n\t}\r\n\r\n.leaflet-oldie .leaflet-popup-content-wrapper {\r\n\t-ms-zoom: 1;\r\n\t}\r\n.leaflet-oldie .leaflet-popup-tip {\r\n\twidth: 24px;\r\n\tmargin: 0 auto;\r\n\r\n\t-ms-filter: \"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)\";\r\n\tfilter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);\r\n\t}\r\n\r\n.leaflet-oldie .leaflet-control-zoom,\r\n.leaflet-oldie .leaflet-control-layers,\r\n.leaflet-oldie .leaflet-popup-content-wrapper,\r\n.leaflet-oldie .leaflet-popup-tip {\r\n\tborder: 1px solid #999;\r\n\t}\r\n\r\n\r\n/* div icon */\r\n\r\n.leaflet-div-icon {\r\n\tbackground: #fff;\r\n\tborder: 1px solid #666;\r\n\t}\r\n\r\n\r\n/* Tooltip */\r\n/* Base styles for the element that has a tooltip */\r\n.leaflet-tooltip {\r\n\tposition: absolute;\r\n\tpadding: 6px;\r\n\tbackground-color: #fff;\r\n\tborder: 1px solid #fff;\r\n\tborder-radius: 3px;\r\n\tcolor: #222;\r\n\twhite-space: nowrap;\r\n\t-webkit-user-select: none;\r\n\t-moz-user-select: none;\r\n\t-ms-user-select: none;\r\n\tuser-select: none;\r\n\tpointer-events: none;\r\n\tbox-shadow: 0 1px 3px rgba(0,0,0,0.4);\r\n\t}\r\n.leaflet-tooltip.leaflet-interactive {\r\n\tcursor: pointer;\r\n\tpointer-events: auto;\r\n\t}\r\n.leaflet-tooltip-top:before,\r\n.leaflet-tooltip-bottom:before,\r\n.leaflet-tooltip-left:before,\r\n.leaflet-tooltip-right:before {\r\n\tposition: absolute;\r\n\tpointer-events: none;\r\n\tborder: 6px solid transparent;\r\n\tbackground: transparent;\r\n\tcontent: \"\";\r\n\t}\r\n\r\n/* Directions */\r\n\r\n.leaflet-tooltip-bottom {\r\n\tmargin-top: 6px;\r\n}\r\n.leaflet-tooltip-top {\r\n\tmargin-top: -6px;\r\n}\r\n.leaflet-tooltip-bottom:before,\r\n.leaflet-tooltip-top:before {\r\n\tleft: 50%;\r\n\tmargin-left: -6px;\r\n\t}\r\n.leaflet-tooltip-top:before {\r\n\tbottom: 0;\r\n\tmargin-bottom: -12px;\r\n\tborder-top-color: #fff;\r\n\t}\r\n.leaflet-tooltip-bottom:before {\r\n\ttop: 0;\r\n\tmargin-top: -12px;\r\n\tmargin-left: -6px;\r\n\tborder-bottom-color: #fff;\r\n\t}\r\n.leaflet-tooltip-left {\r\n\tmargin-left: -6px;\r\n}\r\n.leaflet-tooltip-right {\r\n\tmargin-left: 6px;\r\n}\r\n.leaflet-tooltip-left:before,\r\n.leaflet-tooltip-right:before {\r\n\ttop: 50%;\r\n\tmargin-top: -6px;\r\n\t}\r\n.leaflet-tooltip-left:before {\r\n\tright: 0;\r\n\tmargin-right: -12px;\r\n\tborder-left-color: #fff;\r\n\t}\r\n.leaflet-tooltip-right:before {\r\n\tleft: 0;\r\n\tmargin-left: -12px;\r\n\tborder-right-color: #fff;\r\n\t}\r\n\r\n/* Printing */\r\n\t\r\n@media print {\r\n\t/* Prevent printers from removing background-images of controls. */\r\n\t.leaflet-control {\r\n\t\t-webkit-print-color-adjust: exact;\r\n\t\tcolor-adjust: exact;\r\n\t\t}\r\n\t}\r\n", ""]);
|
|
7890
7890
|
// Exports
|
|
7891
7891
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
7892
7892
|
|
|
@@ -11274,14 +11274,14 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
11274
11274
|
/***/ (function(__unused_webpack_module, exports) {
|
|
11275
11275
|
|
|
11276
11276
|
/* @preserve
|
|
11277
|
-
* Leaflet 1.
|
|
11278
|
-
* (c) 2010-
|
|
11277
|
+
* Leaflet 1.8.0, a JS library for interactive maps. https://leafletjs.com
|
|
11278
|
+
* (c) 2010-2022 Vladimir Agafonkin, (c) 2010-2011 CloudMade
|
|
11279
11279
|
*/
|
|
11280
11280
|
|
|
11281
11281
|
(function (global, factory) {
|
|
11282
11282
|
factory(exports) ;
|
|
11283
|
-
}(this, (function (exports) {
|
|
11284
|
-
var version = "1.
|
|
11283
|
+
})(this, (function (exports) {
|
|
11284
|
+
var version = "1.8.0";
|
|
11285
11285
|
|
|
11286
11286
|
/*
|
|
11287
11287
|
* @namespace Util
|
|
@@ -11305,7 +11305,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
11305
11305
|
|
|
11306
11306
|
// @function create(proto: Object, properties?: Object): Object
|
|
11307
11307
|
// Compatibility polyfill for [Object.create](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/create)
|
|
11308
|
-
var create = Object.create || (function () {
|
|
11308
|
+
var create$2 = Object.create || (function () {
|
|
11309
11309
|
function F() {}
|
|
11310
11310
|
return function (proto) {
|
|
11311
11311
|
F.prototype = proto;
|
|
@@ -11337,10 +11337,10 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
11337
11337
|
// @function stamp(obj: Object): Number
|
|
11338
11338
|
// Returns the unique ID of an object, assigning it one if it doesn't have it.
|
|
11339
11339
|
function stamp(obj) {
|
|
11340
|
-
|
|
11341
|
-
|
|
11340
|
+
if (!('_leaflet_id' in obj)) {
|
|
11341
|
+
obj['_leaflet_id'] = ++lastId;
|
|
11342
|
+
}
|
|
11342
11343
|
return obj._leaflet_id;
|
|
11343
|
-
/* eslint-enable */
|
|
11344
11344
|
}
|
|
11345
11345
|
|
|
11346
11346
|
// @function throttle(fn: Function, time: Number, context: Object): Function
|
|
@@ -11393,10 +11393,13 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
11393
11393
|
// Returns a function which always returns `false`.
|
|
11394
11394
|
function falseFn() { return false; }
|
|
11395
11395
|
|
|
11396
|
-
// @function formatNum(num: Number,
|
|
11397
|
-
// Returns the number `num` rounded
|
|
11398
|
-
|
|
11399
|
-
|
|
11396
|
+
// @function formatNum(num: Number, precision?: Number|false): Number
|
|
11397
|
+
// Returns the number `num` rounded with specified `precision`.
|
|
11398
|
+
// The default `precision` value is 6 decimal places.
|
|
11399
|
+
// `false` can be passed to skip any processing (can be useful to avoid round-off errors).
|
|
11400
|
+
function formatNum(num, precision) {
|
|
11401
|
+
if (precision === false) { return num; }
|
|
11402
|
+
var pow = Math.pow(10, precision === undefined ? 6 : precision);
|
|
11400
11403
|
return Math.round(num * pow) / pow;
|
|
11401
11404
|
}
|
|
11402
11405
|
|
|
@@ -11416,7 +11419,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
11416
11419
|
// Merges the given properties to the `options` of the `obj` object, returning the resulting options. See `Class options`. Has an `L.setOptions` shortcut.
|
|
11417
11420
|
function setOptions(obj, options) {
|
|
11418
11421
|
if (!Object.prototype.hasOwnProperty.call(obj, 'options')) {
|
|
11419
|
-
obj.options = obj.options ? create(obj.options) : {};
|
|
11422
|
+
obj.options = obj.options ? create$2(obj.options) : {};
|
|
11420
11423
|
}
|
|
11421
11424
|
for (var i in options) {
|
|
11422
11425
|
obj.options[i] = options[i];
|
|
@@ -11437,7 +11440,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
11437
11440
|
return ((!existingUrl || existingUrl.indexOf('?') === -1) ? '?' : '&') + params.join('&');
|
|
11438
11441
|
}
|
|
11439
11442
|
|
|
11440
|
-
var templateRe = /\{ *([\w_-]+) *\}/g;
|
|
11443
|
+
var templateRe = /\{ *([\w_ -]+) *\}/g;
|
|
11441
11444
|
|
|
11442
11445
|
// @function template(str: String, data: Object): String
|
|
11443
11446
|
// Simple templating facility, accepts a template string of the form `'Hello {a}, {b}'`
|
|
@@ -11479,7 +11482,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
11479
11482
|
// mobile devices (by setting image `src` to this string).
|
|
11480
11483
|
var emptyImageUrl = 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=';
|
|
11481
11484
|
|
|
11482
|
-
// inspired by
|
|
11485
|
+
// inspired by https://paulirish.com/2011/requestanimationframe-for-smart-animating/
|
|
11483
11486
|
|
|
11484
11487
|
function getPrefixed(name) {
|
|
11485
11488
|
return window['webkit' + name] || window['moz' + name] || window['ms' + name];
|
|
@@ -11522,11 +11525,12 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
11522
11525
|
}
|
|
11523
11526
|
}
|
|
11524
11527
|
|
|
11525
|
-
var Util =
|
|
11528
|
+
var Util = {
|
|
11529
|
+
__proto__: null,
|
|
11526
11530
|
extend: extend,
|
|
11527
|
-
create: create,
|
|
11531
|
+
create: create$2,
|
|
11528
11532
|
bind: bind,
|
|
11529
|
-
lastId
|
|
11533
|
+
get lastId () { return lastId; },
|
|
11530
11534
|
stamp: stamp,
|
|
11531
11535
|
throttle: throttle,
|
|
11532
11536
|
wrapNum: wrapNum,
|
|
@@ -11544,7 +11548,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
11544
11548
|
cancelFn: cancelFn,
|
|
11545
11549
|
requestAnimFrame: requestAnimFrame,
|
|
11546
11550
|
cancelAnimFrame: cancelAnimFrame
|
|
11547
|
-
}
|
|
11551
|
+
};
|
|
11548
11552
|
|
|
11549
11553
|
// @class Class
|
|
11550
11554
|
// @aka L.Class
|
|
@@ -11563,6 +11567,8 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
11563
11567
|
// Returns a Javascript function that is a class constructor (to be called with `new`).
|
|
11564
11568
|
var NewClass = function () {
|
|
11565
11569
|
|
|
11570
|
+
setOptions(this);
|
|
11571
|
+
|
|
11566
11572
|
// call the constructor
|
|
11567
11573
|
if (this.initialize) {
|
|
11568
11574
|
this.initialize.apply(this, arguments);
|
|
@@ -11574,7 +11580,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
11574
11580
|
|
|
11575
11581
|
var parentProto = NewClass.__super__ = this.prototype;
|
|
11576
11582
|
|
|
11577
|
-
var proto = create(parentProto);
|
|
11583
|
+
var proto = create$2(parentProto);
|
|
11578
11584
|
proto.constructor = NewClass;
|
|
11579
11585
|
|
|
11580
11586
|
NewClass.prototype = proto;
|
|
@@ -11589,24 +11595,25 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
11589
11595
|
// mix static properties into the class
|
|
11590
11596
|
if (props.statics) {
|
|
11591
11597
|
extend(NewClass, props.statics);
|
|
11592
|
-
delete props.statics;
|
|
11593
11598
|
}
|
|
11594
11599
|
|
|
11595
11600
|
// mix includes into the prototype
|
|
11596
11601
|
if (props.includes) {
|
|
11597
11602
|
checkDeprecatedMixinEvents(props.includes);
|
|
11598
11603
|
extend.apply(null, [proto].concat(props.includes));
|
|
11599
|
-
delete props.includes;
|
|
11600
11604
|
}
|
|
11601
11605
|
|
|
11606
|
+
// mix given properties into the prototype
|
|
11607
|
+
extend(proto, props);
|
|
11608
|
+
delete proto.statics;
|
|
11609
|
+
delete proto.includes;
|
|
11610
|
+
|
|
11602
11611
|
// merge options
|
|
11603
11612
|
if (proto.options) {
|
|
11604
|
-
|
|
11613
|
+
proto.options = parentProto.options ? create$2(parentProto.options) : {};
|
|
11614
|
+
extend(proto.options, props.options);
|
|
11605
11615
|
}
|
|
11606
11616
|
|
|
11607
|
-
// mix given properties into the prototype
|
|
11608
|
-
extend(proto, props);
|
|
11609
|
-
|
|
11610
11617
|
proto._initHooks = [];
|
|
11611
11618
|
|
|
11612
11619
|
// add method for calling all hooks
|
|
@@ -11632,7 +11639,12 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
11632
11639
|
// @function include(properties: Object): this
|
|
11633
11640
|
// [Includes a mixin](#class-includes) into the current class.
|
|
11634
11641
|
Class.include = function (props) {
|
|
11642
|
+
var parentOptions = this.prototype.options;
|
|
11635
11643
|
extend(this.prototype, props);
|
|
11644
|
+
if (props.options) {
|
|
11645
|
+
this.prototype.options = parentOptions;
|
|
11646
|
+
this.mergeOptions(props.options);
|
|
11647
|
+
}
|
|
11636
11648
|
return this;
|
|
11637
11649
|
};
|
|
11638
11650
|
|
|
@@ -11739,7 +11751,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
11739
11751
|
*/
|
|
11740
11752
|
off: function (types, fn, context) {
|
|
11741
11753
|
|
|
11742
|
-
if (!
|
|
11754
|
+
if (!arguments.length) {
|
|
11743
11755
|
// clear all listeners if called without arguments
|
|
11744
11756
|
delete this._events;
|
|
11745
11757
|
|
|
@@ -11751,8 +11763,13 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
11751
11763
|
} else {
|
|
11752
11764
|
types = splitWords(types);
|
|
11753
11765
|
|
|
11766
|
+
var removeAll = arguments.length === 1;
|
|
11754
11767
|
for (var i = 0, len = types.length; i < len; i++) {
|
|
11755
|
-
|
|
11768
|
+
if (removeAll) {
|
|
11769
|
+
this._off(types[i]);
|
|
11770
|
+
} else {
|
|
11771
|
+
this._off(types[i], fn, context);
|
|
11772
|
+
}
|
|
11756
11773
|
}
|
|
11757
11774
|
}
|
|
11758
11775
|
|
|
@@ -11761,6 +11778,10 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
11761
11778
|
|
|
11762
11779
|
// attach listener (without syntactic sugar now)
|
|
11763
11780
|
_on: function (type, fn, context) {
|
|
11781
|
+
if (typeof fn !== 'function') {
|
|
11782
|
+
console.warn('wrong listener type: ' + typeof fn);
|
|
11783
|
+
return;
|
|
11784
|
+
}
|
|
11764
11785
|
this._events = this._events || {};
|
|
11765
11786
|
|
|
11766
11787
|
/* get/init listeners for type */
|
|
@@ -11800,10 +11821,13 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
11800
11821
|
return;
|
|
11801
11822
|
}
|
|
11802
11823
|
|
|
11803
|
-
if (
|
|
11804
|
-
|
|
11805
|
-
|
|
11806
|
-
|
|
11824
|
+
if (arguments.length === 1) { // remove all
|
|
11825
|
+
if (this._firingCount) {
|
|
11826
|
+
// Set all removed listeners to noop
|
|
11827
|
+
// so they are not called if remove happens in fire
|
|
11828
|
+
for (i = 0, len = listeners.length; i < len; i++) {
|
|
11829
|
+
listeners[i].fn = falseFn;
|
|
11830
|
+
}
|
|
11807
11831
|
}
|
|
11808
11832
|
// clear all listeners for a type if function isn't specified
|
|
11809
11833
|
delete this._events[type];
|
|
@@ -11814,31 +11838,32 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
11814
11838
|
context = undefined;
|
|
11815
11839
|
}
|
|
11816
11840
|
|
|
11817
|
-
if (
|
|
11818
|
-
|
|
11819
|
-
|
|
11820
|
-
|
|
11821
|
-
|
|
11822
|
-
|
|
11823
|
-
|
|
11824
|
-
|
|
11841
|
+
if (typeof fn !== 'function') {
|
|
11842
|
+
console.warn('wrong listener type: ' + typeof fn);
|
|
11843
|
+
return;
|
|
11844
|
+
}
|
|
11845
|
+
// find fn and remove it
|
|
11846
|
+
for (i = 0, len = listeners.length; i < len; i++) {
|
|
11847
|
+
var l = listeners[i];
|
|
11848
|
+
if (l.ctx !== context) { continue; }
|
|
11849
|
+
if (l.fn === fn) {
|
|
11850
|
+
if (this._firingCount) {
|
|
11825
11851
|
// set the removed listener to noop so that's not called if remove happens in fire
|
|
11826
11852
|
l.fn = falseFn;
|
|
11827
11853
|
|
|
11828
|
-
|
|
11829
|
-
|
|
11830
|
-
this._events[type] = listeners = listeners.slice();
|
|
11831
|
-
}
|
|
11832
|
-
listeners.splice(i, 1);
|
|
11833
|
-
|
|
11834
|
-
return;
|
|
11854
|
+
/* copy array in case events are being fired */
|
|
11855
|
+
this._events[type] = listeners = listeners.slice();
|
|
11835
11856
|
}
|
|
11857
|
+
listeners.splice(i, 1);
|
|
11858
|
+
|
|
11859
|
+
return;
|
|
11836
11860
|
}
|
|
11837
11861
|
}
|
|
11862
|
+
console.warn('listener not found');
|
|
11838
11863
|
},
|
|
11839
11864
|
|
|
11840
11865
|
// @method fire(type: String, data?: Object, propagate?: Boolean): this
|
|
11841
|
-
// Fires an event of the specified type. You can optionally provide
|
|
11866
|
+
// Fires an event of the specified type. You can optionally provide a data
|
|
11842
11867
|
// object — the first argument of the listener function will contain its
|
|
11843
11868
|
// properties. The event can optionally be propagated to event parents.
|
|
11844
11869
|
fire: function (type, data, propagate) {
|
|
@@ -11872,9 +11897,13 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
11872
11897
|
return this;
|
|
11873
11898
|
},
|
|
11874
11899
|
|
|
11875
|
-
// @method listens(type: String): Boolean
|
|
11900
|
+
// @method listens(type: String, propagate?: Boolean): Boolean
|
|
11876
11901
|
// Returns `true` if a particular event type has any listeners attached to it.
|
|
11902
|
+
// The verification can optionally be propagated, it will return `true` if parents have the listener attached to it.
|
|
11877
11903
|
listens: function (type, propagate) {
|
|
11904
|
+
if (typeof type !== 'string') {
|
|
11905
|
+
console.warn('"string" type argument expected');
|
|
11906
|
+
}
|
|
11878
11907
|
var listeners = this._events && this._events[type];
|
|
11879
11908
|
if (listeners && listeners.length) { return true; }
|
|
11880
11909
|
|
|
@@ -12747,7 +12776,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
12747
12776
|
* Object that defines coordinate reference systems for projecting
|
|
12748
12777
|
* geographical points into pixel (screen) coordinates and back (and to
|
|
12749
12778
|
* coordinates in other units for [WMS](https://en.wikipedia.org/wiki/Web_Map_Service) services). See
|
|
12750
|
-
* [spatial reference system](
|
|
12779
|
+
* [spatial reference system](https://en.wikipedia.org/wiki/Spatial_reference_system).
|
|
12751
12780
|
*
|
|
12752
12781
|
* Leaflet defines the most usual CRSs by default. If you want to use a
|
|
12753
12782
|
* CRS not defined by default, take a look at the
|
|
@@ -12890,7 +12919,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
12890
12919
|
|
|
12891
12920
|
// Mean Earth Radius, as recommended for use by
|
|
12892
12921
|
// the International Union of Geodesy and Geophysics,
|
|
12893
|
-
// see
|
|
12922
|
+
// see https://rosettacode.org/wiki/Haversine_formula
|
|
12894
12923
|
R: 6371000,
|
|
12895
12924
|
|
|
12896
12925
|
// distance between two geographical points using spherical law of cosines approximation
|
|
@@ -13074,7 +13103,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
13074
13103
|
}
|
|
13075
13104
|
|
|
13076
13105
|
// closes the ring for polygons; "x" is VML syntax
|
|
13077
|
-
str += closed ? (svg ? 'z' : 'x') : '';
|
|
13106
|
+
str += closed ? (Browser.svg ? 'z' : 'x') : '';
|
|
13078
13107
|
}
|
|
13079
13108
|
|
|
13080
13109
|
// SVG complains about empty path strings
|
|
@@ -13096,7 +13125,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
13096
13125
|
* ```
|
|
13097
13126
|
*/
|
|
13098
13127
|
|
|
13099
|
-
var style
|
|
13128
|
+
var style = document.documentElement.style;
|
|
13100
13129
|
|
|
13101
13130
|
// @property ie: Boolean; `true` for all Internet Explorer versions (not Edge).
|
|
13102
13131
|
var ie = 'ActiveXObject' in window;
|
|
@@ -13112,15 +13141,15 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
13112
13141
|
var webkit = userAgentContains('webkit');
|
|
13113
13142
|
|
|
13114
13143
|
// @property android: Boolean
|
|
13115
|
-
// `true` for any browser running on an Android platform.
|
|
13144
|
+
// **Deprecated.** `true` for any browser running on an Android platform.
|
|
13116
13145
|
var android = userAgentContains('android');
|
|
13117
13146
|
|
|
13118
|
-
// @property android23: Boolean; `true` for browsers running on Android 2 or Android 3.
|
|
13147
|
+
// @property android23: Boolean; **Deprecated.** `true` for browsers running on Android 2 or Android 3.
|
|
13119
13148
|
var android23 = userAgentContains('android 2') || userAgentContains('android 3');
|
|
13120
13149
|
|
|
13121
13150
|
/* See https://stackoverflow.com/a/17961266 for details on detecting stock Android */
|
|
13122
13151
|
var webkitVer = parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1], 10); // also matches AppleWebKit
|
|
13123
|
-
// @property androidStock: Boolean; `true` for the Android stock browser (i.e. not Chrome)
|
|
13152
|
+
// @property androidStock: Boolean; **Deprecated.** `true` for the Android stock browser (i.e. not Chrome)
|
|
13124
13153
|
var androidStock = android && userAgentContains('Google') && webkitVer < 537 && !('AudioNode' in window);
|
|
13125
13154
|
|
|
13126
13155
|
// @property opera: Boolean; `true` for the Opera browser
|
|
@@ -13139,19 +13168,19 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
13139
13168
|
|
|
13140
13169
|
// @property opera12: Boolean
|
|
13141
13170
|
// `true` for the Opera browser supporting CSS transforms (version 12 or later).
|
|
13142
|
-
var opera12 = 'OTransition' in style
|
|
13171
|
+
var opera12 = 'OTransition' in style;
|
|
13143
13172
|
|
|
13144
13173
|
// @property win: Boolean; `true` when the browser is running in a Windows platform
|
|
13145
13174
|
var win = navigator.platform.indexOf('Win') === 0;
|
|
13146
13175
|
|
|
13147
13176
|
// @property ie3d: Boolean; `true` for all Internet Explorer versions supporting CSS transforms.
|
|
13148
|
-
var ie3d = ie && ('transition' in style
|
|
13177
|
+
var ie3d = ie && ('transition' in style);
|
|
13149
13178
|
|
|
13150
13179
|
// @property webkit3d: Boolean; `true` for webkit-based browsers supporting CSS transforms.
|
|
13151
13180
|
var webkit3d = ('WebKitCSSMatrix' in window) && ('m11' in new window.WebKitCSSMatrix()) && !android23;
|
|
13152
13181
|
|
|
13153
13182
|
// @property gecko3d: Boolean; `true` for gecko-based browsers supporting CSS transforms.
|
|
13154
|
-
var gecko3d = 'MozPerspective' in style
|
|
13183
|
+
var gecko3d = 'MozPerspective' in style;
|
|
13155
13184
|
|
|
13156
13185
|
// @property any3d: Boolean
|
|
13157
13186
|
// `true` for all browsers supporting CSS transforms.
|
|
@@ -13175,13 +13204,17 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
13175
13204
|
// `true` for all browsers supporting [pointer events](https://msdn.microsoft.com/en-us/library/dn433244%28v=vs.85%29.aspx).
|
|
13176
13205
|
var pointer = !!(window.PointerEvent || msPointer);
|
|
13177
13206
|
|
|
13178
|
-
// @property
|
|
13207
|
+
// @property touchNative: Boolean
|
|
13179
13208
|
// `true` for all browsers supporting [touch events](https://developer.mozilla.org/docs/Web/API/Touch_events).
|
|
13180
|
-
// This does not necessarily mean that the browser is running in a computer with
|
|
13209
|
+
// **This does not necessarily mean** that the browser is running in a computer with
|
|
13181
13210
|
// a touchscreen, it only means that the browser is capable of understanding
|
|
13182
13211
|
// touch events.
|
|
13183
|
-
var
|
|
13184
|
-
|
|
13212
|
+
var touchNative = 'ontouchstart' in window || !!window.TouchEvent;
|
|
13213
|
+
|
|
13214
|
+
// @property touch: Boolean
|
|
13215
|
+
// `true` for all browsers supporting either [touch](#browser-touch) or [pointer](#browser-pointer) events.
|
|
13216
|
+
// Note: pointer events will be preferred (if available), and processed for all `touch*` listeners.
|
|
13217
|
+
var touch = !window.L_NO_TOUCH && (touchNative || pointer);
|
|
13185
13218
|
|
|
13186
13219
|
// @property mobileOpera: Boolean; `true` for the Opera browser in a mobile device.
|
|
13187
13220
|
var mobileOpera = mobile && opera;
|
|
@@ -13214,17 +13247,23 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
13214
13247
|
|
|
13215
13248
|
// @property canvas: Boolean
|
|
13216
13249
|
// `true` when the browser supports [`<canvas>`](https://developer.mozilla.org/docs/Web/API/Canvas_API).
|
|
13217
|
-
var canvas = (function () {
|
|
13250
|
+
var canvas$1 = (function () {
|
|
13218
13251
|
return !!document.createElement('canvas').getContext;
|
|
13219
13252
|
}());
|
|
13220
13253
|
|
|
13221
13254
|
// @property svg: Boolean
|
|
13222
13255
|
// `true` when the browser supports [SVG](https://developer.mozilla.org/docs/Web/SVG).
|
|
13223
|
-
var svg = !!(document.createElementNS && svgCreate('svg').createSVGRect);
|
|
13256
|
+
var svg$1 = !!(document.createElementNS && svgCreate('svg').createSVGRect);
|
|
13257
|
+
|
|
13258
|
+
var inlineSvg = !!svg$1 && (function () {
|
|
13259
|
+
var div = document.createElement('div');
|
|
13260
|
+
div.innerHTML = '<svg/>';
|
|
13261
|
+
return (div.firstChild && div.firstChild.namespaceURI) === 'http://www.w3.org/2000/svg';
|
|
13262
|
+
})();
|
|
13224
13263
|
|
|
13225
13264
|
// @property vml: Boolean
|
|
13226
13265
|
// `true` if the browser supports [VML](https://en.wikipedia.org/wiki/Vector_Markup_Language).
|
|
13227
|
-
var vml = !svg && (function () {
|
|
13266
|
+
var vml = !svg$1 && (function () {
|
|
13228
13267
|
try {
|
|
13229
13268
|
var div = document.createElement('div');
|
|
13230
13269
|
div.innerHTML = '<v:shape adj="1"/>';
|
|
@@ -13239,105 +13278,109 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
13239
13278
|
}
|
|
13240
13279
|
}());
|
|
13241
13280
|
|
|
13242
|
-
|
|
13243
13281
|
function userAgentContains(str) {
|
|
13244
13282
|
return navigator.userAgent.toLowerCase().indexOf(str) >= 0;
|
|
13245
|
-
}
|
|
13246
|
-
|
|
13247
|
-
|
|
13248
|
-
|
|
13249
|
-
|
|
13250
|
-
|
|
13251
|
-
|
|
13252
|
-
|
|
13253
|
-
|
|
13254
|
-
|
|
13255
|
-
|
|
13256
|
-
|
|
13257
|
-
|
|
13258
|
-
|
|
13259
|
-
|
|
13260
|
-
|
|
13261
|
-
|
|
13262
|
-
|
|
13263
|
-
|
|
13264
|
-
|
|
13265
|
-
|
|
13266
|
-
|
|
13267
|
-
|
|
13268
|
-
|
|
13269
|
-
|
|
13270
|
-
|
|
13271
|
-
|
|
13272
|
-
|
|
13273
|
-
|
|
13274
|
-
|
|
13275
|
-
|
|
13276
|
-
|
|
13277
|
-
|
|
13278
|
-
|
|
13279
|
-
|
|
13283
|
+
}
|
|
13284
|
+
|
|
13285
|
+
|
|
13286
|
+
var Browser = {
|
|
13287
|
+
ie: ie,
|
|
13288
|
+
ielt9: ielt9,
|
|
13289
|
+
edge: edge,
|
|
13290
|
+
webkit: webkit,
|
|
13291
|
+
android: android,
|
|
13292
|
+
android23: android23,
|
|
13293
|
+
androidStock: androidStock,
|
|
13294
|
+
opera: opera,
|
|
13295
|
+
chrome: chrome,
|
|
13296
|
+
gecko: gecko,
|
|
13297
|
+
safari: safari,
|
|
13298
|
+
phantom: phantom,
|
|
13299
|
+
opera12: opera12,
|
|
13300
|
+
win: win,
|
|
13301
|
+
ie3d: ie3d,
|
|
13302
|
+
webkit3d: webkit3d,
|
|
13303
|
+
gecko3d: gecko3d,
|
|
13304
|
+
any3d: any3d,
|
|
13305
|
+
mobile: mobile,
|
|
13306
|
+
mobileWebkit: mobileWebkit,
|
|
13307
|
+
mobileWebkit3d: mobileWebkit3d,
|
|
13308
|
+
msPointer: msPointer,
|
|
13309
|
+
pointer: pointer,
|
|
13310
|
+
touch: touch,
|
|
13311
|
+
touchNative: touchNative,
|
|
13312
|
+
mobileOpera: mobileOpera,
|
|
13313
|
+
mobileGecko: mobileGecko,
|
|
13314
|
+
retina: retina,
|
|
13315
|
+
passiveEvents: passiveEvents,
|
|
13316
|
+
canvas: canvas$1,
|
|
13317
|
+
svg: svg$1,
|
|
13318
|
+
vml: vml,
|
|
13319
|
+
inlineSvg: inlineSvg
|
|
13320
|
+
};
|
|
13280
13321
|
|
|
13281
13322
|
/*
|
|
13282
13323
|
* Extends L.DomEvent to provide touch support for Internet Explorer and Windows-based devices.
|
|
13283
13324
|
*/
|
|
13284
13325
|
|
|
13285
|
-
|
|
13286
|
-
var
|
|
13287
|
-
var
|
|
13288
|
-
var
|
|
13289
|
-
var
|
|
13290
|
-
|
|
13326
|
+
var POINTER_DOWN = Browser.msPointer ? 'MSPointerDown' : 'pointerdown';
|
|
13327
|
+
var POINTER_MOVE = Browser.msPointer ? 'MSPointerMove' : 'pointermove';
|
|
13328
|
+
var POINTER_UP = Browser.msPointer ? 'MSPointerUp' : 'pointerup';
|
|
13329
|
+
var POINTER_CANCEL = Browser.msPointer ? 'MSPointerCancel' : 'pointercancel';
|
|
13330
|
+
var pEvent = {
|
|
13331
|
+
touchstart : POINTER_DOWN,
|
|
13332
|
+
touchmove : POINTER_MOVE,
|
|
13333
|
+
touchend : POINTER_UP,
|
|
13334
|
+
touchcancel : POINTER_CANCEL
|
|
13335
|
+
};
|
|
13336
|
+
var handle = {
|
|
13337
|
+
touchstart : _onPointerStart,
|
|
13338
|
+
touchmove : _handlePointer,
|
|
13339
|
+
touchend : _handlePointer,
|
|
13340
|
+
touchcancel : _handlePointer
|
|
13341
|
+
};
|
|
13291
13342
|
var _pointers = {};
|
|
13292
13343
|
var _pointerDocListener = false;
|
|
13293
13344
|
|
|
13294
13345
|
// Provides a touch events wrapper for (ms)pointer events.
|
|
13295
|
-
// ref
|
|
13346
|
+
// ref https://www.w3.org/TR/pointerevents/ https://www.w3.org/Bugs/Public/show_bug.cgi?id=22890
|
|
13296
13347
|
|
|
13297
|
-
function addPointerListener(obj, type, handler
|
|
13348
|
+
function addPointerListener(obj, type, handler) {
|
|
13298
13349
|
if (type === 'touchstart') {
|
|
13299
|
-
|
|
13300
|
-
|
|
13301
|
-
} else if (type === 'touchmove') {
|
|
13302
|
-
_addPointerMove(obj, handler, id);
|
|
13303
|
-
|
|
13304
|
-
} else if (type === 'touchend') {
|
|
13305
|
-
_addPointerEnd(obj, handler, id);
|
|
13350
|
+
_addPointerDocListener();
|
|
13306
13351
|
}
|
|
13307
|
-
|
|
13308
|
-
|
|
13352
|
+
if (!handle[type]) {
|
|
13353
|
+
console.warn('wrong event specified:', type);
|
|
13354
|
+
return L.Util.falseFn;
|
|
13355
|
+
}
|
|
13356
|
+
handler = handle[type].bind(this, handler);
|
|
13357
|
+
obj.addEventListener(pEvent[type], handler, false);
|
|
13358
|
+
return handler;
|
|
13309
13359
|
}
|
|
13310
13360
|
|
|
13311
|
-
function removePointerListener(obj, type,
|
|
13312
|
-
|
|
13313
|
-
|
|
13314
|
-
|
|
13315
|
-
obj.removeEventListener(POINTER_DOWN, handler, false);
|
|
13316
|
-
|
|
13317
|
-
} else if (type === 'touchmove') {
|
|
13318
|
-
obj.removeEventListener(POINTER_MOVE, handler, false);
|
|
13319
|
-
|
|
13320
|
-
} else if (type === 'touchend') {
|
|
13321
|
-
obj.removeEventListener(POINTER_UP, handler, false);
|
|
13322
|
-
obj.removeEventListener(POINTER_CANCEL, handler, false);
|
|
13361
|
+
function removePointerListener(obj, type, handler) {
|
|
13362
|
+
if (!pEvent[type]) {
|
|
13363
|
+
console.warn('wrong event specified:', type);
|
|
13364
|
+
return;
|
|
13323
13365
|
}
|
|
13324
|
-
|
|
13325
|
-
return this;
|
|
13366
|
+
obj.removeEventListener(pEvent[type], handler, false);
|
|
13326
13367
|
}
|
|
13327
13368
|
|
|
13328
|
-
function
|
|
13329
|
-
|
|
13330
|
-
|
|
13331
|
-
if (e.MSPOINTER_TYPE_TOUCH && e.pointerType === e.MSPOINTER_TYPE_TOUCH) {
|
|
13332
|
-
preventDefault(e);
|
|
13333
|
-
}
|
|
13369
|
+
function _globalPointerDown(e) {
|
|
13370
|
+
_pointers[e.pointerId] = e;
|
|
13371
|
+
}
|
|
13334
13372
|
|
|
13335
|
-
|
|
13336
|
-
|
|
13373
|
+
function _globalPointerMove(e) {
|
|
13374
|
+
if (_pointers[e.pointerId]) {
|
|
13375
|
+
_pointers[e.pointerId] = e;
|
|
13376
|
+
}
|
|
13377
|
+
}
|
|
13337
13378
|
|
|
13338
|
-
|
|
13339
|
-
|
|
13379
|
+
function _globalPointerUp(e) {
|
|
13380
|
+
delete _pointers[e.pointerId];
|
|
13381
|
+
}
|
|
13340
13382
|
|
|
13383
|
+
function _addPointerDocListener() {
|
|
13341
13384
|
// need to keep track of what pointers and how many are active to provide e.touches emulation
|
|
13342
13385
|
if (!_pointerDocListener) {
|
|
13343
13386
|
// we listen document as any drags that end by moving the touch off the screen get fired there
|
|
@@ -13350,21 +13393,9 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
13350
13393
|
}
|
|
13351
13394
|
}
|
|
13352
13395
|
|
|
13353
|
-
function
|
|
13354
|
-
|
|
13355
|
-
}
|
|
13356
|
-
|
|
13357
|
-
function _globalPointerMove(e) {
|
|
13358
|
-
if (_pointers[e.pointerId]) {
|
|
13359
|
-
_pointers[e.pointerId] = e;
|
|
13360
|
-
}
|
|
13361
|
-
}
|
|
13362
|
-
|
|
13363
|
-
function _globalPointerUp(e) {
|
|
13364
|
-
delete _pointers[e.pointerId];
|
|
13365
|
-
}
|
|
13396
|
+
function _handlePointer(handler, e) {
|
|
13397
|
+
if (e.pointerType === (e.MSPOINTER_TYPE_MOUSE || 'mouse')) { return; }
|
|
13366
13398
|
|
|
13367
|
-
function _handlePointer(e, handler) {
|
|
13368
13399
|
e.touches = [];
|
|
13369
13400
|
for (var i in _pointers) {
|
|
13370
13401
|
e.touches.push(_pointers[i]);
|
|
@@ -13374,108 +13405,83 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
13374
13405
|
handler(e);
|
|
13375
13406
|
}
|
|
13376
13407
|
|
|
13377
|
-
function
|
|
13378
|
-
|
|
13379
|
-
|
|
13380
|
-
|
|
13381
|
-
|
|
13382
|
-
|
|
13383
|
-
|
|
13384
|
-
_handlePointer(e, handler);
|
|
13385
|
-
};
|
|
13386
|
-
|
|
13387
|
-
obj['_leaflet_touchmove' + id] = onMove;
|
|
13388
|
-
obj.addEventListener(POINTER_MOVE, onMove, false);
|
|
13389
|
-
}
|
|
13390
|
-
|
|
13391
|
-
function _addPointerEnd(obj, handler, id) {
|
|
13392
|
-
var onUp = function (e) {
|
|
13393
|
-
_handlePointer(e, handler);
|
|
13394
|
-
};
|
|
13395
|
-
|
|
13396
|
-
obj['_leaflet_touchend' + id] = onUp;
|
|
13397
|
-
obj.addEventListener(POINTER_UP, onUp, false);
|
|
13398
|
-
obj.addEventListener(POINTER_CANCEL, onUp, false);
|
|
13408
|
+
function _onPointerStart(handler, e) {
|
|
13409
|
+
// IE10 specific: MsTouch needs preventDefault. See #2000
|
|
13410
|
+
if (e.MSPOINTER_TYPE_TOUCH && e.pointerType === e.MSPOINTER_TYPE_TOUCH) {
|
|
13411
|
+
preventDefault(e);
|
|
13412
|
+
}
|
|
13413
|
+
_handlePointer(handler, e);
|
|
13399
13414
|
}
|
|
13400
13415
|
|
|
13401
13416
|
/*
|
|
13402
13417
|
* Extends the event handling code with double tap support for mobile browsers.
|
|
13418
|
+
*
|
|
13419
|
+
* Note: currently most browsers fire native dblclick, with only a few exceptions
|
|
13420
|
+
* (see https://github.com/Leaflet/Leaflet/issues/7012#issuecomment-595087386)
|
|
13403
13421
|
*/
|
|
13404
13422
|
|
|
13405
|
-
|
|
13406
|
-
|
|
13407
|
-
|
|
13408
|
-
|
|
13409
|
-
|
|
13410
|
-
|
|
13411
|
-
|
|
13412
|
-
|
|
13413
|
-
|
|
13414
|
-
|
|
13415
|
-
|
|
13423
|
+
function makeDblclick(event) {
|
|
13424
|
+
// in modern browsers `type` cannot be just overridden:
|
|
13425
|
+
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Getter_only
|
|
13426
|
+
var newEvent = {},
|
|
13427
|
+
prop, i;
|
|
13428
|
+
for (i in event) {
|
|
13429
|
+
prop = event[i];
|
|
13430
|
+
newEvent[i] = prop && prop.bind ? prop.bind(event) : prop;
|
|
13431
|
+
}
|
|
13432
|
+
event = newEvent;
|
|
13433
|
+
newEvent.type = 'dblclick';
|
|
13434
|
+
newEvent.detail = 2;
|
|
13435
|
+
newEvent.isTrusted = false;
|
|
13436
|
+
newEvent._simulated = true; // for debug purposes
|
|
13437
|
+
return newEvent;
|
|
13438
|
+
}
|
|
13416
13439
|
|
|
13417
|
-
|
|
13418
|
-
|
|
13419
|
-
|
|
13420
|
-
|
|
13440
|
+
var delay = 200;
|
|
13441
|
+
function addDoubleTapListener(obj, handler) {
|
|
13442
|
+
// Most browsers handle double tap natively
|
|
13443
|
+
obj.addEventListener('dblclick', handler);
|
|
13444
|
+
|
|
13445
|
+
// On some platforms the browser doesn't fire native dblclicks for touch events.
|
|
13446
|
+
// It seems that in all such cases `detail` property of `click` event is always `1`.
|
|
13447
|
+
// So here we rely on that fact to avoid excessive 'dblclick' simulation when not needed.
|
|
13448
|
+
var last = 0,
|
|
13449
|
+
detail;
|
|
13450
|
+
function simDblclick(e) {
|
|
13451
|
+
if (e.detail !== 1) {
|
|
13452
|
+
detail = e.detail; // keep in sync to avoid false dblclick in some cases
|
|
13421
13453
|
return;
|
|
13422
13454
|
}
|
|
13423
13455
|
|
|
13424
|
-
|
|
13425
|
-
|
|
13456
|
+
if (e.pointerType === 'mouse' ||
|
|
13457
|
+
(e.sourceCapabilities && !e.sourceCapabilities.firesTouchEvents)) {
|
|
13426
13458
|
|
|
13427
|
-
|
|
13428
|
-
|
|
13429
|
-
last = now;
|
|
13430
|
-
}
|
|
13459
|
+
return;
|
|
13460
|
+
}
|
|
13431
13461
|
|
|
13432
|
-
|
|
13433
|
-
if (
|
|
13434
|
-
|
|
13435
|
-
|
|
13436
|
-
|
|
13437
|
-
var newTouch = {},
|
|
13438
|
-
prop, i;
|
|
13439
|
-
|
|
13440
|
-
for (i in touch$$1) {
|
|
13441
|
-
prop = touch$$1[i];
|
|
13442
|
-
newTouch[i] = prop && prop.bind ? prop.bind(touch$$1) : prop;
|
|
13443
|
-
}
|
|
13444
|
-
touch$$1 = newTouch;
|
|
13462
|
+
var now = Date.now();
|
|
13463
|
+
if (now - last <= delay) {
|
|
13464
|
+
detail++;
|
|
13465
|
+
if (detail === 2) {
|
|
13466
|
+
handler(makeDblclick(e));
|
|
13445
13467
|
}
|
|
13446
|
-
|
|
13447
|
-
|
|
13448
|
-
handler(touch$$1);
|
|
13449
|
-
last = null;
|
|
13468
|
+
} else {
|
|
13469
|
+
detail = 1;
|
|
13450
13470
|
}
|
|
13471
|
+
last = now;
|
|
13451
13472
|
}
|
|
13452
13473
|
|
|
13453
|
-
obj
|
|
13454
|
-
obj[_pre + _touchend + id] = onTouchEnd;
|
|
13455
|
-
obj[_pre + 'dblclick' + id] = handler;
|
|
13456
|
-
|
|
13457
|
-
obj.addEventListener(_touchstart, onTouchStart, passiveEvents ? {passive: false} : false);
|
|
13458
|
-
obj.addEventListener(_touchend, onTouchEnd, passiveEvents ? {passive: false} : false);
|
|
13474
|
+
obj.addEventListener('click', simDblclick);
|
|
13459
13475
|
|
|
13460
|
-
|
|
13461
|
-
|
|
13462
|
-
|
|
13463
|
-
|
|
13464
|
-
obj.addEventListener('dblclick', handler, false);
|
|
13465
|
-
|
|
13466
|
-
return this;
|
|
13476
|
+
return {
|
|
13477
|
+
dblclick: handler,
|
|
13478
|
+
simDblclick: simDblclick
|
|
13479
|
+
};
|
|
13467
13480
|
}
|
|
13468
13481
|
|
|
13469
|
-
function removeDoubleTapListener(obj,
|
|
13470
|
-
|
|
13471
|
-
|
|
13472
|
-
dblclick = obj[_pre + 'dblclick' + id];
|
|
13473
|
-
|
|
13474
|
-
obj.removeEventListener(_touchstart, touchstart, passiveEvents ? {passive: false} : false);
|
|
13475
|
-
obj.removeEventListener(_touchend, touchend, passiveEvents ? {passive: false} : false);
|
|
13476
|
-
obj.removeEventListener('dblclick', dblclick, false);
|
|
13477
|
-
|
|
13478
|
-
return this;
|
|
13482
|
+
function removeDoubleTapListener(obj, handlers) {
|
|
13483
|
+
obj.removeEventListener('dblclick', handlers.dblclick);
|
|
13484
|
+
obj.removeEventListener('click', handlers.simDblclick);
|
|
13479
13485
|
}
|
|
13480
13486
|
|
|
13481
13487
|
/*
|
|
@@ -13689,7 +13695,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
13689
13695
|
var pos = offset || new Point(0, 0);
|
|
13690
13696
|
|
|
13691
13697
|
el.style[TRANSFORM] =
|
|
13692
|
-
(ie3d ?
|
|
13698
|
+
(Browser.ie3d ?
|
|
13693
13699
|
'translate(' + pos.x + 'px,' + pos.y + 'px)' :
|
|
13694
13700
|
'translate3d(' + pos.x + 'px,' + pos.y + 'px,0)') +
|
|
13695
13701
|
(scale ? ' scale(' + scale + ')' : '');
|
|
@@ -13705,7 +13711,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
13705
13711
|
el._leaflet_pos = point;
|
|
13706
13712
|
/* eslint-enable */
|
|
13707
13713
|
|
|
13708
|
-
if (any3d) {
|
|
13714
|
+
if (Browser.any3d) {
|
|
13709
13715
|
setTransform(el, point);
|
|
13710
13716
|
} else {
|
|
13711
13717
|
el.style.left = point.x + 'px';
|
|
@@ -13823,7 +13829,8 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
13823
13829
|
};
|
|
13824
13830
|
}
|
|
13825
13831
|
|
|
13826
|
-
var DomUtil =
|
|
13832
|
+
var DomUtil = {
|
|
13833
|
+
__proto__: null,
|
|
13827
13834
|
TRANSFORM: TRANSFORM,
|
|
13828
13835
|
TRANSITION: TRANSITION,
|
|
13829
13836
|
TRANSITION_END: TRANSITION_END,
|
|
@@ -13844,15 +13851,15 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
13844
13851
|
setTransform: setTransform,
|
|
13845
13852
|
setPosition: setPosition,
|
|
13846
13853
|
getPosition: getPosition,
|
|
13847
|
-
disableTextSelection
|
|
13848
|
-
enableTextSelection
|
|
13854
|
+
get disableTextSelection () { return disableTextSelection; },
|
|
13855
|
+
get enableTextSelection () { return enableTextSelection; },
|
|
13849
13856
|
disableImageDrag: disableImageDrag,
|
|
13850
13857
|
enableImageDrag: enableImageDrag,
|
|
13851
13858
|
preventOutline: preventOutline,
|
|
13852
13859
|
restoreOutline: restoreOutline,
|
|
13853
13860
|
getSizedParentNode: getSizedParentNode,
|
|
13854
13861
|
getScale: getScale
|
|
13855
|
-
}
|
|
13862
|
+
};
|
|
13856
13863
|
|
|
13857
13864
|
/*
|
|
13858
13865
|
* @namespace DomEvent
|
|
@@ -13872,7 +13879,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
13872
13879
|
// Adds a set of type/listener pairs, e.g. `{click: onClick, mousemove: onMouseMove}`
|
|
13873
13880
|
function on(obj, types, fn, context) {
|
|
13874
13881
|
|
|
13875
|
-
if (typeof types === 'object') {
|
|
13882
|
+
if (types && typeof types === 'object') {
|
|
13876
13883
|
for (var type in types) {
|
|
13877
13884
|
addOne(obj, type, types[type], fn);
|
|
13878
13885
|
}
|
|
@@ -13897,32 +13904,48 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
13897
13904
|
// @alternative
|
|
13898
13905
|
// @function off(el: HTMLElement, eventMap: Object, context?: Object): this
|
|
13899
13906
|
// Removes a set of type/listener pairs, e.g. `{click: onClick, mousemove: onMouseMove}`
|
|
13907
|
+
|
|
13908
|
+
// @alternative
|
|
13909
|
+
// @function off(el: HTMLElement, types: String): this
|
|
13910
|
+
// Removes all previously added listeners of given types.
|
|
13911
|
+
|
|
13912
|
+
// @alternative
|
|
13913
|
+
// @function off(el: HTMLElement): this
|
|
13914
|
+
// Removes all previously added listeners from given HTMLElement
|
|
13900
13915
|
function off(obj, types, fn, context) {
|
|
13901
13916
|
|
|
13902
|
-
if (
|
|
13917
|
+
if (arguments.length === 1) {
|
|
13918
|
+
batchRemove(obj);
|
|
13919
|
+
delete obj[eventsKey];
|
|
13920
|
+
|
|
13921
|
+
} else if (types && typeof types === 'object') {
|
|
13903
13922
|
for (var type in types) {
|
|
13904
13923
|
removeOne(obj, type, types[type], fn);
|
|
13905
13924
|
}
|
|
13906
|
-
} else if (types) {
|
|
13907
|
-
types = splitWords(types);
|
|
13908
13925
|
|
|
13909
|
-
for (var i = 0, len = types.length; i < len; i++) {
|
|
13910
|
-
removeOne(obj, types[i], fn, context);
|
|
13911
|
-
}
|
|
13912
13926
|
} else {
|
|
13913
|
-
|
|
13914
|
-
|
|
13927
|
+
types = splitWords(types);
|
|
13928
|
+
|
|
13929
|
+
if (arguments.length === 2) {
|
|
13930
|
+
batchRemove(obj, function (type) {
|
|
13931
|
+
return indexOf(types, type) !== -1;
|
|
13932
|
+
});
|
|
13933
|
+
} else {
|
|
13934
|
+
for (var i = 0, len = types.length; i < len; i++) {
|
|
13935
|
+
removeOne(obj, types[i], fn, context);
|
|
13936
|
+
}
|
|
13915
13937
|
}
|
|
13916
|
-
delete obj[eventsKey];
|
|
13917
13938
|
}
|
|
13918
13939
|
|
|
13919
13940
|
return this;
|
|
13920
13941
|
}
|
|
13921
13942
|
|
|
13922
|
-
function
|
|
13923
|
-
|
|
13924
|
-
|
|
13925
|
-
|
|
13943
|
+
function batchRemove(obj, filterFn) {
|
|
13944
|
+
for (var id in obj[eventsKey]) {
|
|
13945
|
+
var type = id.split(/\d/)[0];
|
|
13946
|
+
if (!filterFn || filterFn(type)) {
|
|
13947
|
+
removeOne(obj, type, null, null, id);
|
|
13948
|
+
}
|
|
13926
13949
|
}
|
|
13927
13950
|
}
|
|
13928
13951
|
|
|
@@ -13943,17 +13966,17 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
13943
13966
|
|
|
13944
13967
|
var originalHandler = handler;
|
|
13945
13968
|
|
|
13946
|
-
if (pointer && type.indexOf('touch') === 0) {
|
|
13969
|
+
if (!Browser.touchNative && Browser.pointer && type.indexOf('touch') === 0) {
|
|
13947
13970
|
// Needs DomEvent.Pointer.js
|
|
13948
|
-
addPointerListener(obj, type, handler
|
|
13971
|
+
handler = addPointerListener(obj, type, handler);
|
|
13949
13972
|
|
|
13950
|
-
} else if (touch && (type === 'dblclick')
|
|
13951
|
-
addDoubleTapListener(obj, handler
|
|
13973
|
+
} else if (Browser.touch && (type === 'dblclick')) {
|
|
13974
|
+
handler = addDoubleTapListener(obj, handler);
|
|
13952
13975
|
|
|
13953
13976
|
} else if ('addEventListener' in obj) {
|
|
13954
13977
|
|
|
13955
13978
|
if (type === 'touchstart' || type === 'touchmove' || type === 'wheel' || type === 'mousewheel') {
|
|
13956
|
-
obj.addEventListener(mouseSubst[type] || type, handler, passiveEvents ? {passive: false} : false);
|
|
13979
|
+
obj.addEventListener(mouseSubst[type] || type, handler, Browser.passiveEvents ? {passive: false} : false);
|
|
13957
13980
|
|
|
13958
13981
|
} else if (type === 'mouseenter' || type === 'mouseleave') {
|
|
13959
13982
|
handler = function (e) {
|
|
@@ -13968,7 +13991,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
13968
13991
|
obj.addEventListener(type, originalHandler, false);
|
|
13969
13992
|
}
|
|
13970
13993
|
|
|
13971
|
-
} else
|
|
13994
|
+
} else {
|
|
13972
13995
|
obj.attachEvent('on' + type, handler);
|
|
13973
13996
|
}
|
|
13974
13997
|
|
|
@@ -13976,24 +13999,23 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
13976
13999
|
obj[eventsKey][id] = handler;
|
|
13977
14000
|
}
|
|
13978
14001
|
|
|
13979
|
-
function removeOne(obj, type, fn, context) {
|
|
13980
|
-
|
|
13981
|
-
var
|
|
13982
|
-
handler = obj[eventsKey] && obj[eventsKey][id];
|
|
14002
|
+
function removeOne(obj, type, fn, context, id) {
|
|
14003
|
+
id = id || type + stamp(fn) + (context ? '_' + stamp(context) : '');
|
|
14004
|
+
var handler = obj[eventsKey] && obj[eventsKey][id];
|
|
13983
14005
|
|
|
13984
14006
|
if (!handler) { return this; }
|
|
13985
14007
|
|
|
13986
|
-
if (pointer && type.indexOf('touch') === 0) {
|
|
13987
|
-
removePointerListener(obj, type,
|
|
14008
|
+
if (!Browser.touchNative && Browser.pointer && type.indexOf('touch') === 0) {
|
|
14009
|
+
removePointerListener(obj, type, handler);
|
|
13988
14010
|
|
|
13989
|
-
} else if (touch && (type === 'dblclick')
|
|
13990
|
-
removeDoubleTapListener(obj,
|
|
14011
|
+
} else if (Browser.touch && (type === 'dblclick')) {
|
|
14012
|
+
removeDoubleTapListener(obj, handler);
|
|
13991
14013
|
|
|
13992
14014
|
} else if ('removeEventListener' in obj) {
|
|
13993
14015
|
|
|
13994
14016
|
obj.removeEventListener(mouseSubst[type] || type, handler, false);
|
|
13995
14017
|
|
|
13996
|
-
} else
|
|
14018
|
+
} else {
|
|
13997
14019
|
obj.detachEvent('on' + type, handler);
|
|
13998
14020
|
}
|
|
13999
14021
|
|
|
@@ -14016,7 +14038,6 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
14016
14038
|
} else {
|
|
14017
14039
|
e.cancelBubble = true;
|
|
14018
14040
|
}
|
|
14019
|
-
skipped(e);
|
|
14020
14041
|
|
|
14021
14042
|
return this;
|
|
14022
14043
|
}
|
|
@@ -14029,11 +14050,11 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
14029
14050
|
}
|
|
14030
14051
|
|
|
14031
14052
|
// @function disableClickPropagation(el: HTMLElement): this
|
|
14032
|
-
// Adds `stopPropagation` to the element's `'click'`, `'
|
|
14053
|
+
// Adds `stopPropagation` to the element's `'click'`, `'dblclick'`, `'contextmenu'`,
|
|
14033
14054
|
// `'mousedown'` and `'touchstart'` events (plus browser variants).
|
|
14034
14055
|
function disableClickPropagation(el) {
|
|
14035
|
-
on(el, 'mousedown touchstart dblclick', stopPropagation);
|
|
14036
|
-
|
|
14056
|
+
on(el, 'mousedown touchstart dblclick contextmenu', stopPropagation);
|
|
14057
|
+
el['_leaflet_disable_click'] = true;
|
|
14037
14058
|
return this;
|
|
14038
14059
|
}
|
|
14039
14060
|
|
|
@@ -14081,8 +14102,8 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
14081
14102
|
// Chrome on Win scrolls double the pixels as in other platforms (see #4538),
|
|
14082
14103
|
// and Firefox scrolls device pixels, not CSS pixels
|
|
14083
14104
|
var wheelPxFactor =
|
|
14084
|
-
(win && chrome) ? 2 * window.devicePixelRatio :
|
|
14085
|
-
gecko ? window.devicePixelRatio : 1;
|
|
14105
|
+
(Browser.win && Browser.chrome) ? 2 * window.devicePixelRatio :
|
|
14106
|
+
Browser.gecko ? window.devicePixelRatio : 1;
|
|
14086
14107
|
|
|
14087
14108
|
// @function getWheelDelta(ev: DOMEvent): Number
|
|
14088
14109
|
// Gets normalized wheel delta from a wheel DOM event, in vertical
|
|
@@ -14090,7 +14111,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
14090
14111
|
// Events from pointing devices without precise scrolling are mapped to
|
|
14091
14112
|
// a best guess of 60 pixels.
|
|
14092
14113
|
function getWheelDelta(e) {
|
|
14093
|
-
return (edge) ? e.wheelDeltaY / 2 : // Don't trust window-geometry-based delta
|
|
14114
|
+
return (Browser.edge) ? e.wheelDeltaY / 2 : // Don't trust window-geometry-based delta
|
|
14094
14115
|
(e.deltaY && e.deltaMode === 0) ? -e.deltaY / wheelPxFactor : // Pixels
|
|
14095
14116
|
(e.deltaY && e.deltaMode === 1) ? -e.deltaY * 20 : // Lines
|
|
14096
14117
|
(e.deltaY && e.deltaMode === 2) ? -e.deltaY * 60 : // Pages
|
|
@@ -14101,20 +14122,6 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
14101
14122
|
0;
|
|
14102
14123
|
}
|
|
14103
14124
|
|
|
14104
|
-
var skipEvents = {};
|
|
14105
|
-
|
|
14106
|
-
function fakeStop(e) {
|
|
14107
|
-
// fakes stopPropagation by setting a special event flag, checked/reset with skipped(e)
|
|
14108
|
-
skipEvents[e.type] = true;
|
|
14109
|
-
}
|
|
14110
|
-
|
|
14111
|
-
function skipped(e) {
|
|
14112
|
-
var events = skipEvents[e.type];
|
|
14113
|
-
// reset when checking, as it's only used in map container and propagates outside of the map
|
|
14114
|
-
skipEvents[e.type] = false;
|
|
14115
|
-
return events;
|
|
14116
|
-
}
|
|
14117
|
-
|
|
14118
14125
|
// check if element really left/entered the event target (for mouseenter/mouseleave)
|
|
14119
14126
|
function isExternalTarget(el, e) {
|
|
14120
14127
|
|
|
@@ -14132,7 +14139,8 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
14132
14139
|
return (related !== el);
|
|
14133
14140
|
}
|
|
14134
14141
|
|
|
14135
|
-
var DomEvent =
|
|
14142
|
+
var DomEvent = {
|
|
14143
|
+
__proto__: null,
|
|
14136
14144
|
on: on,
|
|
14137
14145
|
off: off,
|
|
14138
14146
|
stopPropagation: stopPropagation,
|
|
@@ -14142,12 +14150,10 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
14142
14150
|
stop: stop,
|
|
14143
14151
|
getMousePosition: getMousePosition,
|
|
14144
14152
|
getWheelDelta: getWheelDelta,
|
|
14145
|
-
fakeStop: fakeStop,
|
|
14146
|
-
skipped: skipped,
|
|
14147
14153
|
isExternalTarget: isExternalTarget,
|
|
14148
14154
|
addListener: on,
|
|
14149
14155
|
removeListener: off
|
|
14150
|
-
}
|
|
14156
|
+
};
|
|
14151
14157
|
|
|
14152
14158
|
/*
|
|
14153
14159
|
* @class PosAnimation
|
|
@@ -14171,7 +14177,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
14171
14177
|
// @method run(el: HTMLElement, newPos: Point, duration?: Number, easeLinearity?: Number)
|
|
14172
14178
|
// Run an animation of a given element to a new position, optionally setting
|
|
14173
14179
|
// duration in seconds (`0.25` by default) and easing linearity factor (3rd
|
|
14174
|
-
// argument of the [cubic bezier curve](
|
|
14180
|
+
// argument of the [cubic bezier curve](https://cubic-bezier.com/#0,0,.5,1),
|
|
14175
14181
|
// `0.5` by default).
|
|
14176
14182
|
run: function (el, newPos, duration, easeLinearity) {
|
|
14177
14183
|
this.stop();
|
|
@@ -14391,7 +14397,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
14391
14397
|
this.callInitHooks();
|
|
14392
14398
|
|
|
14393
14399
|
// don't animate on browsers without hardware-accelerated transitions or old Android/Opera
|
|
14394
|
-
this._zoomAnimated = TRANSITION && any3d && !mobileOpera &&
|
|
14400
|
+
this._zoomAnimated = TRANSITION && Browser.any3d && !Browser.mobileOpera &&
|
|
14395
14401
|
this.options.zoomAnimation;
|
|
14396
14402
|
|
|
14397
14403
|
// zoom transitions run with the same duration for all layers, so if one of transitionend events
|
|
@@ -14456,14 +14462,14 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
14456
14462
|
// @method zoomIn(delta?: Number, options?: Zoom options): this
|
|
14457
14463
|
// Increases the zoom of the map by `delta` ([`zoomDelta`](#map-zoomdelta) by default).
|
|
14458
14464
|
zoomIn: function (delta, options) {
|
|
14459
|
-
delta = delta || (any3d ? this.options.zoomDelta : 1);
|
|
14465
|
+
delta = delta || (Browser.any3d ? this.options.zoomDelta : 1);
|
|
14460
14466
|
return this.setZoom(this._zoom + delta, options);
|
|
14461
14467
|
},
|
|
14462
14468
|
|
|
14463
14469
|
// @method zoomOut(delta?: Number, options?: Zoom options): this
|
|
14464
14470
|
// Decreases the zoom of the map by `delta` ([`zoomDelta`](#map-zoomdelta) by default).
|
|
14465
14471
|
zoomOut: function (delta, options) {
|
|
14466
|
-
delta = delta || (any3d ? this.options.zoomDelta : 1);
|
|
14472
|
+
delta = delta || (Browser.any3d ? this.options.zoomDelta : 1);
|
|
14467
14473
|
return this.setZoom(this._zoom - delta, options);
|
|
14468
14474
|
},
|
|
14469
14475
|
|
|
@@ -14593,7 +14599,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
14593
14599
|
flyTo: function (targetCenter, targetZoom, options) {
|
|
14594
14600
|
|
|
14595
14601
|
options = options || {};
|
|
14596
|
-
if (options.animate === false || !any3d) {
|
|
14602
|
+
if (options.animate === false || !Browser.any3d) {
|
|
14597
14603
|
return this.setView(targetCenter, targetZoom, options);
|
|
14598
14604
|
}
|
|
14599
14605
|
|
|
@@ -14746,10 +14752,9 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
14746
14752
|
return this;
|
|
14747
14753
|
},
|
|
14748
14754
|
|
|
14749
|
-
// @method panInside(latlng: LatLng, options?: options): this
|
|
14755
|
+
// @method panInside(latlng: LatLng, options?: padding options): this
|
|
14750
14756
|
// Pans the map the minimum amount to make the `latlng` visible. Use
|
|
14751
|
-
//
|
|
14752
|
-
// the display to more restricted bounds, like [`fitBounds`](#map-fitbounds).
|
|
14757
|
+
// padding options to fit the display to more restricted bounds.
|
|
14753
14758
|
// If `latlng` is already within the (optionally padded) display bounds,
|
|
14754
14759
|
// the map will not be panned.
|
|
14755
14760
|
panInside: function (latlng, options) {
|
|
@@ -14757,35 +14762,19 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
14757
14762
|
|
|
14758
14763
|
var paddingTL = toPoint(options.paddingTopLeft || options.padding || [0, 0]),
|
|
14759
14764
|
paddingBR = toPoint(options.paddingBottomRight || options.padding || [0, 0]),
|
|
14760
|
-
|
|
14761
|
-
pixelCenter = this.project(center),
|
|
14765
|
+
pixelCenter = this.project(this.getCenter()),
|
|
14762
14766
|
pixelPoint = this.project(latlng),
|
|
14763
14767
|
pixelBounds = this.getPixelBounds(),
|
|
14764
|
-
|
|
14765
|
-
|
|
14768
|
+
paddedBounds = toBounds([pixelBounds.min.add(paddingTL), pixelBounds.max.subtract(paddingBR)]),
|
|
14769
|
+
paddedSize = paddedBounds.getSize();
|
|
14766
14770
|
|
|
14767
14771
|
if (!paddedBounds.contains(pixelPoint)) {
|
|
14768
14772
|
this._enforcingBounds = true;
|
|
14769
|
-
var
|
|
14770
|
-
|
|
14771
|
-
|
|
14772
|
-
|
|
14773
|
-
|
|
14774
|
-
if (diff.x > 0) {
|
|
14775
|
-
newCenter.x += halfPixelBounds.x - paddingTL.x;
|
|
14776
|
-
} else {
|
|
14777
|
-
newCenter.x -= halfPixelBounds.x - paddingBR.x;
|
|
14778
|
-
}
|
|
14779
|
-
}
|
|
14780
|
-
if (pixelPoint.y < paddedBounds.min.y || pixelPoint.y > paddedBounds.max.y) {
|
|
14781
|
-
newCenter.y = pixelCenter.y - diff.y;
|
|
14782
|
-
if (diff.y > 0) {
|
|
14783
|
-
newCenter.y += halfPixelBounds.y - paddingTL.y;
|
|
14784
|
-
} else {
|
|
14785
|
-
newCenter.y -= halfPixelBounds.y - paddingBR.y;
|
|
14786
|
-
}
|
|
14787
|
-
}
|
|
14788
|
-
this.panTo(this.unproject(newCenter), options);
|
|
14773
|
+
var centerOffset = pixelPoint.subtract(paddedBounds.getCenter());
|
|
14774
|
+
var offset = paddedBounds.extend(pixelPoint).getSize().subtract(paddedSize);
|
|
14775
|
+
pixelCenter.x += centerOffset.x < 0 ? -offset.x : offset.x;
|
|
14776
|
+
pixelCenter.y += centerOffset.y < 0 ? -offset.y : offset.y;
|
|
14777
|
+
this.panTo(this.unproject(pixelCenter), options);
|
|
14789
14778
|
this._enforcingBounds = false;
|
|
14790
14779
|
}
|
|
14791
14780
|
return this;
|
|
@@ -14916,6 +14905,8 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
14916
14905
|
},
|
|
14917
14906
|
|
|
14918
14907
|
_handleGeolocationError: function (error) {
|
|
14908
|
+
if (!this._container._leaflet_id) { return; }
|
|
14909
|
+
|
|
14919
14910
|
var c = error.code,
|
|
14920
14911
|
message = error.message ||
|
|
14921
14912
|
(c === 1 ? 'permission denied' :
|
|
@@ -14935,6 +14926,8 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
14935
14926
|
},
|
|
14936
14927
|
|
|
14937
14928
|
_handleGeolocationResponse: function (pos) {
|
|
14929
|
+
if (!this._container._leaflet_id) { return; }
|
|
14930
|
+
|
|
14938
14931
|
var lat = pos.coords.latitude,
|
|
14939
14932
|
lng = pos.coords.longitude,
|
|
14940
14933
|
latlng = new LatLng(lat, lng),
|
|
@@ -14987,7 +14980,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
14987
14980
|
remove: function () {
|
|
14988
14981
|
|
|
14989
14982
|
this._initEvents(true);
|
|
14990
|
-
this.off('moveend', this._panInsideMaxBounds);
|
|
14983
|
+
if (this.options.maxBounds) { this.off('moveend', this._panInsideMaxBounds); }
|
|
14991
14984
|
|
|
14992
14985
|
if (this._containerId !== this._container._leaflet_id) {
|
|
14993
14986
|
throw new Error('Map container is being reused by another instance');
|
|
@@ -15119,7 +15112,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
15119
15112
|
se = bounds.getSouthEast(),
|
|
15120
15113
|
size = this.getSize().subtract(padding),
|
|
15121
15114
|
boundsSize = toBounds(this.project(se, zoom), this.project(nw, zoom)).getSize(),
|
|
15122
|
-
snap = any3d ? this.options.zoomSnap : 1,
|
|
15115
|
+
snap = Browser.any3d ? this.options.zoomSnap : 1,
|
|
15123
15116
|
scalex = size.x / boundsSize.x,
|
|
15124
15117
|
scaley = size.y / boundsSize.y,
|
|
15125
15118
|
scale = inside ? Math.max(scalex, scaley) : Math.min(scalex, scaley);
|
|
@@ -15347,13 +15340,13 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
15347
15340
|
_initLayout: function () {
|
|
15348
15341
|
var container = this._container;
|
|
15349
15342
|
|
|
15350
|
-
this._fadeAnimated = this.options.fadeAnimation && any3d;
|
|
15343
|
+
this._fadeAnimated = this.options.fadeAnimation && Browser.any3d;
|
|
15351
15344
|
|
|
15352
15345
|
addClass(container, 'leaflet-container' +
|
|
15353
|
-
(touch ? ' leaflet-touch' : '') +
|
|
15354
|
-
(retina ? ' leaflet-retina' : '') +
|
|
15355
|
-
(ielt9 ? ' leaflet-oldie' : '') +
|
|
15356
|
-
(safari ? ' leaflet-safari' : '') +
|
|
15346
|
+
(Browser.touch ? ' leaflet-touch' : '') +
|
|
15347
|
+
(Browser.retina ? ' leaflet-retina' : '') +
|
|
15348
|
+
(Browser.ielt9 ? ' leaflet-oldie' : '') +
|
|
15349
|
+
(Browser.safari ? ' leaflet-safari' : '') +
|
|
15357
15350
|
(this._fadeAnimated ? ' leaflet-fade-anim' : ''));
|
|
15358
15351
|
|
|
15359
15352
|
var position = getStyle(container, 'position');
|
|
@@ -15392,11 +15385,11 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
15392
15385
|
// Pane for `GridLayer`s and `TileLayer`s
|
|
15393
15386
|
this.createPane('tilePane');
|
|
15394
15387
|
// @pane overlayPane: HTMLElement = 400
|
|
15395
|
-
// Pane for overlay shadows (e.g. `Marker` shadows)
|
|
15396
|
-
this.createPane('shadowPane');
|
|
15397
|
-
// @pane shadowPane: HTMLElement = 500
|
|
15398
15388
|
// Pane for vectors (`Path`s, like `Polyline`s and `Polygon`s), `ImageOverlay`s and `VideoOverlay`s
|
|
15399
15389
|
this.createPane('overlayPane');
|
|
15390
|
+
// @pane shadowPane: HTMLElement = 500
|
|
15391
|
+
// Pane for overlay shadows (e.g. `Marker` shadows)
|
|
15392
|
+
this.createPane('shadowPane');
|
|
15400
15393
|
// @pane markerPane: HTMLElement = 600
|
|
15401
15394
|
// Pane for `Icon`s of `Marker`s
|
|
15402
15395
|
this.createPane('markerPane');
|
|
@@ -15459,7 +15452,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
15459
15452
|
return this;
|
|
15460
15453
|
},
|
|
15461
15454
|
|
|
15462
|
-
_move: function (center, zoom, data) {
|
|
15455
|
+
_move: function (center, zoom, data, supressEvent) {
|
|
15463
15456
|
if (zoom === undefined) {
|
|
15464
15457
|
zoom = this._zoom;
|
|
15465
15458
|
}
|
|
@@ -15469,29 +15462,34 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
15469
15462
|
this._lastCenter = center;
|
|
15470
15463
|
this._pixelOrigin = this._getNewPixelOrigin(center);
|
|
15471
15464
|
|
|
15472
|
-
|
|
15473
|
-
|
|
15474
|
-
|
|
15475
|
-
|
|
15465
|
+
if (!supressEvent) {
|
|
15466
|
+
// @event zoom: Event
|
|
15467
|
+
// Fired repeatedly during any change in zoom level,
|
|
15468
|
+
// including zoom and fly animations.
|
|
15469
|
+
if (zoomChanged || (data && data.pinch)) { // Always fire 'zoom' if pinching because #3530
|
|
15470
|
+
this.fire('zoom', data);
|
|
15471
|
+
}
|
|
15472
|
+
|
|
15473
|
+
// @event move: Event
|
|
15474
|
+
// Fired repeatedly during any movement of the map,
|
|
15475
|
+
// including pan and fly animations.
|
|
15476
|
+
this.fire('move', data);
|
|
15477
|
+
} else if (data && data.pinch) { // Always fire 'zoom' if pinching because #3530
|
|
15476
15478
|
this.fire('zoom', data);
|
|
15477
15479
|
}
|
|
15478
|
-
|
|
15479
|
-
// @event move: Event
|
|
15480
|
-
// Fired repeatedly during any movement of the map, including pan and
|
|
15481
|
-
// fly animations.
|
|
15482
|
-
return this.fire('move', data);
|
|
15480
|
+
return this;
|
|
15483
15481
|
},
|
|
15484
15482
|
|
|
15485
15483
|
_moveEnd: function (zoomChanged) {
|
|
15486
15484
|
// @event zoomend: Event
|
|
15487
|
-
// Fired when the map
|
|
15485
|
+
// Fired when the map zoom changed, after any animations.
|
|
15488
15486
|
if (zoomChanged) {
|
|
15489
15487
|
this.fire('zoomend');
|
|
15490
15488
|
}
|
|
15491
15489
|
|
|
15492
15490
|
// @event moveend: Event
|
|
15493
|
-
// Fired when the center of the map stops changing
|
|
15494
|
-
// dragging the map).
|
|
15491
|
+
// Fired when the center of the map stops changing
|
|
15492
|
+
// (e.g. user stopped dragging the map or after non-centered zoom).
|
|
15495
15493
|
return this.fire('moveend');
|
|
15496
15494
|
},
|
|
15497
15495
|
|
|
@@ -15526,11 +15524,11 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
15526
15524
|
// DOM event handling
|
|
15527
15525
|
|
|
15528
15526
|
// @section Interaction events
|
|
15529
|
-
_initEvents: function (remove
|
|
15527
|
+
_initEvents: function (remove) {
|
|
15530
15528
|
this._targets = {};
|
|
15531
15529
|
this._targets[stamp(this._container)] = this;
|
|
15532
15530
|
|
|
15533
|
-
var onOff = remove
|
|
15531
|
+
var onOff = remove ? off : on;
|
|
15534
15532
|
|
|
15535
15533
|
// @event click: MouseEvent
|
|
15536
15534
|
// Fired when the user clicks (or taps) the map.
|
|
@@ -15566,8 +15564,8 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
15566
15564
|
onOff(window, 'resize', this._onResize, this);
|
|
15567
15565
|
}
|
|
15568
15566
|
|
|
15569
|
-
if (any3d && this.options.transform3DLimit) {
|
|
15570
|
-
(remove
|
|
15567
|
+
if (Browser.any3d && this.options.transform3DLimit) {
|
|
15568
|
+
(remove ? this.off : this.on).call(this, 'moveend', this._onMoveEnd);
|
|
15571
15569
|
}
|
|
15572
15570
|
},
|
|
15573
15571
|
|
|
@@ -15586,7 +15584,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
15586
15584
|
var pos = this._getMapPanePos();
|
|
15587
15585
|
if (Math.max(Math.abs(pos.x), Math.abs(pos.y)) >= this.options.transform3DLimit) {
|
|
15588
15586
|
// https://bugzilla.mozilla.org/show_bug.cgi?id=1203873 but Webkit also have
|
|
15589
|
-
// a pixel offset on very high values, see:
|
|
15587
|
+
// a pixel offset on very high values, see: https://jsfiddle.net/dg6r5hhb/
|
|
15590
15588
|
this._resetView(this.getCenter(), this.getZoom());
|
|
15591
15589
|
}
|
|
15592
15590
|
},
|
|
@@ -15600,7 +15598,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
15600
15598
|
|
|
15601
15599
|
while (src) {
|
|
15602
15600
|
target = this._targets[stamp(src)];
|
|
15603
|
-
if (target && (type === 'click' || type === 'preclick') &&
|
|
15601
|
+
if (target && (type === 'click' || type === 'preclick') && this._draggableMoved(target)) {
|
|
15604
15602
|
// Prevent firing click after you just dragged an object.
|
|
15605
15603
|
dragging = true;
|
|
15606
15604
|
break;
|
|
@@ -15613,20 +15611,30 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
15613
15611
|
if (src === this._container) { break; }
|
|
15614
15612
|
src = src.parentNode;
|
|
15615
15613
|
}
|
|
15616
|
-
if (!targets.length && !dragging && !isHover &&
|
|
15614
|
+
if (!targets.length && !dragging && !isHover && this.listens(type, true)) {
|
|
15617
15615
|
targets = [this];
|
|
15618
15616
|
}
|
|
15619
15617
|
return targets;
|
|
15620
15618
|
},
|
|
15621
15619
|
|
|
15620
|
+
_isClickDisabled: function (el) {
|
|
15621
|
+
while (el !== this._container) {
|
|
15622
|
+
if (el['_leaflet_disable_click']) { return true; }
|
|
15623
|
+
el = el.parentNode;
|
|
15624
|
+
}
|
|
15625
|
+
},
|
|
15626
|
+
|
|
15622
15627
|
_handleDOMEvent: function (e) {
|
|
15623
|
-
|
|
15628
|
+
var el = (e.target || e.srcElement);
|
|
15629
|
+
if (!this._loaded || el['_leaflet_disable_events'] || e.type === 'click' && this._isClickDisabled(el)) {
|
|
15630
|
+
return;
|
|
15631
|
+
}
|
|
15624
15632
|
|
|
15625
15633
|
var type = e.type;
|
|
15626
15634
|
|
|
15627
|
-
if (type === 'mousedown'
|
|
15635
|
+
if (type === 'mousedown') {
|
|
15628
15636
|
// prevents outline when clicking on keyboard-focusable element
|
|
15629
|
-
preventOutline(
|
|
15637
|
+
preventOutline(el);
|
|
15630
15638
|
}
|
|
15631
15639
|
|
|
15632
15640
|
this._fireDOMEvent(e, type);
|
|
@@ -15634,7 +15642,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
15634
15642
|
|
|
15635
15643
|
_mouseEvents: ['click', 'dblclick', 'mouseover', 'mouseout', 'contextmenu'],
|
|
15636
15644
|
|
|
15637
|
-
_fireDOMEvent: function (e, type,
|
|
15645
|
+
_fireDOMEvent: function (e, type, canvasTargets) {
|
|
15638
15646
|
|
|
15639
15647
|
if (e.type === 'click') {
|
|
15640
15648
|
// Fire a synthetic 'preclick' event which propagates up (mainly for closing popups).
|
|
@@ -15644,21 +15652,29 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
15644
15652
|
// handlers start running).
|
|
15645
15653
|
var synth = extend({}, e);
|
|
15646
15654
|
synth.type = 'preclick';
|
|
15647
|
-
this._fireDOMEvent(synth, synth.type,
|
|
15655
|
+
this._fireDOMEvent(synth, synth.type, canvasTargets);
|
|
15648
15656
|
}
|
|
15649
15657
|
|
|
15650
|
-
if (e._stopped) { return; }
|
|
15651
|
-
|
|
15652
15658
|
// Find the layer the event is propagating from and its parents.
|
|
15653
|
-
targets =
|
|
15659
|
+
var targets = this._findEventTargets(e, type);
|
|
15660
|
+
|
|
15661
|
+
if (canvasTargets) {
|
|
15662
|
+
var filtered = []; // pick only targets with listeners
|
|
15663
|
+
for (var i = 0; i < canvasTargets.length; i++) {
|
|
15664
|
+
if (canvasTargets[i].listens(type, true)) {
|
|
15665
|
+
filtered.push(canvasTargets[i]);
|
|
15666
|
+
}
|
|
15667
|
+
}
|
|
15668
|
+
targets = filtered.concat(targets);
|
|
15669
|
+
}
|
|
15654
15670
|
|
|
15655
15671
|
if (!targets.length) { return; }
|
|
15656
15672
|
|
|
15657
|
-
|
|
15658
|
-
if (type === 'contextmenu' && target.listens(type, true)) {
|
|
15673
|
+
if (type === 'contextmenu') {
|
|
15659
15674
|
preventDefault(e);
|
|
15660
15675
|
}
|
|
15661
15676
|
|
|
15677
|
+
var target = targets[0];
|
|
15662
15678
|
var data = {
|
|
15663
15679
|
originalEvent: e
|
|
15664
15680
|
};
|
|
@@ -15671,7 +15687,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
15671
15687
|
data.latlng = isMarker ? target.getLatLng() : this.layerPointToLatLng(data.layerPoint);
|
|
15672
15688
|
}
|
|
15673
15689
|
|
|
15674
|
-
for (
|
|
15690
|
+
for (i = 0; i < targets.length; i++) {
|
|
15675
15691
|
targets[i].fire(type, data, true);
|
|
15676
15692
|
if (data.originalEvent._stopped ||
|
|
15677
15693
|
(targets[i].options.bubblingMouseEvents === false && indexOf(this._mouseEvents, type) !== -1)) { return; }
|
|
@@ -15807,7 +15823,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
15807
15823
|
_limitZoom: function (zoom) {
|
|
15808
15824
|
var min = this.getMinZoom(),
|
|
15809
15825
|
max = this.getMaxZoom(),
|
|
15810
|
-
snap = any3d ? this.options.zoomSnap : 1;
|
|
15826
|
+
snap = Browser.any3d ? this.options.zoomSnap : 1;
|
|
15811
15827
|
if (snap) {
|
|
15812
15828
|
zoom = Math.round(zoom / snap) * snap;
|
|
15813
15829
|
}
|
|
@@ -15927,6 +15943,12 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
15927
15943
|
noUpdate: noUpdate
|
|
15928
15944
|
});
|
|
15929
15945
|
|
|
15946
|
+
if (!this._tempFireZoomEvent) {
|
|
15947
|
+
this._tempFireZoomEvent = this._zoom !== this._animateToZoom;
|
|
15948
|
+
}
|
|
15949
|
+
|
|
15950
|
+
this._move(this._animateToCenter, this._animateToZoom, undefined, true);
|
|
15951
|
+
|
|
15930
15952
|
// Work around webkit not firing 'transitionend', see https://github.com/Leaflet/Leaflet/issues/3689, 2693
|
|
15931
15953
|
setTimeout(bind(this._onZoomTransitionEnd, this), 250);
|
|
15932
15954
|
},
|
|
@@ -15940,12 +15962,16 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
15940
15962
|
|
|
15941
15963
|
this._animatingZoom = false;
|
|
15942
15964
|
|
|
15943
|
-
this._move(this._animateToCenter, this._animateToZoom);
|
|
15965
|
+
this._move(this._animateToCenter, this._animateToZoom, undefined, true);
|
|
15944
15966
|
|
|
15945
|
-
|
|
15946
|
-
|
|
15947
|
-
|
|
15948
|
-
|
|
15967
|
+
if (this._tempFireZoomEvent) {
|
|
15968
|
+
this.fire('zoom');
|
|
15969
|
+
}
|
|
15970
|
+
delete this._tempFireZoomEvent;
|
|
15971
|
+
|
|
15972
|
+
this.fire('move');
|
|
15973
|
+
|
|
15974
|
+
this._moveEnd(true);
|
|
15949
15975
|
}
|
|
15950
15976
|
});
|
|
15951
15977
|
|
|
@@ -15974,7 +16000,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
15974
16000
|
|
|
15975
16001
|
var Control = Class.extend({
|
|
15976
16002
|
// @section
|
|
15977
|
-
// @aka Control
|
|
16003
|
+
// @aka Control Options
|
|
15978
16004
|
options: {
|
|
15979
16005
|
// @option position: String = 'topright'
|
|
15980
16006
|
// The position of the control (one of the map corners). Possible values are `'topleft'`,
|
|
@@ -16137,7 +16163,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
16137
16163
|
* @aka L.Control.Layers
|
|
16138
16164
|
* @inherits Control
|
|
16139
16165
|
*
|
|
16140
|
-
* The layers control gives users the ability to switch between different base layers and switch overlays on/off (check out the [detailed example](
|
|
16166
|
+
* The layers control gives users the ability to switch between different base layers and switch overlays on/off (check out the [detailed example](https://leafletjs.com/examples/layers-control/)). Extends `Control`.
|
|
16141
16167
|
*
|
|
16142
16168
|
* @example
|
|
16143
16169
|
*
|
|
@@ -16176,7 +16202,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
16176
16202
|
// @aka Control.Layers options
|
|
16177
16203
|
options: {
|
|
16178
16204
|
// @option collapsed: Boolean = true
|
|
16179
|
-
// If `true`, the control will be collapsed into an icon and expanded on mouse hover or
|
|
16205
|
+
// If `true`, the control will be collapsed into an icon and expanded on mouse hover, touch, or keyboard activation.
|
|
16180
16206
|
collapsed: true,
|
|
16181
16207
|
position: 'topright',
|
|
16182
16208
|
|
|
@@ -16314,24 +16340,25 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
16314
16340
|
if (collapsed) {
|
|
16315
16341
|
this._map.on('click', this.collapse, this);
|
|
16316
16342
|
|
|
16317
|
-
|
|
16318
|
-
|
|
16319
|
-
|
|
16320
|
-
|
|
16321
|
-
|
|
16322
|
-
|
|
16343
|
+
on(container, {
|
|
16344
|
+
mouseenter: function () {
|
|
16345
|
+
on(section, 'click', preventDefault);
|
|
16346
|
+
this.expand();
|
|
16347
|
+
setTimeout(function () {
|
|
16348
|
+
off(section, 'click', preventDefault);
|
|
16349
|
+
});
|
|
16350
|
+
},
|
|
16351
|
+
mouseleave: this.collapse
|
|
16352
|
+
}, this);
|
|
16323
16353
|
}
|
|
16324
16354
|
|
|
16325
16355
|
var link = this._layersLink = create$1('a', className + '-toggle', container);
|
|
16326
16356
|
link.href = '#';
|
|
16327
16357
|
link.title = 'Layers';
|
|
16358
|
+
link.setAttribute('role', 'button');
|
|
16328
16359
|
|
|
16329
|
-
|
|
16330
|
-
|
|
16331
|
-
on(link, 'click', this.expand, this);
|
|
16332
|
-
} else {
|
|
16333
|
-
on(link, 'focus', this.expand, this);
|
|
16334
|
-
}
|
|
16360
|
+
on(link, 'click', preventDefault); // prevent link function
|
|
16361
|
+
on(link, 'focus', this.expand, this);
|
|
16335
16362
|
|
|
16336
16363
|
if (!collapsed) {
|
|
16337
16364
|
this.expand();
|
|
@@ -16431,7 +16458,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
16431
16458
|
}
|
|
16432
16459
|
},
|
|
16433
16460
|
|
|
16434
|
-
// IE7 bugs out if you create a radio dynamically, so you have to do it this hacky way (see
|
|
16461
|
+
// IE7 bugs out if you create a radio dynamically, so you have to do it this hacky way (see https://stackoverflow.com/a/119079)
|
|
16435
16462
|
_createRadioElement: function (name, checked) {
|
|
16436
16463
|
|
|
16437
16464
|
var radioHtml = '<input type="radio" class="leaflet-control-layers-selector" name="' +
|
|
@@ -16467,7 +16494,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
16467
16494
|
|
|
16468
16495
|
// Helps from preventing layer control flicker when checkboxes are disabled
|
|
16469
16496
|
// https://github.com/Leaflet/Leaflet/issues/2771
|
|
16470
|
-
var holder = document.createElement('
|
|
16497
|
+
var holder = document.createElement('span');
|
|
16471
16498
|
|
|
16472
16499
|
label.appendChild(holder);
|
|
16473
16500
|
holder.appendChild(input);
|
|
@@ -16536,16 +16563,6 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
16536
16563
|
this.expand();
|
|
16537
16564
|
}
|
|
16538
16565
|
return this;
|
|
16539
|
-
},
|
|
16540
|
-
|
|
16541
|
-
_expand: function () {
|
|
16542
|
-
// Backward compatibility, remove me in 1.1.
|
|
16543
|
-
return this.expand();
|
|
16544
|
-
},
|
|
16545
|
-
|
|
16546
|
-
_collapse: function () {
|
|
16547
|
-
// Backward compatibility, remove me in 1.1.
|
|
16548
|
-
return this.collapse();
|
|
16549
16566
|
}
|
|
16550
16567
|
|
|
16551
16568
|
});
|
|
@@ -16571,17 +16588,17 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
16571
16588
|
options: {
|
|
16572
16589
|
position: 'topleft',
|
|
16573
16590
|
|
|
16574
|
-
// @option zoomInText: String = '
|
|
16591
|
+
// @option zoomInText: String = '<span aria-hidden="true">+</span>'
|
|
16575
16592
|
// The text set on the 'zoom in' button.
|
|
16576
|
-
zoomInText: '
|
|
16593
|
+
zoomInText: '<span aria-hidden="true">+</span>',
|
|
16577
16594
|
|
|
16578
16595
|
// @option zoomInTitle: String = 'Zoom in'
|
|
16579
16596
|
// The title set on the 'zoom in' button.
|
|
16580
16597
|
zoomInTitle: 'Zoom in',
|
|
16581
16598
|
|
|
16582
|
-
// @option zoomOutText: String = '
|
|
16599
|
+
// @option zoomOutText: String = '<span aria-hidden="true">−</span>'
|
|
16583
16600
|
// The text set on the 'zoom out' button.
|
|
16584
|
-
zoomOutText: '
|
|
16601
|
+
zoomOutText: '<span aria-hidden="true">−</span>',
|
|
16585
16602
|
|
|
16586
16603
|
// @option zoomOutTitle: String = 'Zoom out'
|
|
16587
16604
|
// The title set on the 'zoom out' button.
|
|
@@ -16658,12 +16675,16 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
16658
16675
|
|
|
16659
16676
|
removeClass(this._zoomInButton, className);
|
|
16660
16677
|
removeClass(this._zoomOutButton, className);
|
|
16678
|
+
this._zoomInButton.setAttribute('aria-disabled', 'false');
|
|
16679
|
+
this._zoomOutButton.setAttribute('aria-disabled', 'false');
|
|
16661
16680
|
|
|
16662
16681
|
if (this._disabled || map._zoom === map.getMinZoom()) {
|
|
16663
16682
|
addClass(this._zoomOutButton, className);
|
|
16683
|
+
this._zoomOutButton.setAttribute('aria-disabled', 'true');
|
|
16664
16684
|
}
|
|
16665
16685
|
if (this._disabled || map._zoom === map.getMaxZoom()) {
|
|
16666
16686
|
addClass(this._zoomInButton, className);
|
|
16687
|
+
this._zoomInButton.setAttribute('aria-disabled', 'true');
|
|
16667
16688
|
}
|
|
16668
16689
|
}
|
|
16669
16690
|
});
|
|
@@ -16823,6 +16844,9 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
16823
16844
|
return new Scale(options);
|
|
16824
16845
|
};
|
|
16825
16846
|
|
|
16847
|
+
var ukrainianFlag = '<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>';
|
|
16848
|
+
|
|
16849
|
+
|
|
16826
16850
|
/*
|
|
16827
16851
|
* @class Control.Attribution
|
|
16828
16852
|
* @aka L.Control.Attribution
|
|
@@ -16837,9 +16861,9 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
16837
16861
|
options: {
|
|
16838
16862
|
position: 'bottomright',
|
|
16839
16863
|
|
|
16840
|
-
// @option prefix: String = 'Leaflet'
|
|
16864
|
+
// @option prefix: String|false = 'Leaflet'
|
|
16841
16865
|
// The HTML text shown before the attributions. Pass `false` to disable.
|
|
16842
|
-
prefix: '<a href="https://leafletjs.com" title="A
|
|
16866
|
+
prefix: '<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">' + (Browser.inlineSvg ? ukrainianFlag + ' ' : '') + 'Leaflet</a>'
|
|
16843
16867
|
},
|
|
16844
16868
|
|
|
16845
16869
|
initialize: function (options) {
|
|
@@ -16862,11 +16886,26 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
16862
16886
|
|
|
16863
16887
|
this._update();
|
|
16864
16888
|
|
|
16889
|
+
map.on('layeradd', this._addAttribution, this);
|
|
16890
|
+
|
|
16865
16891
|
return this._container;
|
|
16866
16892
|
},
|
|
16867
16893
|
|
|
16868
|
-
|
|
16869
|
-
|
|
16894
|
+
onRemove: function (map) {
|
|
16895
|
+
map.off('layeradd', this._addAttribution, this);
|
|
16896
|
+
},
|
|
16897
|
+
|
|
16898
|
+
_addAttribution: function (ev) {
|
|
16899
|
+
if (ev.layer.getAttribution) {
|
|
16900
|
+
this.addAttribution(ev.layer.getAttribution());
|
|
16901
|
+
ev.layer.once('remove', function () {
|
|
16902
|
+
this.removeAttribution(ev.layer.getAttribution());
|
|
16903
|
+
}, this);
|
|
16904
|
+
}
|
|
16905
|
+
},
|
|
16906
|
+
|
|
16907
|
+
// @method setPrefix(prefix: String|false): this
|
|
16908
|
+
// The HTML text shown before the attributions. Pass `false` to disable.
|
|
16870
16909
|
setPrefix: function (prefix) {
|
|
16871
16910
|
this.options.prefix = prefix;
|
|
16872
16911
|
this._update();
|
|
@@ -16921,7 +16960,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
16921
16960
|
prefixAndAttribs.push(attribs.join(', '));
|
|
16922
16961
|
}
|
|
16923
16962
|
|
|
16924
|
-
this._container.innerHTML = prefixAndAttribs.join('
|
|
16963
|
+
this._container.innerHTML = prefixAndAttribs.join(' <span aria-hidden="true">|</span> ');
|
|
16925
16964
|
}
|
|
16926
16965
|
});
|
|
16927
16966
|
|
|
@@ -17030,20 +17069,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
17030
17069
|
* ```
|
|
17031
17070
|
*/
|
|
17032
17071
|
|
|
17033
|
-
var START = touch ? 'touchstart mousedown' : 'mousedown';
|
|
17034
|
-
var END = {
|
|
17035
|
-
mousedown: 'mouseup',
|
|
17036
|
-
touchstart: 'touchend',
|
|
17037
|
-
pointerdown: 'touchend',
|
|
17038
|
-
MSPointerDown: 'touchend'
|
|
17039
|
-
};
|
|
17040
|
-
var MOVE = {
|
|
17041
|
-
mousedown: 'mousemove',
|
|
17042
|
-
touchstart: 'touchmove',
|
|
17043
|
-
pointerdown: 'touchmove',
|
|
17044
|
-
MSPointerDown: 'touchmove'
|
|
17045
|
-
};
|
|
17046
|
-
|
|
17072
|
+
var START = Browser.touch ? 'touchstart mousedown' : 'mousedown';
|
|
17047
17073
|
|
|
17048
17074
|
var Draggable = Evented.extend({
|
|
17049
17075
|
|
|
@@ -17058,12 +17084,12 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
17058
17084
|
|
|
17059
17085
|
// @constructor L.Draggable(el: HTMLElement, dragHandle?: HTMLElement, preventOutline?: Boolean, options?: Draggable options)
|
|
17060
17086
|
// Creates a `Draggable` object for moving `el` when you start dragging the `dragHandle` element (equals `el` itself by default).
|
|
17061
|
-
initialize: function (element, dragStartTarget, preventOutline
|
|
17087
|
+
initialize: function (element, dragStartTarget, preventOutline, options) {
|
|
17062
17088
|
setOptions(this, options);
|
|
17063
17089
|
|
|
17064
17090
|
this._element = element;
|
|
17065
17091
|
this._dragStartTarget = dragStartTarget || element;
|
|
17066
|
-
this._preventOutline = preventOutline
|
|
17092
|
+
this._preventOutline = preventOutline;
|
|
17067
17093
|
},
|
|
17068
17094
|
|
|
17069
17095
|
// @method enable()
|
|
@@ -17084,7 +17110,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
17084
17110
|
// If we're currently dragging this draggable,
|
|
17085
17111
|
// disabling it counts as first ending the drag.
|
|
17086
17112
|
if (Draggable._dragging === this) {
|
|
17087
|
-
this.finishDrag();
|
|
17113
|
+
this.finishDrag(true);
|
|
17088
17114
|
}
|
|
17089
17115
|
|
|
17090
17116
|
off(this._dragStartTarget, START, this._onDown, this);
|
|
@@ -17094,17 +17120,22 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
17094
17120
|
},
|
|
17095
17121
|
|
|
17096
17122
|
_onDown: function (e) {
|
|
17097
|
-
// Ignore
|
|
17098
|
-
// mouse explicitly; otherwise we risk getting duplicates of
|
|
17099
|
-
// touch events, see #4315.
|
|
17100
|
-
// Also ignore the event if disabled; this happens in IE11
|
|
17123
|
+
// Ignore the event if disabled; this happens in IE11
|
|
17101
17124
|
// under some circumstances, see #3666.
|
|
17102
|
-
if (
|
|
17125
|
+
if (!this._enabled) { return; }
|
|
17103
17126
|
|
|
17104
17127
|
this._moved = false;
|
|
17105
17128
|
|
|
17106
17129
|
if (hasClass(this._element, 'leaflet-zoom-anim')) { return; }
|
|
17107
17130
|
|
|
17131
|
+
if (e.touches && e.touches.length !== 1) {
|
|
17132
|
+
// Finish dragging to avoid conflict with touchZoom
|
|
17133
|
+
if (Draggable._dragging === this) {
|
|
17134
|
+
this.finishDrag();
|
|
17135
|
+
}
|
|
17136
|
+
return;
|
|
17137
|
+
}
|
|
17138
|
+
|
|
17108
17139
|
if (Draggable._dragging || e.shiftKey || ((e.which !== 1) && (e.button !== 1) && !e.touches)) { return; }
|
|
17109
17140
|
Draggable._dragging = this; // Prevent dragging multiple objects at once.
|
|
17110
17141
|
|
|
@@ -17125,21 +17156,20 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
17125
17156
|
sizedParent = getSizedParentNode(this._element);
|
|
17126
17157
|
|
|
17127
17158
|
this._startPoint = new Point(first.clientX, first.clientY);
|
|
17159
|
+
this._startPos = getPosition(this._element);
|
|
17128
17160
|
|
|
17129
17161
|
// Cache the scale, so that we can continuously compensate for it during drag (_onMove).
|
|
17130
17162
|
this._parentScale = getScale(sizedParent);
|
|
17131
17163
|
|
|
17132
|
-
|
|
17133
|
-
on(document,
|
|
17164
|
+
var mouseevent = e.type === 'mousedown';
|
|
17165
|
+
on(document, mouseevent ? 'mousemove' : 'touchmove', this._onMove, this);
|
|
17166
|
+
on(document, mouseevent ? 'mouseup' : 'touchend touchcancel', this._onUp, this);
|
|
17134
17167
|
},
|
|
17135
17168
|
|
|
17136
17169
|
_onMove: function (e) {
|
|
17137
|
-
// Ignore
|
|
17138
|
-
// mouse explicitly; otherwise we risk getting duplicates of
|
|
17139
|
-
// touch events, see #4315.
|
|
17140
|
-
// Also ignore the event if disabled; this happens in IE11
|
|
17170
|
+
// Ignore the event if disabled; this happens in IE11
|
|
17141
17171
|
// under some circumstances, see #3666.
|
|
17142
|
-
if (
|
|
17172
|
+
if (!this._enabled) { return; }
|
|
17143
17173
|
|
|
17144
17174
|
if (e.touches && e.touches.length > 1) {
|
|
17145
17175
|
this._moved = true;
|
|
@@ -17166,7 +17196,6 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
17166
17196
|
this.fire('dragstart');
|
|
17167
17197
|
|
|
17168
17198
|
this._moved = true;
|
|
17169
|
-
this._startPos = getPosition(this._element).subtract(offset);
|
|
17170
17199
|
|
|
17171
17200
|
addClass(document.body, 'leaflet-dragging');
|
|
17172
17201
|
|
|
@@ -17182,9 +17211,8 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
17182
17211
|
this._newPos = this._startPos.add(offset);
|
|
17183
17212
|
this._moving = true;
|
|
17184
17213
|
|
|
17185
|
-
cancelAnimFrame(this._animRequest);
|
|
17186
17214
|
this._lastEvent = e;
|
|
17187
|
-
this.
|
|
17215
|
+
this._updatePosition();
|
|
17188
17216
|
},
|
|
17189
17217
|
|
|
17190
17218
|
_updatePosition: function () {
|
|
@@ -17201,17 +17229,14 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
17201
17229
|
this.fire('drag', e);
|
|
17202
17230
|
},
|
|
17203
17231
|
|
|
17204
|
-
_onUp: function (
|
|
17205
|
-
// Ignore
|
|
17206
|
-
// mouse explicitly; otherwise we risk getting duplicates of
|
|
17207
|
-
// touch events, see #4315.
|
|
17208
|
-
// Also ignore the event if disabled; this happens in IE11
|
|
17232
|
+
_onUp: function () {
|
|
17233
|
+
// Ignore the event if disabled; this happens in IE11
|
|
17209
17234
|
// under some circumstances, see #3666.
|
|
17210
|
-
if (
|
|
17235
|
+
if (!this._enabled) { return; }
|
|
17211
17236
|
this.finishDrag();
|
|
17212
17237
|
},
|
|
17213
17238
|
|
|
17214
|
-
finishDrag: function () {
|
|
17239
|
+
finishDrag: function (noInertia) {
|
|
17215
17240
|
removeClass(document.body, 'leaflet-dragging');
|
|
17216
17241
|
|
|
17217
17242
|
if (this._lastTarget) {
|
|
@@ -17219,21 +17244,18 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
17219
17244
|
this._lastTarget = null;
|
|
17220
17245
|
}
|
|
17221
17246
|
|
|
17222
|
-
|
|
17223
|
-
|
|
17224
|
-
off(document, END[i], this._onUp, this);
|
|
17225
|
-
}
|
|
17247
|
+
off(document, 'mousemove touchmove', this._onMove, this);
|
|
17248
|
+
off(document, 'mouseup touchend touchcancel', this._onUp, this);
|
|
17226
17249
|
|
|
17227
17250
|
enableImageDrag();
|
|
17228
17251
|
enableTextSelection();
|
|
17229
17252
|
|
|
17230
17253
|
if (this._moved && this._moving) {
|
|
17231
|
-
// ensure drag is not fired after dragend
|
|
17232
|
-
cancelAnimFrame(this._animRequest);
|
|
17233
17254
|
|
|
17234
17255
|
// @event dragend: DragEndEvent
|
|
17235
17256
|
// Fired when the drag ends.
|
|
17236
17257
|
this.fire('dragend', {
|
|
17258
|
+
noInertia: noInertia,
|
|
17237
17259
|
distance: this._newPos.distanceTo(this._startPos)
|
|
17238
17260
|
});
|
|
17239
17261
|
}
|
|
@@ -17256,11 +17278,11 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
17256
17278
|
// @function simplify(points: Point[], tolerance: Number): Point[]
|
|
17257
17279
|
// Dramatically reduces the number of points in a polyline while retaining
|
|
17258
17280
|
// its shape and returns a new array of simplified points, using the
|
|
17259
|
-
// [Douglas-Peucker algorithm](
|
|
17281
|
+
// [Ramer-Douglas-Peucker algorithm](https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm).
|
|
17260
17282
|
// Used for a huge performance boost when processing/displaying Leaflet polylines for
|
|
17261
17283
|
// each zoom level and also reducing visual noise. tolerance affects the amount of
|
|
17262
17284
|
// simplification (lesser value means higher quality but slower and with more points).
|
|
17263
|
-
// Also released as a separated micro-library [Simplify.js](
|
|
17285
|
+
// Also released as a separated micro-library [Simplify.js](https://mourner.github.io/simplify-js/).
|
|
17264
17286
|
function simplify(points, tolerance) {
|
|
17265
17287
|
if (!tolerance || !points.length) {
|
|
17266
17288
|
return points.slice();
|
|
@@ -17289,7 +17311,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
17289
17311
|
return _sqClosestPointOnSegment(p, p1, p2);
|
|
17290
17312
|
}
|
|
17291
17313
|
|
|
17292
|
-
// Douglas-Peucker simplification, see
|
|
17314
|
+
// Ramer-Douglas-Peucker simplification, see https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm
|
|
17293
17315
|
function _simplifyDP(points, sqTolerance) {
|
|
17294
17316
|
|
|
17295
17317
|
var len = points.length,
|
|
@@ -17483,7 +17505,8 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
17483
17505
|
return isFlat(latlngs);
|
|
17484
17506
|
}
|
|
17485
17507
|
|
|
17486
|
-
var LineUtil =
|
|
17508
|
+
var LineUtil = {
|
|
17509
|
+
__proto__: null,
|
|
17487
17510
|
simplify: simplify,
|
|
17488
17511
|
pointToSegmentDistance: pointToSegmentDistance,
|
|
17489
17512
|
closestPointOnSegment: closestPointOnSegment,
|
|
@@ -17493,7 +17516,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
17493
17516
|
_sqClosestPointOnSegment: _sqClosestPointOnSegment,
|
|
17494
17517
|
isFlat: isFlat,
|
|
17495
17518
|
_flat: _flat
|
|
17496
|
-
}
|
|
17519
|
+
};
|
|
17497
17520
|
|
|
17498
17521
|
/*
|
|
17499
17522
|
* @namespace PolyUtil
|
|
@@ -17549,9 +17572,10 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
17549
17572
|
return points;
|
|
17550
17573
|
}
|
|
17551
17574
|
|
|
17552
|
-
var PolyUtil =
|
|
17575
|
+
var PolyUtil = {
|
|
17576
|
+
__proto__: null,
|
|
17553
17577
|
clipPolygon: clipPolygon
|
|
17554
|
-
}
|
|
17578
|
+
};
|
|
17555
17579
|
|
|
17556
17580
|
/*
|
|
17557
17581
|
* @namespace Projection
|
|
@@ -17628,7 +17652,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
17628
17652
|
* @class Projection
|
|
17629
17653
|
|
|
17630
17654
|
* An object with methods for projecting geographical coordinates of the world onto
|
|
17631
|
-
* a flat surface (and back). See [Map projection](
|
|
17655
|
+
* a flat surface (and back). See [Map projection](https://en.wikipedia.org/wiki/Map_projection).
|
|
17632
17656
|
|
|
17633
17657
|
* @property bounds: Bounds
|
|
17634
17658
|
* The bounds (specified in CRS units) where the projection is valid
|
|
@@ -17647,11 +17671,12 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
17647
17671
|
|
|
17648
17672
|
*/
|
|
17649
17673
|
|
|
17650
|
-
var index =
|
|
17674
|
+
var index = {
|
|
17675
|
+
__proto__: null,
|
|
17651
17676
|
LonLat: LonLat,
|
|
17652
17677
|
Mercator: Mercator,
|
|
17653
17678
|
SphericalMercator: SphericalMercator
|
|
17654
|
-
}
|
|
17679
|
+
};
|
|
17655
17680
|
|
|
17656
17681
|
/*
|
|
17657
17682
|
* @namespace CRS
|
|
@@ -17838,10 +17863,6 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
17838
17863
|
|
|
17839
17864
|
this.onAdd(map);
|
|
17840
17865
|
|
|
17841
|
-
if (this.getAttribution && map.attributionControl) {
|
|
17842
|
-
map.attributionControl.addAttribution(this.getAttribution());
|
|
17843
|
-
}
|
|
17844
|
-
|
|
17845
17866
|
this.fire('add');
|
|
17846
17867
|
map.fire('layeradd', {layer: this});
|
|
17847
17868
|
}
|
|
@@ -17914,10 +17935,6 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
17914
17935
|
layer.onRemove(this);
|
|
17915
17936
|
}
|
|
17916
17937
|
|
|
17917
|
-
if (layer.getAttribution && this.attributionControl) {
|
|
17918
|
-
this.attributionControl.removeAttribution(layer.getAttribution());
|
|
17919
|
-
}
|
|
17920
|
-
|
|
17921
17938
|
delete this._layers[id];
|
|
17922
17939
|
|
|
17923
17940
|
if (this._loaded) {
|
|
@@ -17933,7 +17950,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
17933
17950
|
// @method hasLayer(layer: Layer): Boolean
|
|
17934
17951
|
// Returns `true` if the given layer is currently added to the map
|
|
17935
17952
|
hasLayer: function (layer) {
|
|
17936
|
-
return
|
|
17953
|
+
return stamp(layer) in this._layers;
|
|
17937
17954
|
},
|
|
17938
17955
|
|
|
17939
17956
|
/* @method eachLayer(fn: Function, context?: Object): this
|
|
@@ -17960,7 +17977,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
17960
17977
|
},
|
|
17961
17978
|
|
|
17962
17979
|
_addZoomLimit: function (layer) {
|
|
17963
|
-
if (isNaN(layer.options.maxZoom) || !isNaN(layer.options.minZoom)) {
|
|
17980
|
+
if (!isNaN(layer.options.maxZoom) || !isNaN(layer.options.minZoom)) {
|
|
17964
17981
|
this._zoomBoundLayers[stamp(layer)] = layer;
|
|
17965
17982
|
this._updateZoomLevels();
|
|
17966
17983
|
}
|
|
@@ -18010,7 +18027,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
18010
18027
|
/*
|
|
18011
18028
|
* @class LayerGroup
|
|
18012
18029
|
* @aka L.LayerGroup
|
|
18013
|
-
* @inherits
|
|
18030
|
+
* @inherits Interactive layer
|
|
18014
18031
|
*
|
|
18015
18032
|
* Used to group several layers and handle them as one. If you add it to the map,
|
|
18016
18033
|
* any layers added or removed from the group will be added/removed on the map as
|
|
@@ -18078,7 +18095,6 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
18078
18095
|
// @method hasLayer(id: Number): Boolean
|
|
18079
18096
|
// Returns `true` if the given internal ID is currently added to the group.
|
|
18080
18097
|
hasLayer: function (layer) {
|
|
18081
|
-
if (!layer) { return false; }
|
|
18082
18098
|
var layerId = typeof layer === 'number' ? layer : this.getLayerId(layer);
|
|
18083
18099
|
return layerId in this._layers;
|
|
18084
18100
|
},
|
|
@@ -18328,7 +18344,13 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
18328
18344
|
|
|
18329
18345
|
options: {
|
|
18330
18346
|
popupAnchor: [0, 0],
|
|
18331
|
-
tooltipAnchor: [0, 0]
|
|
18347
|
+
tooltipAnchor: [0, 0],
|
|
18348
|
+
|
|
18349
|
+
// @option crossOrigin: Boolean|String = false
|
|
18350
|
+
// Whether the crossOrigin attribute will be added to the tiles.
|
|
18351
|
+
// If a String is provided, all tiles will have their crossOrigin attribute set to the String provided. This is needed if you want to access tile pixel data.
|
|
18352
|
+
// Refer to [CORS Settings](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) for valid String values.
|
|
18353
|
+
crossOrigin: false
|
|
18332
18354
|
},
|
|
18333
18355
|
|
|
18334
18356
|
initialize: function (options) {
|
|
@@ -18361,6 +18383,10 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
18361
18383
|
var img = this._createImg(src, oldIcon && oldIcon.tagName === 'IMG' ? oldIcon : null);
|
|
18362
18384
|
this._setIconStyles(img, name);
|
|
18363
18385
|
|
|
18386
|
+
if (this.options.crossOrigin || this.options.crossOrigin === '') {
|
|
18387
|
+
img.crossOrigin = this.options.crossOrigin === true ? '' : this.options.crossOrigin;
|
|
18388
|
+
}
|
|
18389
|
+
|
|
18364
18390
|
return img;
|
|
18365
18391
|
},
|
|
18366
18392
|
|
|
@@ -18396,7 +18422,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
18396
18422
|
},
|
|
18397
18423
|
|
|
18398
18424
|
_getIconUrl: function (name) {
|
|
18399
|
-
return retina && this.options[name + 'RetinaUrl'] || this.options[name + 'Url'];
|
|
18425
|
+
return Browser.retina && this.options[name + 'RetinaUrl'] || this.options[name + 'Url'];
|
|
18400
18426
|
}
|
|
18401
18427
|
});
|
|
18402
18428
|
|
|
@@ -18437,7 +18463,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
18437
18463
|
},
|
|
18438
18464
|
|
|
18439
18465
|
_getIconUrl: function (name) {
|
|
18440
|
-
if (
|
|
18466
|
+
if (typeof IconDefault.imagePath !== 'string') { // Deprecated, backwards-compatibility only
|
|
18441
18467
|
IconDefault.imagePath = this._detectIconPath();
|
|
18442
18468
|
}
|
|
18443
18469
|
|
|
@@ -18448,20 +18474,26 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
18448
18474
|
return (this.options.imagePath || IconDefault.imagePath) + Icon.prototype._getIconUrl.call(this, name);
|
|
18449
18475
|
},
|
|
18450
18476
|
|
|
18477
|
+
_stripUrl: function (path) { // separate function to use in tests
|
|
18478
|
+
var strip = function (str, re, idx) {
|
|
18479
|
+
var match = re.exec(str);
|
|
18480
|
+
return match && match[idx];
|
|
18481
|
+
};
|
|
18482
|
+
path = strip(path, /^url\((['"])?(.+)\1\)$/, 2);
|
|
18483
|
+
return path && strip(path, /^(.*)marker-icon\.png$/, 1);
|
|
18484
|
+
},
|
|
18485
|
+
|
|
18451
18486
|
_detectIconPath: function () {
|
|
18452
18487
|
var el = create$1('div', 'leaflet-default-icon-path', document.body);
|
|
18453
18488
|
var path = getStyle(el, 'background-image') ||
|
|
18454
18489
|
getStyle(el, 'backgroundImage'); // IE8
|
|
18455
18490
|
|
|
18456
18491
|
document.body.removeChild(el);
|
|
18457
|
-
|
|
18458
|
-
if (path
|
|
18459
|
-
|
|
18460
|
-
|
|
18461
|
-
|
|
18462
|
-
}
|
|
18463
|
-
|
|
18464
|
-
return path;
|
|
18492
|
+
path = this._stripUrl(path);
|
|
18493
|
+
if (path) { return path; }
|
|
18494
|
+
var link = document.querySelector('link[href$="leaflet.css"]');
|
|
18495
|
+
if (!link) { return ''; }
|
|
18496
|
+
return link.href.substring(0, link.href.length - 'leaflet.css'.length - 1);
|
|
18465
18497
|
}
|
|
18466
18498
|
});
|
|
18467
18499
|
|
|
@@ -18653,11 +18685,13 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
18653
18685
|
|
|
18654
18686
|
// @option title: String = ''
|
|
18655
18687
|
// Text for the browser tooltip that appear on marker hover (no tooltip by default).
|
|
18688
|
+
// [Useful for accessibility](https://leafletjs.com/examples/accessibility/#markers-must-be-labelled).
|
|
18656
18689
|
title: '',
|
|
18657
18690
|
|
|
18658
|
-
// @option alt: String = ''
|
|
18659
|
-
// Text for the `alt` attribute of the icon image
|
|
18660
|
-
|
|
18691
|
+
// @option alt: String = 'Marker'
|
|
18692
|
+
// Text for the `alt` attribute of the icon image.
|
|
18693
|
+
// [Useful for accessibility](https://leafletjs.com/examples/accessibility/#markers-must-be-labelled).
|
|
18694
|
+
alt: 'Marker',
|
|
18661
18695
|
|
|
18662
18696
|
// @option zIndexOffset: Number = 0
|
|
18663
18697
|
// By default, marker images zIndex is set automatically based on its latitude. Use this option if you want to put the marker on top of all others (or below), specifying a high value like `1000` (or high negative value, respectively).
|
|
@@ -18688,6 +18722,12 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
18688
18722
|
// (unless [`L.DomEvent.stopPropagation`](#domevent-stoppropagation) is used).
|
|
18689
18723
|
bubblingMouseEvents: false,
|
|
18690
18724
|
|
|
18725
|
+
// @option autoPanOnFocus: Boolean = true
|
|
18726
|
+
// When `true`, the map will pan whenever the marker is focused (via
|
|
18727
|
+
// e.g. pressing `tab` on the keyboard) to ensure the marker is
|
|
18728
|
+
// visible within the map's bounds
|
|
18729
|
+
autoPanOnFocus: true,
|
|
18730
|
+
|
|
18691
18731
|
// @section Draggable marker options
|
|
18692
18732
|
// @option draggable: Boolean = false
|
|
18693
18733
|
// Whether the marker is draggable with mouse/touch or not.
|
|
@@ -18840,6 +18880,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
18840
18880
|
|
|
18841
18881
|
if (options.keyboard) {
|
|
18842
18882
|
icon.tabIndex = '0';
|
|
18883
|
+
icon.setAttribute('role', 'button');
|
|
18843
18884
|
}
|
|
18844
18885
|
|
|
18845
18886
|
this._icon = icon;
|
|
@@ -18851,6 +18892,10 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
18851
18892
|
});
|
|
18852
18893
|
}
|
|
18853
18894
|
|
|
18895
|
+
if (this.options.autoPanOnFocus) {
|
|
18896
|
+
on(icon, 'focus', this._panOnFocus, this);
|
|
18897
|
+
}
|
|
18898
|
+
|
|
18854
18899
|
var newShadow = options.icon.createShadow(this._shadow),
|
|
18855
18900
|
addShadow = false;
|
|
18856
18901
|
|
|
@@ -18888,6 +18933,10 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
18888
18933
|
});
|
|
18889
18934
|
}
|
|
18890
18935
|
|
|
18936
|
+
if (this.options.autoPanOnFocus) {
|
|
18937
|
+
off(this._icon, 'focus', this._panOnFocus, this);
|
|
18938
|
+
}
|
|
18939
|
+
|
|
18891
18940
|
remove(this._icon);
|
|
18892
18941
|
this.removeInteractiveTarget(this._icon);
|
|
18893
18942
|
|
|
@@ -18982,8 +19031,22 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
18982
19031
|
this._updateZIndex(0);
|
|
18983
19032
|
},
|
|
18984
19033
|
|
|
18985
|
-
|
|
18986
|
-
|
|
19034
|
+
_panOnFocus: function () {
|
|
19035
|
+
var map = this._map;
|
|
19036
|
+
if (!map) { return; }
|
|
19037
|
+
|
|
19038
|
+
var iconOpts = this.options.icon.options;
|
|
19039
|
+
var size = iconOpts.iconSize ? toPoint(iconOpts.iconSize) : toPoint(0, 0);
|
|
19040
|
+
var anchor = iconOpts.iconAnchor ? toPoint(iconOpts.iconAnchor) : toPoint(0, 0);
|
|
19041
|
+
|
|
19042
|
+
map.panInside(this._latlng, {
|
|
19043
|
+
paddingTopLeft: anchor,
|
|
19044
|
+
paddingBottomRight: size.subtract(anchor)
|
|
19045
|
+
});
|
|
19046
|
+
},
|
|
19047
|
+
|
|
19048
|
+
_getPopupAnchor: function () {
|
|
19049
|
+
return this.options.icon.options.popupAnchor;
|
|
18987
19050
|
},
|
|
18988
19051
|
|
|
18989
19052
|
_getTooltipAnchor: function () {
|
|
@@ -19141,7 +19204,8 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
19141
19204
|
|
|
19142
19205
|
_clickTolerance: function () {
|
|
19143
19206
|
// used when doing hit detection for Canvas layers
|
|
19144
|
-
return (this.options.stroke ? this.options.weight / 2 : 0) +
|
|
19207
|
+
return (this.options.stroke ? this.options.weight / 2 : 0) +
|
|
19208
|
+
(this._renderer.options.tolerance || 0);
|
|
19145
19209
|
}
|
|
19146
19210
|
});
|
|
19147
19211
|
|
|
@@ -19463,7 +19527,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
19463
19527
|
},
|
|
19464
19528
|
|
|
19465
19529
|
// @method getCenter(): LatLng
|
|
19466
|
-
// Returns the center ([centroid](
|
|
19530
|
+
// Returns the center ([centroid](https://en.wikipedia.org/wiki/Centroid)) of the polyline.
|
|
19467
19531
|
getCenter: function () {
|
|
19468
19532
|
// throws error when not yet added to map as this center calculation requires projected coordinates
|
|
19469
19533
|
if (!this._map) {
|
|
@@ -19561,6 +19625,11 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
19561
19625
|
_updateBounds: function () {
|
|
19562
19626
|
var w = this._clickTolerance(),
|
|
19563
19627
|
p = new Point(w, w);
|
|
19628
|
+
|
|
19629
|
+
if (!this._rawPxBounds) {
|
|
19630
|
+
return;
|
|
19631
|
+
}
|
|
19632
|
+
|
|
19564
19633
|
this._pxBounds = new Bounds([
|
|
19565
19634
|
this._rawPxBounds.min.subtract(p),
|
|
19566
19635
|
this._rawPxBounds.max.add(p)
|
|
@@ -20102,18 +20171,20 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
20102
20171
|
return latlngs;
|
|
20103
20172
|
}
|
|
20104
20173
|
|
|
20105
|
-
// @function latLngToCoords(latlng: LatLng, precision?: Number): Array
|
|
20174
|
+
// @function latLngToCoords(latlng: LatLng, precision?: Number|false): Array
|
|
20106
20175
|
// Reverse of [`coordsToLatLng`](#geojson-coordstolatlng)
|
|
20176
|
+
// Coordinates values are rounded with [`formatNum`](#util-formatnum) function.
|
|
20107
20177
|
function latLngToCoords(latlng, precision) {
|
|
20108
|
-
|
|
20178
|
+
latlng = toLatLng(latlng);
|
|
20109
20179
|
return latlng.alt !== undefined ?
|
|
20110
20180
|
[formatNum(latlng.lng, precision), formatNum(latlng.lat, precision), formatNum(latlng.alt, precision)] :
|
|
20111
20181
|
[formatNum(latlng.lng, precision), formatNum(latlng.lat, precision)];
|
|
20112
20182
|
}
|
|
20113
20183
|
|
|
20114
|
-
// @function latLngsToCoords(latlngs: Array, levelsDeep?: Number, closed?: Boolean): Array
|
|
20184
|
+
// @function latLngsToCoords(latlngs: Array, levelsDeep?: Number, closed?: Boolean, precision?: Number|false): Array
|
|
20115
20185
|
// Reverse of [`coordsToLatLngs`](#geojson-coordstolatlngs)
|
|
20116
20186
|
// `closed` determines whether the first point should be appended to the end of the array to close the feature, only used when `levelsDeep` is 0. False by default.
|
|
20187
|
+
// Coordinates values are rounded with [`formatNum`](#util-formatnum) function.
|
|
20117
20188
|
function latLngsToCoords(latlngs, levelsDeep, closed, precision) {
|
|
20118
20189
|
var coords = [];
|
|
20119
20190
|
|
|
@@ -20161,26 +20232,23 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
20161
20232
|
|
|
20162
20233
|
// @namespace Marker
|
|
20163
20234
|
// @section Other methods
|
|
20164
|
-
// @method toGeoJSON(precision?: Number): Object
|
|
20165
|
-
//
|
|
20166
|
-
//
|
|
20167
|
-
// Returns a [`GeoJSON`](http://en.wikipedia.org/wiki/GeoJSON) representation of the marker (as a GeoJSON `Point` Feature).
|
|
20235
|
+
// @method toGeoJSON(precision?: Number|false): Object
|
|
20236
|
+
// Coordinates values are rounded with [`formatNum`](#util-formatnum) function with given `precision`.
|
|
20237
|
+
// Returns a [`GeoJSON`](https://en.wikipedia.org/wiki/GeoJSON) representation of the marker (as a GeoJSON `Point` Feature).
|
|
20168
20238
|
Marker.include(PointToGeoJSON);
|
|
20169
20239
|
|
|
20170
20240
|
// @namespace CircleMarker
|
|
20171
|
-
// @method toGeoJSON(precision?: Number): Object
|
|
20172
|
-
//
|
|
20173
|
-
//
|
|
20174
|
-
// Returns a [`GeoJSON`](http://en.wikipedia.org/wiki/GeoJSON) representation of the circle marker (as a GeoJSON `Point` Feature).
|
|
20241
|
+
// @method toGeoJSON(precision?: Number|false): Object
|
|
20242
|
+
// Coordinates values are rounded with [`formatNum`](#util-formatnum) function with given `precision`.
|
|
20243
|
+
// Returns a [`GeoJSON`](https://en.wikipedia.org/wiki/GeoJSON) representation of the circle marker (as a GeoJSON `Point` Feature).
|
|
20175
20244
|
Circle.include(PointToGeoJSON);
|
|
20176
20245
|
CircleMarker.include(PointToGeoJSON);
|
|
20177
20246
|
|
|
20178
20247
|
|
|
20179
20248
|
// @namespace Polyline
|
|
20180
|
-
// @method toGeoJSON(precision?: Number): Object
|
|
20181
|
-
//
|
|
20182
|
-
//
|
|
20183
|
-
// Returns a [`GeoJSON`](http://en.wikipedia.org/wiki/GeoJSON) representation of the polyline (as a GeoJSON `LineString` or `MultiLineString` Feature).
|
|
20249
|
+
// @method toGeoJSON(precision?: Number|false): Object
|
|
20250
|
+
// Coordinates values are rounded with [`formatNum`](#util-formatnum) function with given `precision`.
|
|
20251
|
+
// Returns a [`GeoJSON`](https://en.wikipedia.org/wiki/GeoJSON) representation of the polyline (as a GeoJSON `LineString` or `MultiLineString` Feature).
|
|
20184
20252
|
Polyline.include({
|
|
20185
20253
|
toGeoJSON: function (precision) {
|
|
20186
20254
|
var multi = !isFlat(this._latlngs);
|
|
@@ -20195,10 +20263,9 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
20195
20263
|
});
|
|
20196
20264
|
|
|
20197
20265
|
// @namespace Polygon
|
|
20198
|
-
// @method toGeoJSON(precision?: Number): Object
|
|
20199
|
-
//
|
|
20200
|
-
//
|
|
20201
|
-
// Returns a [`GeoJSON`](http://en.wikipedia.org/wiki/GeoJSON) representation of the polygon (as a GeoJSON `Polygon` or `MultiPolygon` Feature).
|
|
20266
|
+
// @method toGeoJSON(precision?: Number|false): Object
|
|
20267
|
+
// Coordinates values are rounded with [`formatNum`](#util-formatnum) function with given `precision`.
|
|
20268
|
+
// Returns a [`GeoJSON`](https://en.wikipedia.org/wiki/GeoJSON) representation of the polygon (as a GeoJSON `Polygon` or `MultiPolygon` Feature).
|
|
20202
20269
|
Polygon.include({
|
|
20203
20270
|
toGeoJSON: function (precision) {
|
|
20204
20271
|
var holes = !isFlat(this._latlngs),
|
|
@@ -20233,10 +20300,9 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
20233
20300
|
});
|
|
20234
20301
|
},
|
|
20235
20302
|
|
|
20236
|
-
// @method toGeoJSON(precision?: Number): Object
|
|
20237
|
-
//
|
|
20238
|
-
//
|
|
20239
|
-
// Returns a [`GeoJSON`](http://en.wikipedia.org/wiki/GeoJSON) representation of the layer group (as a GeoJSON `FeatureCollection`, `GeometryCollection`, or `MultiPoint`).
|
|
20303
|
+
// @method toGeoJSON(precision?: Number|false): Object
|
|
20304
|
+
// Coordinates values are rounded with [`formatNum`](#util-formatnum) function with given `precision`.
|
|
20305
|
+
// Returns a [`GeoJSON`](https://en.wikipedia.org/wiki/GeoJSON) representation of the layer group (as a GeoJSON `FeatureCollection`, `GeometryCollection`, or `MultiPoint`).
|
|
20240
20306
|
toGeoJSON: function (precision) {
|
|
20241
20307
|
|
|
20242
20308
|
var type = this.feature && this.feature.geometry && this.feature.geometry.type;
|
|
@@ -20301,7 +20367,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
20301
20367
|
* @example
|
|
20302
20368
|
*
|
|
20303
20369
|
* ```js
|
|
20304
|
-
* var imageUrl = '
|
|
20370
|
+
* var imageUrl = 'https://maps.lib.utexas.edu/maps/historical/newark_nj_1922.jpg',
|
|
20305
20371
|
* imageBounds = [[40.712216, -74.22655], [40.773941, -74.12544]];
|
|
20306
20372
|
* L.imageOverlay(imageUrl, imageBounds).addTo(map);
|
|
20307
20373
|
* ```
|
|
@@ -20540,6 +20606,12 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
20540
20606
|
this._url = errorUrl;
|
|
20541
20607
|
this._image.src = errorUrl;
|
|
20542
20608
|
}
|
|
20609
|
+
},
|
|
20610
|
+
|
|
20611
|
+
// @method getCenter(): LatLng
|
|
20612
|
+
// Returns the center of the ImageOverlay.
|
|
20613
|
+
getCenter: function () {
|
|
20614
|
+
return this._bounds.getCenter();
|
|
20543
20615
|
}
|
|
20544
20616
|
});
|
|
20545
20617
|
|
|
@@ -20576,6 +20648,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
20576
20648
|
options: {
|
|
20577
20649
|
// @option autoplay: Boolean = true
|
|
20578
20650
|
// Whether the video starts playing automatically when loaded.
|
|
20651
|
+
// On some browsers autoplay will only work with `muted: true`
|
|
20579
20652
|
autoplay: true,
|
|
20580
20653
|
|
|
20581
20654
|
// @option loop: Boolean = true
|
|
@@ -20584,12 +20657,16 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
20584
20657
|
|
|
20585
20658
|
// @option keepAspectRatio: Boolean = true
|
|
20586
20659
|
// Whether the video will save aspect ratio after the projection.
|
|
20587
|
-
// Relevant for supported browsers.
|
|
20660
|
+
// Relevant for supported browsers. See [browser compatibility](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit)
|
|
20588
20661
|
keepAspectRatio: true,
|
|
20589
20662
|
|
|
20590
20663
|
// @option muted: Boolean = false
|
|
20591
20664
|
// Whether the video starts on mute when loaded.
|
|
20592
|
-
muted: false
|
|
20665
|
+
muted: false,
|
|
20666
|
+
|
|
20667
|
+
// @option playsInline: Boolean = true
|
|
20668
|
+
// Mobile browsers will play the video right where it is instead of open it up in fullscreen mode.
|
|
20669
|
+
playsInline: true
|
|
20593
20670
|
},
|
|
20594
20671
|
|
|
20595
20672
|
_initImage: function () {
|
|
@@ -20626,6 +20703,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
20626
20703
|
vid.autoplay = !!this.options.autoplay;
|
|
20627
20704
|
vid.loop = !!this.options.loop;
|
|
20628
20705
|
vid.muted = !!this.options.muted;
|
|
20706
|
+
vid.playsInline = !!this.options.playsInline;
|
|
20629
20707
|
for (var i = 0; i < this._url.length; i++) {
|
|
20630
20708
|
var source = create$1('source');
|
|
20631
20709
|
source.src = this._url[i];
|
|
@@ -20696,9 +20774,9 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
20696
20774
|
|
|
20697
20775
|
/*
|
|
20698
20776
|
* @class DivOverlay
|
|
20699
|
-
* @inherits
|
|
20777
|
+
* @inherits Interactive layer
|
|
20700
20778
|
* @aka L.DivOverlay
|
|
20701
|
-
* Base model for L.Popup and L.Tooltip. Inherit from it for custom
|
|
20779
|
+
* Base model for L.Popup and L.Tooltip. Inherit from it for custom overlays like plugins.
|
|
20702
20780
|
*/
|
|
20703
20781
|
|
|
20704
20782
|
// @namespace DivOverlay
|
|
@@ -20707,18 +20785,21 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
20707
20785
|
// @section
|
|
20708
20786
|
// @aka DivOverlay options
|
|
20709
20787
|
options: {
|
|
20710
|
-
// @option
|
|
20711
|
-
//
|
|
20712
|
-
|
|
20713
|
-
|
|
20788
|
+
// @option interactive: Boolean = false
|
|
20789
|
+
// If true, the popup/tooltip will listen to the mouse events.
|
|
20790
|
+
interactive: false,
|
|
20791
|
+
|
|
20792
|
+
// @option offset: Point = Point(0, 0)
|
|
20793
|
+
// The offset of the overlay position.
|
|
20794
|
+
offset: [0, 0],
|
|
20714
20795
|
|
|
20715
20796
|
// @option className: String = ''
|
|
20716
|
-
// A custom CSS class name to assign to the
|
|
20797
|
+
// A custom CSS class name to assign to the overlay.
|
|
20717
20798
|
className: '',
|
|
20718
20799
|
|
|
20719
|
-
// @option pane: String =
|
|
20720
|
-
// `Map pane` where the
|
|
20721
|
-
pane:
|
|
20800
|
+
// @option pane: String = undefined
|
|
20801
|
+
// `Map pane` where the overlay will be added.
|
|
20802
|
+
pane: undefined
|
|
20722
20803
|
},
|
|
20723
20804
|
|
|
20724
20805
|
initialize: function (options, source) {
|
|
@@ -20727,6 +20808,49 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
20727
20808
|
this._source = source;
|
|
20728
20809
|
},
|
|
20729
20810
|
|
|
20811
|
+
// @method openOn(map: Map): this
|
|
20812
|
+
// Adds the overlay to the map.
|
|
20813
|
+
// Alternative to `map.openPopup(popup)`/`.openTooltip(tooltip)`.
|
|
20814
|
+
openOn: function (map) {
|
|
20815
|
+
map = arguments.length ? map : this._source._map; // experimental, not the part of public api
|
|
20816
|
+
if (!map.hasLayer(this)) {
|
|
20817
|
+
map.addLayer(this);
|
|
20818
|
+
}
|
|
20819
|
+
return this;
|
|
20820
|
+
},
|
|
20821
|
+
|
|
20822
|
+
// @method close(): this
|
|
20823
|
+
// Closes the overlay.
|
|
20824
|
+
// Alternative to `map.closePopup(popup)`/`.closeTooltip(tooltip)`
|
|
20825
|
+
// and `layer.closePopup()`/`.closeTooltip()`.
|
|
20826
|
+
close: function () {
|
|
20827
|
+
if (this._map) {
|
|
20828
|
+
this._map.removeLayer(this);
|
|
20829
|
+
}
|
|
20830
|
+
return this;
|
|
20831
|
+
},
|
|
20832
|
+
|
|
20833
|
+
// @method toggle(layer?: Layer): this
|
|
20834
|
+
// Opens or closes the overlay bound to layer depending on its current state.
|
|
20835
|
+
// Argument may be omitted only for overlay bound to layer.
|
|
20836
|
+
// Alternative to `layer.togglePopup()`/`.toggleTooltip()`.
|
|
20837
|
+
toggle: function (layer) {
|
|
20838
|
+
if (this._map) {
|
|
20839
|
+
this.close();
|
|
20840
|
+
} else {
|
|
20841
|
+
if (arguments.length) {
|
|
20842
|
+
this._source = layer;
|
|
20843
|
+
} else {
|
|
20844
|
+
layer = this._source;
|
|
20845
|
+
}
|
|
20846
|
+
this._prepareOpen();
|
|
20847
|
+
|
|
20848
|
+
// open the overlay on the map
|
|
20849
|
+
this.openOn(layer._map);
|
|
20850
|
+
}
|
|
20851
|
+
return this;
|
|
20852
|
+
},
|
|
20853
|
+
|
|
20730
20854
|
onAdd: function (map) {
|
|
20731
20855
|
this._zoomAnimated = map._zoomAnimated;
|
|
20732
20856
|
|
|
@@ -20747,6 +20871,11 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
20747
20871
|
}
|
|
20748
20872
|
|
|
20749
20873
|
this.bringToFront();
|
|
20874
|
+
|
|
20875
|
+
if (this.options.interactive) {
|
|
20876
|
+
addClass(this._container, 'leaflet-interactive');
|
|
20877
|
+
this.addInteractiveTarget(this._container);
|
|
20878
|
+
}
|
|
20750
20879
|
},
|
|
20751
20880
|
|
|
20752
20881
|
onRemove: function (map) {
|
|
@@ -20756,17 +20885,22 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
20756
20885
|
} else {
|
|
20757
20886
|
remove(this._container);
|
|
20758
20887
|
}
|
|
20888
|
+
|
|
20889
|
+
if (this.options.interactive) {
|
|
20890
|
+
removeClass(this._container, 'leaflet-interactive');
|
|
20891
|
+
this.removeInteractiveTarget(this._container);
|
|
20892
|
+
}
|
|
20759
20893
|
},
|
|
20760
20894
|
|
|
20761
|
-
// @namespace
|
|
20895
|
+
// @namespace DivOverlay
|
|
20762
20896
|
// @method getLatLng: LatLng
|
|
20763
|
-
// Returns the geographical point of
|
|
20897
|
+
// Returns the geographical point of the overlay.
|
|
20764
20898
|
getLatLng: function () {
|
|
20765
20899
|
return this._latlng;
|
|
20766
20900
|
},
|
|
20767
20901
|
|
|
20768
20902
|
// @method setLatLng(latlng: LatLng): this
|
|
20769
|
-
// Sets the geographical point where the
|
|
20903
|
+
// Sets the geographical point where the overlay will open.
|
|
20770
20904
|
setLatLng: function (latlng) {
|
|
20771
20905
|
this._latlng = toLatLng(latlng);
|
|
20772
20906
|
if (this._map) {
|
|
@@ -20777,13 +20911,14 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
20777
20911
|
},
|
|
20778
20912
|
|
|
20779
20913
|
// @method getContent: String|HTMLElement
|
|
20780
|
-
// Returns the content of the
|
|
20914
|
+
// Returns the content of the overlay.
|
|
20781
20915
|
getContent: function () {
|
|
20782
20916
|
return this._content;
|
|
20783
20917
|
},
|
|
20784
20918
|
|
|
20785
20919
|
// @method setContent(htmlContent: String|HTMLElement|Function): this
|
|
20786
|
-
// Sets the HTML content of the
|
|
20920
|
+
// Sets the HTML content of the overlay. If a function is passed the source layer will be passed to the function.
|
|
20921
|
+
// The function should return a `String` or `HTMLElement` to be used in the overlay.
|
|
20787
20922
|
setContent: function (content) {
|
|
20788
20923
|
this._content = content;
|
|
20789
20924
|
this.update();
|
|
@@ -20791,13 +20926,13 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
20791
20926
|
},
|
|
20792
20927
|
|
|
20793
20928
|
// @method getElement: String|HTMLElement
|
|
20794
|
-
// Returns the HTML container of the
|
|
20929
|
+
// Returns the HTML container of the overlay.
|
|
20795
20930
|
getElement: function () {
|
|
20796
20931
|
return this._container;
|
|
20797
20932
|
},
|
|
20798
20933
|
|
|
20799
20934
|
// @method update: null
|
|
20800
|
-
// Updates the
|
|
20935
|
+
// Updates the overlay content, layout and position. Useful for updating the overlay after something inside changed, e.g. image loaded.
|
|
20801
20936
|
update: function () {
|
|
20802
20937
|
if (!this._map) { return; }
|
|
20803
20938
|
|
|
@@ -20825,13 +20960,13 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
20825
20960
|
},
|
|
20826
20961
|
|
|
20827
20962
|
// @method isOpen: Boolean
|
|
20828
|
-
// Returns `true` when the
|
|
20963
|
+
// Returns `true` when the overlay is visible on the map.
|
|
20829
20964
|
isOpen: function () {
|
|
20830
20965
|
return !!this._map && this._map.hasLayer(this);
|
|
20831
20966
|
},
|
|
20832
20967
|
|
|
20833
20968
|
// @method bringToFront: this
|
|
20834
|
-
// Brings this
|
|
20969
|
+
// Brings this overlay in front of other overlays (in the same map pane).
|
|
20835
20970
|
bringToFront: function () {
|
|
20836
20971
|
if (this._map) {
|
|
20837
20972
|
toFront(this._container);
|
|
@@ -20840,7 +20975,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
20840
20975
|
},
|
|
20841
20976
|
|
|
20842
20977
|
// @method bringToBack: this
|
|
20843
|
-
// Brings this
|
|
20978
|
+
// Brings this overlay to the back of other overlays (in the same map pane).
|
|
20844
20979
|
bringToBack: function () {
|
|
20845
20980
|
if (this._map) {
|
|
20846
20981
|
toBack(this._container);
|
|
@@ -20848,36 +20983,45 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
20848
20983
|
return this;
|
|
20849
20984
|
},
|
|
20850
20985
|
|
|
20851
|
-
|
|
20852
|
-
|
|
20853
|
-
|
|
20854
|
-
|
|
20855
|
-
}
|
|
20986
|
+
// prepare bound overlay to open: update latlng pos / content source (for FeatureGroup)
|
|
20987
|
+
_prepareOpen: function (latlng) {
|
|
20988
|
+
var source = this._source;
|
|
20989
|
+
if (!source._map) { return false; }
|
|
20856
20990
|
|
|
20857
|
-
if (
|
|
20858
|
-
|
|
20859
|
-
|
|
20860
|
-
|
|
20991
|
+
if (source instanceof FeatureGroup) {
|
|
20992
|
+
source = null;
|
|
20993
|
+
var layers = this._source._layers;
|
|
20994
|
+
for (var id in layers) {
|
|
20995
|
+
if (layers[id]._map) {
|
|
20996
|
+
source = layers[id];
|
|
20997
|
+
break;
|
|
20998
|
+
}
|
|
20861
20999
|
}
|
|
21000
|
+
if (!source) { return false; } // Unable to get source layer.
|
|
21001
|
+
|
|
21002
|
+
// set overlay source to this layer
|
|
21003
|
+
this._source = source;
|
|
20862
21004
|
}
|
|
20863
21005
|
|
|
20864
21006
|
if (!latlng) {
|
|
20865
|
-
if (
|
|
20866
|
-
latlng =
|
|
20867
|
-
} else if (
|
|
20868
|
-
latlng =
|
|
21007
|
+
if (source.getCenter) {
|
|
21008
|
+
latlng = source.getCenter();
|
|
21009
|
+
} else if (source.getLatLng) {
|
|
21010
|
+
latlng = source.getLatLng();
|
|
21011
|
+
} else if (source.getBounds) {
|
|
21012
|
+
latlng = source.getBounds().getCenter();
|
|
20869
21013
|
} else {
|
|
20870
21014
|
throw new Error('Unable to get source layer LatLng.');
|
|
20871
21015
|
}
|
|
20872
21016
|
}
|
|
21017
|
+
this.setLatLng(latlng);
|
|
20873
21018
|
|
|
20874
|
-
|
|
20875
|
-
|
|
20876
|
-
|
|
20877
|
-
|
|
20878
|
-
this.update();
|
|
21019
|
+
if (this._map) {
|
|
21020
|
+
// update the overlay (content, layout, etc...)
|
|
21021
|
+
this.update();
|
|
21022
|
+
}
|
|
20879
21023
|
|
|
20880
|
-
return
|
|
21024
|
+
return true;
|
|
20881
21025
|
},
|
|
20882
21026
|
|
|
20883
21027
|
_updateContent: function () {
|
|
@@ -20894,6 +21038,11 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
20894
21038
|
}
|
|
20895
21039
|
node.appendChild(content);
|
|
20896
21040
|
}
|
|
21041
|
+
|
|
21042
|
+
// @namespace DivOverlay
|
|
21043
|
+
// @section DivOverlay events
|
|
21044
|
+
// @event contentupdate: Event
|
|
21045
|
+
// Fired when the content of the overlay is updated
|
|
20897
21046
|
this.fire('contentupdate');
|
|
20898
21047
|
},
|
|
20899
21048
|
|
|
@@ -20913,7 +21062,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
20913
21062
|
var bottom = this._containerBottom = -offset.y,
|
|
20914
21063
|
left = this._containerLeft = -Math.round(this._containerWidth / 2) + offset.x;
|
|
20915
21064
|
|
|
20916
|
-
// bottom position the
|
|
21065
|
+
// bottom position the overlay in case the height of the overlay changes (images loading etc)
|
|
20917
21066
|
this._container.style.bottom = bottom + 'px';
|
|
20918
21067
|
this._container.style.left = left + 'px';
|
|
20919
21068
|
},
|
|
@@ -20922,6 +21071,34 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
20922
21071
|
return [0, 0];
|
|
20923
21072
|
}
|
|
20924
21073
|
|
|
21074
|
+
});
|
|
21075
|
+
|
|
21076
|
+
Map.include({
|
|
21077
|
+
_initOverlay: function (OverlayClass, content, latlng, options) {
|
|
21078
|
+
var overlay = content;
|
|
21079
|
+
if (!(overlay instanceof OverlayClass)) {
|
|
21080
|
+
overlay = new OverlayClass(options).setContent(content);
|
|
21081
|
+
}
|
|
21082
|
+
if (latlng) {
|
|
21083
|
+
overlay.setLatLng(latlng);
|
|
21084
|
+
}
|
|
21085
|
+
return overlay;
|
|
21086
|
+
}
|
|
21087
|
+
});
|
|
21088
|
+
|
|
21089
|
+
|
|
21090
|
+
Layer.include({
|
|
21091
|
+
_initOverlay: function (OverlayClass, old, content, options) {
|
|
21092
|
+
var overlay = content;
|
|
21093
|
+
if (overlay instanceof OverlayClass) {
|
|
21094
|
+
setOptions(overlay, options);
|
|
21095
|
+
overlay._source = this;
|
|
21096
|
+
} else {
|
|
21097
|
+
overlay = (old && !options) ? old : new OverlayClass(options, this);
|
|
21098
|
+
overlay.setContent(content);
|
|
21099
|
+
}
|
|
21100
|
+
return overlay;
|
|
21101
|
+
}
|
|
20925
21102
|
});
|
|
20926
21103
|
|
|
20927
21104
|
/*
|
|
@@ -20957,6 +21134,14 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
20957
21134
|
// @section
|
|
20958
21135
|
// @aka Popup options
|
|
20959
21136
|
options: {
|
|
21137
|
+
// @option pane: String = 'popupPane'
|
|
21138
|
+
// `Map pane` where the popup will be added.
|
|
21139
|
+
pane: 'popupPane',
|
|
21140
|
+
|
|
21141
|
+
// @option offset: Point = Point(0, 7)
|
|
21142
|
+
// The offset of the popup position.
|
|
21143
|
+
offset: [0, 7],
|
|
21144
|
+
|
|
20960
21145
|
// @option maxWidth: Number = 300
|
|
20961
21146
|
// Max width of the popup, in pixels.
|
|
20962
21147
|
maxWidth: 300,
|
|
@@ -21019,10 +21204,17 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
21019
21204
|
|
|
21020
21205
|
// @namespace Popup
|
|
21021
21206
|
// @method openOn(map: Map): this
|
|
21022
|
-
//
|
|
21207
|
+
// Alternative to `map.openPopup(popup)`.
|
|
21208
|
+
// Adds the popup to the map and closes the previous one.
|
|
21023
21209
|
openOn: function (map) {
|
|
21024
|
-
map.
|
|
21025
|
-
|
|
21210
|
+
map = arguments.length ? map : this._source._map; // experimental, not the part of public api
|
|
21211
|
+
|
|
21212
|
+
if (!map.hasLayer(this) && map._popup && map._popup.options.autoClose) {
|
|
21213
|
+
map.removeLayer(map._popup);
|
|
21214
|
+
}
|
|
21215
|
+
map._popup = this;
|
|
21216
|
+
|
|
21217
|
+
return DivOverlay.prototype.openOn.call(this, map);
|
|
21026
21218
|
},
|
|
21027
21219
|
|
|
21028
21220
|
onAdd: function (map) {
|
|
@@ -21073,7 +21265,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
21073
21265
|
var events = DivOverlay.prototype.getEvents.call(this);
|
|
21074
21266
|
|
|
21075
21267
|
if (this.options.closeOnClick !== undefined ? this.options.closeOnClick : this._map.options.closePopupOnClick) {
|
|
21076
|
-
events.preclick = this.
|
|
21268
|
+
events.preclick = this.close;
|
|
21077
21269
|
}
|
|
21078
21270
|
|
|
21079
21271
|
if (this.options.keepInView) {
|
|
@@ -21083,12 +21275,6 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
21083
21275
|
return events;
|
|
21084
21276
|
},
|
|
21085
21277
|
|
|
21086
|
-
_close: function () {
|
|
21087
|
-
if (this._map) {
|
|
21088
|
-
this._map.closePopup(this);
|
|
21089
|
-
}
|
|
21090
|
-
},
|
|
21091
|
-
|
|
21092
21278
|
_initLayout: function () {
|
|
21093
21279
|
var prefix = 'leaflet-popup',
|
|
21094
21280
|
container = this._container = create$1('div',
|
|
@@ -21107,10 +21293,12 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
21107
21293
|
|
|
21108
21294
|
if (this.options.closeButton) {
|
|
21109
21295
|
var closeButton = this._closeButton = create$1('a', prefix + '-close-button', container);
|
|
21296
|
+
closeButton.setAttribute('role', 'button'); // overrides the implicit role=link of <a> elements #7399
|
|
21297
|
+
closeButton.setAttribute('aria-label', 'Close popup');
|
|
21110
21298
|
closeButton.href = '#close';
|
|
21111
|
-
closeButton.innerHTML = '
|
|
21299
|
+
closeButton.innerHTML = '<span aria-hidden="true">×</span>';
|
|
21112
21300
|
|
|
21113
|
-
on(closeButton, 'click', this.
|
|
21301
|
+
on(closeButton, 'click', this.close, this);
|
|
21114
21302
|
}
|
|
21115
21303
|
},
|
|
21116
21304
|
|
|
@@ -21150,7 +21338,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
21150
21338
|
setPosition(this._container, pos.add(anchor));
|
|
21151
21339
|
},
|
|
21152
21340
|
|
|
21153
|
-
_adjustPan: function () {
|
|
21341
|
+
_adjustPan: function (e) {
|
|
21154
21342
|
if (!this.options.autoPan) { return; }
|
|
21155
21343
|
if (this._map._panAnim) { this._map._panAnim.stop(); }
|
|
21156
21344
|
|
|
@@ -21190,15 +21378,10 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
21190
21378
|
if (dx || dy) {
|
|
21191
21379
|
map
|
|
21192
21380
|
.fire('autopanstart')
|
|
21193
|
-
.panBy([dx, dy]);
|
|
21381
|
+
.panBy([dx, dy], {animate: e && e.type === 'moveend'});
|
|
21194
21382
|
}
|
|
21195
21383
|
},
|
|
21196
21384
|
|
|
21197
|
-
_onCloseButtonClick: function (e) {
|
|
21198
|
-
this._close();
|
|
21199
|
-
stop(e);
|
|
21200
|
-
},
|
|
21201
|
-
|
|
21202
21385
|
_getAnchor: function () {
|
|
21203
21386
|
// Where should we anchor the popup on the source layer?
|
|
21204
21387
|
return toPoint(this._source && this._source._getPopupAnchor ? this._source._getPopupAnchor() : [0, 0]);
|
|
@@ -21233,35 +21416,18 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
21233
21416
|
// @method openPopup(content: String|HTMLElement, latlng: LatLng, options?: Popup options): this
|
|
21234
21417
|
// Creates a popup with the specified content and options and opens it in the given point on a map.
|
|
21235
21418
|
openPopup: function (popup, latlng, options) {
|
|
21236
|
-
|
|
21237
|
-
|
|
21238
|
-
}
|
|
21239
|
-
|
|
21240
|
-
if (latlng) {
|
|
21241
|
-
popup.setLatLng(latlng);
|
|
21242
|
-
}
|
|
21243
|
-
|
|
21244
|
-
if (this.hasLayer(popup)) {
|
|
21245
|
-
return this;
|
|
21246
|
-
}
|
|
21419
|
+
this._initOverlay(Popup, popup, latlng, options)
|
|
21420
|
+
.openOn(this);
|
|
21247
21421
|
|
|
21248
|
-
|
|
21249
|
-
this.closePopup();
|
|
21250
|
-
}
|
|
21251
|
-
|
|
21252
|
-
this._popup = popup;
|
|
21253
|
-
return this.addLayer(popup);
|
|
21422
|
+
return this;
|
|
21254
21423
|
},
|
|
21255
21424
|
|
|
21256
21425
|
// @method closePopup(popup?: Popup): this
|
|
21257
21426
|
// Closes the popup previously opened with [openPopup](#map-openpopup) (or the given one).
|
|
21258
21427
|
closePopup: function (popup) {
|
|
21259
|
-
|
|
21260
|
-
popup = this._popup;
|
|
21261
|
-
this._popup = null;
|
|
21262
|
-
}
|
|
21428
|
+
popup = arguments.length ? popup : this._popup;
|
|
21263
21429
|
if (popup) {
|
|
21264
|
-
|
|
21430
|
+
popup.close();
|
|
21265
21431
|
}
|
|
21266
21432
|
return this;
|
|
21267
21433
|
}
|
|
@@ -21290,18 +21456,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
21290
21456
|
// necessary event listeners. If a `Function` is passed it will receive
|
|
21291
21457
|
// the layer as the first argument and should return a `String` or `HTMLElement`.
|
|
21292
21458
|
bindPopup: function (content, options) {
|
|
21293
|
-
|
|
21294
|
-
if (content instanceof Popup) {
|
|
21295
|
-
setOptions(content, options);
|
|
21296
|
-
this._popup = content;
|
|
21297
|
-
content._source = this;
|
|
21298
|
-
} else {
|
|
21299
|
-
if (!this._popup || options) {
|
|
21300
|
-
this._popup = new Popup(options, this);
|
|
21301
|
-
}
|
|
21302
|
-
this._popup.setContent(content);
|
|
21303
|
-
}
|
|
21304
|
-
|
|
21459
|
+
this._popup = this._initOverlay(Popup, this._popup, content, options);
|
|
21305
21460
|
if (!this._popupHandlersAdded) {
|
|
21306
21461
|
this.on({
|
|
21307
21462
|
click: this._openPopup,
|
|
@@ -21333,14 +21488,11 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
21333
21488
|
|
|
21334
21489
|
// @method openPopup(latlng?: LatLng): this
|
|
21335
21490
|
// Opens the bound popup at the specified `latlng` or at the default popup anchor if no `latlng` is passed.
|
|
21336
|
-
openPopup: function (
|
|
21337
|
-
if (this._popup && this.
|
|
21338
|
-
latlng = this._popup._prepareOpen(this, layer, latlng);
|
|
21339
|
-
|
|
21491
|
+
openPopup: function (latlng) {
|
|
21492
|
+
if (this._popup && this._popup._prepareOpen(latlng)) {
|
|
21340
21493
|
// open the popup on the map
|
|
21341
|
-
this.
|
|
21494
|
+
this._popup.openOn(this._map);
|
|
21342
21495
|
}
|
|
21343
|
-
|
|
21344
21496
|
return this;
|
|
21345
21497
|
},
|
|
21346
21498
|
|
|
@@ -21348,20 +21500,16 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
21348
21500
|
// Closes the popup bound to this layer if it is open.
|
|
21349
21501
|
closePopup: function () {
|
|
21350
21502
|
if (this._popup) {
|
|
21351
|
-
this._popup.
|
|
21503
|
+
this._popup.close();
|
|
21352
21504
|
}
|
|
21353
21505
|
return this;
|
|
21354
21506
|
},
|
|
21355
21507
|
|
|
21356
21508
|
// @method togglePopup(): this
|
|
21357
21509
|
// Opens or closes the popup bound to this layer depending on its current state.
|
|
21358
|
-
togglePopup: function (
|
|
21510
|
+
togglePopup: function () {
|
|
21359
21511
|
if (this._popup) {
|
|
21360
|
-
|
|
21361
|
-
this.closePopup();
|
|
21362
|
-
} else {
|
|
21363
|
-
this.openPopup(target);
|
|
21364
|
-
}
|
|
21512
|
+
this._popup.toggle(this);
|
|
21365
21513
|
}
|
|
21366
21514
|
return this;
|
|
21367
21515
|
},
|
|
@@ -21388,33 +21536,25 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
21388
21536
|
},
|
|
21389
21537
|
|
|
21390
21538
|
_openPopup: function (e) {
|
|
21391
|
-
|
|
21392
|
-
|
|
21393
|
-
if (!this._popup) {
|
|
21539
|
+
if (!this._popup || !this._map) {
|
|
21394
21540
|
return;
|
|
21395
21541
|
}
|
|
21396
|
-
|
|
21397
|
-
if (!this._map) {
|
|
21398
|
-
return;
|
|
21399
|
-
}
|
|
21400
|
-
|
|
21401
21542
|
// prevent map click
|
|
21402
21543
|
stop(e);
|
|
21403
21544
|
|
|
21404
|
-
|
|
21405
|
-
|
|
21406
|
-
|
|
21407
|
-
|
|
21545
|
+
var target = e.layer || e.target;
|
|
21546
|
+
if (this._popup._source === target && !(target instanceof Path)) {
|
|
21547
|
+
// treat it like a marker and figure out
|
|
21548
|
+
// if we should toggle it open/closed
|
|
21549
|
+
if (this._map.hasLayer(this._popup)) {
|
|
21550
|
+
this.closePopup();
|
|
21551
|
+
} else {
|
|
21552
|
+
this.openPopup(e.latlng);
|
|
21553
|
+
}
|
|
21408
21554
|
return;
|
|
21409
21555
|
}
|
|
21410
|
-
|
|
21411
|
-
|
|
21412
|
-
// if we should toggle it open/closed
|
|
21413
|
-
if (this._map.hasLayer(this._popup) && this._popup._source === layer) {
|
|
21414
|
-
this.closePopup();
|
|
21415
|
-
} else {
|
|
21416
|
-
this.openPopup(layer, e.latlng);
|
|
21417
|
-
}
|
|
21556
|
+
this._popup._source = target;
|
|
21557
|
+
this.openPopup(e.latlng);
|
|
21418
21558
|
},
|
|
21419
21559
|
|
|
21420
21560
|
_movePopup: function (e) {
|
|
@@ -21478,10 +21618,6 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
21478
21618
|
// If true, the tooltip will follow the mouse instead of being fixed at the feature center.
|
|
21479
21619
|
sticky: false,
|
|
21480
21620
|
|
|
21481
|
-
// @option interactive: Boolean = false
|
|
21482
|
-
// If true, the tooltip will listen to the feature events.
|
|
21483
|
-
interactive: false,
|
|
21484
|
-
|
|
21485
21621
|
// @option opacity: Number = 0.9
|
|
21486
21622
|
// Tooltip container opacity.
|
|
21487
21623
|
opacity: 0.9
|
|
@@ -21498,6 +21634,8 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
21498
21634
|
map.fire('tooltipopen', {tooltip: this});
|
|
21499
21635
|
|
|
21500
21636
|
if (this._source) {
|
|
21637
|
+
this.addEventParent(this._source);
|
|
21638
|
+
|
|
21501
21639
|
// @namespace Layer
|
|
21502
21640
|
// @section Tooltip events
|
|
21503
21641
|
// @event tooltipopen: TooltipEvent
|
|
@@ -21516,6 +21654,8 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
21516
21654
|
map.fire('tooltipclose', {tooltip: this});
|
|
21517
21655
|
|
|
21518
21656
|
if (this._source) {
|
|
21657
|
+
this.removeEventParent(this._source);
|
|
21658
|
+
|
|
21519
21659
|
// @namespace Layer
|
|
21520
21660
|
// @section Tooltip events
|
|
21521
21661
|
// @event tooltipclose: TooltipEvent
|
|
@@ -21527,19 +21667,13 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
21527
21667
|
getEvents: function () {
|
|
21528
21668
|
var events = DivOverlay.prototype.getEvents.call(this);
|
|
21529
21669
|
|
|
21530
|
-
if (
|
|
21531
|
-
events.preclick = this.
|
|
21670
|
+
if (!this.options.permanent) {
|
|
21671
|
+
events.preclick = this.close;
|
|
21532
21672
|
}
|
|
21533
21673
|
|
|
21534
21674
|
return events;
|
|
21535
21675
|
},
|
|
21536
21676
|
|
|
21537
|
-
_close: function () {
|
|
21538
|
-
if (this._map) {
|
|
21539
|
-
this._map.closeTooltip(this);
|
|
21540
|
-
}
|
|
21541
|
-
},
|
|
21542
|
-
|
|
21543
21677
|
_initLayout: function () {
|
|
21544
21678
|
var prefix = 'leaflet-tooltip',
|
|
21545
21679
|
className = prefix + ' ' + (this.options.className || '') + ' leaflet-zoom-' + (this._zoomAnimated ? 'animated' : 'hide');
|
|
@@ -21640,27 +21774,16 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
21640
21774
|
// @method openTooltip(content: String|HTMLElement, latlng: LatLng, options?: Tooltip options): this
|
|
21641
21775
|
// Creates a tooltip with the specified content and options and open it.
|
|
21642
21776
|
openTooltip: function (tooltip, latlng, options) {
|
|
21643
|
-
|
|
21644
|
-
|
|
21645
|
-
}
|
|
21777
|
+
this._initOverlay(Tooltip, tooltip, latlng, options)
|
|
21778
|
+
.openOn(this);
|
|
21646
21779
|
|
|
21647
|
-
|
|
21648
|
-
tooltip.setLatLng(latlng);
|
|
21649
|
-
}
|
|
21650
|
-
|
|
21651
|
-
if (this.hasLayer(tooltip)) {
|
|
21652
|
-
return this;
|
|
21653
|
-
}
|
|
21654
|
-
|
|
21655
|
-
return this.addLayer(tooltip);
|
|
21780
|
+
return this;
|
|
21656
21781
|
},
|
|
21657
21782
|
|
|
21658
|
-
// @method closeTooltip(tooltip
|
|
21783
|
+
// @method closeTooltip(tooltip: Tooltip): this
|
|
21659
21784
|
// Closes the tooltip given as parameter.
|
|
21660
21785
|
closeTooltip: function (tooltip) {
|
|
21661
|
-
|
|
21662
|
-
this.removeLayer(tooltip);
|
|
21663
|
-
}
|
|
21786
|
+
tooltip.close();
|
|
21664
21787
|
return this;
|
|
21665
21788
|
}
|
|
21666
21789
|
|
|
@@ -21688,18 +21811,11 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
21688
21811
|
// the layer as the first argument and should return a `String` or `HTMLElement`.
|
|
21689
21812
|
bindTooltip: function (content, options) {
|
|
21690
21813
|
|
|
21691
|
-
if (
|
|
21692
|
-
|
|
21693
|
-
this._tooltip = content;
|
|
21694
|
-
content._source = this;
|
|
21695
|
-
} else {
|
|
21696
|
-
if (!this._tooltip || options) {
|
|
21697
|
-
this._tooltip = new Tooltip(options, this);
|
|
21698
|
-
}
|
|
21699
|
-
this._tooltip.setContent(content);
|
|
21700
|
-
|
|
21814
|
+
if (this._tooltip && this.isTooltipOpen()) {
|
|
21815
|
+
this.unbindTooltip();
|
|
21701
21816
|
}
|
|
21702
21817
|
|
|
21818
|
+
this._tooltip = this._initOverlay(Tooltip, this._tooltip, content, options);
|
|
21703
21819
|
this._initTooltipInteractions();
|
|
21704
21820
|
|
|
21705
21821
|
if (this._tooltip.options.permanent && this._map && this._map.hasLayer(this)) {
|
|
@@ -21720,9 +21836,9 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
21720
21836
|
return this;
|
|
21721
21837
|
},
|
|
21722
21838
|
|
|
21723
|
-
_initTooltipInteractions: function (remove
|
|
21724
|
-
if (!remove
|
|
21725
|
-
var onOff = remove
|
|
21839
|
+
_initTooltipInteractions: function (remove) {
|
|
21840
|
+
if (!remove && this._tooltipHandlersAdded) { return; }
|
|
21841
|
+
var onOff = remove ? 'off' : 'on',
|
|
21726
21842
|
events = {
|
|
21727
21843
|
remove: this.closeTooltip,
|
|
21728
21844
|
move: this._moveTooltip
|
|
@@ -21730,36 +21846,24 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
21730
21846
|
if (!this._tooltip.options.permanent) {
|
|
21731
21847
|
events.mouseover = this._openTooltip;
|
|
21732
21848
|
events.mouseout = this.closeTooltip;
|
|
21733
|
-
|
|
21734
|
-
events.mousemove = this._moveTooltip;
|
|
21735
|
-
}
|
|
21736
|
-
if (touch) {
|
|
21737
|
-
events.click = this._openTooltip;
|
|
21738
|
-
}
|
|
21849
|
+
events.click = this._openTooltip;
|
|
21739
21850
|
} else {
|
|
21740
21851
|
events.add = this._openTooltip;
|
|
21741
21852
|
}
|
|
21853
|
+
if (this._tooltip.options.sticky) {
|
|
21854
|
+
events.mousemove = this._moveTooltip;
|
|
21855
|
+
}
|
|
21742
21856
|
this[onOff](events);
|
|
21743
|
-
this._tooltipHandlersAdded = !remove
|
|
21857
|
+
this._tooltipHandlersAdded = !remove;
|
|
21744
21858
|
},
|
|
21745
21859
|
|
|
21746
21860
|
// @method openTooltip(latlng?: LatLng): this
|
|
21747
21861
|
// Opens the bound tooltip at the specified `latlng` or at the default tooltip anchor if no `latlng` is passed.
|
|
21748
|
-
openTooltip: function (
|
|
21749
|
-
if (this._tooltip && this.
|
|
21750
|
-
latlng = this._tooltip._prepareOpen(this, layer, latlng);
|
|
21751
|
-
|
|
21862
|
+
openTooltip: function (latlng) {
|
|
21863
|
+
if (this._tooltip && this._tooltip._prepareOpen(latlng)) {
|
|
21752
21864
|
// open the tooltip on the map
|
|
21753
|
-
this.
|
|
21754
|
-
|
|
21755
|
-
// Tooltip container may not be defined if not permanent and never
|
|
21756
|
-
// opened.
|
|
21757
|
-
if (this._tooltip.options.interactive && this._tooltip._container) {
|
|
21758
|
-
addClass(this._tooltip._container, 'leaflet-clickable');
|
|
21759
|
-
this.addInteractiveTarget(this._tooltip._container);
|
|
21760
|
-
}
|
|
21865
|
+
this._tooltip.openOn(this._map);
|
|
21761
21866
|
}
|
|
21762
|
-
|
|
21763
21867
|
return this;
|
|
21764
21868
|
},
|
|
21765
21869
|
|
|
@@ -21767,24 +21871,15 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
21767
21871
|
// Closes the tooltip bound to this layer if it is open.
|
|
21768
21872
|
closeTooltip: function () {
|
|
21769
21873
|
if (this._tooltip) {
|
|
21770
|
-
this._tooltip.
|
|
21771
|
-
if (this._tooltip.options.interactive && this._tooltip._container) {
|
|
21772
|
-
removeClass(this._tooltip._container, 'leaflet-clickable');
|
|
21773
|
-
this.removeInteractiveTarget(this._tooltip._container);
|
|
21774
|
-
}
|
|
21874
|
+
return this._tooltip.close();
|
|
21775
21875
|
}
|
|
21776
|
-
return this;
|
|
21777
21876
|
},
|
|
21778
21877
|
|
|
21779
21878
|
// @method toggleTooltip(): this
|
|
21780
21879
|
// Opens or closes the tooltip bound to this layer depending on its current state.
|
|
21781
|
-
toggleTooltip: function (
|
|
21880
|
+
toggleTooltip: function () {
|
|
21782
21881
|
if (this._tooltip) {
|
|
21783
|
-
|
|
21784
|
-
this.closeTooltip();
|
|
21785
|
-
} else {
|
|
21786
|
-
this.openTooltip(target);
|
|
21787
|
-
}
|
|
21882
|
+
this._tooltip.toggle(this);
|
|
21788
21883
|
}
|
|
21789
21884
|
return this;
|
|
21790
21885
|
},
|
|
@@ -21811,12 +21906,12 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
21811
21906
|
},
|
|
21812
21907
|
|
|
21813
21908
|
_openTooltip: function (e) {
|
|
21814
|
-
|
|
21815
|
-
|
|
21816
|
-
if (!this._tooltip || !this._map) {
|
|
21909
|
+
if (!this._tooltip || !this._map || (this._map.dragging && this._map.dragging.moving())) {
|
|
21817
21910
|
return;
|
|
21818
21911
|
}
|
|
21819
|
-
this.
|
|
21912
|
+
this._tooltip._source = e.layer || e.target;
|
|
21913
|
+
|
|
21914
|
+
this.openTooltip(this._tooltip.options.sticky ? e.latlng : undefined);
|
|
21820
21915
|
},
|
|
21821
21916
|
|
|
21822
21917
|
_moveTooltip: function (e) {
|
|
@@ -21987,7 +22082,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
21987
22082
|
// `true` by default on mobile browsers, in order to avoid too many requests and keep smooth navigation.
|
|
21988
22083
|
// `false` otherwise in order to display new tiles _during_ panning, since it is easy to pan outside the
|
|
21989
22084
|
// [`keepBuffer`](#gridlayer-keepbuffer) option in desktop browsers.
|
|
21990
|
-
updateWhenIdle: mobile,
|
|
22085
|
+
updateWhenIdle: Browser.mobile,
|
|
21991
22086
|
|
|
21992
22087
|
// @option updateWhenZooming: Boolean = true
|
|
21993
22088
|
// By default, a smooth zoom animation (during a [touch zoom](#map-touchzoom) or a [`flyTo()`](#map-flyto)) will update grid layers every integer zoom level. Setting this option to `false` will update the grid layer only when the smooth animation ends.
|
|
@@ -22056,8 +22151,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
22056
22151
|
this._levels = {};
|
|
22057
22152
|
this._tiles = {};
|
|
22058
22153
|
|
|
22059
|
-
this._resetView();
|
|
22060
|
-
this._update();
|
|
22154
|
+
this._resetView(); // implicit _update() call
|
|
22061
22155
|
},
|
|
22062
22156
|
|
|
22063
22157
|
beforeAdd: function (map) {
|
|
@@ -22126,6 +22220,11 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
22126
22220
|
redraw: function () {
|
|
22127
22221
|
if (this._map) {
|
|
22128
22222
|
this._removeAllTiles();
|
|
22223
|
+
var tileZoom = this._clampZoom(this._map.getZoom());
|
|
22224
|
+
if (tileZoom !== this._tileZoom) {
|
|
22225
|
+
this._tileZoom = tileZoom;
|
|
22226
|
+
this._updateLevels();
|
|
22227
|
+
}
|
|
22129
22228
|
this._update();
|
|
22130
22229
|
}
|
|
22131
22230
|
return this;
|
|
@@ -22204,7 +22303,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
22204
22303
|
if (!this._map) { return; }
|
|
22205
22304
|
|
|
22206
22305
|
// IE doesn't inherit filter opacity properly, so we're forced to set it on tiles
|
|
22207
|
-
if (ielt9) { return; }
|
|
22306
|
+
if (Browser.ielt9) { return; }
|
|
22208
22307
|
|
|
22209
22308
|
setOpacity(this._container, this.options.opacity);
|
|
22210
22309
|
|
|
@@ -22490,7 +22589,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
22490
22589
|
translate = level.origin.multiplyBy(scale)
|
|
22491
22590
|
.subtract(this._map._getNewPixelOrigin(center, zoom)).round();
|
|
22492
22591
|
|
|
22493
|
-
if (any3d) {
|
|
22592
|
+
if (Browser.any3d) {
|
|
22494
22593
|
setTransform(level.el, translate, scale);
|
|
22495
22594
|
} else {
|
|
22496
22595
|
setPosition(level.el, translate);
|
|
@@ -22691,15 +22790,9 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
22691
22790
|
tile.onmousemove = falseFn;
|
|
22692
22791
|
|
|
22693
22792
|
// update opacity on tiles in IE7-8 because of filter inheritance problems
|
|
22694
|
-
if (ielt9 && this.options.opacity < 1) {
|
|
22793
|
+
if (Browser.ielt9 && this.options.opacity < 1) {
|
|
22695
22794
|
setOpacity(tile, this.options.opacity);
|
|
22696
22795
|
}
|
|
22697
|
-
|
|
22698
|
-
// without this hack, tiles disappear after zoom on Chrome for Android
|
|
22699
|
-
// https://github.com/Leaflet/Leaflet/issues/2078
|
|
22700
|
-
if (android && !android23) {
|
|
22701
|
-
tile.style.WebkitBackfaceVisibility = 'hidden';
|
|
22702
|
-
}
|
|
22703
22796
|
},
|
|
22704
22797
|
|
|
22705
22798
|
_addTile: function (coords, container) {
|
|
@@ -22778,7 +22871,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
22778
22871
|
// Fired when the grid layer loaded all visible tiles.
|
|
22779
22872
|
this.fire('load');
|
|
22780
22873
|
|
|
22781
|
-
if (ielt9 || !this._map._fadeAnimated) {
|
|
22874
|
+
if (Browser.ielt9 || !this._map._fadeAnimated) {
|
|
22782
22875
|
requestAnimFrame(this._pruneTiles, this);
|
|
22783
22876
|
} else {
|
|
22784
22877
|
// Wait a bit more than 0.2 secs (the duration of the tile fade-in)
|
|
@@ -22830,7 +22923,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
22830
22923
|
* @example
|
|
22831
22924
|
*
|
|
22832
22925
|
* ```js
|
|
22833
|
-
* L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png?{foo}', {foo: 'bar', attribution: '
|
|
22926
|
+
* L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png?{foo}', {foo: 'bar', attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'}).addTo(map);
|
|
22834
22927
|
* ```
|
|
22835
22928
|
*
|
|
22836
22929
|
* @section URL template
|
|
@@ -22839,7 +22932,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
22839
22932
|
* A string of the following form:
|
|
22840
22933
|
*
|
|
22841
22934
|
* ```
|
|
22842
|
-
* '
|
|
22935
|
+
* 'https://{s}.somedomain.com/blabla/{z}/{x}/{y}{r}.png'
|
|
22843
22936
|
* ```
|
|
22844
22937
|
*
|
|
22845
22938
|
* `{s}` means one of the available subdomains (used sequentially to help with browser parallel requests per domain limitation; subdomain values are specified in options; `a`, `b` or `c` by default, can be omitted), `{z}` — zoom level, `{x}` and `{y}` — tile coordinates. `{r}` can be used to add "@2x" to the URL to load retina tiles.
|
|
@@ -22847,7 +22940,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
22847
22940
|
* You can use custom keys in the template, which will be [evaluated](#util-template) from TileLayer options, like this:
|
|
22848
22941
|
*
|
|
22849
22942
|
* ```
|
|
22850
|
-
* L.tileLayer('
|
|
22943
|
+
* L.tileLayer('https://{s}.somedomain.com/{foo}/{z}/{x}/{y}.png', {foo: 'bar'});
|
|
22851
22944
|
* ```
|
|
22852
22945
|
*/
|
|
22853
22946
|
|
|
@@ -22893,7 +22986,15 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
22893
22986
|
// Whether the crossOrigin attribute will be added to the tiles.
|
|
22894
22987
|
// If a String is provided, all tiles will have their crossOrigin attribute set to the String provided. This is needed if you want to access tile pixel data.
|
|
22895
22988
|
// Refer to [CORS Settings](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) for valid String values.
|
|
22896
|
-
crossOrigin: false
|
|
22989
|
+
crossOrigin: false,
|
|
22990
|
+
|
|
22991
|
+
// @option referrerPolicy: Boolean|String = false
|
|
22992
|
+
// Whether the referrerPolicy attribute will be added to the tiles.
|
|
22993
|
+
// If a String is provided, all tiles will have their referrerPolicy attribute set to the String provided.
|
|
22994
|
+
// This may be needed if your map's rendering context has a strict default but your tile provider expects a valid referrer
|
|
22995
|
+
// (e.g. to validate an API token).
|
|
22996
|
+
// Refer to [HTMLImageElement.referrerPolicy](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/referrerPolicy) for valid String values.
|
|
22997
|
+
referrerPolicy: false
|
|
22897
22998
|
},
|
|
22898
22999
|
|
|
22899
23000
|
initialize: function (url, options) {
|
|
@@ -22903,7 +23004,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
22903
23004
|
options = setOptions(this, options);
|
|
22904
23005
|
|
|
22905
23006
|
// detecting retina displays, adjusting tileSize and zoom levels
|
|
22906
|
-
if (options.detectRetina && retina && options.maxZoom > 0) {
|
|
23007
|
+
if (options.detectRetina && Browser.retina && options.maxZoom > 0) {
|
|
22907
23008
|
|
|
22908
23009
|
options.tileSize = Math.floor(options.tileSize / 2);
|
|
22909
23010
|
|
|
@@ -22922,10 +23023,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
22922
23023
|
options.subdomains = options.subdomains.split('');
|
|
22923
23024
|
}
|
|
22924
23025
|
|
|
22925
|
-
|
|
22926
|
-
if (!android) {
|
|
22927
|
-
this.on('tileunload', this._onTileRemove);
|
|
22928
|
-
}
|
|
23026
|
+
this.on('tileunload', this._onTileRemove);
|
|
22929
23027
|
},
|
|
22930
23028
|
|
|
22931
23029
|
// @method setUrl(url: String, noRedraw?: Boolean): this
|
|
@@ -22959,9 +23057,15 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
22959
23057
|
tile.crossOrigin = this.options.crossOrigin === true ? '' : this.options.crossOrigin;
|
|
22960
23058
|
}
|
|
22961
23059
|
|
|
23060
|
+
// for this new option we follow the documented behavior
|
|
23061
|
+
// more closely by only setting the property when string
|
|
23062
|
+
if (typeof this.options.referrerPolicy === 'string') {
|
|
23063
|
+
tile.referrerPolicy = this.options.referrerPolicy;
|
|
23064
|
+
}
|
|
23065
|
+
|
|
22962
23066
|
/*
|
|
22963
23067
|
Alt tag is set to empty string to keep screen readers from reading URL and for compliance reasons
|
|
22964
|
-
|
|
23068
|
+
https://www.w3.org/TR/WCAG20-TECHS/H67
|
|
22965
23069
|
*/
|
|
22966
23070
|
tile.alt = '';
|
|
22967
23071
|
|
|
@@ -22984,7 +23088,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
22984
23088
|
// Classes extending `TileLayer` can override this function to provide custom tile URL naming schemes.
|
|
22985
23089
|
getTileUrl: function (coords) {
|
|
22986
23090
|
var data = {
|
|
22987
|
-
r: retina ? '@2x' : '',
|
|
23091
|
+
r: Browser.retina ? '@2x' : '',
|
|
22988
23092
|
s: this._getSubdomain(coords),
|
|
22989
23093
|
x: coords.x,
|
|
22990
23094
|
y: coords.y,
|
|
@@ -23003,7 +23107,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
23003
23107
|
|
|
23004
23108
|
_tileOnLoad: function (done, tile) {
|
|
23005
23109
|
// For https://github.com/Leaflet/Leaflet/issues/3332
|
|
23006
|
-
if (ielt9) {
|
|
23110
|
+
if (Browser.ielt9) {
|
|
23007
23111
|
setTimeout(bind(done, this, null, tile), 0);
|
|
23008
23112
|
} else {
|
|
23009
23113
|
done(null, tile);
|
|
@@ -23052,8 +23156,15 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
23052
23156
|
|
|
23053
23157
|
if (!tile.complete) {
|
|
23054
23158
|
tile.src = emptyImageUrl;
|
|
23159
|
+
var coords = this._tiles[i].coords;
|
|
23055
23160
|
remove(tile);
|
|
23056
23161
|
delete this._tiles[i];
|
|
23162
|
+
// @event tileabort: TileEvent
|
|
23163
|
+
// Fired when a tile was loading but is now not wanted.
|
|
23164
|
+
this.fire('tileabort', {
|
|
23165
|
+
tile: tile,
|
|
23166
|
+
coords: coords
|
|
23167
|
+
});
|
|
23057
23168
|
}
|
|
23058
23169
|
}
|
|
23059
23170
|
}
|
|
@@ -23064,11 +23175,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
23064
23175
|
if (!tile) { return; }
|
|
23065
23176
|
|
|
23066
23177
|
// Cancels any pending http requests associated with the tile
|
|
23067
|
-
|
|
23068
|
-
// see https://github.com/Leaflet/Leaflet/issues/137
|
|
23069
|
-
if (!androidStock) {
|
|
23070
|
-
tile.el.setAttribute('src', emptyImageUrl);
|
|
23071
|
-
}
|
|
23178
|
+
tile.el.setAttribute('src', emptyImageUrl);
|
|
23072
23179
|
|
|
23073
23180
|
return GridLayer.prototype._removeTile.call(this, key);
|
|
23074
23181
|
},
|
|
@@ -23114,7 +23221,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
23114
23221
|
// @aka TileLayer.WMS options
|
|
23115
23222
|
// If any custom options not documented here are used, they will be sent to the
|
|
23116
23223
|
// WMS server as extra parameters in each request URL. This can be useful for
|
|
23117
|
-
// [non-standard vendor WMS parameters](
|
|
23224
|
+
// [non-standard vendor WMS parameters](https://docs.geoserver.org/stable/en/user/services/wms/vendor.html).
|
|
23118
23225
|
defaultWmsParams: {
|
|
23119
23226
|
service: 'WMS',
|
|
23120
23227
|
request: 'GetMap',
|
|
@@ -23166,7 +23273,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
23166
23273
|
|
|
23167
23274
|
options = setOptions(this, options);
|
|
23168
23275
|
|
|
23169
|
-
var realRetina = options.detectRetina && retina ? 2 : 1;
|
|
23276
|
+
var realRetina = options.detectRetina && Browser.retina ? 2 : 1;
|
|
23170
23277
|
var tileSize = this.getTileSize();
|
|
23171
23278
|
wmsParams.width = tileSize.x * realRetina;
|
|
23172
23279
|
wmsParams.height = tileSize.y * realRetina;
|
|
@@ -23253,11 +23360,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
23253
23360
|
// @option padding: Number = 0.1
|
|
23254
23361
|
// How much to extend the clip area around the map view (relative to its size)
|
|
23255
23362
|
// e.g. 0.1 would be 10% of map view in each direction
|
|
23256
|
-
padding: 0.1
|
|
23257
|
-
|
|
23258
|
-
// @option tolerance: Number = 0
|
|
23259
|
-
// How much to extend click tolerance round a path/object on the map
|
|
23260
|
-
tolerance : 0
|
|
23363
|
+
padding: 0.1
|
|
23261
23364
|
},
|
|
23262
23365
|
|
|
23263
23366
|
initialize: function (options) {
|
|
@@ -23308,15 +23411,13 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
23308
23411
|
|
|
23309
23412
|
_updateTransform: function (center, zoom) {
|
|
23310
23413
|
var scale = this._map.getZoomScale(zoom, this._zoom),
|
|
23311
|
-
position = getPosition(this._container),
|
|
23312
23414
|
viewHalf = this._map.getSize().multiplyBy(0.5 + this.options.padding),
|
|
23313
23415
|
currentCenterPoint = this._map.project(this._center, zoom),
|
|
23314
|
-
destCenterPoint = this._map.project(center, zoom),
|
|
23315
|
-
centerOffset = destCenterPoint.subtract(currentCenterPoint),
|
|
23316
23416
|
|
|
23317
|
-
topLeftOffset = viewHalf.multiplyBy(-scale).add(
|
|
23417
|
+
topLeftOffset = viewHalf.multiplyBy(-scale).add(currentCenterPoint)
|
|
23418
|
+
.subtract(this._map._getNewPixelOrigin(center, zoom));
|
|
23318
23419
|
|
|
23319
|
-
if (any3d) {
|
|
23420
|
+
if (Browser.any3d) {
|
|
23320
23421
|
setTransform(this._container, topLeftOffset, scale);
|
|
23321
23422
|
} else {
|
|
23322
23423
|
setPosition(this._container, topLeftOffset);
|
|
@@ -23366,7 +23467,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
23366
23467
|
* Allows vector layers to be displayed with [`<canvas>`](https://developer.mozilla.org/docs/Web/API/Canvas_API).
|
|
23367
23468
|
* Inherits `Renderer`.
|
|
23368
23469
|
*
|
|
23369
|
-
* Due to [technical limitations](
|
|
23470
|
+
* Due to [technical limitations](https://caniuse.com/canvas), Canvas is not
|
|
23370
23471
|
* available in all web browsers, notably IE8, and overlapping geometries might
|
|
23371
23472
|
* not display properly in some edge cases.
|
|
23372
23473
|
*
|
|
@@ -23391,6 +23492,15 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
23391
23492
|
*/
|
|
23392
23493
|
|
|
23393
23494
|
var Canvas = Renderer.extend({
|
|
23495
|
+
|
|
23496
|
+
// @section
|
|
23497
|
+
// @aka Canvas options
|
|
23498
|
+
options: {
|
|
23499
|
+
// @option tolerance: Number = 0
|
|
23500
|
+
// How much to extend the click tolerance around a path/object on the map.
|
|
23501
|
+
tolerance: 0
|
|
23502
|
+
},
|
|
23503
|
+
|
|
23394
23504
|
getEvents: function () {
|
|
23395
23505
|
var events = Renderer.prototype.getEvents.call(this);
|
|
23396
23506
|
events.viewprereset = this._onViewPreReset;
|
|
@@ -23416,6 +23526,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
23416
23526
|
on(container, 'mousemove', this._onMouseMove, this);
|
|
23417
23527
|
on(container, 'click dblclick mousedown mouseup contextmenu', this._onClick, this);
|
|
23418
23528
|
on(container, 'mouseout', this._handleMouseOut, this);
|
|
23529
|
+
container['_leaflet_disable_events'] = true;
|
|
23419
23530
|
|
|
23420
23531
|
this._ctx = container.getContext('2d');
|
|
23421
23532
|
},
|
|
@@ -23448,7 +23559,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
23448
23559
|
var b = this._bounds,
|
|
23449
23560
|
container = this._container,
|
|
23450
23561
|
size = b.getSize(),
|
|
23451
|
-
m = retina ? 2 : 1;
|
|
23562
|
+
m = Browser.retina ? 2 : 1;
|
|
23452
23563
|
|
|
23453
23564
|
setPosition(container, b.min);
|
|
23454
23565
|
|
|
@@ -23458,7 +23569,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
23458
23569
|
container.style.width = size.x + 'px';
|
|
23459
23570
|
container.style.height = size.y + 'px';
|
|
23460
23571
|
|
|
23461
|
-
if (retina) {
|
|
23572
|
+
if (Browser.retina) {
|
|
23462
23573
|
this._ctx.scale(2, 2);
|
|
23463
23574
|
}
|
|
23464
23575
|
|
|
@@ -23702,15 +23813,12 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
23702
23813
|
for (var order = this._drawFirst; order; order = order.next) {
|
|
23703
23814
|
layer = order.layer;
|
|
23704
23815
|
if (layer.options.interactive && layer._containsPoint(point)) {
|
|
23705
|
-
if (!(e.type === 'click' || e.type
|
|
23816
|
+
if (!(e.type === 'click' || e.type === 'preclick') || !this._map._draggableMoved(layer)) {
|
|
23706
23817
|
clickedLayer = layer;
|
|
23707
23818
|
}
|
|
23708
23819
|
}
|
|
23709
23820
|
}
|
|
23710
|
-
|
|
23711
|
-
fakeStop(e);
|
|
23712
|
-
this._fireEvent([clickedLayer], e);
|
|
23713
|
-
}
|
|
23821
|
+
this._fireEvent(clickedLayer ? [clickedLayer] : false, e);
|
|
23714
23822
|
},
|
|
23715
23823
|
|
|
23716
23824
|
_onMouseMove: function (e) {
|
|
@@ -23756,9 +23864,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
23756
23864
|
}
|
|
23757
23865
|
}
|
|
23758
23866
|
|
|
23759
|
-
|
|
23760
|
-
this._fireEvent([this._hoveredLayer], e);
|
|
23761
|
-
}
|
|
23867
|
+
this._fireEvent(this._hoveredLayer ? [this._hoveredLayer] : false, e);
|
|
23762
23868
|
|
|
23763
23869
|
this._mouseHoverThrottled = true;
|
|
23764
23870
|
setTimeout(bind(function () {
|
|
@@ -23835,8 +23941,8 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
23835
23941
|
|
|
23836
23942
|
// @factory L.canvas(options?: Renderer options)
|
|
23837
23943
|
// Creates a Canvas renderer with the given options.
|
|
23838
|
-
function canvas
|
|
23839
|
-
return canvas ? new Canvas(options) : null;
|
|
23944
|
+
function canvas(options) {
|
|
23945
|
+
return Browser.canvas ? new Canvas(options) : null;
|
|
23840
23946
|
}
|
|
23841
23947
|
|
|
23842
23948
|
/*
|
|
@@ -23851,10 +23957,12 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
23851
23957
|
return document.createElement('<lvml:' + name + ' class="lvml">');
|
|
23852
23958
|
};
|
|
23853
23959
|
} catch (e) {
|
|
23854
|
-
return
|
|
23855
|
-
|
|
23856
|
-
};
|
|
23960
|
+
// Do not return fn from catch block so `e` can be garbage collected
|
|
23961
|
+
// See https://github.com/Leaflet/Leaflet/pull/7279
|
|
23857
23962
|
}
|
|
23963
|
+
return function (name) {
|
|
23964
|
+
return document.createElement('<' + name + ' xmlns="urn:schemas-microsoft.com:vml" class="lvml">');
|
|
23965
|
+
};
|
|
23858
23966
|
})();
|
|
23859
23967
|
|
|
23860
23968
|
|
|
@@ -23978,7 +24086,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
23978
24086
|
}
|
|
23979
24087
|
};
|
|
23980
24088
|
|
|
23981
|
-
var create
|
|
24089
|
+
var create = Browser.vml ? vmlCreate : svgCreate;
|
|
23982
24090
|
|
|
23983
24091
|
/*
|
|
23984
24092
|
* @class SVG
|
|
@@ -23988,7 +24096,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
23988
24096
|
* Allows vector layers to be displayed with [SVG](https://developer.mozilla.org/docs/Web/SVG).
|
|
23989
24097
|
* Inherits `Renderer`.
|
|
23990
24098
|
*
|
|
23991
|
-
* Due to [technical limitations](
|
|
24099
|
+
* Due to [technical limitations](https://caniuse.com/svg), SVG is not
|
|
23992
24100
|
* available in all web browsers, notably Android 2.x and 3.x.
|
|
23993
24101
|
*
|
|
23994
24102
|
* Although SVG is not available on IE7 and IE8, these browsers support
|
|
@@ -24018,19 +24126,13 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
24018
24126
|
|
|
24019
24127
|
var SVG = Renderer.extend({
|
|
24020
24128
|
|
|
24021
|
-
getEvents: function () {
|
|
24022
|
-
var events = Renderer.prototype.getEvents.call(this);
|
|
24023
|
-
events.zoomstart = this._onZoomStart;
|
|
24024
|
-
return events;
|
|
24025
|
-
},
|
|
24026
|
-
|
|
24027
24129
|
_initContainer: function () {
|
|
24028
|
-
this._container = create
|
|
24130
|
+
this._container = create('svg');
|
|
24029
24131
|
|
|
24030
24132
|
// makes it possible to click through svg root; we'll reset it back in individual paths
|
|
24031
24133
|
this._container.setAttribute('pointer-events', 'none');
|
|
24032
24134
|
|
|
24033
|
-
this._rootGroup = create
|
|
24135
|
+
this._rootGroup = create('g');
|
|
24034
24136
|
this._container.appendChild(this._rootGroup);
|
|
24035
24137
|
},
|
|
24036
24138
|
|
|
@@ -24042,13 +24144,6 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
24042
24144
|
delete this._svgSize;
|
|
24043
24145
|
},
|
|
24044
24146
|
|
|
24045
|
-
_onZoomStart: function () {
|
|
24046
|
-
// Drag-then-pinch interactions might mess up the center and zoom.
|
|
24047
|
-
// In this case, the easiest way to prevent this is re-do the renderer
|
|
24048
|
-
// bounds and padding when the zooming starts.
|
|
24049
|
-
this._update();
|
|
24050
|
-
},
|
|
24051
|
-
|
|
24052
24147
|
_update: function () {
|
|
24053
24148
|
if (this._map._animatingZoom && this._bounds) { return; }
|
|
24054
24149
|
|
|
@@ -24075,7 +24170,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
24075
24170
|
// methods below are called by vector layers implementations
|
|
24076
24171
|
|
|
24077
24172
|
_initPath: function (layer) {
|
|
24078
|
-
var path = layer._path = create
|
|
24173
|
+
var path = layer._path = create('path');
|
|
24079
24174
|
|
|
24080
24175
|
// @namespace Path
|
|
24081
24176
|
// @option className: String = null
|
|
@@ -24179,15 +24274,15 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
24179
24274
|
}
|
|
24180
24275
|
});
|
|
24181
24276
|
|
|
24182
|
-
if (vml) {
|
|
24277
|
+
if (Browser.vml) {
|
|
24183
24278
|
SVG.include(vmlMixin);
|
|
24184
24279
|
}
|
|
24185
24280
|
|
|
24186
24281
|
// @namespace SVG
|
|
24187
24282
|
// @factory L.svg(options?: Renderer options)
|
|
24188
24283
|
// Creates a SVG renderer with the given options.
|
|
24189
|
-
function svg
|
|
24190
|
-
return svg || vml ? new SVG(options) : null;
|
|
24284
|
+
function svg(options) {
|
|
24285
|
+
return Browser.svg || Browser.vml ? new SVG(options) : null;
|
|
24191
24286
|
}
|
|
24192
24287
|
|
|
24193
24288
|
Map.include({
|
|
@@ -24228,7 +24323,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
24228
24323
|
// @namespace Map; @option preferCanvas: Boolean = false
|
|
24229
24324
|
// Whether `Path`s should be rendered on a `Canvas` renderer.
|
|
24230
24325
|
// By default, all `Path`s are rendered in a `SVG` renderer.
|
|
24231
|
-
return (this.options.preferCanvas && canvas
|
|
24326
|
+
return (this.options.preferCanvas && canvas(options)) || svg(options);
|
|
24232
24327
|
}
|
|
24233
24328
|
});
|
|
24234
24329
|
|
|
@@ -24287,7 +24382,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
24287
24382
|
return new Rectangle(latLngBounds, options);
|
|
24288
24383
|
}
|
|
24289
24384
|
|
|
24290
|
-
SVG.create = create
|
|
24385
|
+
SVG.create = create;
|
|
24291
24386
|
SVG.pointsToPath = pointsToPath;
|
|
24292
24387
|
|
|
24293
24388
|
GeoJSON.geometryToLayer = geometryToLayer;
|
|
@@ -24432,6 +24527,8 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
24432
24527
|
_onKeyDown: function (e) {
|
|
24433
24528
|
if (e.keyCode === 27) {
|
|
24434
24529
|
this._finish();
|
|
24530
|
+
this._clearDeferredResetState();
|
|
24531
|
+
this._resetState();
|
|
24435
24532
|
}
|
|
24436
24533
|
}
|
|
24437
24534
|
});
|
|
@@ -24502,7 +24599,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
24502
24599
|
// @section Interaction Options
|
|
24503
24600
|
Map.mergeOptions({
|
|
24504
24601
|
// @option dragging: Boolean = true
|
|
24505
|
-
// Whether the map
|
|
24602
|
+
// Whether the map is draggable with mouse/touch or not.
|
|
24506
24603
|
dragging: true,
|
|
24507
24604
|
|
|
24508
24605
|
// @section Panning Inertia Options
|
|
@@ -24510,8 +24607,8 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
24510
24607
|
// If enabled, panning of the map will have an inertia effect where
|
|
24511
24608
|
// the map builds momentum while dragging and continues moving in
|
|
24512
24609
|
// the same direction for some time. Feels especially nice on touch
|
|
24513
|
-
// devices. Enabled by default
|
|
24514
|
-
inertia:
|
|
24610
|
+
// devices. Enabled by default.
|
|
24611
|
+
inertia: true,
|
|
24515
24612
|
|
|
24516
24613
|
// @option inertiaDeceleration: Number = 3000
|
|
24517
24614
|
// The rate with which the inertial movement slows down, in pixels/second².
|
|
@@ -24675,7 +24772,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
24675
24772
|
var map = this._map,
|
|
24676
24773
|
options = map.options,
|
|
24677
24774
|
|
|
24678
|
-
noInertia = !options.inertia || this._times.length < 2;
|
|
24775
|
+
noInertia = !options.inertia || e.noInertia || this._times.length < 2;
|
|
24679
24776
|
|
|
24680
24777
|
map.fire('dragend', e);
|
|
24681
24778
|
|
|
@@ -24983,17 +25080,19 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
24983
25080
|
Map.addInitHook('addHandler', 'scrollWheelZoom', ScrollWheelZoom);
|
|
24984
25081
|
|
|
24985
25082
|
/*
|
|
24986
|
-
* L.Map.
|
|
25083
|
+
* L.Map.TapHold is used to simulate `contextmenu` event on long hold,
|
|
25084
|
+
* which otherwise is not fired by mobile Safari.
|
|
24987
25085
|
*/
|
|
24988
25086
|
|
|
25087
|
+
var tapHoldDelay = 600;
|
|
25088
|
+
|
|
24989
25089
|
// @namespace Map
|
|
24990
25090
|
// @section Interaction Options
|
|
24991
25091
|
Map.mergeOptions({
|
|
24992
25092
|
// @section Touch interaction options
|
|
24993
|
-
// @option
|
|
24994
|
-
// Enables
|
|
24995
|
-
|
|
24996
|
-
tap: true,
|
|
25093
|
+
// @option tapHold: Boolean
|
|
25094
|
+
// Enables simulation of `contextmenu` event, default is `true` for mobile Safari.
|
|
25095
|
+
tapHold: Browser.touchNative && Browser.safari && Browser.mobile,
|
|
24997
25096
|
|
|
24998
25097
|
// @option tapTolerance: Number = 15
|
|
24999
25098
|
// The max number of pixels a user can shift his finger during touch
|
|
@@ -25001,7 +25100,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
25001
25100
|
tapTolerance: 15
|
|
25002
25101
|
});
|
|
25003
25102
|
|
|
25004
|
-
var
|
|
25103
|
+
var TapHold = Handler.extend({
|
|
25005
25104
|
addHooks: function () {
|
|
25006
25105
|
on(this._map._container, 'touchstart', this._onDown, this);
|
|
25007
25106
|
},
|
|
@@ -25011,104 +25110,70 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
25011
25110
|
},
|
|
25012
25111
|
|
|
25013
25112
|
_onDown: function (e) {
|
|
25014
|
-
|
|
25015
|
-
|
|
25016
|
-
preventDefault(e);
|
|
25017
|
-
|
|
25018
|
-
this._fireClick = true;
|
|
25019
|
-
|
|
25020
|
-
// don't simulate click or track longpress if more than 1 touch
|
|
25021
|
-
if (e.touches.length > 1) {
|
|
25022
|
-
this._fireClick = false;
|
|
25023
|
-
clearTimeout(this._holdTimeout);
|
|
25024
|
-
return;
|
|
25025
|
-
}
|
|
25026
|
-
|
|
25027
|
-
var first = e.touches[0],
|
|
25028
|
-
el = first.target;
|
|
25113
|
+
clearTimeout(this._holdTimeout);
|
|
25114
|
+
if (e.touches.length !== 1) { return; }
|
|
25029
25115
|
|
|
25116
|
+
var first = e.touches[0];
|
|
25030
25117
|
this._startPos = this._newPos = new Point(first.clientX, first.clientY);
|
|
25031
25118
|
|
|
25032
|
-
// if touching a link, highlight it
|
|
25033
|
-
if (el.tagName && el.tagName.toLowerCase() === 'a') {
|
|
25034
|
-
addClass(el, 'leaflet-active');
|
|
25035
|
-
}
|
|
25036
|
-
|
|
25037
|
-
// simulate long hold but setting a timeout
|
|
25038
25119
|
this._holdTimeout = setTimeout(bind(function () {
|
|
25039
|
-
|
|
25040
|
-
|
|
25041
|
-
this._onUp();
|
|
25042
|
-
this._simulateEvent('contextmenu', first);
|
|
25043
|
-
}
|
|
25044
|
-
}, this), 1000);
|
|
25120
|
+
this._cancel();
|
|
25121
|
+
if (!this._isTapValid()) { return; }
|
|
25045
25122
|
|
|
25046
|
-
|
|
25123
|
+
// prevent simulated mouse events https://w3c.github.io/touch-events/#mouse-events
|
|
25124
|
+
on(document, 'touchend', preventDefault);
|
|
25125
|
+
on(document, 'touchend touchcancel', this._cancelClickPrevent);
|
|
25126
|
+
this._simulateEvent('contextmenu', first);
|
|
25127
|
+
}, this), tapHoldDelay);
|
|
25047
25128
|
|
|
25048
|
-
on(document,
|
|
25049
|
-
|
|
25050
|
-
touchend: this._onUp
|
|
25051
|
-
}, this);
|
|
25129
|
+
on(document, 'touchend touchcancel contextmenu', this._cancel, this);
|
|
25130
|
+
on(document, 'touchmove', this._onMove, this);
|
|
25052
25131
|
},
|
|
25053
25132
|
|
|
25054
|
-
|
|
25055
|
-
|
|
25056
|
-
|
|
25057
|
-
off(document, {
|
|
25058
|
-
touchmove: this._onMove,
|
|
25059
|
-
touchend: this._onUp
|
|
25060
|
-
}, this);
|
|
25061
|
-
|
|
25062
|
-
if (this._fireClick && e && e.changedTouches) {
|
|
25063
|
-
|
|
25064
|
-
var first = e.changedTouches[0],
|
|
25065
|
-
el = first.target;
|
|
25066
|
-
|
|
25067
|
-
if (el && el.tagName && el.tagName.toLowerCase() === 'a') {
|
|
25068
|
-
removeClass(el, 'leaflet-active');
|
|
25069
|
-
}
|
|
25070
|
-
|
|
25071
|
-
this._simulateEvent('mouseup', first);
|
|
25072
|
-
|
|
25073
|
-
// simulate click if the touch didn't move too much
|
|
25074
|
-
if (this._isTapValid()) {
|
|
25075
|
-
this._simulateEvent('click', first);
|
|
25076
|
-
}
|
|
25077
|
-
}
|
|
25133
|
+
_cancelClickPrevent: function cancelClickPrevent() {
|
|
25134
|
+
off(document, 'touchend', preventDefault);
|
|
25135
|
+
off(document, 'touchend touchcancel', cancelClickPrevent);
|
|
25078
25136
|
},
|
|
25079
25137
|
|
|
25080
|
-
|
|
25081
|
-
|
|
25138
|
+
_cancel: function () {
|
|
25139
|
+
clearTimeout(this._holdTimeout);
|
|
25140
|
+
off(document, 'touchend touchcancel contextmenu', this._cancel, this);
|
|
25141
|
+
off(document, 'touchmove', this._onMove, this);
|
|
25082
25142
|
},
|
|
25083
25143
|
|
|
25084
25144
|
_onMove: function (e) {
|
|
25085
25145
|
var first = e.touches[0];
|
|
25086
25146
|
this._newPos = new Point(first.clientX, first.clientY);
|
|
25087
|
-
|
|
25147
|
+
},
|
|
25148
|
+
|
|
25149
|
+
_isTapValid: function () {
|
|
25150
|
+
return this._newPos.distanceTo(this._startPos) <= this._map.options.tapTolerance;
|
|
25088
25151
|
},
|
|
25089
25152
|
|
|
25090
25153
|
_simulateEvent: function (type, e) {
|
|
25091
|
-
var simulatedEvent =
|
|
25154
|
+
var simulatedEvent = new MouseEvent(type, {
|
|
25155
|
+
bubbles: true,
|
|
25156
|
+
cancelable: true,
|
|
25157
|
+
view: window,
|
|
25158
|
+
// detail: 1,
|
|
25159
|
+
screenX: e.screenX,
|
|
25160
|
+
screenY: e.screenY,
|
|
25161
|
+
clientX: e.clientX,
|
|
25162
|
+
clientY: e.clientY,
|
|
25163
|
+
// button: 2,
|
|
25164
|
+
// buttons: 2
|
|
25165
|
+
});
|
|
25092
25166
|
|
|
25093
25167
|
simulatedEvent._simulated = true;
|
|
25094
|
-
e.target._simulatedClick = true;
|
|
25095
|
-
|
|
25096
|
-
simulatedEvent.initMouseEvent(
|
|
25097
|
-
type, true, true, window, 1,
|
|
25098
|
-
e.screenX, e.screenY,
|
|
25099
|
-
e.clientX, e.clientY,
|
|
25100
|
-
false, false, false, false, 0, null);
|
|
25101
25168
|
|
|
25102
25169
|
e.target.dispatchEvent(simulatedEvent);
|
|
25103
25170
|
}
|
|
25104
25171
|
});
|
|
25105
25172
|
|
|
25106
25173
|
// @section Handlers
|
|
25107
|
-
// @property
|
|
25108
|
-
//
|
|
25109
|
-
|
|
25110
|
-
Map.addInitHook('addHandler', 'tap', Tap);
|
|
25111
|
-
}
|
|
25174
|
+
// @property tapHold: Handler
|
|
25175
|
+
// Long tap handler to simulate `contextmenu` event (useful in mobile Safari).
|
|
25176
|
+
Map.addInitHook('addHandler', 'tapHold', TapHold);
|
|
25112
25177
|
|
|
25113
25178
|
/*
|
|
25114
25179
|
* L.Handler.TouchZoom is used by L.Map to add pinch zoom on supported mobile browsers.
|
|
@@ -25122,8 +25187,8 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
25122
25187
|
// Whether the map can be zoomed by touch-dragging with two fingers. If
|
|
25123
25188
|
// passed `'center'`, it will zoom to the center of the view regardless of
|
|
25124
25189
|
// where the touch events (fingers) were. Enabled for touch-capable web
|
|
25125
|
-
// browsers
|
|
25126
|
-
touchZoom: touch
|
|
25190
|
+
// browsers.
|
|
25191
|
+
touchZoom: Browser.touch,
|
|
25127
25192
|
|
|
25128
25193
|
// @option bounceAtZoomLimits: Boolean = true
|
|
25129
25194
|
// Set it to false if you don't want the map to zoom beyond min/max zoom
|
|
@@ -25164,7 +25229,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
25164
25229
|
map._stop();
|
|
25165
25230
|
|
|
25166
25231
|
on(document, 'touchmove', this._onTouchMove, this);
|
|
25167
|
-
on(document, 'touchend', this._onTouchEnd, this);
|
|
25232
|
+
on(document, 'touchend touchcancel', this._onTouchEnd, this);
|
|
25168
25233
|
|
|
25169
25234
|
preventDefault(e);
|
|
25170
25235
|
},
|
|
@@ -25218,7 +25283,7 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
25218
25283
|
cancelAnimFrame(this._animRequest);
|
|
25219
25284
|
|
|
25220
25285
|
off(document, 'touchmove', this._onTouchMove, this);
|
|
25221
|
-
off(document, 'touchend', this._onTouchEnd, this);
|
|
25286
|
+
off(document, 'touchend touchcancel', this._onTouchEnd, this);
|
|
25222
25287
|
|
|
25223
25288
|
// Pinch updates GridLayers' levels only when zoomSnap is off, so zoomSnap becomes noUpdate.
|
|
25224
25289
|
if (this._map.options.zoomAnimation) {
|
|
@@ -25239,98 +25304,97 @@ this._selectedPathOptions&&(e instanceof L.Marker?this._toggleMarkerHighlight(e)
|
|
|
25239
25304
|
Map.Drag = Drag;
|
|
25240
25305
|
Map.Keyboard = Keyboard;
|
|
25241
25306
|
Map.ScrollWheelZoom = ScrollWheelZoom;
|
|
25242
|
-
Map.
|
|
25307
|
+
Map.TapHold = TapHold;
|
|
25243
25308
|
Map.TouchZoom = TouchZoom;
|
|
25244
25309
|
|
|
25245
|
-
exports.
|
|
25246
|
-
exports.Control = Control;
|
|
25247
|
-
exports.control = control;
|
|
25310
|
+
exports.Bounds = Bounds;
|
|
25248
25311
|
exports.Browser = Browser;
|
|
25249
|
-
exports.
|
|
25250
|
-
exports.
|
|
25251
|
-
exports.
|
|
25312
|
+
exports.CRS = CRS;
|
|
25313
|
+
exports.Canvas = Canvas;
|
|
25314
|
+
exports.Circle = Circle;
|
|
25315
|
+
exports.CircleMarker = CircleMarker;
|
|
25252
25316
|
exports.Class = Class;
|
|
25253
|
-
exports.
|
|
25254
|
-
exports.
|
|
25255
|
-
exports.
|
|
25256
|
-
exports.stamp = stamp;
|
|
25257
|
-
exports.setOptions = setOptions;
|
|
25317
|
+
exports.Control = Control;
|
|
25318
|
+
exports.DivIcon = DivIcon;
|
|
25319
|
+
exports.DivOverlay = DivOverlay;
|
|
25258
25320
|
exports.DomEvent = DomEvent;
|
|
25259
25321
|
exports.DomUtil = DomUtil;
|
|
25260
|
-
exports.PosAnimation = PosAnimation;
|
|
25261
25322
|
exports.Draggable = Draggable;
|
|
25262
|
-
exports.
|
|
25263
|
-
exports.
|
|
25264
|
-
exports.
|
|
25265
|
-
exports.
|
|
25266
|
-
exports.
|
|
25267
|
-
exports.
|
|
25268
|
-
exports.
|
|
25269
|
-
exports.transformation = toTransformation;
|
|
25270
|
-
exports.Projection = index;
|
|
25323
|
+
exports.Evented = Evented;
|
|
25324
|
+
exports.FeatureGroup = FeatureGroup;
|
|
25325
|
+
exports.GeoJSON = GeoJSON;
|
|
25326
|
+
exports.GridLayer = GridLayer;
|
|
25327
|
+
exports.Handler = Handler;
|
|
25328
|
+
exports.Icon = Icon;
|
|
25329
|
+
exports.ImageOverlay = ImageOverlay;
|
|
25271
25330
|
exports.LatLng = LatLng;
|
|
25272
|
-
exports.latLng = toLatLng;
|
|
25273
25331
|
exports.LatLngBounds = LatLngBounds;
|
|
25274
|
-
exports.latLngBounds = toLatLngBounds;
|
|
25275
|
-
exports.CRS = CRS;
|
|
25276
|
-
exports.GeoJSON = GeoJSON;
|
|
25277
|
-
exports.geoJSON = geoJSON;
|
|
25278
|
-
exports.geoJson = geoJson;
|
|
25279
25332
|
exports.Layer = Layer;
|
|
25280
25333
|
exports.LayerGroup = LayerGroup;
|
|
25281
|
-
exports.
|
|
25282
|
-
exports.
|
|
25283
|
-
exports.
|
|
25284
|
-
exports.
|
|
25285
|
-
exports.
|
|
25286
|
-
exports.
|
|
25287
|
-
exports.
|
|
25288
|
-
exports.
|
|
25289
|
-
exports.
|
|
25290
|
-
exports.DivOverlay = DivOverlay;
|
|
25334
|
+
exports.LineUtil = LineUtil;
|
|
25335
|
+
exports.Map = Map;
|
|
25336
|
+
exports.Marker = Marker;
|
|
25337
|
+
exports.Mixin = Mixin;
|
|
25338
|
+
exports.Path = Path;
|
|
25339
|
+
exports.Point = Point;
|
|
25340
|
+
exports.PolyUtil = PolyUtil;
|
|
25341
|
+
exports.Polygon = Polygon;
|
|
25342
|
+
exports.Polyline = Polyline;
|
|
25291
25343
|
exports.Popup = Popup;
|
|
25292
|
-
exports.
|
|
25344
|
+
exports.PosAnimation = PosAnimation;
|
|
25345
|
+
exports.Projection = index;
|
|
25346
|
+
exports.Rectangle = Rectangle;
|
|
25347
|
+
exports.Renderer = Renderer;
|
|
25348
|
+
exports.SVG = SVG;
|
|
25349
|
+
exports.SVGOverlay = SVGOverlay;
|
|
25350
|
+
exports.TileLayer = TileLayer;
|
|
25293
25351
|
exports.Tooltip = Tooltip;
|
|
25294
|
-
exports.
|
|
25295
|
-
exports.
|
|
25296
|
-
exports.
|
|
25297
|
-
exports.
|
|
25352
|
+
exports.Transformation = Transformation;
|
|
25353
|
+
exports.Util = Util;
|
|
25354
|
+
exports.VideoOverlay = VideoOverlay;
|
|
25355
|
+
exports.bind = bind;
|
|
25356
|
+
exports.bounds = toBounds;
|
|
25357
|
+
exports.canvas = canvas;
|
|
25358
|
+
exports.circle = circle;
|
|
25359
|
+
exports.circleMarker = circleMarker;
|
|
25360
|
+
exports.control = control;
|
|
25298
25361
|
exports.divIcon = divIcon;
|
|
25299
|
-
exports.
|
|
25300
|
-
exports.
|
|
25301
|
-
exports.
|
|
25302
|
-
exports.
|
|
25303
|
-
exports.GridLayer = GridLayer;
|
|
25362
|
+
exports.extend = extend;
|
|
25363
|
+
exports.featureGroup = featureGroup;
|
|
25364
|
+
exports.geoJSON = geoJSON;
|
|
25365
|
+
exports.geoJson = geoJson;
|
|
25304
25366
|
exports.gridLayer = gridLayer;
|
|
25305
|
-
exports.
|
|
25306
|
-
exports.
|
|
25307
|
-
exports.
|
|
25308
|
-
exports.
|
|
25309
|
-
exports.
|
|
25310
|
-
exports.
|
|
25311
|
-
exports.
|
|
25312
|
-
exports.
|
|
25313
|
-
exports.Circle = Circle;
|
|
25314
|
-
exports.circle = circle;
|
|
25315
|
-
exports.Polyline = Polyline;
|
|
25316
|
-
exports.polyline = polyline;
|
|
25317
|
-
exports.Polygon = Polygon;
|
|
25367
|
+
exports.icon = icon;
|
|
25368
|
+
exports.imageOverlay = imageOverlay;
|
|
25369
|
+
exports.latLng = toLatLng;
|
|
25370
|
+
exports.latLngBounds = toLatLngBounds;
|
|
25371
|
+
exports.layerGroup = layerGroup;
|
|
25372
|
+
exports.map = createMap;
|
|
25373
|
+
exports.marker = marker;
|
|
25374
|
+
exports.point = toPoint;
|
|
25318
25375
|
exports.polygon = polygon;
|
|
25319
|
-
exports.
|
|
25376
|
+
exports.polyline = polyline;
|
|
25377
|
+
exports.popup = popup;
|
|
25320
25378
|
exports.rectangle = rectangle;
|
|
25321
|
-
exports.
|
|
25322
|
-
exports.
|
|
25379
|
+
exports.setOptions = setOptions;
|
|
25380
|
+
exports.stamp = stamp;
|
|
25381
|
+
exports.svg = svg;
|
|
25382
|
+
exports.svgOverlay = svgOverlay;
|
|
25383
|
+
exports.tileLayer = tileLayer;
|
|
25384
|
+
exports.tooltip = tooltip;
|
|
25385
|
+
exports.transformation = toTransformation;
|
|
25386
|
+
exports.version = version;
|
|
25387
|
+
exports.videoOverlay = videoOverlay;
|
|
25323
25388
|
|
|
25324
25389
|
var oldL = window.L;
|
|
25325
25390
|
exports.noConflict = function() {
|
|
25326
25391
|
window.L = oldL;
|
|
25327
25392
|
return this;
|
|
25328
25393
|
};
|
|
25329
|
-
|
|
25330
25394
|
// Always export us to window global (see #2364)
|
|
25331
25395
|
window.L = exports;
|
|
25332
25396
|
|
|
25333
|
-
}))
|
|
25397
|
+
}));
|
|
25334
25398
|
|
|
25335
25399
|
|
|
25336
25400
|
|
|
@@ -25955,8 +26019,8 @@ module.exports = styleTagTransform;
|
|
|
25955
26019
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
25956
26020
|
/* harmony export */ "ZT": () => (/* binding */ __extends)
|
|
25957
26021
|
/* harmony export */ });
|
|
25958
|
-
/* unused harmony exports __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __createBinding, __exportStar, __values, __read, __spread, __spreadArrays, __spreadArray, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault, __classPrivateFieldGet, __classPrivateFieldSet */
|
|
25959
|
-
|
|
26022
|
+
/* unused harmony exports __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __createBinding, __exportStar, __values, __read, __spread, __spreadArrays, __spreadArray, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault, __classPrivateFieldGet, __classPrivateFieldSet, __classPrivateFieldIn */
|
|
26023
|
+
/******************************************************************************
|
|
25960
26024
|
Copyright (c) Microsoft Corporation.
|
|
25961
26025
|
|
|
25962
26026
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -28171,6 +28235,11 @@ module.exports = __webpack_require__.p + "1e8408af1a34bdf61457.png";
|
|
|
28171
28235
|
/******/ // no jsonp function
|
|
28172
28236
|
/******/ })();
|
|
28173
28237
|
/******/
|
|
28238
|
+
/******/ /* webpack/runtime/nonce */
|
|
28239
|
+
/******/ (() => {
|
|
28240
|
+
/******/ __webpack_require__.nc = undefined;
|
|
28241
|
+
/******/ })();
|
|
28242
|
+
/******/
|
|
28174
28243
|
/************************************************************************/
|
|
28175
28244
|
var __webpack_exports__ = {};
|
|
28176
28245
|
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
|