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