diff --git a/dist/leaflet-rotate-src.js b/dist/leaflet-rotate-src.js index ab96290..4f16105 100644 --- a/dist/leaflet-rotate-src.js +++ b/dist/leaflet-rotate-src.js @@ -6,10 +6,7 @@ /** * L.DomUtil */ - const domUtilProto = { - setTransform: L.DomUtil.setTransform, - setPosition: L.DomUtil.setPosition - }; + const domUtilProto = L.extend({}, L.DomUtil); L.extend(L.DomUtil, { @@ -108,10 +105,7 @@ /** * L.DivOverlay */ - const divOverlayProto = { - getEvents: L.DivOverlay.prototype.getEvents, - _updatePosition: L.DivOverlay.prototype._updatePosition, - }; + const divOverlayProto = L.extend({}, L.DivOverlay.prototype); L.DivOverlay.include({ @@ -149,10 +143,7 @@ /** * L.Popup */ - const popupProto = { - _animateZoom: L.Popup.prototype._animateZoom, - _adjustPan: L.Popup.prototype._adjustPan, - }; + const popupProto = L.extend({}, L.Popup.prototype); L.Popup.include({ @@ -218,10 +209,7 @@ /** * L.Tooltip */ - const tooltipProto = { - _updatePosition: L.Tooltip.prototype._updatePosition, - _animateZoom: L.Tooltip.prototype._animateZoom, - }; + const tooltipProto = L.extend({}, L.Tooltip.prototype); L.Tooltip.include({ @@ -237,7 +225,7 @@ _animateZoom: function(e) { if (!this._map._rotate) { - return tooltipProto._animateZoom.call(this); + return tooltipProto._animateZoom.call(this, e); } var pos = this._map._latLngToNewLayerPoint(this._latlng, e.zoom, e.center); @@ -250,9 +238,7 @@ /** * L.Icon */ - const iconProto = { - _updatePosition: L.Icon.prototype._setIconStyles, - }; + const iconProto = L.extend({}, L.Icon.prototype); L.Icon.include({ @@ -288,11 +274,7 @@ /** * L.Handler.MarkerDrag */ - var markerDragProto = { - _onDragStart: function() {}, - _onDrag: function() {}, - _onDragEnd: function() {}, - }; + var markerDragProto; var MarkerDrag = { @@ -321,7 +303,7 @@ // Reverse calculation from mapPane coordinates to rotatePane coordinates iconPos = marker._map.mapPanePointToRotatedPoint(iconPos); } - latlng = marker._map.layerPointToLatLng(iconPos); + var latlng = marker._map.layerPointToLatLng(iconPos); marker._latlng = latlng; e.latlng = latlng; @@ -341,7 +323,7 @@ if (this._marker._map._rotate) { this._marker.update(); } - markerDragProto.update.call(this, e); + markerDragProto._onDragEnd.call(this, e); }, }; @@ -349,13 +331,7 @@ /** * L.Marker */ - const markerProto = { - getEvents: L.Marker.prototype.getEvents, - onAdd: L.Marker.prototype.onAdd, - _initInteraction: L.Marker.prototype._initInteraction, - _setPos: L.Marker.prototype._setPos, - _updateZIndex: L.Marker.prototype._updateZIndex, - }; + const markerProto = L.extend({}, L.Marker.prototype); L.Marker.mergeOptions({ @@ -368,6 +344,7 @@ rotateWithView: false, }); + L.Marker.include({ getEvents: function() { @@ -383,12 +360,12 @@ var ret = markerProto._initInteraction.call(this); if (this.dragging && this._map && this._map._rotate) { // L.Handler.MarkerDrag is used internally by L.Marker to make the markers draggable - markerDragProto._onDragStart = this.dragging._onDragStart.bind(this.dragging); - markerDragProto._onDrag = this.dragging._onDrag.bind(this.dragging); - markerDragProto._onDragEnd = this.dragging._onDragEnd.bind(this.dragging); + markerDragProto = markerDragProto || Object.getPrototypeOf(this.dragging); this.dragging._onDragStart = MarkerDrag._onDragStart.bind(this.dragging); this.dragging._onDrag = MarkerDrag._onDrag.bind(this.dragging); this.dragging._onDragEnd = MarkerDrag._onDragEnd.bind(this.dragging); + this.dragging.disable(); + this.dragging.enable(); } return ret; }, @@ -436,10 +413,7 @@ /** * L.GridLayer */ - const gridLayerProto = { - getEvents: L.GridLayer.prototype.getEvents, - _getTiledPixelBounds: L.GridLayer.prototype._getTiledPixelBounds, - }; + const gridLayerProto = L.extend({}, L.GridLayer.prototype); L.GridLayer.include({ @@ -479,11 +453,7 @@ /** * L.Canvas */ - const canvasProto = { - onAdd: L.Canvas.prototype.onAdd, - onRemove: L.Canvas.prototype.onRemove, - _update: L.Canvas.prototype._update, - }; + const canvasProto = L.extend({}, L.Canvas.prototype); L.Canvas.include({ @@ -509,12 +479,7 @@ /** * L.Renderer */ - const rendererProto = { - onAdd: L.Renderer.prototype.onAdd, - onRemove: L.Renderer.prototype.onRemove, - _updateTransform: L.Renderer.prototype._updateTransform, - _update: L.Renderer.prototype._update, - }; + const rendererProto = L.extend({}, L.Renderer.prototype); L.Renderer.include({ @@ -575,9 +540,7 @@ /** * L.SVG */ - const svgProto = { - _update: L.SVG.prototype._update, - }; + const svgProto = L.extend({}, L.SVG.prototype); L.SVG.include({ @@ -593,19 +556,9 @@ /** * L.Map */ - const mapProto = { - initialize: L.Map.prototype.initialize, - createPane: L.Map.prototype.createPane, - containerPointToLayerPoint: L.Map.prototype.containerPointToLayerPoint, - getBounds: L.Map.prototype.getBounds, - layerPointToContainerPoint: L.Map.prototype.layerPointToContainerPoint, - _initPanes: L.Map.prototype._initPanes, - _getCenterOffset: L.Map.prototype._getCenterOffset, - _getNewPixelOrigin: L.Map.prototype._getNewPixelOrigin, - _handleGeolocationResponse: L.Map.prototype._handleGeolocationResponse, - }; + const mapProto = L.extend({}, L.Map.prototype); - L.Map.mergeOptions({ rotate: false, }); + L.Map.mergeOptions({ rotate: false, bearing: 0, }); L.Map.include({ @@ -615,21 +568,24 @@ this._bearing = 0; } mapProto.initialize.call(this, id, options); - }, - - createPane: function(name, container) { - if (!this._rotate || name == 'mapPane') { - return mapProto.createPane.call(this, name, container); + if(this.options.rotate){ + this.setBearing(this.options.bearing); } - // init "rotatePane" - if (!this._rotatePane) { - // this._pivot = this.getSize().divideBy(2); - this._rotatePane = mapProto.createPane.call(this, 'rotatePane', this._mapPane); - L.DomUtil.setPosition(this._rotatePane, new L.Point(0, 0), this._bearing, this._pivot); - } - return mapProto.createPane.call(this, name, container || this._rotatePane); }, + // createPane: function(name, container) { + // if (!this._rotate || name == 'mapPane') { + // return mapProto.createPane.call(this, name, container); + // } + // // init "rotatePane" + // if (!this._rotatePane) { + // // this._pivot = this.getSize().divideBy(2); + // this._rotatePane = mapProto.createPane.call(this, 'rotatePane', this._mapPane); + // L.DomUtil.setPosition(this._rotatePane, new L.Point(0, 0), this._bearing, this._pivot); + // } + // return mapProto.createPane.call(this, name, container || this._rotatePane); + // }, + containerPointToLayerPoint: function(point) { // (Point) if (!this._rotate) { return mapProto.containerPointToLayerPoint.call(this, point); @@ -1133,9 +1089,9 @@ // @section Interaction Options L.Map.mergeOptions({ - // @section Touch interaction options - // @option touchRotate: Boolean|String = * - // Whether the map can be rotated with a two-finger rotation gesture + // @section ShiftKey interaction options + // @option shiftKeyRotate: Boolean|String = * + // Whether the map can be rotated with a shit-wheel rotation shiftKeyRotate: true, }); diff --git a/dist/leaflet-rotate-src.js.map b/dist/leaflet-rotate-src.js.map index 4d25ccf..62e5afb 100644 --- a/dist/leaflet-rotate-src.js.map +++ b/dist/leaflet-rotate-src.js.map @@ -1 +1 @@ -{"version":3,"file":"leaflet-rotate-src.js","sources":["../src/dom/DomUtil.js","../src/dom/Draggable.js","../src/geometry/Point.js","../src/layer/DivOverlay.js","../src/layer/Popup.js","../src/layer/Tooltip.js","../src/layer/marker/Icon.js","../src/layer/marker/Marker.js","../src/layer/tile/GridLayer.js","../src/layer/vector/Canvas.js","../src/layer/vector/Renderer.js","../src/layer/vector/SVG.js","../src/map/Map.js","../src/map/handler/CompassBearing.js","../src/map/handler/ContainerMutation.js","../src/map/handler/TouchGestures.js","../src/map/handler/TouchRotate.js","../src/map/handler/ShiftKeyRotate.js","../src/map/handler/TouchZoom.js","../src/control/Rotate.js"],"sourcesContent":["/**\n * L.DomUtil\n */\nconst domUtilProto = {\n setTransform: L.DomUtil.setTransform,\n setPosition: L.DomUtil.setPosition\n};\n\nL.extend(L.DomUtil, {\n\n setTransform: function(el, offset, scale, bearing, pivot) {\n var pos = offset || new L.Point(0, 0);\n\n if (!bearing) {\n offset = pos._round();\n return domUtilProto.setTransform.call(this, el, offset, scale);\n }\n\n pos = pos.rotateFrom(bearing, pivot);\n\n el.style[L.DomUtil.TRANSFORM] =\n 'translate3d(' + pos.x + 'px,' + pos.y + 'px' + ',0)' +\n (scale ? ' scale(' + scale + ')' : '') +\n ' rotate(' + bearing + 'rad)';\n },\n\n setPosition: function(el, point, bearing, pivot) { // (HTMLElement, Point[, Boolean])\n if (!bearing) {\n return domUtilProto.setPosition.call(this, el, point);\n }\n\n /*eslint-disable */\n el._leaflet_pos = point;\n /*eslint-enable */\n\n if (L.Browser.any3d) {\n L.DomUtil.setTransform(el, point, undefined, bearing, pivot);\n } else {\n el.style.left = point.x + 'px';\n el.style.top = point.y + 'px';\n }\n },\n\n // Constants for rotation\n DEG_TO_RAD: Math.PI / 180,\n RAD_TO_DEG: 180 / Math.PI,\n\n});\r\n","/**\n * L.Draggable\n */\nL.Draggable.include({\n\n updateMapBearing: function(mapBearing) {\n this._mapBearing = mapBearing;\n },\n\n});\r\n","/**\n * L.Point\n */\nL.extend(L.Point.prototype, {\n\n // Rotate around (0,0) by applying the 2D rotation matrix:\n // ⎡ x' ⎤ = ⎡ cos θ -sin θ ⎤ ⎡ x ⎤\n // ⎣ y' ⎦ ⎣ sin θ cos θ ⎦ ⎣ y ⎦\n // Theta must be given in radians.\n rotate: function(theta) {\n if (!theta) { return this; }\n var sinTheta = Math.sin(theta);\n var cosTheta = Math.cos(theta);\n\n return new L.Point(\n this.x * cosTheta - this.y * sinTheta,\n this.x * sinTheta + this.y * cosTheta\n );\n },\n\n // Rotate around (pivot.x, pivot.y) by:\n // 1. subtract (pivot.x, pivot.y)\n // 2. rotate around (0, 0)\n // 3. add (pivot.x, pivot.y) back\n // same as `this.subtract(pivot).rotate(theta).add(pivot)`\n rotateFrom: function(theta, pivot) {\n if (!theta) { return this; }\n var sinTheta = Math.sin(theta);\n var cosTheta = Math.cos(theta);\n var cx = pivot.x,\n cy = pivot.y;\n var x = this.x - cx,\n y = this.y - cy;\n\n return new L.Point(\n x * cosTheta - y * sinTheta + cx,\n x * sinTheta + y * cosTheta + cy\n );\n },\n\n});\r\n","/**\n * L.DivOverlay\n */\nconst divOverlayProto = {\n getEvents: L.DivOverlay.prototype.getEvents,\n _updatePosition: L.DivOverlay.prototype._updatePosition,\n};\n\nL.DivOverlay.include({\n\n getEvents: function() {\n return L.extend(divOverlayProto.getEvents.call(this), { rotate: this._updatePosition });\n },\n\n _updatePosition: function() {\n if (!this._map) { return; }\n\n var pos = this._map.latLngToLayerPoint(this._latlng),\n offset = L.point(this.options.offset),\n anchor = this._getAnchor();\n\n if (this._zoomAnimated) {\n // TODO: use divOverlayProto._updatePosition\n if (this._map._rotate) {\n pos = this._map.rotatedPointToMapPanePoint(pos);\n }\n L.DomUtil.setPosition(this._container, pos.add(anchor));\n } else {\n offset = offset.add(pos).add(anchor);\n }\n\n var bottom = this._containerBottom = -offset.y,\n left = this._containerLeft = -Math.round(this._containerWidth / 2) + offset.x;\n\n // bottom position the popup in case the height of the popup changes (images loading etc)\n this._container.style.bottom = bottom + 'px';\n this._container.style.left = left + 'px';\n },\n\n});\r\n","/**\n * L.Popup\n */\nconst popupProto = {\n _animateZoom: L.Popup.prototype._animateZoom,\n _adjustPan: L.Popup.prototype._adjustPan,\n};\n\nL.Popup.include({\n\n _animateZoom: function(e) {\n if (!this._map._rotate) {\n popupProto._animateZoom.call(this, e);\n }\n var pos = this._map._latLngToNewLayerPoint(this._latlng, e.zoom, e.center),\n anchor = this._getAnchor();\n\n pos = this._map.rotatedPointToMapPanePoint(pos);\n\n L.DomUtil.setPosition(this._container, pos.add(anchor));\n },\n\n _adjustPan: function() {\n if (!this.options.autoPan || (this._map._panAnim && this._map._panAnim._inProgress)) { return; }\n\n var map = this._map,\n marginBottom = parseInt(L.DomUtil.getStyle(this._container, 'marginBottom'), 10) || 0,\n containerHeight = this._container.offsetHeight + marginBottom,\n containerWidth = this._containerWidth,\n layerPos = new L.Point(this._containerLeft, -containerHeight - this._containerBottom);\n\n layerPos._add(L.DomUtil.getPosition(this._container));\n\n // var containerPos = map.layerPointToContainerPoint(layerPos);\n // TODO: use popupProto._adjustPan\n var containerPos = layerPos._add(this._map._getMapPanePos()),\n padding = L.point(this.options.autoPanPadding),\n paddingTL = L.point(this.options.autoPanPaddingTopLeft || padding),\n paddingBR = L.point(this.options.autoPanPaddingBottomRight || padding),\n size = map.getSize(),\n dx = 0,\n dy = 0;\n\n if (containerPos.x + containerWidth + paddingBR.x > size.x) { // right\n dx = containerPos.x + containerWidth - size.x + paddingBR.x;\n }\n if (containerPos.x - dx - paddingTL.x < 0) { // left\n dx = containerPos.x - paddingTL.x;\n }\n if (containerPos.y + containerHeight + paddingBR.y > size.y) { // bottom\n dy = containerPos.y + containerHeight - size.y + paddingBR.y;\n }\n if (containerPos.y - dy - paddingTL.y < 0) { // top\n dy = containerPos.y - paddingTL.y;\n }\n\n // @namespace Map\n // @section Popup events\n // @event autopanstart: Event\n // Fired when the map starts autopanning when opening a popup.\n if (dx || dy) {\n map\n .fire('autopanstart')\n .panBy([dx, dy]);\n }\n },\n\n});\r\n","/**\n * L.Tooltip\n */\nconst tooltipProto = {\n _updatePosition: L.Tooltip.prototype._updatePosition,\n _animateZoom: L.Tooltip.prototype._animateZoom,\n};\n\nL.Tooltip.include({\n\n _updatePosition: function() {\n if (!this._map._rotate) {\n return tooltipProto._updatePosition.call(this);\n }\n var pos = this._map.latLngToLayerPoint(this._latlng);\n\n pos = this._map.rotatedPointToMapPanePoint(pos);\n this._setPosition(pos);\n },\n\n _animateZoom: function(e) {\n if (!this._map._rotate) {\n return tooltipProto._animateZoom.call(this);\n }\n var pos = this._map._latLngToNewLayerPoint(this._latlng, e.zoom, e.center);\n\n pos = this._map.rotatedPointToMapPanePoint(pos);\n this._setPosition(pos);\n },\n\n});\r\n","/**\n * L.Icon\n */\nconst iconProto = {\n _updatePosition: L.Icon.prototype._setIconStyles,\n};\n\nL.Icon.include({\n\n _setIconStyles: function(img, name) {\n var options = this.options;\n var sizeOption = options[name + 'Size'];\n\n if (typeof sizeOption === 'number') {\n sizeOption = [sizeOption, sizeOption];\n }\n\n var size = L.point(sizeOption),\n anchor = L.point(name === 'shadow' && options.shadowAnchor || options.iconAnchor ||\n size && size.divideBy(2, true));\n\n img.className = 'leaflet-marker-' + name + ' ' + (options.className || '');\n\n if (anchor) {\n img.style.marginLeft = (-anchor.x) + 'px';\n img.style.marginTop = (-anchor.y) + 'px';\n // TODO: use iconProto._setIconStyles\n img.style[L.DomUtil.TRANSFORM + \"Origin\"] = anchor.x + \"px \" + anchor.y + \"px 0px\";\n }\n\n if (size) {\n img.style.width = size.x + 'px';\n img.style.height = size.y + 'px';\n }\n },\n\n});\r\n","/**\n * L.Handler.MarkerDrag\n */\nvar markerDragProto = {\n _onDragStart: function() {},\n _onDrag: function() {},\n _onDragEnd: function() {},\n};\n\nvar MarkerDrag = {\n\n _onDragStart: function() {\n if (!this._marker._map._rotate) {\n return markerDragProto._onDragStart.call(this)\n }\n this._draggable.updateMapBearing(this._marker._map._bearing);\n },\n\n _onDrag: function(e) {\n var marker = this._marker,\n // TODO: use markerDragProto._onDrag\n rotated_marker = marker.options.rotation || marker.options.rotateWithView,\n shadow = marker._shadow,\n iconPos = L.DomUtil.getPosition(marker._icon);\n\n // TODO: use markerDragProto._onDrag\n // update shadow position\n if (!rotated_marker && shadow) {\n L.DomUtil.setPosition(shadow, iconPos);\n }\n\n // TODO: use markerDragProto._onDrag\n if (marker._map._rotate) {\n // Reverse calculation from mapPane coordinates to rotatePane coordinates\n iconPos = marker._map.mapPanePointToRotatedPoint(iconPos);\n }\n latlng = marker._map.layerPointToLatLng(iconPos);\n\n marker._latlng = latlng;\n e.latlng = latlng;\n e.oldLatLng = this._oldLatLng;\n\n // TODO: use markerDragProto._onDrag\n if (rotated_marker) marker.setLatLng(latlng); // use `setLatLng` to presisit rotation. low efficiency\n else marker.fire('move', e); // `setLatLng` will trig 'move' event. we imitate here.\n\n // @event drag: Event\n // Fired repeatedly while the user drags the marker.\n marker\n .fire('drag', e);\n },\n\n _onDragEnd: function(e) {\n if (this._marker._map._rotate) {\n this._marker.update();\n }\n markerDragProto.update.call(this, e);\n },\n\n};\n\n/**\n * L.Marker\n */\nconst markerProto = {\n getEvents: L.Marker.prototype.getEvents,\n onAdd: L.Marker.prototype.onAdd,\n _initInteraction: L.Marker.prototype._initInteraction,\n _setPos: L.Marker.prototype._setPos,\n _updateZIndex: L.Marker.prototype._updateZIndex,\n};\n\nL.Marker.mergeOptions({\n\n // @option rotation: Number = 0\n // Rotation of this marker in rad\n rotation: 0,\n\n // @option rotateWithView: Boolean = false\n // Rotate this marker when map rotates\n rotateWithView: false,\n\n});\nL.Marker.include({\n\n getEvents: function() {\n return L.extend(markerProto.getEvents.call(this), { rotate: this.update });\n },\n\n onAdd: function(map) {\n markerProto.onAdd.call(this, map);\n map.on('rotate', this.update, this);\n },\n\n _initInteraction: function() {\n var ret = markerProto._initInteraction.call(this);\n if (this.dragging && this._map && this._map._rotate) {\n // L.Handler.MarkerDrag is used internally by L.Marker to make the markers draggable\n markerDragProto._onDragStart = this.dragging._onDragStart.bind(this.dragging);\n markerDragProto._onDrag = this.dragging._onDrag.bind(this.dragging);\n markerDragProto._onDragEnd = this.dragging._onDragEnd.bind(this.dragging);\n this.dragging._onDragStart = MarkerDrag._onDragStart.bind(this.dragging);\n this.dragging._onDrag = MarkerDrag._onDrag.bind(this.dragging);\n this.dragging._onDragEnd = MarkerDrag._onDragEnd.bind(this.dragging);\n }\n return ret;\n },\n\n _setPos: function(pos) {\n\n // TODO: use markerProto._setPos\n if (this._map._rotate) {\n pos = this._map.rotatedPointToMapPanePoint(pos);\n }\n\n // TODO: use markerProto._setPos\n var bearing = this.options.rotation || 0;\n if (this.options.rotateWithView) {\n bearing += this._map._bearing;\n }\n\n // TODO: use markerProto._setPos\n L.DomUtil.setPosition(this._icon, pos, bearing, pos);\n\n // TODO: use markerProto._setPos\n if (this._shadow) {\n L.DomUtil.setPosition(this._shadow, pos, bearing, pos);\n }\n\n this._zIndex = pos.y + this.options.zIndexOffset;\n\n this._resetZIndex();\n },\n\n _updateZIndex: function(offset) {\n if (!this._map._rotate) {\n return markerProto._updateZIndex.call(this, offset)\n }\n this._icon.style.zIndex = Math.round(this._zIndex + offset);\n },\n\n setRotation: function(rotation) {\n this.options.rotation = rotation;\n this.update();\n },\n\n});\r\n","/**\n * L.GridLayer\n */\nconst gridLayerProto = {\n getEvents: L.GridLayer.prototype.getEvents,\n _getTiledPixelBounds: L.GridLayer.prototype._getTiledPixelBounds,\n};\n\nL.GridLayer.include({\n\n getEvents: function() {\n var events = gridLayerProto.getEvents.call(this);\n if (this._map._rotate && !this.options.updateWhenIdle) {\n if (!this._onRotate) {\n this._onRotate = L.Util.throttle(this._onMoveEnd, this.options.updateInterval, this);\n }\n events.rotate = this._onRotate;\n }\n return events;\n },\n\n _getTiledPixelBounds: function(center) {\n if (!this._map._rotate) {\n return gridLayerProto._getTiledPixelBounds.call(this, center);\n }\n\n var map = this._map,\n mapZoom = map._animatingZoom ? Math.max(map._animateToZoom, map.getZoom()) : map.getZoom(),\n scale = map.getZoomScale(mapZoom, this._tileZoom),\n pixelCenter = map.project(center, this._tileZoom).floor(),\n size = map.getSize(),\n halfSize = new L.Bounds([\n map.containerPointToLayerPoint([0, 0]).floor(),\n map.containerPointToLayerPoint([size.x, 0]).floor(),\n map.containerPointToLayerPoint([0, size.y]).floor(),\n map.containerPointToLayerPoint([size.x, size.y]).floor()\n ]).getSize().divideBy(scale * 2);\n\n return new L.Bounds(pixelCenter.subtract(halfSize), pixelCenter.add(halfSize));\n },\n\n});\r\n","/**\n * L.Canvas\n */\nconst canvasProto = {\n onAdd: L.Canvas.prototype.onAdd,\n onRemove: L.Canvas.prototype.onRemove,\n _update: L.Canvas.prototype._update,\n};\n\nL.Canvas.include({\n\n onAdd: function() {\n canvasProto.onAdd.call(this);\n // When rotating the canvas itself, it is cleared by some weird reason, so redraw.\n this._map.on('rotate', this._redraw, this);\n },\n\n onRemove: function() {\n canvasProto.onRemove.call(this);\n this._map.off('rotate', this._redraw, this);\n },\n\n _update: function() {\n canvasProto._update.call(this);\n // Tell paths to redraw themselves\n this.fire('update')\n },\n\n});\r\n","/**\n * L.Renderer\n */\nconst rendererProto = {\n onAdd: L.Renderer.prototype.onAdd,\n onRemove: L.Renderer.prototype.onRemove,\n _updateTransform: L.Renderer.prototype._updateTransform,\n _update: L.Renderer.prototype._update,\n};\n\nL.Renderer.include({\n\n onAdd: function() {\n rendererProto.onAdd.call(this);\n // this._map.on('rotate', this._update, this);\n },\n\n onRemove: function() {\n rendererProto.onRemove.call(this);\n // this._map.off('rotate', this._update, this);\n },\n\n _updateTransform: function(center, zoom) {\n if (!this._map._rotate) {\n return rendererProto._updateTransform.call(this, center, zoom);\n }\n var scale = this._map.getZoomScale(zoom, this._zoom),\n offset = this._map._latLngToNewLayerPoint(this._topLeft, zoom, center);\n if (L.Browser.any3d) {\n L.DomUtil.setTransform(this._container, offset, scale);\n } else {\n L.DomUtil.setPosition(this._container, offset);\n }\n },\n\n _update: function() {\n if (!this._map._rotate) {\n return rendererProto._update.call(this);\n }\n // Update pixel bounds of renderer container (for positioning/sizing/clipping later)\n // Subclasses are responsible of firing the 'update' event.\n var p = this.options.padding,\n map = this._map,\n size = this._map.getSize(),\n padMin = size.multiplyBy(-p),\n padMax = size.multiplyBy(1 + p),\n //// TODO: Somehow refactor this out into map.something() - the code is\n //// pretty much the same as in GridLayer.\n clip = new L.Bounds([\n map.containerPointToLayerPoint([padMin.x, padMin.y]).floor(),\n map.containerPointToLayerPoint([padMin.x, padMax.y]).floor(),\n map.containerPointToLayerPoint([padMax.x, padMin.y]).floor(),\n map.containerPointToLayerPoint([padMax.x, padMax.y]).floor()\n ]);\n //min = this._map.containerPointToLayerPoint(size.multiplyBy(-p)).round();\n\n this._bounds = clip;\n // this._topLeft = clip.min;\n this._topLeft = this._map.layerPointToLatLng(clip.min);\n\n this._center = this._map.getCenter();\n this._zoom = this._map.getZoom();\n },\n\n});\r\n","/**\n * L.SVG\n */\nconst svgProto = {\n _update: L.SVG.prototype._update,\n};\n\nL.SVG.include({\n\n _update: function() {\n svgProto._update.call(this);\n if (this._map._rotate) {\n this.fire('update');\n }\n },\n\n});\r\n","/**\n * L.Map\n */\nconst mapProto = {\n initialize: L.Map.prototype.initialize,\n createPane: L.Map.prototype.createPane,\n containerPointToLayerPoint: L.Map.prototype.containerPointToLayerPoint,\n getBounds: L.Map.prototype.getBounds,\n layerPointToContainerPoint: L.Map.prototype.layerPointToContainerPoint,\n _initPanes: L.Map.prototype._initPanes,\n _getCenterOffset: L.Map.prototype._getCenterOffset,\n _getNewPixelOrigin: L.Map.prototype._getNewPixelOrigin,\n _handleGeolocationResponse: L.Map.prototype._handleGeolocationResponse,\n};\n\nL.Map.mergeOptions({ rotate: false, });\n\nL.Map.include({\n\n initialize: function(id, options) { // (HTMLElement or String, Object)\n if (options.rotate) {\n this._rotate = true;\n this._bearing = 0;\n }\n mapProto.initialize.call(this, id, options);\n },\n\n createPane: function(name, container) {\n if (!this._rotate || name == 'mapPane') {\n return mapProto.createPane.call(this, name, container);\n }\n // init \"rotatePane\"\n if (!this._rotatePane) {\n // this._pivot = this.getSize().divideBy(2);\n this._rotatePane = mapProto.createPane.call(this, 'rotatePane', this._mapPane);\n L.DomUtil.setPosition(this._rotatePane, new L.Point(0, 0), this._bearing, this._pivot);\n }\n return mapProto.createPane.call(this, name, container || this._rotatePane);\n },\n\n containerPointToLayerPoint: function(point) { // (Point)\n if (!this._rotate) {\n return mapProto.containerPointToLayerPoint.call(this, point);\n }\n return L.point(point)\n .subtract(this._getMapPanePos())\n .rotateFrom(-this._bearing, this._getRotatePanePos())\n .subtract(this._getRotatePanePos());\n },\n\n getBounds: function() {\n if (!this._rotate) {\n return mapProto.getBounds.call(this);\n }\n var size = this.getSize();\n var topleft = this.layerPointToLatLng(this.containerPointToLayerPoint([0, 0])),\n topright = this.layerPointToLatLng(this.containerPointToLayerPoint([size.x, 0])),\n bottomright = this.layerPointToLatLng(this.containerPointToLayerPoint([size.x, size.y])),\n bottomleft = this.layerPointToLatLng(this.containerPointToLayerPoint([0, size.y]));\n\n // Use LatLngBounds' build-in constructor that automatically extends the bounds to fit the passed points\n return new L.LatLngBounds([topleft, topright, bottomright, bottomleft]);\n },\n\n layerPointToContainerPoint: function(point) { // (Point)\n if (!this._rotate) {\n return mapProto.layerPointToContainerPoint.call(this, point);\n }\n return L.point(point)\n .add(this._getRotatePanePos())\n .rotateFrom(this._bearing, this._getRotatePanePos())\n .add(this._getMapPanePos());\n },\n\n // Rotation methods\n // setBearing will work with just the 'theta' parameter.\n setBearing: function(theta) {\n if (!L.Browser.any3d || !this._rotate) { return; }\n\n var rotatePanePos = this._getRotatePanePos();\n var halfSize = this.getSize().divideBy(2);\n this._pivot = this._getMapPanePos().clone().multiplyBy(-1).add(halfSize);\n\n rotatePanePos = rotatePanePos.rotateFrom(-this._bearing, this._pivot);\n\n this._bearing = theta * L.DomUtil.DEG_TO_RAD; // TODO: mod 360\n this._rotatePanePos = rotatePanePos.rotateFrom(this._bearing, this._pivot);\n\n L.DomUtil.setPosition(this._rotatePane, rotatePanePos, this._bearing, this._pivot);\n\n this.fire('rotate');\n },\n\n getBearing: function() {\n return this._bearing * L.DomUtil.RAD_TO_DEG;\n },\n\n _initPanes: function() {\n var panes = this._panes = {};\n this._paneRenderers = {};\n\n // @section\n //\n // Panes are DOM elements used to control the ordering of layers on the map. You\n // can access panes with [`map.getPane`](#map-getpane) or\n // [`map.getPanes`](#map-getpanes) methods. New panes can be created with the\n // [`map.createPane`](#map-createpane) method.\n //\n // Every map has the following default panes that differ only in zIndex.\n //\n // @pane mapPane: HTMLElement = 'auto'\n // Pane that contains all other map panes\n\n this._mapPane = this.createPane('mapPane', this._container);\n L.DomUtil.setPosition(this._mapPane, new L.Point(0, 0));\n\n if (this._rotate) {\n this._rotatePane = this.createPane('rotatePane', this._mapPane);\n this._norotatePane = this.createPane('norotatePane', this._mapPane);\n\n // @pane tilePane: HTMLElement = 2\n // Pane for tile layers\n this.createPane('tilePane', this._rotatePane);\n // @pane overlayPane: HTMLElement = 4\n // Pane for overlays like polylines and polygons\n this.createPane('overlayPane', this._rotatePane);\n\n // @pane shadowPane: HTMLElement = 5\n // Pane for overlay shadows (e.g. marker shadows)\n this.createPane('shadowPane', this._norotatePane);\n // @pane markerPane: HTMLElement = 6\n // Pane for marker icons\n this.createPane('markerPane', this._norotatePane);\n // @pane tooltipPane: HTMLElement = 650\n // Pane for tooltips.\n this.createPane('tooltipPane', this._norotatePane);\n // @pane popupPane: HTMLElement = 700\n // Pane for popups.\n this.createPane('popupPane', this._norotatePane);\n } else {\n // @pane tilePane: HTMLElement = 2\n // Pane for tile layers\n this.createPane('tilePane');\n // @pane overlayPane: HTMLElement = 4\n // Pane for overlays like polylines and polygons\n this.createPane('overlayPane');\n // @pane shadowPane: HTMLElement = 5\n // Pane for overlay shadows (e.g. marker shadows)\n this.createPane('shadowPane');\n // @pane markerPane: HTMLElement = 6\n // Pane for marker icons\n this.createPane('markerPane');\n // @pane tooltipPane: HTMLElement = 650\n // Pane for tooltips.\n this.createPane('tooltipPane');\n // @pane popupPane: HTMLElement = 700\n // Pane for popups.\n this.createPane('popupPane');\n }\n\n if (!this.options.markerZoomAnimation) {\n L.DomUtil.addClass(panes.markerPane, 'leaflet-zoom-hide');\n L.DomUtil.addClass(panes.shadowPane, 'leaflet-zoom-hide');\n }\n },\n\n // @method rotatedPointToMapPanePoint(point: Point): Point\n // Converts a coordinate from the rotated pane reference system\n // to the reference system of the not rotated map pane.\n rotatedPointToMapPanePoint: function(point) {\n return L.point(point).rotate(this._bearing)._add(this._getRotatePanePos());\n },\n\n // @method mapPanePointToRotatedPoint(point: Point): Point\n // Converts a coordinate from the not rotated map pane reference system\n // to the reference system of the rotated pane.\n mapPanePointToRotatedPoint: function(point) {\n return L.point(point)._subtract(this._getRotatePanePos()).rotate(-this._bearing);\n },\n\n // offset of the specified place to the current center in pixels\n _getCenterOffset: function(latlng) {\n var centerOffset = mapProto._getCenterOffset.call(this, latlng);\n if (this._rotate) {\n centerOffset = centerOffset.rotate(this._bearing);\n }\n return centerOffset;\n },\n\n _getRotatePanePos: function() {\n return this._rotatePanePos || new L.Point(0, 0);\n },\n\n _getNewPixelOrigin: function(center, zoom) {\n var viewHalf = this.getSize()._divideBy(2);\n if (!this._rotate) {\n mapProto._getNewPixelOrigin.call(this, center, zoom);\n }\n return this.project(center, zoom)\n .rotate(this._bearing)\n ._subtract(viewHalf)\n ._add(this._getMapPanePos())\n ._add(this._getRotatePanePos())\n .rotate(-this._bearing)\n ._round();\n },\n\n _handleGeolocationResponse: function(pos) {\n var lat = pos.coords.latitude,\n lng = pos.coords.longitude,\n // TODO: use mapProto._handleGeolocationResponse\n hdg = pos.coords.heading,\n latlng = new L.LatLng(lat, lng),\n bounds = latlng.toBounds(pos.coords.accuracy),\n options = this._locateOptions;\n\n if (options.setView) {\n var zoom = this.getBoundsZoom(bounds);\n this.setView(latlng, options.maxZoom ? Math.min(zoom, options.maxZoom) : zoom);\n }\n\n var data = {\n latlng: latlng,\n bounds: bounds,\n timestamp: pos.timestamp,\n // TODO: use mapProto._handleGeolocationResponse\n heading: hdg\n };\n\n for (var i in pos.coords) {\n if (typeof pos.coords[i] === 'number') {\n data[i] = pos.coords[i];\n }\n }\n\n // @event locationfound: LocationEvent\n // Fired when geolocation (using the [`locate`](#map-locate) method)\n // went successfully.\n this.fire('locationfound', data);\n },\n\n});\r\n","/*\n * L.Map.CompassBearing will rotate the map according to a smartphone's compass.\n */\n\nL.Map.CompassBearing = L.Handler.extend({\n\n initialize: function(map) {\n if (!window.DeviceOrientationEvent) {\n this._capable = false;\n return;\n }\n this._capable = true;\n this._map = map;\n\n this._throttled = L.Util.throttle(this._onDeviceOrientation, 1000, this);\n },\n\n addHooks: function() {\n if (this._capable && this._map._rotate) {\n L.DomEvent.on(window, 'deviceorientation', this._throttled, this);\n }\n },\n\n removeHooks: function() {\n if (this._capable && this._map._rotate) {\n L.DomEvent.off(window, 'deviceorientation', this._throttled, this);\n }\n },\n\n _onDeviceOrientation: function(event) {\n if (event.alpha !== null) {\n this._map.setBearing(event.alpha - window.orientation);\n }\n },\n\n});\n\n// @section Handlers\n// @property compassBearing: Handler\n// Compass bearing handler.\nL.Map.addInitHook('addHandler', 'compassBearing', L.Map.CompassBearing);\r\n","/*\n * L.Handler.ContainerMutation triggers `invalidateResize` when the map's DOM container mutates.\n */\n\n// @namespace Map\n// @section Interaction Options\nL.Map.mergeOptions({\n\n // @option trackContainerMutation: Boolean = false\n // Whether the map uses [mutation observers](https://developer.mozilla.org/docs/Web/API/MutationObserver)\n // to detect changes in its container and trigger `invalidateSize`. Disabled\n // by default due to support not being available in all web browsers.\n trackContainerMutation: false\n\n});\n\nL.Map.ContainerMutation = L.Handler.extend({\n\n addHooks: function() {\n if (!L.Browser.mutation) {\n return;\n }\n\n if (!this._observer) {\n this._observer = new MutationObserver(L.Util.bind(this._onMutation, this));\n }\n\n this._observer.observe(this._map.getContainer(), {\n childList: false,\n attributes: true,\n characterData: false,\n subtree: false,\n attributeFilter: ['style']\n });\n },\n\n removeHooks: function() {\n if (!L.Browser.mutation) {\n return;\n }\n this._observer.disconnect();\n },\n\n _onMutation: function() {\n this._map.invalidateSize();\n },\n\n});\n\n// @section Handlers\n// @property containerMutation: Handler\n// Container mutation handler (disabled unless [`trackContainerMutation`](#map-trackcontainermutation) is set).\nL.Map.addInitHook('addHandler', 'trackContainerMutation', L.Map.ContainerMutation);\r\n","/*\n * L.Handler.TouchGestures is both TouchZoom plus TouchRotate.\n */\n\n// @namespace Map\n// @section Interaction Options\nL.Map.mergeOptions({\n\n // @option bounceAtZoomLimits: Boolean = true\n // Set it to false if you don't want the map to zoom beyond min/max zoom\n // and then bounce back when pinch-zooming.\n bounceAtZoomLimits: true,\n\n});\n\nL.Map.TouchGestures = L.Handler.extend({\n\n initialize: function(map) {\n this._map = map;\n this.rotate = !!this._map.options.touchRotate;\n this.zoom = !!this._map.options.touchZoom;\n },\n\n addHooks: function() {\n L.DomEvent.on(this._map._container, 'touchstart', this._onTouchStart, this);\n },\n\n removeHooks: function() {\n L.DomEvent.off(this._map._container, 'touchstart', this._onTouchStart, this);\n },\n\n _onTouchStart: function(e) {\n var map = this._map;\n\n if (!e.touches || e.touches.length !== 2 || map._animatingZoom || this._zooming || this._rotating) { return; }\n\n var p1 = map.mouseEventToContainerPoint(e.touches[0]),\n p2 = map.mouseEventToContainerPoint(e.touches[1]),\n vector = p1.subtract(p2);\n\n this._centerPoint = map.getSize()._divideBy(2);\n this._startLatLng = map.containerPointToLatLng(this._centerPoint);\n\n if (this.zoom) {\n if (map.options.touchZoom !== 'center') {\n this._pinchStartLatLng = map.containerPointToLatLng(p1.add(p2)._divideBy(2));\n }\n this._startDist = p1.distanceTo(p2);\n this._startZoom = map.getZoom();\n this._zooming = true;\n } else {\n this._zooming = false;\n }\n\n if (this.rotate) {\n this._startTheta = Math.atan(vector.x / vector.y);\n this._startBearing = map.getBearing();\n if (vector.y < 0) { this._startBearing += 180; }\n this._rotating = true;\n } else {\n this._rotating = false;\n }\n\n this._moved = false;\n\n map.stop();\n\n L.DomEvent\n .on(document, 'touchmove', this._onTouchMove, this)\n .on(document, 'touchend', this._onTouchEnd, this);\n\n L.DomEvent.preventDefault(e);\n },\n\n _onTouchMove: function(e) {\n if (!e.touches || e.touches.length !== 2 || !(this._zooming || this._rotating)) { return; }\n\n var map = this._map,\n p1 = map.mouseEventToContainerPoint(e.touches[0]),\n p2 = map.mouseEventToContainerPoint(e.touches[1]),\n vector = p1.subtract(p2),\n scale = p1.distanceTo(p2) / this._startDist,\n delta;\n\n if (this._rotating) {\n var theta = Math.atan(vector.x / vector.y);\n var bearingDelta = (theta - this._startTheta) * L.DomUtil.RAD_TO_DEG;\n if (vector.y < 0) { bearingDelta += 180; }\n if (bearingDelta) {\n /// TODO: The pivot should be the last touch point, but zoomAnimation manages to\n /// overwrite the rotate pane position. Maybe related to #3529.\n map.setBearing(this._startBearing - bearingDelta);\n }\n }\n\n if (this._zooming) {\n this._zoom = map.getScaleZoom(scale, this._startZoom);\n\n if (!map.options.bounceAtZoomLimits && (\n (this._zoom < map.getMinZoom() && scale < 1) ||\n (this._zoom > map.getMaxZoom() && scale > 1))) {\n this._zoom = map._limitZoom(this._zoom);\n }\n\n if (map.options.touchZoom === 'center') {\n this._center = this._startLatLng;\n if (scale === 1) { return; }\n } else {\n // Get delta from pinch to center, so centerLatLng is delta applied to initial pinchLatLng\n delta = p1._add(p2)._divideBy(2)._subtract(this._centerPoint);\n if (scale === 1 && delta.x === 0 && delta.y === 0) { return; }\n\n var alpha = -map.getBearing() * L.DomUtil.DEG_TO_RAD;\n\n this._center = map.unproject(map.project(this._pinchStartLatLng).subtract(delta.rotate(alpha)));\n }\n\n }\n\n if (!this._moved) {\n map._moveStart(true);\n this._moved = true;\n }\n\n L.Util.cancelAnimFrame(this._animRequest);\n\n var moveFn = L.bind(map._move, map, this._center, this._zoom, { pinch: true, round: false });\n this._animRequest = L.Util.requestAnimFrame(moveFn, this, true);\n\n L.DomEvent.preventDefault(e);\n },\n\n _onTouchEnd: function() {\n if (!this._moved || !this._zooming) {\n this._zooming = false;\n return;\n }\n\n this._zooming = false;\n this._rotating = false;\n L.Util.cancelAnimFrame(this._animRequest);\n\n L.DomEvent\n .off(document, 'touchmove', this._onTouchMove)\n .off(document, 'touchend', this._onTouchEnd);\n\n if (this.zoom) {\n // Pinch updates GridLayers' levels only when snapZoom is off, so snapZoom becomes noUpdate.\n if (this._map.options.zoomAnimation) {\n this._map._animateZoom(this._center, this._map._limitZoom(this._zoom), true, this._map.options.snapZoom);\n } else {\n this._map._resetView(this._center, this._map._limitZoom(this._zoom));\n }\n }\n },\n\n});\n\n// @section Handlers\n// @property touchGestures: Handler\n// Touch gestures handler.\nL.Map.addInitHook('addHandler', 'touchGestures', L.Map.TouchGestures);\r\n","/*\n * L.Handler.TouchRotate is used by L.Map to add two-finger rotation gestures.\n */\n\n// @namespace Map\n// @section Interaction Options\nL.Map.mergeOptions({\n\n // @section Touch interaction options\n // @option touchRotate: Boolean|String = *\n // Whether the map can be rotated with a two-finger rotation gesture\n touchRotate: false,\n\n});\n\nL.Map.TouchRotate = L.Handler.extend({\n\n addHooks: function() {\n this._map.touchGestures.enable();\n this._map.touchGestures.rotate = true;\n },\n\n removeHooks: function() {\n this._map.touchGestures.rotate = false;\n },\n\n});\n\n// @section Handlers\n// @property touchZoom: Handler\n// Touch rotate handler.\nL.Map.addInitHook('addHandler', 'touchRotate', L.Map.TouchRotate);\r\n","/*\n * L.Handler.ShiftKeyRotate is used by L.Map to add shift-wheel rotation.\n */\n\n// @namespace Map\n// @section Interaction Options\nL.Map.mergeOptions({\n\n // @section Touch interaction options\n // @option touchRotate: Boolean|String = *\n // Whether the map can be rotated with a two-finger rotation gesture\n shiftKeyRotate: true,\n\n});\n\nL.Map.ShiftKeyRotate = L.Handler.extend({\n\n addHooks: function() {\n L.DomEvent.on(this._map._container, \"wheel\", this._handleShiftScroll, this);\n // this._map.shiftKeyRotate.enable();\n this._map.shiftKeyRotate.rotate = true;\n },\n\n removeHooks: function() {\n L.DomEvent.off(this._map._container, \"wheel\", this._handleShiftScroll, this);\n this._map.shiftKeyRotate.rotate = false;\n },\n\n _handleShiftScroll: function(e) {\n if (e.shiftKey) {\n e.preventDefault();\n this._map.scrollWheelZoom.disable();\n this._map.setBearing((this._map._bearing * L.DomUtil.RAD_TO_DEG) + e.deltaY);\n } else {\n this._map.scrollWheelZoom.enable();\n }\n },\n\n});\n\n// @section Handlers\n// @property touchZoom: Handler\n// Touch rotate handler.\nL.Map.addInitHook('addHandler', 'shiftKeyRotate', L.Map.ShiftKeyRotate);\r\n","/*\n * L.Handler.TouchZoom is used by L.Map to add pinch zoom on supported mobile browsers.\n */\n\n// @namespace Map\n// @section Interaction Options\nL.Map.mergeOptions({\n\n // @section Touch interaction options\n // @option touchZoom: Boolean|String = *\n // Whether the map can be zoomed by touch-dragging with two fingers. If\n // passed `'center'`, it will zoom to the center of the view regardless of\n // where the touch events (fingers) were. Enabled for touch-capable web\n // browsers except for old Androids.\n touchZoom: L.Browser.touch && !L.Browser.android23,\n\n bounceAtZoomLimits: false,\n});\n\nL.Map.TouchZoom = L.Handler.extend({\n\n addHooks: function() {\n L.DomUtil.addClass(this._map._container, 'leaflet-touch-zoom');\n this._map.touchGestures.enable();\n this._map.touchGestures.zoom = true;\n },\n\n removeHooks: function() {\n L.DomUtil.removeClass(this._map._container, 'leaflet-touch-zoom');\n this._map.touchGestures.zoom = false;\n },\n\n});\n\n// @section Handlers\n// @property touchZoom: Handler\n// Touch zoom handler.\nL.Map.addInitHook('addHandler', 'touchZoom', L.Map.TouchZoom);\r\n","/**\n * L.Control.Rotate\n */\n\n// A tri-state control for map rotation. States are:\n// Locked (default)\n// Unlocked (user can pinch-rotate)\n// Follow (rotation follows device orientation, if available)\nL.Control.Rotate = L.Control.extend({\n\n options: {\n position: 'topleft',\n closeOnZeroBearing: true\n },\n\n onAdd: function(map) {\n this._onDeviceOrientation = L.Util.throttle(this._unthrottledOnDeviceOrientation, 100, this);\n\n var container = this._container = L.DomUtil.create('div', 'leaflet-control-rotate leaflet-bar');\n\n // this.button = L.Control.Zoom.prototype._createButton.call(this, 'R', 'leaflet-control-rotate', 'leaflet-control-rotate', container, this._toggleLock);\n\n var arrow = this._arrow = L.DomUtil.create('span', 'leaflet-control-rotate-arrow');\n\n arrow.style.backgroundImage = `url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M10.5 14l4-8 4 8h-8z'/%3E%3Cpath d='M10.5 16l4 8 4-8h-8z' fill='%23ccc'/%3E%3C/svg%3E\")`;\n arrow.style.cursor = 'grab';\n arrow.style.display = 'block';\n arrow.style.width = '100%';\n arrow.style.height = '100%';\n arrow.style.backgroundRepeat = 'no-repeat';\n arrow.style.backgroundPosition = '50%';\n\n // Copy-pasted from L.Control.Zoom\n var link = this._link = L.DomUtil.create('a', 'leaflet-control-rotate-toggle', container);\n link.appendChild(arrow);\n link.href = '#';\n link.title = 'leaflet-control-rotate-toggle';\n\n L.DomEvent\n .on(link, 'dblclick', L.DomEvent.stopPropagation)\n .on(link, 'mousedown', this._handleMouseDown, this)\n .on(link, 'click', L.DomEvent.stop)\n .on(link, 'click', this._cycleState, this)\n .on(link, 'click', this._refocusOnMap, this);\n\n if (!L.Browser.any3d) {\n L.DomUtil.addClass(link, 'leaflet-disabled');\n }\n\n this._restyle();\n\n map.on('rotate', this._restyle.bind(this));\n\n // State flag\n this._follow = false;\n this._canFollow = false;\n\n if (this.options.closeOnZeroBearing && map.getBearing() === 0) {\n container.style.display = 'none';\n }\n\n return container;\n },\n\n _handleMouseDown: function(e) {\n L.DomEvent.stopPropagation(e);\n this.dragging = true;\n this.dragstartX = e.pageX;\n this.dragstartY = e.pageY;\n L.DomEvent\n .on(document, 'mousemove', this._handleMouseDrag, this)\n .on(document, 'mouseup', this._handleMouseUp, this);\n },\n\n _handleMouseUp: function(e) {\n L.DomEvent.stopPropagation(e);\n this.dragging = false;\n\n L.DomEvent\n .off(document, 'mousemove', this._handleMouseDrag, this)\n .off(document, 'mouseup', this._handleMouseUp, this);\n },\n\n _handleMouseDrag: function(e) {\n if (!this.dragging) { return; }\n var deltaX = e.clientX - this.dragstartX;\n this._map.setBearing(deltaX);\n },\n\n _cycleState: function(ev) {\n var map = this._map;\n\n if (!map) { return; }\n\n if (!map.touchRotate.enabled() && !map.compassBearing.enabled()) {\n // Go from disabled to touch\n map.touchRotate.enable();\n\n // console.log('state is now: touch rotate');\n } else {\n\n if (!map.compassBearing.enabled()) {\n // Go from touch to compass\n map.touchRotate.disable();\n map.compassBearing.enable();\n\n // console.log('state is now: compass');\n\n // It is possible that compass is not supported. If so,\n // the hangler will automatically go from compass to disabled.\n } else {\n // Go from compass to disabled\n map.compassBearing.disable();\n\n // console.log('state is now: locked');\n\n map.setBearing(0);\n if (this.options.closeOnZeroBearing) {\n map.touchRotate.enable();\n }\n }\n }\n this._restyle();\n },\n\n _restyle: function() {\n if (this._map.options.rotate) {\n var map = this._map;\n var bearing = map.getBearing();\n if (this.options.closeOnZeroBearing && bearing) {\n this._container.style.display = 'block';\n }\n\n var cssTransform = 'rotate(' + bearing + 'deg)';\n this._arrow.style.transform = cssTransform;\n\n if (map.compassBearing.enabled()) {\n this._link.style.backgroundColor = 'orange';\n } else if (map.touchRotate.enabled()) {\n this._link.style.backgroundColor = null;\n } else {\n this._link.style.backgroundColor = 'grey';\n if (this.options.closeOnZeroBearing && map.getBearing() === 0) {\n this._container.style.display = 'none';\n }\n }\n } else {\n L.DomUtil.addClass(link, 'leaflet-disabled');\n }\n },\n\n});\n\nL.control.rotate = function(options) {\n return new L.Control.Rotate(options);\n};\n\nL.Map.mergeOptions({\n rotateControl: true,\n});\n\nL.Map.addInitHook(function() {\n if (this.options.rotateControl) {\n var options = typeof this.options.rotateControl === 'object' ? this.options.rotateControl : {};\n this.rotateControl = L.control.rotate(options);\n this.addControl(this.rotateControl);\n }\n});\r\n"],"names":[],"mappings":";;;;;IAAA;IACA;IACA;IACA,MAAM,YAAY,GAAG;IACrB,IAAI,YAAY,EAAE,CAAC,CAAC,OAAO,CAAC,YAAY;IACxC,IAAI,WAAW,EAAE,CAAC,CAAC,OAAO,CAAC,WAAW;IACtC,CAAC,CAAC;AACF;IACA,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE;AACpB;IACA,IAAI,YAAY,EAAE,SAAS,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE;IAC9D,QAAQ,IAAI,GAAG,GAAG,MAAM,IAAI,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC9C;IACA,QAAQ,IAAI,CAAC,OAAO,EAAE;IACtB,YAAY,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC;IAClC,YAAY,OAAO,YAAY,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IAC3E,SAAS;AACT;IACA,QAAQ,GAAG,GAAG,GAAG,CAAC,UAAU,CAAC,OAAO,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GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACvD,QAAQ,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAC5C,KAAK;IACL,CAAC,CAAC,CAAC;;;;"} \ No newline at end of file +{"version":3,"file":"leaflet-rotate-src.js","sources":["../src/dom/DomUtil.js","../src/dom/Draggable.js","../src/geometry/Point.js","../src/layer/DivOverlay.js","../src/layer/Popup.js","../src/layer/Tooltip.js","../src/layer/marker/Icon.js","../src/layer/marker/Marker.js","../src/layer/tile/GridLayer.js","../src/layer/vector/Canvas.js","../src/layer/vector/Renderer.js","../src/layer/vector/SVG.js","../src/map/Map.js","../src/map/handler/CompassBearing.js","../src/map/handler/ContainerMutation.js","../src/map/handler/TouchGestures.js","../src/map/handler/TouchRotate.js","../src/map/handler/ShiftKeyRotate.js","../src/map/handler/TouchZoom.js","../src/control/Rotate.js"],"sourcesContent":["/**\n * L.DomUtil\n */\nconst domUtilProto = L.extend({}, L.DomUtil);\n\nL.extend(L.DomUtil, {\n\n setTransform: function(el, offset, scale, bearing, pivot) {\n var pos = offset || new L.Point(0, 0);\n\n if (!bearing) {\n offset = pos._round();\n return domUtilProto.setTransform.call(this, el, offset, scale);\n }\n\n pos = pos.rotateFrom(bearing, pivot);\n\n el.style[L.DomUtil.TRANSFORM] =\n 'translate3d(' + pos.x + 'px,' + pos.y + 'px' + ',0)' +\n (scale ? ' scale(' + scale + ')' : '') +\n ' rotate(' + bearing + 'rad)';\n },\n\n setPosition: function(el, point, bearing, pivot) { // (HTMLElement, Point[, Boolean])\n if (!bearing) {\n return domUtilProto.setPosition.call(this, el, point);\n }\n\n /*eslint-disable */\n el._leaflet_pos = point;\n /*eslint-enable */\n\n if (L.Browser.any3d) {\n L.DomUtil.setTransform(el, point, undefined, bearing, pivot);\n } else {\n el.style.left = point.x + 'px';\n el.style.top = point.y + 'px';\n }\n },\n\n // Constants for rotation\n DEG_TO_RAD: Math.PI / 180,\n RAD_TO_DEG: 180 / Math.PI,\n\n});\r\n","/**\n * L.Draggable\n */\nL.Draggable.include({\n\n updateMapBearing: function(mapBearing) {\n this._mapBearing = mapBearing;\n },\n\n});\r\n","/**\n * L.Point\n */\nL.extend(L.Point.prototype, {\n\n // Rotate around (0,0) by applying the 2D rotation matrix:\n // ⎡ x' ⎤ = ⎡ cos θ -sin θ ⎤ ⎡ x ⎤\n // ⎣ y' ⎦ ⎣ sin θ cos θ ⎦ ⎣ y ⎦\n // Theta must be given in radians.\n rotate: function(theta) {\n if (!theta) { return this; }\n var sinTheta = Math.sin(theta);\n var cosTheta = Math.cos(theta);\n\n return new L.Point(\n this.x * cosTheta - this.y * sinTheta,\n this.x * sinTheta + this.y * cosTheta\n );\n },\n\n // Rotate around (pivot.x, pivot.y) by:\n // 1. subtract (pivot.x, pivot.y)\n // 2. rotate around (0, 0)\n // 3. add (pivot.x, pivot.y) back\n // same as `this.subtract(pivot).rotate(theta).add(pivot)`\n rotateFrom: function(theta, pivot) {\n if (!theta) { return this; }\n var sinTheta = Math.sin(theta);\n var cosTheta = Math.cos(theta);\n var cx = pivot.x,\n cy = pivot.y;\n var x = this.x - cx,\n y = this.y - cy;\n\n return new L.Point(\n x * cosTheta - y * sinTheta + cx,\n x * sinTheta + y * cosTheta + cy\n );\n },\n\n});\r\n","/**\n * L.DivOverlay\n */\nconst divOverlayProto = L.extend({}, L.DivOverlay.prototype);\n\nL.DivOverlay.include({\n\n getEvents: function() {\n return L.extend(divOverlayProto.getEvents.call(this), { rotate: this._updatePosition });\n },\n\n _updatePosition: function() {\n if (!this._map) { return; }\n\n var pos = this._map.latLngToLayerPoint(this._latlng),\n offset = L.point(this.options.offset),\n anchor = this._getAnchor();\n\n if (this._zoomAnimated) {\n // TODO: use divOverlayProto._updatePosition\n if (this._map._rotate) {\n pos = this._map.rotatedPointToMapPanePoint(pos);\n }\n L.DomUtil.setPosition(this._container, pos.add(anchor));\n } else {\n offset = offset.add(pos).add(anchor);\n }\n\n var bottom = this._containerBottom = -offset.y,\n left = this._containerLeft = -Math.round(this._containerWidth / 2) + offset.x;\n\n // bottom position the popup in case the height of the popup changes (images loading etc)\n this._container.style.bottom = bottom + 'px';\n this._container.style.left = left + 'px';\n },\n\n});\n","/**\n * L.Popup\n */\nconst popupProto = L.extend({}, L.Popup.prototype);\n\nL.Popup.include({\n\n _animateZoom: function(e) {\n if (!this._map._rotate) {\n popupProto._animateZoom.call(this, e);\n }\n var pos = this._map._latLngToNewLayerPoint(this._latlng, e.zoom, e.center),\n anchor = this._getAnchor();\n\n pos = this._map.rotatedPointToMapPanePoint(pos);\n\n L.DomUtil.setPosition(this._container, pos.add(anchor));\n },\n\n _adjustPan: function() {\n if (!this.options.autoPan || (this._map._panAnim && this._map._panAnim._inProgress)) { return; }\n\n var map = this._map,\n marginBottom = parseInt(L.DomUtil.getStyle(this._container, 'marginBottom'), 10) || 0,\n containerHeight = this._container.offsetHeight + marginBottom,\n containerWidth = this._containerWidth,\n layerPos = new L.Point(this._containerLeft, -containerHeight - this._containerBottom);\n\n layerPos._add(L.DomUtil.getPosition(this._container));\n\n // var containerPos = map.layerPointToContainerPoint(layerPos);\n // TODO: use popupProto._adjustPan\n var containerPos = layerPos._add(this._map._getMapPanePos()),\n padding = L.point(this.options.autoPanPadding),\n paddingTL = L.point(this.options.autoPanPaddingTopLeft || padding),\n paddingBR = L.point(this.options.autoPanPaddingBottomRight || padding),\n size = map.getSize(),\n dx = 0,\n dy = 0;\n\n if (containerPos.x + containerWidth + paddingBR.x > size.x) { // right\n dx = containerPos.x + containerWidth - size.x + paddingBR.x;\n }\n if (containerPos.x - dx - paddingTL.x < 0) { // left\n dx = containerPos.x - paddingTL.x;\n }\n if (containerPos.y + containerHeight + paddingBR.y > size.y) { // bottom\n dy = containerPos.y + containerHeight - size.y + paddingBR.y;\n }\n if (containerPos.y - dy - paddingTL.y < 0) { // top\n dy = containerPos.y - paddingTL.y;\n }\n\n // @namespace Map\n // @section Popup events\n // @event autopanstart: Event\n // Fired when the map starts autopanning when opening a popup.\n if (dx || dy) {\n map\n .fire('autopanstart')\n .panBy([dx, dy]);\n }\n },\n\n});\n","/**\n * L.Tooltip\n */\nconst tooltipProto = L.extend({}, L.Tooltip.prototype);\n\nL.Tooltip.include({\n\n _updatePosition: function() {\n if (!this._map._rotate) {\n return tooltipProto._updatePosition.call(this);\n }\n var pos = this._map.latLngToLayerPoint(this._latlng);\n\n pos = this._map.rotatedPointToMapPanePoint(pos);\n this._setPosition(pos);\n },\n\n _animateZoom: function(e) {\n if (!this._map._rotate) {\n return tooltipProto._animateZoom.call(this, e);\n }\n var pos = this._map._latLngToNewLayerPoint(this._latlng, e.zoom, e.center);\n\n pos = this._map.rotatedPointToMapPanePoint(pos);\n this._setPosition(pos);\n },\n\n});\n","/**\n * L.Icon\n */\nconst iconProto = L.extend({}, L.Icon.prototype);\n\nL.Icon.include({\n\n _setIconStyles: function(img, name) {\n var options = this.options;\n var sizeOption = options[name + 'Size'];\n\n if (typeof sizeOption === 'number') {\n sizeOption = [sizeOption, sizeOption];\n }\n\n var size = L.point(sizeOption),\n anchor = L.point(name === 'shadow' && options.shadowAnchor || options.iconAnchor ||\n size && size.divideBy(2, true));\n\n img.className = 'leaflet-marker-' + name + ' ' + (options.className || '');\n\n if (anchor) {\n img.style.marginLeft = (-anchor.x) + 'px';\n img.style.marginTop = (-anchor.y) + 'px';\n // TODO: use iconProto._setIconStyles\n img.style[L.DomUtil.TRANSFORM + \"Origin\"] = anchor.x + \"px \" + anchor.y + \"px 0px\";\n }\n\n if (size) {\n img.style.width = size.x + 'px';\n img.style.height = size.y + 'px';\n }\n },\n\n});\n","/**\n * L.Handler.MarkerDrag\n */\nvar markerDragProto;\n\nvar MarkerDrag = {\n\n _onDragStart: function() {\n if (!this._marker._map._rotate) {\n return markerDragProto._onDragStart.call(this)\n }\n this._draggable.updateMapBearing(this._marker._map._bearing);\n },\n\n _onDrag: function(e) {\n var marker = this._marker,\n // TODO: use markerDragProto._onDrag\n rotated_marker = marker.options.rotation || marker.options.rotateWithView,\n shadow = marker._shadow,\n iconPos = L.DomUtil.getPosition(marker._icon);\n\n // TODO: use markerDragProto._onDrag\n // update shadow position\n if (!rotated_marker && shadow) {\n L.DomUtil.setPosition(shadow, iconPos);\n }\n\n // TODO: use markerDragProto._onDrag\n if (marker._map._rotate) {\n // Reverse calculation from mapPane coordinates to rotatePane coordinates\n iconPos = marker._map.mapPanePointToRotatedPoint(iconPos);\n }\n var latlng = marker._map.layerPointToLatLng(iconPos);\n\n marker._latlng = latlng;\n e.latlng = latlng;\n e.oldLatLng = this._oldLatLng;\n\n // TODO: use markerDragProto._onDrag\n if (rotated_marker) marker.setLatLng(latlng); // use `setLatLng` to presisit rotation. low efficiency\n else marker.fire('move', e); // `setLatLng` will trig 'move' event. we imitate here.\n\n // @event drag: Event\n // Fired repeatedly while the user drags the marker.\n marker\n .fire('drag', e);\n },\n\n _onDragEnd: function(e) {\n if (this._marker._map._rotate) {\n this._marker.update();\n }\n markerDragProto._onDragEnd.call(this, e);\n },\n\n};\n\n/**\n * L.Marker\n */\nconst markerProto = L.extend({}, L.Marker.prototype);\n\nL.Marker.mergeOptions({\n\n // @option rotation: Number = 0\n // Rotation of this marker in rad\n rotation: 0,\n\n // @option rotateWithView: Boolean = false\n // Rotate this marker when map rotates\n rotateWithView: false,\n\n});\n\nL.Marker.include({\n\n getEvents: function() {\n return L.extend(markerProto.getEvents.call(this), { rotate: this.update });\n },\n\n onAdd: function(map) {\n markerProto.onAdd.call(this, map);\n map.on('rotate', this.update, this);\n },\n\n _initInteraction: function() {\n var ret = markerProto._initInteraction.call(this);\n if (this.dragging && this._map && this._map._rotate) {\n // L.Handler.MarkerDrag is used internally by L.Marker to make the markers draggable\n markerDragProto = markerDragProto || Object.getPrototypeOf(this.dragging);\n this.dragging._onDragStart = MarkerDrag._onDragStart.bind(this.dragging);\n this.dragging._onDrag = MarkerDrag._onDrag.bind(this.dragging);\n this.dragging._onDragEnd = MarkerDrag._onDragEnd.bind(this.dragging);\n this.dragging.disable();\n this.dragging.enable();\n }\n return ret;\n },\n\n _setPos: function(pos) {\n\n // TODO: use markerProto._setPos\n if (this._map._rotate) {\n pos = this._map.rotatedPointToMapPanePoint(pos);\n }\n\n // TODO: use markerProto._setPos\n var bearing = this.options.rotation || 0;\n if (this.options.rotateWithView) {\n bearing += this._map._bearing;\n }\n\n // TODO: use markerProto._setPos\n L.DomUtil.setPosition(this._icon, pos, bearing, pos);\n\n // TODO: use markerProto._setPos\n if (this._shadow) {\n L.DomUtil.setPosition(this._shadow, pos, bearing, pos);\n }\n\n this._zIndex = pos.y + this.options.zIndexOffset;\n\n this._resetZIndex();\n },\n\n _updateZIndex: function(offset) {\n if (!this._map._rotate) {\n return markerProto._updateZIndex.call(this, offset)\n }\n this._icon.style.zIndex = Math.round(this._zIndex + offset);\n },\n\n setRotation: function(rotation) {\n this.options.rotation = rotation;\n this.update();\n },\n\n});\n","/**\n * L.GridLayer\n */\nconst gridLayerProto = L.extend({}, L.GridLayer.prototype);\n\nL.GridLayer.include({\n\n getEvents: function() {\n var events = gridLayerProto.getEvents.call(this);\n if (this._map._rotate && !this.options.updateWhenIdle) {\n if (!this._onRotate) {\n this._onRotate = L.Util.throttle(this._onMoveEnd, this.options.updateInterval, this);\n }\n events.rotate = this._onRotate;\n }\n return events;\n },\n\n _getTiledPixelBounds: function(center) {\n if (!this._map._rotate) {\n return gridLayerProto._getTiledPixelBounds.call(this, center);\n }\n\n var map = this._map,\n mapZoom = map._animatingZoom ? Math.max(map._animateToZoom, map.getZoom()) : map.getZoom(),\n scale = map.getZoomScale(mapZoom, this._tileZoom),\n pixelCenter = map.project(center, this._tileZoom).floor(),\n size = map.getSize(),\n halfSize = new L.Bounds([\n map.containerPointToLayerPoint([0, 0]).floor(),\n map.containerPointToLayerPoint([size.x, 0]).floor(),\n map.containerPointToLayerPoint([0, size.y]).floor(),\n map.containerPointToLayerPoint([size.x, size.y]).floor()\n ]).getSize().divideBy(scale * 2);\n\n return new L.Bounds(pixelCenter.subtract(halfSize), pixelCenter.add(halfSize));\n },\n\n});\n","/**\n * L.Canvas\n */\nconst canvasProto = L.extend({}, L.Canvas.prototype);\n\nL.Canvas.include({\n\n onAdd: function() {\n canvasProto.onAdd.call(this);\n // When rotating the canvas itself, it is cleared by some weird reason, so redraw.\n this._map.on('rotate', this._redraw, this);\n },\n\n onRemove: function() {\n canvasProto.onRemove.call(this);\n this._map.off('rotate', this._redraw, this);\n },\n\n _update: function() {\n canvasProto._update.call(this);\n // Tell paths to redraw themselves\n this.fire('update')\n },\n\n});\n","/**\n * L.Renderer\n */\nconst rendererProto = L.extend({}, L.Renderer.prototype);\n\nL.Renderer.include({\n\n onAdd: function() {\n rendererProto.onAdd.call(this);\n // this._map.on('rotate', this._update, this);\n },\n\n onRemove: function() {\n rendererProto.onRemove.call(this);\n // this._map.off('rotate', this._update, this);\n },\n\n _updateTransform: function(center, zoom) {\n if (!this._map._rotate) {\n return rendererProto._updateTransform.call(this, center, zoom);\n }\n var scale = this._map.getZoomScale(zoom, this._zoom),\n offset = this._map._latLngToNewLayerPoint(this._topLeft, zoom, center);\n if (L.Browser.any3d) {\n L.DomUtil.setTransform(this._container, offset, scale);\n } else {\n L.DomUtil.setPosition(this._container, offset);\n }\n },\n\n _update: function() {\n if (!this._map._rotate) {\n return rendererProto._update.call(this);\n }\n // Update pixel bounds of renderer container (for positioning/sizing/clipping later)\n // Subclasses are responsible of firing the 'update' event.\n var p = this.options.padding,\n map = this._map,\n size = this._map.getSize(),\n padMin = size.multiplyBy(-p),\n padMax = size.multiplyBy(1 + p),\n //// TODO: Somehow refactor this out into map.something() - the code is\n //// pretty much the same as in GridLayer.\n clip = new L.Bounds([\n map.containerPointToLayerPoint([padMin.x, padMin.y]).floor(),\n map.containerPointToLayerPoint([padMin.x, padMax.y]).floor(),\n map.containerPointToLayerPoint([padMax.x, padMin.y]).floor(),\n map.containerPointToLayerPoint([padMax.x, padMax.y]).floor()\n ]);\n //min = this._map.containerPointToLayerPoint(size.multiplyBy(-p)).round();\n\n this._bounds = clip;\n // this._topLeft = clip.min;\n this._topLeft = this._map.layerPointToLatLng(clip.min);\n\n this._center = this._map.getCenter();\n this._zoom = this._map.getZoom();\n },\n\n});\n","/**\n * L.SVG\n */\nconst svgProto = L.extend({}, L.SVG.prototype);\n\nL.SVG.include({\n\n _update: function() {\n svgProto._update.call(this);\n if (this._map._rotate) {\n this.fire('update');\n }\n },\n\n});\n","/**\n * L.Map\n */\nconst mapProto = L.extend({}, L.Map.prototype);\n\nL.Map.mergeOptions({ rotate: false, bearing: 0, });\n\nL.Map.include({\n\n initialize: function(id, options) { // (HTMLElement or String, Object)\n if (options.rotate) {\n this._rotate = true;\n this._bearing = 0;\n }\n mapProto.initialize.call(this, id, options);\n if(this.options.rotate){\n this.setBearing(this.options.bearing);\n }\n },\n\n // createPane: function(name, container) {\n // if (!this._rotate || name == 'mapPane') {\n // return mapProto.createPane.call(this, name, container);\n // }\n // // init \"rotatePane\"\n // if (!this._rotatePane) {\n // // this._pivot = this.getSize().divideBy(2);\n // this._rotatePane = mapProto.createPane.call(this, 'rotatePane', this._mapPane);\n // L.DomUtil.setPosition(this._rotatePane, new L.Point(0, 0), this._bearing, this._pivot);\n // }\n // return mapProto.createPane.call(this, name, container || this._rotatePane);\n // },\n\n containerPointToLayerPoint: function(point) { // (Point)\n if (!this._rotate) {\n return mapProto.containerPointToLayerPoint.call(this, point);\n }\n return L.point(point)\n .subtract(this._getMapPanePos())\n .rotateFrom(-this._bearing, this._getRotatePanePos())\n .subtract(this._getRotatePanePos());\n },\n\n getBounds: function() {\n if (!this._rotate) {\n return mapProto.getBounds.call(this);\n }\n var size = this.getSize();\n var topleft = this.layerPointToLatLng(this.containerPointToLayerPoint([0, 0])),\n topright = this.layerPointToLatLng(this.containerPointToLayerPoint([size.x, 0])),\n bottomright = this.layerPointToLatLng(this.containerPointToLayerPoint([size.x, size.y])),\n bottomleft = this.layerPointToLatLng(this.containerPointToLayerPoint([0, size.y]));\n\n // Use LatLngBounds' build-in constructor that automatically extends the bounds to fit the passed points\n return new L.LatLngBounds([topleft, topright, bottomright, bottomleft]);\n },\n\n layerPointToContainerPoint: function(point) { // (Point)\n if (!this._rotate) {\n return mapProto.layerPointToContainerPoint.call(this, point);\n }\n return L.point(point)\n .add(this._getRotatePanePos())\n .rotateFrom(this._bearing, this._getRotatePanePos())\n .add(this._getMapPanePos());\n },\n\n // Rotation methods\n // setBearing will work with just the 'theta' parameter.\n setBearing: function(theta) {\n if (!L.Browser.any3d || !this._rotate) { return; }\n\n var rotatePanePos = this._getRotatePanePos();\n var halfSize = this.getSize().divideBy(2);\n this._pivot = this._getMapPanePos().clone().multiplyBy(-1).add(halfSize);\n\n rotatePanePos = rotatePanePos.rotateFrom(-this._bearing, this._pivot);\n\n this._bearing = theta * L.DomUtil.DEG_TO_RAD; // TODO: mod 360\n this._rotatePanePos = rotatePanePos.rotateFrom(this._bearing, this._pivot);\n\n L.DomUtil.setPosition(this._rotatePane, rotatePanePos, this._bearing, this._pivot);\n\n this.fire('rotate');\n },\n\n getBearing: function() {\n return this._bearing * L.DomUtil.RAD_TO_DEG;\n },\n\n _initPanes: function() {\n var panes = this._panes = {};\n this._paneRenderers = {};\n\n // @section\n //\n // Panes are DOM elements used to control the ordering of layers on the map. You\n // can access panes with [`map.getPane`](#map-getpane) or\n // [`map.getPanes`](#map-getpanes) methods. New panes can be created with the\n // [`map.createPane`](#map-createpane) method.\n //\n // Every map has the following default panes that differ only in zIndex.\n //\n // @pane mapPane: HTMLElement = 'auto'\n // Pane that contains all other map panes\n\n this._mapPane = this.createPane('mapPane', this._container);\n L.DomUtil.setPosition(this._mapPane, new L.Point(0, 0));\n\n if (this._rotate) {\n this._rotatePane = this.createPane('rotatePane', this._mapPane);\n this._norotatePane = this.createPane('norotatePane', this._mapPane);\n\n // @pane tilePane: HTMLElement = 2\n // Pane for tile layers\n this.createPane('tilePane', this._rotatePane);\n // @pane overlayPane: HTMLElement = 4\n // Pane for overlays like polylines and polygons\n this.createPane('overlayPane', this._rotatePane);\n\n // @pane shadowPane: HTMLElement = 5\n // Pane for overlay shadows (e.g. marker shadows)\n this.createPane('shadowPane', this._norotatePane);\n // @pane markerPane: HTMLElement = 6\n // Pane for marker icons\n this.createPane('markerPane', this._norotatePane);\n // @pane tooltipPane: HTMLElement = 650\n // Pane for tooltips.\n this.createPane('tooltipPane', this._norotatePane);\n // @pane popupPane: HTMLElement = 700\n // Pane for popups.\n this.createPane('popupPane', this._norotatePane);\n } else {\n // @pane tilePane: HTMLElement = 2\n // Pane for tile layers\n this.createPane('tilePane');\n // @pane overlayPane: HTMLElement = 4\n // Pane for overlays like polylines and polygons\n this.createPane('overlayPane');\n // @pane shadowPane: HTMLElement = 5\n // Pane for overlay shadows (e.g. marker shadows)\n this.createPane('shadowPane');\n // @pane markerPane: HTMLElement = 6\n // Pane for marker icons\n this.createPane('markerPane');\n // @pane tooltipPane: HTMLElement = 650\n // Pane for tooltips.\n this.createPane('tooltipPane');\n // @pane popupPane: HTMLElement = 700\n // Pane for popups.\n this.createPane('popupPane');\n }\n\n if (!this.options.markerZoomAnimation) {\n L.DomUtil.addClass(panes.markerPane, 'leaflet-zoom-hide');\n L.DomUtil.addClass(panes.shadowPane, 'leaflet-zoom-hide');\n }\n },\n\n // @method rotatedPointToMapPanePoint(point: Point): Point\n // Converts a coordinate from the rotated pane reference system\n // to the reference system of the not rotated map pane.\n rotatedPointToMapPanePoint: function(point) {\n return L.point(point).rotate(this._bearing)._add(this._getRotatePanePos());\n },\n\n // @method mapPanePointToRotatedPoint(point: Point): Point\n // Converts a coordinate from the not rotated map pane reference system\n // to the reference system of the rotated pane.\n mapPanePointToRotatedPoint: function(point) {\n return L.point(point)._subtract(this._getRotatePanePos()).rotate(-this._bearing);\n },\n\n // offset of the specified place to the current center in pixels\n _getCenterOffset: function(latlng) {\n var centerOffset = mapProto._getCenterOffset.call(this, latlng);\n if (this._rotate) {\n centerOffset = centerOffset.rotate(this._bearing);\n }\n return centerOffset;\n },\n\n _getRotatePanePos: function() {\n return this._rotatePanePos || new L.Point(0, 0);\n },\n\n _getNewPixelOrigin: function(center, zoom) {\n var viewHalf = this.getSize()._divideBy(2);\n if (!this._rotate) {\n mapProto._getNewPixelOrigin.call(this, center, zoom);\n }\n return this.project(center, zoom)\n .rotate(this._bearing)\n ._subtract(viewHalf)\n ._add(this._getMapPanePos())\n ._add(this._getRotatePanePos())\n .rotate(-this._bearing)\n ._round();\n },\n\n _handleGeolocationResponse: function(pos) {\n var lat = pos.coords.latitude,\n lng = pos.coords.longitude,\n // TODO: use mapProto._handleGeolocationResponse\n hdg = pos.coords.heading,\n latlng = new L.LatLng(lat, lng),\n bounds = latlng.toBounds(pos.coords.accuracy),\n options = this._locateOptions;\n\n if (options.setView) {\n var zoom = this.getBoundsZoom(bounds);\n this.setView(latlng, options.maxZoom ? Math.min(zoom, options.maxZoom) : zoom);\n }\n\n var data = {\n latlng: latlng,\n bounds: bounds,\n timestamp: pos.timestamp,\n // TODO: use mapProto._handleGeolocationResponse\n heading: hdg\n };\n\n for (var i in pos.coords) {\n if (typeof pos.coords[i] === 'number') {\n data[i] = pos.coords[i];\n }\n }\n\n // @event locationfound: LocationEvent\n // Fired when geolocation (using the [`locate`](#map-locate) method)\n // went successfully.\n this.fire('locationfound', data);\n },\n\n});\n","/*\n * L.Map.CompassBearing will rotate the map according to a smartphone's compass.\n */\n\nL.Map.CompassBearing = L.Handler.extend({\n\n initialize: function(map) {\n if (!window.DeviceOrientationEvent) {\n this._capable = false;\n return;\n }\n this._capable = true;\n this._map = map;\n\n this._throttled = L.Util.throttle(this._onDeviceOrientation, 1000, this);\n },\n\n addHooks: function() {\n if (this._capable && this._map._rotate) {\n L.DomEvent.on(window, 'deviceorientation', this._throttled, this);\n }\n },\n\n removeHooks: function() {\n if (this._capable && this._map._rotate) {\n L.DomEvent.off(window, 'deviceorientation', this._throttled, this);\n }\n },\n\n _onDeviceOrientation: function(event) {\n if (event.alpha !== null) {\n this._map.setBearing(event.alpha - window.orientation);\n }\n },\n\n});\n\n// @section Handlers\n// @property compassBearing: Handler\n// Compass bearing handler.\nL.Map.addInitHook('addHandler', 'compassBearing', L.Map.CompassBearing);\r\n","/*\n * L.Handler.ContainerMutation triggers `invalidateResize` when the map's DOM container mutates.\n */\n\n// @namespace Map\n// @section Interaction Options\nL.Map.mergeOptions({\n\n // @option trackContainerMutation: Boolean = false\n // Whether the map uses [mutation observers](https://developer.mozilla.org/docs/Web/API/MutationObserver)\n // to detect changes in its container and trigger `invalidateSize`. Disabled\n // by default due to support not being available in all web browsers.\n trackContainerMutation: false\n\n});\n\nL.Map.ContainerMutation = L.Handler.extend({\n\n addHooks: function() {\n if (!L.Browser.mutation) {\n return;\n }\n\n if (!this._observer) {\n this._observer = new MutationObserver(L.Util.bind(this._onMutation, this));\n }\n\n this._observer.observe(this._map.getContainer(), {\n childList: false,\n attributes: true,\n characterData: false,\n subtree: false,\n attributeFilter: ['style']\n });\n },\n\n removeHooks: function() {\n if (!L.Browser.mutation) {\n return;\n }\n this._observer.disconnect();\n },\n\n _onMutation: function() {\n this._map.invalidateSize();\n },\n\n});\n\n// @section Handlers\n// @property containerMutation: Handler\n// Container mutation handler (disabled unless [`trackContainerMutation`](#map-trackcontainermutation) is set).\nL.Map.addInitHook('addHandler', 'trackContainerMutation', L.Map.ContainerMutation);\r\n","/*\n * L.Handler.TouchGestures is both TouchZoom plus TouchRotate.\n */\n\n// @namespace Map\n// @section Interaction Options\nL.Map.mergeOptions({\n\n // @option bounceAtZoomLimits: Boolean = true\n // Set it to false if you don't want the map to zoom beyond min/max zoom\n // and then bounce back when pinch-zooming.\n bounceAtZoomLimits: true,\n\n});\n\nL.Map.TouchGestures = L.Handler.extend({\n\n initialize: function(map) {\n this._map = map;\n this.rotate = !!this._map.options.touchRotate;\n this.zoom = !!this._map.options.touchZoom;\n },\n\n addHooks: function() {\n L.DomEvent.on(this._map._container, 'touchstart', this._onTouchStart, this);\n },\n\n removeHooks: function() {\n L.DomEvent.off(this._map._container, 'touchstart', this._onTouchStart, this);\n },\n\n _onTouchStart: function(e) {\n var map = this._map;\n\n if (!e.touches || e.touches.length !== 2 || map._animatingZoom || this._zooming || this._rotating) { return; }\n\n var p1 = map.mouseEventToContainerPoint(e.touches[0]),\n p2 = map.mouseEventToContainerPoint(e.touches[1]),\n vector = p1.subtract(p2);\n\n this._centerPoint = map.getSize()._divideBy(2);\n this._startLatLng = map.containerPointToLatLng(this._centerPoint);\n\n if (this.zoom) {\n if (map.options.touchZoom !== 'center') {\n this._pinchStartLatLng = map.containerPointToLatLng(p1.add(p2)._divideBy(2));\n }\n this._startDist = p1.distanceTo(p2);\n this._startZoom = map.getZoom();\n this._zooming = true;\n } else {\n this._zooming = false;\n }\n\n if (this.rotate) {\n this._startTheta = Math.atan(vector.x / vector.y);\n this._startBearing = map.getBearing();\n if (vector.y < 0) { this._startBearing += 180; }\n this._rotating = true;\n } else {\n this._rotating = false;\n }\n\n this._moved = false;\n\n map.stop();\n\n L.DomEvent\n .on(document, 'touchmove', this._onTouchMove, this)\n .on(document, 'touchend', this._onTouchEnd, this);\n\n L.DomEvent.preventDefault(e);\n },\n\n _onTouchMove: function(e) {\n if (!e.touches || e.touches.length !== 2 || !(this._zooming || this._rotating)) { return; }\n\n var map = this._map,\n p1 = map.mouseEventToContainerPoint(e.touches[0]),\n p2 = map.mouseEventToContainerPoint(e.touches[1]),\n vector = p1.subtract(p2),\n scale = p1.distanceTo(p2) / this._startDist,\n delta;\n\n if (this._rotating) {\n var theta = Math.atan(vector.x / vector.y);\n var bearingDelta = (theta - this._startTheta) * L.DomUtil.RAD_TO_DEG;\n if (vector.y < 0) { bearingDelta += 180; }\n if (bearingDelta) {\n /// TODO: The pivot should be the last touch point, but zoomAnimation manages to\n /// overwrite the rotate pane position. Maybe related to #3529.\n map.setBearing(this._startBearing - bearingDelta);\n }\n }\n\n if (this._zooming) {\n this._zoom = map.getScaleZoom(scale, this._startZoom);\n\n if (!map.options.bounceAtZoomLimits && (\n (this._zoom < map.getMinZoom() && scale < 1) ||\n (this._zoom > map.getMaxZoom() && scale > 1))) {\n this._zoom = map._limitZoom(this._zoom);\n }\n\n if (map.options.touchZoom === 'center') {\n this._center = this._startLatLng;\n if (scale === 1) { return; }\n } else {\n // Get delta from pinch to center, so centerLatLng is delta applied to initial pinchLatLng\n delta = p1._add(p2)._divideBy(2)._subtract(this._centerPoint);\n if (scale === 1 && delta.x === 0 && delta.y === 0) { return; }\n\n var alpha = -map.getBearing() * L.DomUtil.DEG_TO_RAD;\n\n this._center = map.unproject(map.project(this._pinchStartLatLng).subtract(delta.rotate(alpha)));\n }\n\n }\n\n if (!this._moved) {\n map._moveStart(true);\n this._moved = true;\n }\n\n L.Util.cancelAnimFrame(this._animRequest);\n\n var moveFn = L.bind(map._move, map, this._center, this._zoom, { pinch: true, round: false });\n this._animRequest = L.Util.requestAnimFrame(moveFn, this, true);\n\n L.DomEvent.preventDefault(e);\n },\n\n _onTouchEnd: function() {\n if (!this._moved || !this._zooming) {\n this._zooming = false;\n return;\n }\n\n this._zooming = false;\n this._rotating = false;\n L.Util.cancelAnimFrame(this._animRequest);\n\n L.DomEvent\n .off(document, 'touchmove', this._onTouchMove)\n .off(document, 'touchend', this._onTouchEnd);\n\n if (this.zoom) {\n // Pinch updates GridLayers' levels only when snapZoom is off, so snapZoom becomes noUpdate.\n if (this._map.options.zoomAnimation) {\n this._map._animateZoom(this._center, this._map._limitZoom(this._zoom), true, this._map.options.snapZoom);\n } else {\n this._map._resetView(this._center, this._map._limitZoom(this._zoom));\n }\n }\n },\n\n});\n\n// @section Handlers\n// @property touchGestures: Handler\n// Touch gestures handler.\nL.Map.addInitHook('addHandler', 'touchGestures', L.Map.TouchGestures);\r\n","/*\n * L.Handler.TouchRotate is used by L.Map to add two-finger rotation gestures.\n */\n\n// @namespace Map\n// @section Interaction Options\nL.Map.mergeOptions({\n\n // @section Touch interaction options\n // @option touchRotate: Boolean|String = *\n // Whether the map can be rotated with a two-finger rotation gesture\n touchRotate: false,\n\n});\n\nL.Map.TouchRotate = L.Handler.extend({\n\n addHooks: function() {\n this._map.touchGestures.enable();\n this._map.touchGestures.rotate = true;\n },\n\n removeHooks: function() {\n this._map.touchGestures.rotate = false;\n },\n\n});\n\n// @section Handlers\n// @property touchZoom: Handler\n// Touch rotate handler.\nL.Map.addInitHook('addHandler', 'touchRotate', L.Map.TouchRotate);\r\n","/*\n * L.Handler.ShiftKeyRotate is used by L.Map to add shift-wheel rotation.\n */\n\n// @namespace Map\n// @section Interaction Options\nL.Map.mergeOptions({\n\n // @section ShiftKey interaction options\n // @option shiftKeyRotate: Boolean|String = *\n // Whether the map can be rotated with a shit-wheel rotation\n shiftKeyRotate: true,\n\n});\n\nL.Map.ShiftKeyRotate = L.Handler.extend({\n\n addHooks: function() {\n L.DomEvent.on(this._map._container, \"wheel\", this._handleShiftScroll, this);\n // this._map.shiftKeyRotate.enable();\n this._map.shiftKeyRotate.rotate = true;\n },\n\n removeHooks: function() {\n L.DomEvent.off(this._map._container, \"wheel\", this._handleShiftScroll, this);\n this._map.shiftKeyRotate.rotate = false;\n },\n\n _handleShiftScroll: function(e) {\n if (e.shiftKey) {\n e.preventDefault();\n this._map.scrollWheelZoom.disable();\n this._map.setBearing((this._map._bearing * L.DomUtil.RAD_TO_DEG) + e.deltaY);\n } else {\n this._map.scrollWheelZoom.enable();\n }\n },\n\n});\n\n// @section Handlers\n// @property touchZoom: Handler\n// Touch rotate handler.\nL.Map.addInitHook('addHandler', 'shiftKeyRotate', L.Map.ShiftKeyRotate);\r\n","/*\n * L.Handler.TouchZoom is used by L.Map to add pinch zoom on supported mobile browsers.\n */\n\n// @namespace Map\n// @section Interaction Options\nL.Map.mergeOptions({\n\n // @section Touch interaction options\n // @option touchZoom: Boolean|String = *\n // Whether the map can be zoomed by touch-dragging with two fingers. If\n // passed `'center'`, it will zoom to the center of the view regardless of\n // where the touch events (fingers) were. Enabled for touch-capable web\n // browsers except for old Androids.\n touchZoom: L.Browser.touch && !L.Browser.android23,\n\n bounceAtZoomLimits: false,\n});\n\nL.Map.TouchZoom = L.Handler.extend({\n\n addHooks: function() {\n L.DomUtil.addClass(this._map._container, 'leaflet-touch-zoom');\n this._map.touchGestures.enable();\n this._map.touchGestures.zoom = true;\n },\n\n removeHooks: function() {\n L.DomUtil.removeClass(this._map._container, 'leaflet-touch-zoom');\n this._map.touchGestures.zoom = false;\n },\n\n});\n\n// @section Handlers\n// @property touchZoom: Handler\n// Touch zoom handler.\nL.Map.addInitHook('addHandler', 'touchZoom', L.Map.TouchZoom);\r\n","/**\n * L.Control.Rotate\n */\n\n// A tri-state control for map rotation. States are:\n// Locked (default)\n// Unlocked (user can pinch-rotate)\n// Follow (rotation follows device orientation, if available)\nL.Control.Rotate = L.Control.extend({\n\n options: {\n position: 'topleft',\n closeOnZeroBearing: true\n },\n\n onAdd: function(map) {\n this._onDeviceOrientation = L.Util.throttle(this._unthrottledOnDeviceOrientation, 100, this);\n\n var container = this._container = L.DomUtil.create('div', 'leaflet-control-rotate leaflet-bar');\n\n // this.button = L.Control.Zoom.prototype._createButton.call(this, 'R', 'leaflet-control-rotate', 'leaflet-control-rotate', container, this._toggleLock);\n\n var arrow = this._arrow = L.DomUtil.create('span', 'leaflet-control-rotate-arrow');\n\n arrow.style.backgroundImage = `url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M10.5 14l4-8 4 8h-8z'/%3E%3Cpath d='M10.5 16l4 8 4-8h-8z' fill='%23ccc'/%3E%3C/svg%3E\")`;\n arrow.style.cursor = 'grab';\n arrow.style.display = 'block';\n arrow.style.width = '100%';\n arrow.style.height = '100%';\n arrow.style.backgroundRepeat = 'no-repeat';\n arrow.style.backgroundPosition = '50%';\n\n // Copy-pasted from L.Control.Zoom\n var link = this._link = L.DomUtil.create('a', 'leaflet-control-rotate-toggle', container);\n link.appendChild(arrow);\n link.href = '#';\n link.title = 'leaflet-control-rotate-toggle';\n\n L.DomEvent\n .on(link, 'dblclick', L.DomEvent.stopPropagation)\n .on(link, 'mousedown', this._handleMouseDown, this)\n .on(link, 'click', L.DomEvent.stop)\n .on(link, 'click', this._cycleState, this)\n .on(link, 'click', this._refocusOnMap, this);\n\n if (!L.Browser.any3d) {\n L.DomUtil.addClass(link, 'leaflet-disabled');\n }\n\n this._restyle();\n\n map.on('rotate', this._restyle.bind(this));\n\n // State flag\n this._follow = false;\n this._canFollow = false;\n\n if (this.options.closeOnZeroBearing && map.getBearing() === 0) {\n container.style.display = 'none';\n }\n\n return container;\n },\n\n _handleMouseDown: function(e) {\n L.DomEvent.stopPropagation(e);\n this.dragging = true;\n this.dragstartX = e.pageX;\n this.dragstartY = e.pageY;\n L.DomEvent\n .on(document, 'mousemove', this._handleMouseDrag, this)\n .on(document, 'mouseup', this._handleMouseUp, this);\n },\n\n _handleMouseUp: function(e) {\n L.DomEvent.stopPropagation(e);\n this.dragging = false;\n\n L.DomEvent\n .off(document, 'mousemove', this._handleMouseDrag, this)\n .off(document, 'mouseup', this._handleMouseUp, this);\n },\n\n _handleMouseDrag: function(e) {\n if (!this.dragging) { return; }\n var deltaX = e.clientX - this.dragstartX;\n this._map.setBearing(deltaX);\n },\n\n _cycleState: function(ev) {\n var map = this._map;\n\n if (!map) { return; }\n\n if (!map.touchRotate.enabled() && !map.compassBearing.enabled()) {\n // Go from disabled to touch\n map.touchRotate.enable();\n\n // console.log('state is now: touch rotate');\n } else {\n\n if (!map.compassBearing.enabled()) {\n // Go from touch to compass\n map.touchRotate.disable();\n map.compassBearing.enable();\n\n // console.log('state is now: compass');\n\n // It is possible that compass is not supported. If so,\n // the hangler will automatically go from compass to disabled.\n } else {\n // Go from compass to disabled\n map.compassBearing.disable();\n\n // console.log('state is now: locked');\n\n map.setBearing(0);\n if (this.options.closeOnZeroBearing) {\n map.touchRotate.enable();\n }\n }\n }\n this._restyle();\n },\n\n _restyle: function() {\n if (this._map.options.rotate) {\n var map = this._map;\n var bearing = map.getBearing();\n if (this.options.closeOnZeroBearing && bearing) {\n this._container.style.display = 'block';\n }\n\n var cssTransform = 'rotate(' + bearing + 'deg)';\n this._arrow.style.transform = cssTransform;\n\n if (map.compassBearing.enabled()) {\n this._link.style.backgroundColor = 'orange';\n } else if (map.touchRotate.enabled()) {\n this._link.style.backgroundColor = null;\n } else {\n this._link.style.backgroundColor = 'grey';\n if (this.options.closeOnZeroBearing && map.getBearing() === 0) {\n this._container.style.display = 'none';\n }\n }\n } else {\n L.DomUtil.addClass(link, 'leaflet-disabled');\n }\n },\n\n});\n\nL.control.rotate = function(options) {\n return new L.Control.Rotate(options);\n};\n\nL.Map.mergeOptions({\n rotateControl: true,\n});\n\nL.Map.addInitHook(function() {\n if (this.options.rotateControl) {\n var options = typeof this.options.rotateControl === 'object' ? this.options.rotateControl : {};\n this.rotateControl = L.control.rotate(options);\n this.addControl(this.rotateControl);\n }\n});\r\n"],"names":[],"mappings":";;;;;IAAA;IACA;IACA;IACA,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC;AAC7C;IACA,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE;AACpB;IACA,IAAI,YAAY,EAAE,SAAS,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE;IAC9D,QAAQ,IAAI,GAAG,GAAG,MAAM,IAAI,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAC9C;IACA,QAAQ,IAAI,CAAC,OAAO,EAAE;IACtB,YAAY,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC;IAClC,YAAY,OAAO,YAAY,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IAC3E,SAAS;AACT;IACA,QAAQ,GAAG,GAA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IAAI,IAAI,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE;IACpC,QAAQ,IAAI,OAAO,GAAG,OAAO,IAAI,CAAC,OAAO,CAAC,aAAa,KAAK,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,GAAG,EAAE,CAAC;IACvG,QAAQ,IAAI,CAAC,aAAa,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACvD,QAAQ,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAC5C,KAAK;IACL,CAAC,CAAC,CAAC;;;;"} \ No newline at end of file diff --git a/dist/leaflet-rotate.js b/dist/leaflet-rotate.js index d4b065c..1372d1e 100644 --- a/dist/leaflet-rotate.js +++ b/dist/leaflet-rotate.js @@ -1,2 +1,2 @@ -!function(t){"function"==typeof define&&define.amd?define(t):t()}((function(){"use strict";const t={setTransform:L.DomUtil.setTransform,setPosition:L.DomUtil.setPosition};L.extend(L.DomUtil,{setTransform:function(o,e,i,n,a){var s=e||new L.Point(0,0);if(!n)return e=s._round(),t.setTransform.call(this,o,e,i);s=s.rotateFrom(n,a),o.style[L.DomUtil.TRANSFORM]="translate3d("+s.x+"px,"+s.y+"px,0)"+(i?" scale("+i+")":"")+" rotate("+n+"rad)"},setPosition:function(o,e,i,n){if(!i)return t.setPosition.call(this,o,e);o._leaflet_pos=e,L.Browser.any3d?L.DomUtil.setTransform(o,e,void 0,i,n):(o.style.left=e.x+"px",o.style.top=e.y+"px")},DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI}),L.Draggable.include({updateMapBearing:function(t){this._mapBearing=t}}),L.extend(L.Point.prototype,{rotate:function(t){if(!t)return this;var o=Math.sin(t),e=Math.cos(t);return new L.Point(this.x*e-this.y*o,this.x*o+this.y*e)},rotateFrom:function(t,o){if(!t)return this;var e=Math.sin(t),i=Math.cos(t),n=o.x,a=o.y,s=this.x-n,r=this.y-a;return new L.Point(s*i-r*e+n,s*e+r*i+a)}});const o={getEvents:L.DivOverlay.prototype.getEvents,_updatePosition:L.DivOverlay.prototype._updatePosition};L.DivOverlay.include({getEvents:function(){return L.extend(o.getEvents.call(this),{rotate:this._updatePosition})},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),o=L.point(this.options.offset),e=this._getAnchor();this._zoomAnimated?(this._map._rotate&&(t=this._map.rotatedPointToMapPanePoint(t)),L.DomUtil.setPosition(this._container,t.add(e))):o=o.add(t).add(e);var i=this._containerBottom=-o.y,n=this._containerLeft=-Math.round(this._containerWidth/2)+o.x;this._container.style.bottom=i+"px",this._container.style.left=n+"px"}}});const e={_animateZoom:L.Popup.prototype._animateZoom,_adjustPan:L.Popup.prototype._adjustPan};L.Popup.include({_animateZoom:function(t){this._map._rotate||e._animateZoom.call(this,t);var o=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();o=this._map.rotatedPointToMapPanePoint(o),L.DomUtil.setPosition(this._container,o.add(i))},_adjustPan:function(){if(!(!this.options.autoPan||this._map._panAnim&&this._map._panAnim._inProgress)){var t=this._map,o=parseInt(L.DomUtil.getStyle(this._container,"marginBottom"),10)||0,e=this._container.offsetHeight+o,i=this._containerWidth,n=new L.Point(this._containerLeft,-e-this._containerBottom);n._add(L.DomUtil.getPosition(this._container));var a=n._add(this._map._getMapPanePos()),s=L.point(this.options.autoPanPadding),r=L.point(this.options.autoPanPaddingTopLeft||s),h=L.point(this.options.autoPanPaddingBottomRight||s),_=t.getSize(),l=0,d=0;a.x+i+h.x>_.x&&(l=a.x+i-_.x+h.x),a.x-l-r.x<0&&(l=a.x-r.x),a.y+e+h.y>_.y&&(d=a.y+e-_.y+h.y),a.y-d-r.y<0&&(d=a.y-r.y),(l||d)&&t.fire("autopanstart").panBy([l,d])}}});const i={_updatePosition:L.Tooltip.prototype._updatePosition,_animateZoom:L.Tooltip.prototype._animateZoom};L.Tooltip.include({_updatePosition:function(){if(!this._map._rotate)return i._updatePosition.call(this);var t=this._map.latLngToLayerPoint(this._latlng);t=this._map.rotatedPointToMapPanePoint(t),this._setPosition(t)},_animateZoom:function(t){if(!this._map._rotate)return i._animateZoom.call(this);var o=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);o=this._map.rotatedPointToMapPanePoint(o),this._setPosition(o)}});L.Icon.prototype._setIconStyles;L.Icon.include({_setIconStyles:function(t,o){var e=this.options,i=e[o+"Size"];"number"==typeof i&&(i=[i,i]);var n=L.point(i),a=L.point("shadow"===o&&e.shadowAnchor||e.iconAnchor||n&&n.divideBy(2,!0));t.className="leaflet-marker-"+o+" "+(e.className||""),a&&(t.style.marginLeft=-a.x+"px",t.style.marginTop=-a.y+"px",t.style[L.DomUtil.TRANSFORM+"Origin"]=a.x+"px "+a.y+"px 0px"),n&&(t.style.width=n.x+"px",t.style.height=n.y+"px")}});var n={_onDragStart:function(){},_onDrag:function(){},_onDragEnd:function(){}},a={_onDragStart:function(){if(!this._marker._map._rotate)return n._onDragStart.call(this);this._draggable.updateMapBearing(this._marker._map._bearing)},_onDrag:function(t){var o=this._marker,e=o.options.rotation||o.options.rotateWithView,i=o._shadow,n=L.DomUtil.getPosition(o._icon);!e&&i&&L.DomUtil.setPosition(i,n),o._map._rotate&&(n=o._map.mapPanePointToRotatedPoint(n)),latlng=o._map.layerPointToLatLng(n),o._latlng=latlng,t.latlng=latlng,t.oldLatLng=this._oldLatLng,e?o.setLatLng(latlng):o.fire("move",t),o.fire("drag",t)},_onDragEnd:function(t){this._marker._map._rotate&&this._marker.update(),n.update.call(this,t)}};const s={getEvents:L.Marker.prototype.getEvents,onAdd:L.Marker.prototype.onAdd,_initInteraction:L.Marker.prototype._initInteraction,_setPos:L.Marker.prototype._setPos,_updateZIndex:L.Marker.prototype._updateZIndex};L.Marker.mergeOptions({rotation:0,rotateWithView:!1}),L.Marker.include({getEvents:function(){return L.extend(s.getEvents.call(this),{rotate:this.update})},onAdd:function(t){s.onAdd.call(this,t),t.on("rotate",this.update,this)},_initInteraction:function(){var t=s._initInteraction.call(this);return this.dragging&&this._map&&this._map._rotate&&(n._onDragStart=this.dragging._onDragStart.bind(this.dragging),n._onDrag=this.dragging._onDrag.bind(this.dragging),n._onDragEnd=this.dragging._onDragEnd.bind(this.dragging),this.dragging._onDragStart=a._onDragStart.bind(this.dragging),this.dragging._onDrag=a._onDrag.bind(this.dragging),this.dragging._onDragEnd=a._onDragEnd.bind(this.dragging)),t},_setPos:function(t){this._map._rotate&&(t=this._map.rotatedPointToMapPanePoint(t));var o=this.options.rotation||0;this.options.rotateWithView&&(o+=this._map._bearing),L.DomUtil.setPosition(this._icon,t,o,t),this._shadow&&L.DomUtil.setPosition(this._shadow,t,o,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){if(!this._map._rotate)return s._updateZIndex.call(this,t);this._icon.style.zIndex=Math.round(this._zIndex+t)},setRotation:function(t){this.options.rotation=t,this.update()}});const r={getEvents:L.GridLayer.prototype.getEvents,_getTiledPixelBounds:L.GridLayer.prototype._getTiledPixelBounds};L.GridLayer.include({getEvents:function(){var t=r.getEvents.call(this);return this._map._rotate&&!this.options.updateWhenIdle&&(this._onRotate||(this._onRotate=L.Util.throttle(this._onMoveEnd,this.options.updateInterval,this)),t.rotate=this._onRotate),t},_getTiledPixelBounds:function(t){if(!this._map._rotate)return r._getTiledPixelBounds.call(this,t);var o=this._map,e=o._animatingZoom?Math.max(o._animateToZoom,o.getZoom()):o.getZoom(),i=o.getZoomScale(e,this._tileZoom),n=o.project(t,this._tileZoom).floor(),a=o.getSize(),s=new L.Bounds([o.containerPointToLayerPoint([0,0]).floor(),o.containerPointToLayerPoint([a.x,0]).floor(),o.containerPointToLayerPoint([0,a.y]).floor(),o.containerPointToLayerPoint([a.x,a.y]).floor()]).getSize().divideBy(2*i);return new L.Bounds(n.subtract(s),n.add(s))}});const h={onAdd:L.Canvas.prototype.onAdd,onRemove:L.Canvas.prototype.onRemove,_update:L.Canvas.prototype._update};L.Canvas.include({onAdd:function(){h.onAdd.call(this),this._map.on("rotate",this._redraw,this)},onRemove:function(){h.onRemove.call(this),this._map.off("rotate",this._redraw,this)},_update:function(){h._update.call(this),this.fire("update")}});const _={onAdd:L.Renderer.prototype.onAdd,onRemove:L.Renderer.prototype.onRemove,_updateTransform:L.Renderer.prototype._updateTransform,_update:L.Renderer.prototype._update};L.Renderer.include({onAdd:function(){_.onAdd.call(this)},onRemove:function(){_.onRemove.call(this)},_updateTransform:function(t,o){if(!this._map._rotate)return _._updateTransform.call(this,t,o);var e=this._map.getZoomScale(o,this._zoom),i=this._map._latLngToNewLayerPoint(this._topLeft,o,t);L.Browser.any3d?L.DomUtil.setTransform(this._container,i,e):L.DomUtil.setPosition(this._container,i)},_update:function(){if(!this._map._rotate)return _._update.call(this);var t=this.options.padding,o=this._map,e=this._map.getSize(),i=e.multiplyBy(-t),n=e.multiplyBy(1+t),a=new L.Bounds([o.containerPointToLayerPoint([i.x,i.y]).floor(),o.containerPointToLayerPoint([i.x,n.y]).floor(),o.containerPointToLayerPoint([n.x,i.y]).floor(),o.containerPointToLayerPoint([n.x,n.y]).floor()]);this._bounds=a,this._topLeft=this._map.layerPointToLatLng(a.min),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}});const l={_update:L.SVG.prototype._update};L.SVG.include({_update:function(){l._update.call(this),this._map._rotate&&this.fire("update")}});const d={initialize:L.Map.prototype.initialize,createPane:L.Map.prototype.createPane,containerPointToLayerPoint:L.Map.prototype.containerPointToLayerPoint,getBounds:L.Map.prototype.getBounds,layerPointToContainerPoint:L.Map.prototype.layerPointToContainerPoint,_initPanes:L.Map.prototype._initPanes,_getCenterOffset:L.Map.prototype._getCenterOffset,_getNewPixelOrigin:L.Map.prototype._getNewPixelOrigin,_handleGeolocationResponse:L.Map.prototype._handleGeolocationResponse};L.Map.mergeOptions({rotate:!1}),L.Map.include({initialize:function(t,o){o.rotate&&(this._rotate=!0,this._bearing=0),d.initialize.call(this,t,o)},createPane:function(t,o){return this._rotate&&"mapPane"!=t?(this._rotatePane||(this._rotatePane=d.createPane.call(this,"rotatePane",this._mapPane),L.DomUtil.setPosition(this._rotatePane,new L.Point(0,0),this._bearing,this._pivot)),d.createPane.call(this,t,o||this._rotatePane)):d.createPane.call(this,t,o)},containerPointToLayerPoint:function(t){return this._rotate?L.point(t).subtract(this._getMapPanePos()).rotateFrom(-this._bearing,this._getRotatePanePos()).subtract(this._getRotatePanePos()):d.containerPointToLayerPoint.call(this,t)},getBounds:function(){if(!this._rotate)return d.getBounds.call(this);var t=this.getSize(),o=this.layerPointToLatLng(this.containerPointToLayerPoint([0,0])),e=this.layerPointToLatLng(this.containerPointToLayerPoint([t.x,0])),i=this.layerPointToLatLng(this.containerPointToLayerPoint([t.x,t.y])),n=this.layerPointToLatLng(this.containerPointToLayerPoint([0,t.y]));return new L.LatLngBounds([o,e,i,n])},layerPointToContainerPoint:function(t){return this._rotate?L.point(t).add(this._getRotatePanePos()).rotateFrom(this._bearing,this._getRotatePanePos()).add(this._getMapPanePos()):d.layerPointToContainerPoint.call(this,t)},setBearing:function(t){if(L.Browser.any3d&&this._rotate){var o=this._getRotatePanePos(),e=this.getSize().divideBy(2);this._pivot=this._getMapPanePos().clone().multiplyBy(-1).add(e),o=o.rotateFrom(-this._bearing,this._pivot),this._bearing=t*L.DomUtil.DEG_TO_RAD,this._rotatePanePos=o.rotateFrom(this._bearing,this._pivot),L.DomUtil.setPosition(this._rotatePane,o,this._bearing,this._pivot),this.fire("rotate")}},getBearing:function(){return this._bearing*L.DomUtil.RAD_TO_DEG},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),L.DomUtil.setPosition(this._mapPane,new L.Point(0,0)),this._rotate?(this._rotatePane=this.createPane("rotatePane",this._mapPane),this._norotatePane=this.createPane("norotatePane",this._mapPane),this.createPane("tilePane",this._rotatePane),this.createPane("overlayPane",this._rotatePane),this.createPane("shadowPane",this._norotatePane),this.createPane("markerPane",this._norotatePane),this.createPane("tooltipPane",this._norotatePane),this.createPane("popupPane",this._norotatePane)):(this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane")),this.options.markerZoomAnimation||(L.DomUtil.addClass(t.markerPane,"leaflet-zoom-hide"),L.DomUtil.addClass(t.shadowPane,"leaflet-zoom-hide"))},rotatedPointToMapPanePoint:function(t){return L.point(t).rotate(this._bearing)._add(this._getRotatePanePos())},mapPanePointToRotatedPoint:function(t){return L.point(t)._subtract(this._getRotatePanePos()).rotate(-this._bearing)},_getCenterOffset:function(t){var o=d._getCenterOffset.call(this,t);return this._rotate&&(o=o.rotate(this._bearing)),o},_getRotatePanePos:function(){return this._rotatePanePos||new L.Point(0,0)},_getNewPixelOrigin:function(t,o){var e=this.getSize()._divideBy(2);return this._rotate||d._getNewPixelOrigin.call(this,t,o),this.project(t,o).rotate(this._bearing)._subtract(e)._add(this._getMapPanePos())._add(this._getRotatePanePos()).rotate(-this._bearing)._round()},_handleGeolocationResponse:function(t){var o=t.coords.latitude,e=t.coords.longitude,i=t.coords.heading,n=new L.LatLng(o,e),a=n.toBounds(t.coords.accuracy),s=this._locateOptions;if(s.setView){var r=this.getBoundsZoom(a);this.setView(n,s.maxZoom?Math.min(r,s.maxZoom):r)}var h={latlng:n,bounds:a,timestamp:t.timestamp,heading:i};for(var _ in t.coords)"number"==typeof t.coords[_]&&(h[_]=t.coords[_]);this.fire("locationfound",h)}}),L.Map.CompassBearing=L.Handler.extend({initialize:function(t){window.DeviceOrientationEvent?(this._capable=!0,this._map=t,this._throttled=L.Util.throttle(this._onDeviceOrientation,1e3,this)):this._capable=!1},addHooks:function(){this._capable&&this._map._rotate&&L.DomEvent.on(window,"deviceorientation",this._throttled,this)},removeHooks:function(){this._capable&&this._map._rotate&&L.DomEvent.off(window,"deviceorientation",this._throttled,this)},_onDeviceOrientation:function(t){null!==t.alpha&&this._map.setBearing(t.alpha-window.orientation)}}),L.Map.addInitHook("addHandler","compassBearing",L.Map.CompassBearing),L.Map.mergeOptions({trackContainerMutation:!1}),L.Map.ContainerMutation=L.Handler.extend({addHooks:function(){L.Browser.mutation&&(this._observer||(this._observer=new MutationObserver(L.Util.bind(this._onMutation,this))),this._observer.observe(this._map.getContainer(),{childList:!1,attributes:!0,characterData:!1,subtree:!1,attributeFilter:["style"]}))},removeHooks:function(){L.Browser.mutation&&this._observer.disconnect()},_onMutation:function(){this._map.invalidateSize()}}),L.Map.addInitHook("addHandler","trackContainerMutation",L.Map.ContainerMutation),L.Map.mergeOptions({bounceAtZoomLimits:!0}),L.Map.TouchGestures=L.Handler.extend({initialize:function(t){this._map=t,this.rotate=!!this._map.options.touchRotate,this.zoom=!!this._map.options.touchZoom},addHooks:function(){L.DomEvent.on(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){L.DomEvent.off(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var o=this._map;if(t.touches&&2===t.touches.length&&!o._animatingZoom&&!this._zooming&&!this._rotating){var e=o.mouseEventToContainerPoint(t.touches[0]),i=o.mouseEventToContainerPoint(t.touches[1]),n=e.subtract(i);this._centerPoint=o.getSize()._divideBy(2),this._startLatLng=o.containerPointToLatLng(this._centerPoint),this.zoom?("center"!==o.options.touchZoom&&(this._pinchStartLatLng=o.containerPointToLatLng(e.add(i)._divideBy(2))),this._startDist=e.distanceTo(i),this._startZoom=o.getZoom(),this._zooming=!0):this._zooming=!1,this.rotate?(this._startTheta=Math.atan(n.x/n.y),this._startBearing=o.getBearing(),n.y<0&&(this._startBearing+=180),this._rotating=!0):this._rotating=!1,this._moved=!1,o.stop(),L.DomEvent.on(document,"touchmove",this._onTouchMove,this).on(document,"touchend",this._onTouchEnd,this),L.DomEvent.preventDefault(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&(this._zooming||this._rotating)){var o,e=this._map,i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]),a=i.subtract(n),s=i.distanceTo(n)/this._startDist;if(this._rotating){var r=(Math.atan(a.x/a.y)-this._startTheta)*L.DomUtil.RAD_TO_DEG;a.y<0&&(r+=180),r&&e.setBearing(this._startBearing-r)}if(this._zooming)if(this._zoom=e.getScaleZoom(s,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoome.getMaxZoom()&&s>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===s)return}else{if(o=i._add(n)._divideBy(2)._subtract(this._centerPoint),1===s&&0===o.x&&0===o.y)return;var h=-e.getBearing()*L.DomUtil.DEG_TO_RAD;this._center=e.unproject(e.project(this._pinchStartLatLng).subtract(o.rotate(h)))}this._moved||(e._moveStart(!0),this._moved=!0),L.Util.cancelAnimFrame(this._animRequest);var _=L.bind(e._move,e,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=L.Util.requestAnimFrame(_,this,!0),L.DomEvent.preventDefault(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,this._rotating=!1,L.Util.cancelAnimFrame(this._animRequest),L.DomEvent.off(document,"touchmove",this._onTouchMove).off(document,"touchend",this._onTouchEnd),this.zoom&&(this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.snapZoom):this._map._resetView(this._center,this._map._limitZoom(this._zoom)))):this._zooming=!1}}),L.Map.addInitHook("addHandler","touchGestures",L.Map.TouchGestures),L.Map.mergeOptions({touchRotate:!1}),L.Map.TouchRotate=L.Handler.extend({addHooks:function(){this._map.touchGestures.enable(),this._map.touchGestures.rotate=!0},removeHooks:function(){this._map.touchGestures.rotate=!1}}),L.Map.addInitHook("addHandler","touchRotate",L.Map.TouchRotate),L.Map.mergeOptions({shiftKeyRotate:!0}),L.Map.ShiftKeyRotate=L.Handler.extend({addHooks:function(){L.DomEvent.on(this._map._container,"wheel",this._handleShiftScroll,this),this._map.shiftKeyRotate.rotate=!0},removeHooks:function(){L.DomEvent.off(this._map._container,"wheel",this._handleShiftScroll,this),this._map.shiftKeyRotate.rotate=!1},_handleShiftScroll:function(t){t.shiftKey?(t.preventDefault(),this._map.scrollWheelZoom.disable(),this._map.setBearing(this._map._bearing*L.DomUtil.RAD_TO_DEG+t.deltaY)):this._map.scrollWheelZoom.enable()}}),L.Map.addInitHook("addHandler","shiftKeyRotate",L.Map.ShiftKeyRotate),L.Map.mergeOptions({touchZoom:L.Browser.touch&&!L.Browser.android23,bounceAtZoomLimits:!1}),L.Map.TouchZoom=L.Handler.extend({addHooks:function(){L.DomUtil.addClass(this._map._container,"leaflet-touch-zoom"),this._map.touchGestures.enable(),this._map.touchGestures.zoom=!0},removeHooks:function(){L.DomUtil.removeClass(this._map._container,"leaflet-touch-zoom"),this._map.touchGestures.zoom=!1}}),L.Map.addInitHook("addHandler","touchZoom",L.Map.TouchZoom),L.Control.Rotate=L.Control.extend({options:{position:"topleft",closeOnZeroBearing:!0},onAdd:function(t){this._onDeviceOrientation=L.Util.throttle(this._unthrottledOnDeviceOrientation,100,this);var o=this._container=L.DomUtil.create("div","leaflet-control-rotate leaflet-bar"),e=this._arrow=L.DomUtil.create("span","leaflet-control-rotate-arrow");e.style.backgroundImage="url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M10.5 14l4-8 4 8h-8z'/%3E%3Cpath d='M10.5 16l4 8 4-8h-8z' fill='%23ccc'/%3E%3C/svg%3E\")",e.style.cursor="grab",e.style.display="block",e.style.width="100%",e.style.height="100%",e.style.backgroundRepeat="no-repeat",e.style.backgroundPosition="50%";var i=this._link=L.DomUtil.create("a","leaflet-control-rotate-toggle",o);return i.appendChild(e),i.href="#",i.title="leaflet-control-rotate-toggle",L.DomEvent.on(i,"dblclick",L.DomEvent.stopPropagation).on(i,"mousedown",this._handleMouseDown,this).on(i,"click",L.DomEvent.stop).on(i,"click",this._cycleState,this).on(i,"click",this._refocusOnMap,this),L.Browser.any3d||L.DomUtil.addClass(i,"leaflet-disabled"),this._restyle(),t.on("rotate",this._restyle.bind(this)),this._follow=!1,this._canFollow=!1,this.options.closeOnZeroBearing&&0===t.getBearing()&&(o.style.display="none"),o},_handleMouseDown:function(t){L.DomEvent.stopPropagation(t),this.dragging=!0,this.dragstartX=t.pageX,this.dragstartY=t.pageY,L.DomEvent.on(document,"mousemove",this._handleMouseDrag,this).on(document,"mouseup",this._handleMouseUp,this)},_handleMouseUp:function(t){L.DomEvent.stopPropagation(t),this.dragging=!1,L.DomEvent.off(document,"mousemove",this._handleMouseDrag,this).off(document,"mouseup",this._handleMouseUp,this)},_handleMouseDrag:function(t){if(this.dragging){var o=t.clientX-this.dragstartX;this._map.setBearing(o)}},_cycleState:function(t){var o=this._map;o&&(o.touchRotate.enabled()||o.compassBearing.enabled()?o.compassBearing.enabled()?(o.compassBearing.disable(),o.setBearing(0),this.options.closeOnZeroBearing&&o.touchRotate.enable()):(o.touchRotate.disable(),o.compassBearing.enable()):o.touchRotate.enable(),this._restyle())},_restyle:function(){if(this._map.options.rotate){var t=this._map,o=t.getBearing();this.options.closeOnZeroBearing&&o&&(this._container.style.display="block");var e="rotate("+o+"deg)";this._arrow.style.transform=e,t.compassBearing.enabled()?this._link.style.backgroundColor="orange":t.touchRotate.enabled()?this._link.style.backgroundColor=null:(this._link.style.backgroundColor="grey",this.options.closeOnZeroBearing&&0===t.getBearing()&&(this._container.style.display="none"))}else L.DomUtil.addClass(link,"leaflet-disabled")}}),L.control.rotate=function(t){return new L.Control.Rotate(t)},L.Map.mergeOptions({rotateControl:!0}),L.Map.addInitHook((function(){if(this.options.rotateControl){var t="object"==typeof this.options.rotateControl?this.options.rotateControl:{};this.rotateControl=L.control.rotate(t),this.addControl(this.rotateControl)}}))})); +!function(t){"function"==typeof define&&define.amd?define(t):t()}((function(){"use strict";const t=L.extend({},L.DomUtil);L.extend(L.DomUtil,{setTransform:function(o,e,i,n,a){var s=e||new L.Point(0,0);if(!n)return e=s._round(),t.setTransform.call(this,o,e,i);s=s.rotateFrom(n,a),o.style[L.DomUtil.TRANSFORM]="translate3d("+s.x+"px,"+s.y+"px,0)"+(i?" scale("+i+")":"")+" rotate("+n+"rad)"},setPosition:function(o,e,i,n){if(!i)return t.setPosition.call(this,o,e);o._leaflet_pos=e,L.Browser.any3d?L.DomUtil.setTransform(o,e,void 0,i,n):(o.style.left=e.x+"px",o.style.top=e.y+"px")},DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI}),L.Draggable.include({updateMapBearing:function(t){this._mapBearing=t}}),L.extend(L.Point.prototype,{rotate:function(t){if(!t)return this;var o=Math.sin(t),e=Math.cos(t);return new L.Point(this.x*e-this.y*o,this.x*o+this.y*e)},rotateFrom:function(t,o){if(!t)return this;var e=Math.sin(t),i=Math.cos(t),n=o.x,a=o.y,s=this.x-n,r=this.y-a;return new L.Point(s*i-r*e+n,s*e+r*i+a)}});const o=L.extend({},L.DivOverlay.prototype);L.DivOverlay.include({getEvents:function(){return L.extend(o.getEvents.call(this),{rotate:this._updatePosition})},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),o=L.point(this.options.offset),e=this._getAnchor();this._zoomAnimated?(this._map._rotate&&(t=this._map.rotatedPointToMapPanePoint(t)),L.DomUtil.setPosition(this._container,t.add(e))):o=o.add(t).add(e);var i=this._containerBottom=-o.y,n=this._containerLeft=-Math.round(this._containerWidth/2)+o.x;this._container.style.bottom=i+"px",this._container.style.left=n+"px"}}});const e=L.extend({},L.Popup.prototype);L.Popup.include({_animateZoom:function(t){this._map._rotate||e._animateZoom.call(this,t);var o=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();o=this._map.rotatedPointToMapPanePoint(o),L.DomUtil.setPosition(this._container,o.add(i))},_adjustPan:function(){if(!(!this.options.autoPan||this._map._panAnim&&this._map._panAnim._inProgress)){var t=this._map,o=parseInt(L.DomUtil.getStyle(this._container,"marginBottom"),10)||0,e=this._container.offsetHeight+o,i=this._containerWidth,n=new L.Point(this._containerLeft,-e-this._containerBottom);n._add(L.DomUtil.getPosition(this._container));var a=n._add(this._map._getMapPanePos()),s=L.point(this.options.autoPanPadding),r=L.point(this.options.autoPanPaddingTopLeft||s),h=L.point(this.options.autoPanPaddingBottomRight||s),_=t.getSize(),l=0,c=0;a.x+i+h.x>_.x&&(l=a.x+i-_.x+h.x),a.x-l-r.x<0&&(l=a.x-r.x),a.y+e+h.y>_.y&&(c=a.y+e-_.y+h.y),a.y-c-r.y<0&&(c=a.y-r.y),(l||c)&&t.fire("autopanstart").panBy([l,c])}}});const i=L.extend({},L.Tooltip.prototype);L.Tooltip.include({_updatePosition:function(){if(!this._map._rotate)return i._updatePosition.call(this);var t=this._map.latLngToLayerPoint(this._latlng);t=this._map.rotatedPointToMapPanePoint(t),this._setPosition(t)},_animateZoom:function(t){if(!this._map._rotate)return i._animateZoom.call(this,t);var o=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);o=this._map.rotatedPointToMapPanePoint(o),this._setPosition(o)}});L.extend({},L.Icon.prototype);var n;L.Icon.include({_setIconStyles:function(t,o){var e=this.options,i=e[o+"Size"];"number"==typeof i&&(i=[i,i]);var n=L.point(i),a=L.point("shadow"===o&&e.shadowAnchor||e.iconAnchor||n&&n.divideBy(2,!0));t.className="leaflet-marker-"+o+" "+(e.className||""),a&&(t.style.marginLeft=-a.x+"px",t.style.marginTop=-a.y+"px",t.style[L.DomUtil.TRANSFORM+"Origin"]=a.x+"px "+a.y+"px 0px"),n&&(t.style.width=n.x+"px",t.style.height=n.y+"px")}});var a={_onDragStart:function(){if(!this._marker._map._rotate)return n._onDragStart.call(this);this._draggable.updateMapBearing(this._marker._map._bearing)},_onDrag:function(t){var o=this._marker,e=o.options.rotation||o.options.rotateWithView,i=o._shadow,n=L.DomUtil.getPosition(o._icon);!e&&i&&L.DomUtil.setPosition(i,n),o._map._rotate&&(n=o._map.mapPanePointToRotatedPoint(n));var a=o._map.layerPointToLatLng(n);o._latlng=a,t.latlng=a,t.oldLatLng=this._oldLatLng,e?o.setLatLng(a):o.fire("move",t),o.fire("drag",t)},_onDragEnd:function(t){this._marker._map._rotate&&this._marker.update(),n._onDragEnd.call(this,t)}};const s=L.extend({},L.Marker.prototype);L.Marker.mergeOptions({rotation:0,rotateWithView:!1}),L.Marker.include({getEvents:function(){return L.extend(s.getEvents.call(this),{rotate:this.update})},onAdd:function(t){s.onAdd.call(this,t),t.on("rotate",this.update,this)},_initInteraction:function(){var t=s._initInteraction.call(this);return this.dragging&&this._map&&this._map._rotate&&(n=n||Object.getPrototypeOf(this.dragging),this.dragging._onDragStart=a._onDragStart.bind(this.dragging),this.dragging._onDrag=a._onDrag.bind(this.dragging),this.dragging._onDragEnd=a._onDragEnd.bind(this.dragging),this.dragging.disable(),this.dragging.enable()),t},_setPos:function(t){this._map._rotate&&(t=this._map.rotatedPointToMapPanePoint(t));var o=this.options.rotation||0;this.options.rotateWithView&&(o+=this._map._bearing),L.DomUtil.setPosition(this._icon,t,o,t),this._shadow&&L.DomUtil.setPosition(this._shadow,t,o,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){if(!this._map._rotate)return s._updateZIndex.call(this,t);this._icon.style.zIndex=Math.round(this._zIndex+t)},setRotation:function(t){this.options.rotation=t,this.update()}});const r=L.extend({},L.GridLayer.prototype);L.GridLayer.include({getEvents:function(){var t=r.getEvents.call(this);return this._map._rotate&&!this.options.updateWhenIdle&&(this._onRotate||(this._onRotate=L.Util.throttle(this._onMoveEnd,this.options.updateInterval,this)),t.rotate=this._onRotate),t},_getTiledPixelBounds:function(t){if(!this._map._rotate)return r._getTiledPixelBounds.call(this,t);var o=this._map,e=o._animatingZoom?Math.max(o._animateToZoom,o.getZoom()):o.getZoom(),i=o.getZoomScale(e,this._tileZoom),n=o.project(t,this._tileZoom).floor(),a=o.getSize(),s=new L.Bounds([o.containerPointToLayerPoint([0,0]).floor(),o.containerPointToLayerPoint([a.x,0]).floor(),o.containerPointToLayerPoint([0,a.y]).floor(),o.containerPointToLayerPoint([a.x,a.y]).floor()]).getSize().divideBy(2*i);return new L.Bounds(n.subtract(s),n.add(s))}});const h=L.extend({},L.Canvas.prototype);L.Canvas.include({onAdd:function(){h.onAdd.call(this),this._map.on("rotate",this._redraw,this)},onRemove:function(){h.onRemove.call(this),this._map.off("rotate",this._redraw,this)},_update:function(){h._update.call(this),this.fire("update")}});const _=L.extend({},L.Renderer.prototype);L.Renderer.include({onAdd:function(){_.onAdd.call(this)},onRemove:function(){_.onRemove.call(this)},_updateTransform:function(t,o){if(!this._map._rotate)return _._updateTransform.call(this,t,o);var e=this._map.getZoomScale(o,this._zoom),i=this._map._latLngToNewLayerPoint(this._topLeft,o,t);L.Browser.any3d?L.DomUtil.setTransform(this._container,i,e):L.DomUtil.setPosition(this._container,i)},_update:function(){if(!this._map._rotate)return _._update.call(this);var t=this.options.padding,o=this._map,e=this._map.getSize(),i=e.multiplyBy(-t),n=e.multiplyBy(1+t),a=new L.Bounds([o.containerPointToLayerPoint([i.x,i.y]).floor(),o.containerPointToLayerPoint([i.x,n.y]).floor(),o.containerPointToLayerPoint([n.x,i.y]).floor(),o.containerPointToLayerPoint([n.x,n.y]).floor()]);this._bounds=a,this._topLeft=this._map.layerPointToLatLng(a.min),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}});const l=L.extend({},L.SVG.prototype);L.SVG.include({_update:function(){l._update.call(this),this._map._rotate&&this.fire("update")}});const c=L.extend({},L.Map.prototype);L.Map.mergeOptions({rotate:!1,bearing:0}),L.Map.include({initialize:function(t,o){o.rotate&&(this._rotate=!0,this._bearing=0),c.initialize.call(this,t,o),this.options.rotate&&this.setBearing(this.options.bearing)},containerPointToLayerPoint:function(t){return this._rotate?L.point(t).subtract(this._getMapPanePos()).rotateFrom(-this._bearing,this._getRotatePanePos()).subtract(this._getRotatePanePos()):c.containerPointToLayerPoint.call(this,t)},getBounds:function(){if(!this._rotate)return c.getBounds.call(this);var t=this.getSize(),o=this.layerPointToLatLng(this.containerPointToLayerPoint([0,0])),e=this.layerPointToLatLng(this.containerPointToLayerPoint([t.x,0])),i=this.layerPointToLatLng(this.containerPointToLayerPoint([t.x,t.y])),n=this.layerPointToLatLng(this.containerPointToLayerPoint([0,t.y]));return new L.LatLngBounds([o,e,i,n])},layerPointToContainerPoint:function(t){return this._rotate?L.point(t).add(this._getRotatePanePos()).rotateFrom(this._bearing,this._getRotatePanePos()).add(this._getMapPanePos()):c.layerPointToContainerPoint.call(this,t)},setBearing:function(t){if(L.Browser.any3d&&this._rotate){var o=this._getRotatePanePos(),e=this.getSize().divideBy(2);this._pivot=this._getMapPanePos().clone().multiplyBy(-1).add(e),o=o.rotateFrom(-this._bearing,this._pivot),this._bearing=t*L.DomUtil.DEG_TO_RAD,this._rotatePanePos=o.rotateFrom(this._bearing,this._pivot),L.DomUtil.setPosition(this._rotatePane,o,this._bearing,this._pivot),this.fire("rotate")}},getBearing:function(){return this._bearing*L.DomUtil.RAD_TO_DEG},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),L.DomUtil.setPosition(this._mapPane,new L.Point(0,0)),this._rotate?(this._rotatePane=this.createPane("rotatePane",this._mapPane),this._norotatePane=this.createPane("norotatePane",this._mapPane),this.createPane("tilePane",this._rotatePane),this.createPane("overlayPane",this._rotatePane),this.createPane("shadowPane",this._norotatePane),this.createPane("markerPane",this._norotatePane),this.createPane("tooltipPane",this._norotatePane),this.createPane("popupPane",this._norotatePane)):(this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane")),this.options.markerZoomAnimation||(L.DomUtil.addClass(t.markerPane,"leaflet-zoom-hide"),L.DomUtil.addClass(t.shadowPane,"leaflet-zoom-hide"))},rotatedPointToMapPanePoint:function(t){return L.point(t).rotate(this._bearing)._add(this._getRotatePanePos())},mapPanePointToRotatedPoint:function(t){return L.point(t)._subtract(this._getRotatePanePos()).rotate(-this._bearing)},_getCenterOffset:function(t){var o=c._getCenterOffset.call(this,t);return this._rotate&&(o=o.rotate(this._bearing)),o},_getRotatePanePos:function(){return this._rotatePanePos||new L.Point(0,0)},_getNewPixelOrigin:function(t,o){var e=this.getSize()._divideBy(2);return this._rotate||c._getNewPixelOrigin.call(this,t,o),this.project(t,o).rotate(this._bearing)._subtract(e)._add(this._getMapPanePos())._add(this._getRotatePanePos()).rotate(-this._bearing)._round()},_handleGeolocationResponse:function(t){var o=t.coords.latitude,e=t.coords.longitude,i=t.coords.heading,n=new L.LatLng(o,e),a=n.toBounds(t.coords.accuracy),s=this._locateOptions;if(s.setView){var r=this.getBoundsZoom(a);this.setView(n,s.maxZoom?Math.min(r,s.maxZoom):r)}var h={latlng:n,bounds:a,timestamp:t.timestamp,heading:i};for(var _ in t.coords)"number"==typeof t.coords[_]&&(h[_]=t.coords[_]);this.fire("locationfound",h)}}),L.Map.CompassBearing=L.Handler.extend({initialize:function(t){window.DeviceOrientationEvent?(this._capable=!0,this._map=t,this._throttled=L.Util.throttle(this._onDeviceOrientation,1e3,this)):this._capable=!1},addHooks:function(){this._capable&&this._map._rotate&&L.DomEvent.on(window,"deviceorientation",this._throttled,this)},removeHooks:function(){this._capable&&this._map._rotate&&L.DomEvent.off(window,"deviceorientation",this._throttled,this)},_onDeviceOrientation:function(t){null!==t.alpha&&this._map.setBearing(t.alpha-window.orientation)}}),L.Map.addInitHook("addHandler","compassBearing",L.Map.CompassBearing),L.Map.mergeOptions({trackContainerMutation:!1}),L.Map.ContainerMutation=L.Handler.extend({addHooks:function(){L.Browser.mutation&&(this._observer||(this._observer=new MutationObserver(L.Util.bind(this._onMutation,this))),this._observer.observe(this._map.getContainer(),{childList:!1,attributes:!0,characterData:!1,subtree:!1,attributeFilter:["style"]}))},removeHooks:function(){L.Browser.mutation&&this._observer.disconnect()},_onMutation:function(){this._map.invalidateSize()}}),L.Map.addInitHook("addHandler","trackContainerMutation",L.Map.ContainerMutation),L.Map.mergeOptions({bounceAtZoomLimits:!0}),L.Map.TouchGestures=L.Handler.extend({initialize:function(t){this._map=t,this.rotate=!!this._map.options.touchRotate,this.zoom=!!this._map.options.touchZoom},addHooks:function(){L.DomEvent.on(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){L.DomEvent.off(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var o=this._map;if(t.touches&&2===t.touches.length&&!o._animatingZoom&&!this._zooming&&!this._rotating){var e=o.mouseEventToContainerPoint(t.touches[0]),i=o.mouseEventToContainerPoint(t.touches[1]),n=e.subtract(i);this._centerPoint=o.getSize()._divideBy(2),this._startLatLng=o.containerPointToLatLng(this._centerPoint),this.zoom?("center"!==o.options.touchZoom&&(this._pinchStartLatLng=o.containerPointToLatLng(e.add(i)._divideBy(2))),this._startDist=e.distanceTo(i),this._startZoom=o.getZoom(),this._zooming=!0):this._zooming=!1,this.rotate?(this._startTheta=Math.atan(n.x/n.y),this._startBearing=o.getBearing(),n.y<0&&(this._startBearing+=180),this._rotating=!0):this._rotating=!1,this._moved=!1,o.stop(),L.DomEvent.on(document,"touchmove",this._onTouchMove,this).on(document,"touchend",this._onTouchEnd,this),L.DomEvent.preventDefault(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&(this._zooming||this._rotating)){var o,e=this._map,i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]),a=i.subtract(n),s=i.distanceTo(n)/this._startDist;if(this._rotating){var r=(Math.atan(a.x/a.y)-this._startTheta)*L.DomUtil.RAD_TO_DEG;a.y<0&&(r+=180),r&&e.setBearing(this._startBearing-r)}if(this._zooming)if(this._zoom=e.getScaleZoom(s,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoome.getMaxZoom()&&s>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===s)return}else{if(o=i._add(n)._divideBy(2)._subtract(this._centerPoint),1===s&&0===o.x&&0===o.y)return;var h=-e.getBearing()*L.DomUtil.DEG_TO_RAD;this._center=e.unproject(e.project(this._pinchStartLatLng).subtract(o.rotate(h)))}this._moved||(e._moveStart(!0),this._moved=!0),L.Util.cancelAnimFrame(this._animRequest);var _=L.bind(e._move,e,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=L.Util.requestAnimFrame(_,this,!0),L.DomEvent.preventDefault(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,this._rotating=!1,L.Util.cancelAnimFrame(this._animRequest),L.DomEvent.off(document,"touchmove",this._onTouchMove).off(document,"touchend",this._onTouchEnd),this.zoom&&(this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.snapZoom):this._map._resetView(this._center,this._map._limitZoom(this._zoom)))):this._zooming=!1}}),L.Map.addInitHook("addHandler","touchGestures",L.Map.TouchGestures),L.Map.mergeOptions({touchRotate:!1}),L.Map.TouchRotate=L.Handler.extend({addHooks:function(){this._map.touchGestures.enable(),this._map.touchGestures.rotate=!0},removeHooks:function(){this._map.touchGestures.rotate=!1}}),L.Map.addInitHook("addHandler","touchRotate",L.Map.TouchRotate),L.Map.mergeOptions({shiftKeyRotate:!0}),L.Map.ShiftKeyRotate=L.Handler.extend({addHooks:function(){L.DomEvent.on(this._map._container,"wheel",this._handleShiftScroll,this),this._map.shiftKeyRotate.rotate=!0},removeHooks:function(){L.DomEvent.off(this._map._container,"wheel",this._handleShiftScroll,this),this._map.shiftKeyRotate.rotate=!1},_handleShiftScroll:function(t){t.shiftKey?(t.preventDefault(),this._map.scrollWheelZoom.disable(),this._map.setBearing(this._map._bearing*L.DomUtil.RAD_TO_DEG+t.deltaY)):this._map.scrollWheelZoom.enable()}}),L.Map.addInitHook("addHandler","shiftKeyRotate",L.Map.ShiftKeyRotate),L.Map.mergeOptions({touchZoom:L.Browser.touch&&!L.Browser.android23,bounceAtZoomLimits:!1}),L.Map.TouchZoom=L.Handler.extend({addHooks:function(){L.DomUtil.addClass(this._map._container,"leaflet-touch-zoom"),this._map.touchGestures.enable(),this._map.touchGestures.zoom=!0},removeHooks:function(){L.DomUtil.removeClass(this._map._container,"leaflet-touch-zoom"),this._map.touchGestures.zoom=!1}}),L.Map.addInitHook("addHandler","touchZoom",L.Map.TouchZoom),L.Control.Rotate=L.Control.extend({options:{position:"topleft",closeOnZeroBearing:!0},onAdd:function(t){this._onDeviceOrientation=L.Util.throttle(this._unthrottledOnDeviceOrientation,100,this);var o=this._container=L.DomUtil.create("div","leaflet-control-rotate leaflet-bar"),e=this._arrow=L.DomUtil.create("span","leaflet-control-rotate-arrow");e.style.backgroundImage="url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M10.5 14l4-8 4 8h-8z'/%3E%3Cpath d='M10.5 16l4 8 4-8h-8z' fill='%23ccc'/%3E%3C/svg%3E\")",e.style.cursor="grab",e.style.display="block",e.style.width="100%",e.style.height="100%",e.style.backgroundRepeat="no-repeat",e.style.backgroundPosition="50%";var i=this._link=L.DomUtil.create("a","leaflet-control-rotate-toggle",o);return i.appendChild(e),i.href="#",i.title="leaflet-control-rotate-toggle",L.DomEvent.on(i,"dblclick",L.DomEvent.stopPropagation).on(i,"mousedown",this._handleMouseDown,this).on(i,"click",L.DomEvent.stop).on(i,"click",this._cycleState,this).on(i,"click",this._refocusOnMap,this),L.Browser.any3d||L.DomUtil.addClass(i,"leaflet-disabled"),this._restyle(),t.on("rotate",this._restyle.bind(this)),this._follow=!1,this._canFollow=!1,this.options.closeOnZeroBearing&&0===t.getBearing()&&(o.style.display="none"),o},_handleMouseDown:function(t){L.DomEvent.stopPropagation(t),this.dragging=!0,this.dragstartX=t.pageX,this.dragstartY=t.pageY,L.DomEvent.on(document,"mousemove",this._handleMouseDrag,this).on(document,"mouseup",this._handleMouseUp,this)},_handleMouseUp:function(t){L.DomEvent.stopPropagation(t),this.dragging=!1,L.DomEvent.off(document,"mousemove",this._handleMouseDrag,this).off(document,"mouseup",this._handleMouseUp,this)},_handleMouseDrag:function(t){if(this.dragging){var o=t.clientX-this.dragstartX;this._map.setBearing(o)}},_cycleState:function(t){var o=this._map;o&&(o.touchRotate.enabled()||o.compassBearing.enabled()?o.compassBearing.enabled()?(o.compassBearing.disable(),o.setBearing(0),this.options.closeOnZeroBearing&&o.touchRotate.enable()):(o.touchRotate.disable(),o.compassBearing.enable()):o.touchRotate.enable(),this._restyle())},_restyle:function(){if(this._map.options.rotate){var t=this._map,o=t.getBearing();this.options.closeOnZeroBearing&&o&&(this._container.style.display="block");var e="rotate("+o+"deg)";this._arrow.style.transform=e,t.compassBearing.enabled()?this._link.style.backgroundColor="orange":t.touchRotate.enabled()?this._link.style.backgroundColor=null:(this._link.style.backgroundColor="grey",this.options.closeOnZeroBearing&&0===t.getBearing()&&(this._container.style.display="none"))}else L.DomUtil.addClass(link,"leaflet-disabled")}}),L.control.rotate=function(t){return new L.Control.Rotate(t)},L.Map.mergeOptions({rotateControl:!0}),L.Map.addInitHook((function(){if(this.options.rotateControl){var t="object"==typeof this.options.rotateControl?this.options.rotateControl:{};this.rotateControl=L.control.rotate(t),this.addControl(this.rotateControl)}}))})); //# sourceMappingURL=leaflet-rotate.js.map diff --git a/dist/leaflet-rotate.js.map b/dist/leaflet-rotate.js.map index 40b3236..a93ab52 100644 --- a/dist/leaflet-rotate.js.map +++ b/dist/leaflet-rotate.js.map @@ -1 +1 @@ -{"version":3,"file":"leaflet-rotate.js","sources":["../src/dom/DomUtil.js","../src/dom/Draggable.js","../src/geometry/Point.js","../src/layer/DivOverlay.js","../src/layer/Popup.js","../src/layer/Tooltip.js","../src/layer/marker/Icon.js","../src/layer/marker/Marker.js","../src/layer/tile/GridLayer.js","../src/layer/vector/Canvas.js","../src/layer/vector/Renderer.js","../src/layer/vector/SVG.js","../src/map/Map.js","../src/map/handler/CompassBearing.js","../src/map/handler/ContainerMutation.js","../src/map/handler/TouchGestures.js","../src/map/handler/TouchRotate.js","../src/map/handler/ShiftKeyRotate.js","../src/map/handler/TouchZoom.js","../src/control/Rotate.js"],"sourcesContent":["/**\n * L.DomUtil\n */\nconst domUtilProto = {\n setTransform: L.DomUtil.setTransform,\n setPosition: L.DomUtil.setPosition\n};\n\nL.extend(L.DomUtil, {\n\n setTransform: function(el, offset, scale, bearing, pivot) {\n var pos = offset || new L.Point(0, 0);\n\n if (!bearing) {\n offset = pos._round();\n return domUtilProto.setTransform.call(this, el, offset, scale);\n }\n\n pos = pos.rotateFrom(bearing, pivot);\n\n el.style[L.DomUtil.TRANSFORM] =\n 'translate3d(' + pos.x + 'px,' + pos.y + 'px' + ',0)' +\n (scale ? ' scale(' + scale + ')' : '') +\n ' rotate(' + bearing + 'rad)';\n },\n\n setPosition: function(el, point, bearing, pivot) { // (HTMLElement, Point[, Boolean])\n if (!bearing) {\n return domUtilProto.setPosition.call(this, el, point);\n }\n\n /*eslint-disable */\n el._leaflet_pos = point;\n /*eslint-enable */\n\n if (L.Browser.any3d) {\n L.DomUtil.setTransform(el, point, undefined, bearing, pivot);\n } else {\n el.style.left = point.x + 'px';\n el.style.top = point.y + 'px';\n }\n },\n\n // Constants for rotation\n DEG_TO_RAD: Math.PI / 180,\n RAD_TO_DEG: 180 / Math.PI,\n\n});\r\n","/**\n * L.Draggable\n */\nL.Draggable.include({\n\n updateMapBearing: function(mapBearing) {\n this._mapBearing = mapBearing;\n },\n\n});\r\n","/**\n * L.Point\n */\nL.extend(L.Point.prototype, {\n\n // Rotate around (0,0) by applying the 2D rotation matrix:\n // ⎡ x' ⎤ = ⎡ cos θ -sin θ ⎤ ⎡ x ⎤\n // ⎣ y' ⎦ ⎣ sin θ cos θ ⎦ ⎣ y ⎦\n // Theta must be given in radians.\n rotate: function(theta) {\n if (!theta) { return this; }\n var sinTheta = Math.sin(theta);\n var cosTheta = Math.cos(theta);\n\n return new L.Point(\n this.x * cosTheta - this.y * sinTheta,\n this.x * sinTheta + this.y * cosTheta\n );\n },\n\n // Rotate around (pivot.x, pivot.y) by:\n // 1. subtract (pivot.x, pivot.y)\n // 2. rotate around (0, 0)\n // 3. add (pivot.x, pivot.y) back\n // same as `this.subtract(pivot).rotate(theta).add(pivot)`\n rotateFrom: function(theta, pivot) {\n if (!theta) { return this; }\n var sinTheta = Math.sin(theta);\n var cosTheta = Math.cos(theta);\n var cx = pivot.x,\n cy = pivot.y;\n var x = this.x - cx,\n y = this.y - cy;\n\n return new L.Point(\n x * cosTheta - y * sinTheta + cx,\n x * sinTheta + y * cosTheta + cy\n );\n },\n\n});\r\n","/**\n * L.DivOverlay\n */\nconst divOverlayProto = {\n getEvents: L.DivOverlay.prototype.getEvents,\n _updatePosition: L.DivOverlay.prototype._updatePosition,\n};\n\nL.DivOverlay.include({\n\n getEvents: function() {\n return L.extend(divOverlayProto.getEvents.call(this), { rotate: this._updatePosition });\n },\n\n _updatePosition: function() {\n if (!this._map) { return; }\n\n var pos = this._map.latLngToLayerPoint(this._latlng),\n offset = L.point(this.options.offset),\n anchor = this._getAnchor();\n\n if (this._zoomAnimated) {\n // TODO: use divOverlayProto._updatePosition\n if (this._map._rotate) {\n pos = this._map.rotatedPointToMapPanePoint(pos);\n }\n L.DomUtil.setPosition(this._container, pos.add(anchor));\n } else {\n offset = offset.add(pos).add(anchor);\n }\n\n var bottom = this._containerBottom = -offset.y,\n left = this._containerLeft = -Math.round(this._containerWidth / 2) + offset.x;\n\n // bottom position the popup in case the height of the popup changes (images loading etc)\n this._container.style.bottom = bottom + 'px';\n this._container.style.left = left + 'px';\n },\n\n});\r\n","/**\n * L.Popup\n */\nconst popupProto = {\n _animateZoom: L.Popup.prototype._animateZoom,\n _adjustPan: L.Popup.prototype._adjustPan,\n};\n\nL.Popup.include({\n\n _animateZoom: function(e) {\n if (!this._map._rotate) {\n popupProto._animateZoom.call(this, e);\n }\n var pos = this._map._latLngToNewLayerPoint(this._latlng, e.zoom, e.center),\n anchor = this._getAnchor();\n\n pos = this._map.rotatedPointToMapPanePoint(pos);\n\n L.DomUtil.setPosition(this._container, pos.add(anchor));\n },\n\n _adjustPan: function() {\n if (!this.options.autoPan || (this._map._panAnim && this._map._panAnim._inProgress)) { return; }\n\n var map = this._map,\n marginBottom = parseInt(L.DomUtil.getStyle(this._container, 'marginBottom'), 10) || 0,\n containerHeight = this._container.offsetHeight + marginBottom,\n containerWidth = this._containerWidth,\n layerPos = new L.Point(this._containerLeft, -containerHeight - this._containerBottom);\n\n layerPos._add(L.DomUtil.getPosition(this._container));\n\n // var containerPos = map.layerPointToContainerPoint(layerPos);\n // TODO: use popupProto._adjustPan\n var containerPos = layerPos._add(this._map._getMapPanePos()),\n padding = L.point(this.options.autoPanPadding),\n paddingTL = L.point(this.options.autoPanPaddingTopLeft || padding),\n paddingBR = L.point(this.options.autoPanPaddingBottomRight || padding),\n size = map.getSize(),\n dx = 0,\n dy = 0;\n\n if (containerPos.x + containerWidth + paddingBR.x > size.x) { // right\n dx = containerPos.x + containerWidth - size.x + paddingBR.x;\n }\n if (containerPos.x - dx - paddingTL.x < 0) { // left\n dx = containerPos.x - paddingTL.x;\n }\n if (containerPos.y + containerHeight + paddingBR.y > size.y) { // bottom\n dy = containerPos.y + containerHeight - size.y + paddingBR.y;\n }\n if (containerPos.y - dy - paddingTL.y < 0) { // top\n dy = containerPos.y - paddingTL.y;\n }\n\n // @namespace Map\n // @section Popup events\n // @event autopanstart: Event\n // Fired when the map starts autopanning when opening a popup.\n if (dx || dy) {\n map\n .fire('autopanstart')\n .panBy([dx, dy]);\n }\n },\n\n});\r\n","/**\n * L.Tooltip\n */\nconst tooltipProto = {\n _updatePosition: L.Tooltip.prototype._updatePosition,\n _animateZoom: L.Tooltip.prototype._animateZoom,\n};\n\nL.Tooltip.include({\n\n _updatePosition: function() {\n if (!this._map._rotate) {\n return tooltipProto._updatePosition.call(this);\n }\n var pos = this._map.latLngToLayerPoint(this._latlng);\n\n pos = this._map.rotatedPointToMapPanePoint(pos);\n this._setPosition(pos);\n },\n\n _animateZoom: function(e) {\n if (!this._map._rotate) {\n return tooltipProto._animateZoom.call(this);\n }\n var pos = this._map._latLngToNewLayerPoint(this._latlng, e.zoom, e.center);\n\n pos = this._map.rotatedPointToMapPanePoint(pos);\n this._setPosition(pos);\n },\n\n});\r\n","/**\n * L.Icon\n */\nconst iconProto = {\n _updatePosition: L.Icon.prototype._setIconStyles,\n};\n\nL.Icon.include({\n\n _setIconStyles: function(img, name) {\n var options = this.options;\n var sizeOption = options[name + 'Size'];\n\n if (typeof sizeOption === 'number') {\n sizeOption = [sizeOption, sizeOption];\n }\n\n var size = L.point(sizeOption),\n anchor = L.point(name === 'shadow' && options.shadowAnchor || options.iconAnchor ||\n size && size.divideBy(2, true));\n\n img.className = 'leaflet-marker-' + name + ' ' + (options.className || '');\n\n if (anchor) {\n img.style.marginLeft = (-anchor.x) + 'px';\n img.style.marginTop = (-anchor.y) + 'px';\n // TODO: use iconProto._setIconStyles\n img.style[L.DomUtil.TRANSFORM + \"Origin\"] = anchor.x + \"px \" + anchor.y + \"px 0px\";\n }\n\n if (size) {\n img.style.width = size.x + 'px';\n img.style.height = size.y + 'px';\n }\n },\n\n});\r\n","/**\n * L.Handler.MarkerDrag\n */\nvar markerDragProto = {\n _onDragStart: function() {},\n _onDrag: function() {},\n _onDragEnd: function() {},\n};\n\nvar MarkerDrag = {\n\n _onDragStart: function() {\n if (!this._marker._map._rotate) {\n return markerDragProto._onDragStart.call(this)\n }\n this._draggable.updateMapBearing(this._marker._map._bearing);\n },\n\n _onDrag: function(e) {\n var marker = this._marker,\n // TODO: use markerDragProto._onDrag\n rotated_marker = marker.options.rotation || marker.options.rotateWithView,\n shadow = marker._shadow,\n iconPos = L.DomUtil.getPosition(marker._icon);\n\n // TODO: use markerDragProto._onDrag\n // update shadow position\n if (!rotated_marker && shadow) {\n L.DomUtil.setPosition(shadow, iconPos);\n }\n\n // TODO: use markerDragProto._onDrag\n if (marker._map._rotate) {\n // Reverse calculation from mapPane coordinates to rotatePane coordinates\n iconPos = marker._map.mapPanePointToRotatedPoint(iconPos);\n }\n latlng = marker._map.layerPointToLatLng(iconPos);\n\n marker._latlng = latlng;\n e.latlng = latlng;\n e.oldLatLng = this._oldLatLng;\n\n // TODO: use markerDragProto._onDrag\n if (rotated_marker) marker.setLatLng(latlng); // use `setLatLng` to presisit rotation. low efficiency\n else marker.fire('move', e); // `setLatLng` will trig 'move' event. we imitate here.\n\n // @event drag: Event\n // Fired repeatedly while the user drags the marker.\n marker\n .fire('drag', e);\n },\n\n _onDragEnd: function(e) {\n if (this._marker._map._rotate) {\n this._marker.update();\n }\n markerDragProto.update.call(this, e);\n },\n\n};\n\n/**\n * L.Marker\n */\nconst markerProto = {\n getEvents: L.Marker.prototype.getEvents,\n onAdd: L.Marker.prototype.onAdd,\n _initInteraction: L.Marker.prototype._initInteraction,\n _setPos: L.Marker.prototype._setPos,\n _updateZIndex: L.Marker.prototype._updateZIndex,\n};\n\nL.Marker.mergeOptions({\n\n // @option rotation: Number = 0\n // Rotation of this marker in rad\n rotation: 0,\n\n // @option rotateWithView: Boolean = false\n // Rotate this marker when map rotates\n rotateWithView: false,\n\n});\nL.Marker.include({\n\n getEvents: function() {\n return L.extend(markerProto.getEvents.call(this), { rotate: this.update });\n },\n\n onAdd: function(map) {\n markerProto.onAdd.call(this, map);\n map.on('rotate', this.update, this);\n },\n\n _initInteraction: function() {\n var ret = markerProto._initInteraction.call(this);\n if (this.dragging && this._map && this._map._rotate) {\n // L.Handler.MarkerDrag is used internally by L.Marker to make the markers draggable\n markerDragProto._onDragStart = this.dragging._onDragStart.bind(this.dragging);\n markerDragProto._onDrag = this.dragging._onDrag.bind(this.dragging);\n markerDragProto._onDragEnd = this.dragging._onDragEnd.bind(this.dragging);\n this.dragging._onDragStart = MarkerDrag._onDragStart.bind(this.dragging);\n this.dragging._onDrag = MarkerDrag._onDrag.bind(this.dragging);\n this.dragging._onDragEnd = MarkerDrag._onDragEnd.bind(this.dragging);\n }\n return ret;\n },\n\n _setPos: function(pos) {\n\n // TODO: use markerProto._setPos\n if (this._map._rotate) {\n pos = this._map.rotatedPointToMapPanePoint(pos);\n }\n\n // TODO: use markerProto._setPos\n var bearing = this.options.rotation || 0;\n if (this.options.rotateWithView) {\n bearing += this._map._bearing;\n }\n\n // TODO: use markerProto._setPos\n L.DomUtil.setPosition(this._icon, pos, bearing, pos);\n\n // TODO: use markerProto._setPos\n if (this._shadow) {\n L.DomUtil.setPosition(this._shadow, pos, bearing, pos);\n }\n\n this._zIndex = pos.y + this.options.zIndexOffset;\n\n this._resetZIndex();\n },\n\n _updateZIndex: function(offset) {\n if (!this._map._rotate) {\n return markerProto._updateZIndex.call(this, offset)\n }\n this._icon.style.zIndex = Math.round(this._zIndex + offset);\n },\n\n setRotation: function(rotation) {\n this.options.rotation = rotation;\n this.update();\n },\n\n});\r\n","/**\n * L.GridLayer\n */\nconst gridLayerProto = {\n getEvents: L.GridLayer.prototype.getEvents,\n _getTiledPixelBounds: L.GridLayer.prototype._getTiledPixelBounds,\n};\n\nL.GridLayer.include({\n\n getEvents: function() {\n var events = gridLayerProto.getEvents.call(this);\n if (this._map._rotate && !this.options.updateWhenIdle) {\n if (!this._onRotate) {\n this._onRotate = L.Util.throttle(this._onMoveEnd, this.options.updateInterval, this);\n }\n events.rotate = this._onRotate;\n }\n return events;\n },\n\n _getTiledPixelBounds: function(center) {\n if (!this._map._rotate) {\n return gridLayerProto._getTiledPixelBounds.call(this, center);\n }\n\n var map = this._map,\n mapZoom = map._animatingZoom ? Math.max(map._animateToZoom, map.getZoom()) : map.getZoom(),\n scale = map.getZoomScale(mapZoom, this._tileZoom),\n pixelCenter = map.project(center, this._tileZoom).floor(),\n size = map.getSize(),\n halfSize = new L.Bounds([\n map.containerPointToLayerPoint([0, 0]).floor(),\n map.containerPointToLayerPoint([size.x, 0]).floor(),\n map.containerPointToLayerPoint([0, size.y]).floor(),\n map.containerPointToLayerPoint([size.x, size.y]).floor()\n ]).getSize().divideBy(scale * 2);\n\n return new L.Bounds(pixelCenter.subtract(halfSize), pixelCenter.add(halfSize));\n },\n\n});\r\n","/**\n * L.Canvas\n */\nconst canvasProto = {\n onAdd: L.Canvas.prototype.onAdd,\n onRemove: L.Canvas.prototype.onRemove,\n _update: L.Canvas.prototype._update,\n};\n\nL.Canvas.include({\n\n onAdd: function() {\n canvasProto.onAdd.call(this);\n // When rotating the canvas itself, it is cleared by some weird reason, so redraw.\n this._map.on('rotate', this._redraw, this);\n },\n\n onRemove: function() {\n canvasProto.onRemove.call(this);\n this._map.off('rotate', this._redraw, this);\n },\n\n _update: function() {\n canvasProto._update.call(this);\n // Tell paths to redraw themselves\n this.fire('update')\n },\n\n});\r\n","/**\n * L.Renderer\n */\nconst rendererProto = {\n onAdd: L.Renderer.prototype.onAdd,\n onRemove: L.Renderer.prototype.onRemove,\n _updateTransform: L.Renderer.prototype._updateTransform,\n _update: L.Renderer.prototype._update,\n};\n\nL.Renderer.include({\n\n onAdd: function() {\n rendererProto.onAdd.call(this);\n // this._map.on('rotate', this._update, this);\n },\n\n onRemove: function() {\n rendererProto.onRemove.call(this);\n // this._map.off('rotate', this._update, this);\n },\n\n _updateTransform: function(center, zoom) {\n if (!this._map._rotate) {\n return rendererProto._updateTransform.call(this, center, zoom);\n }\n var scale = this._map.getZoomScale(zoom, this._zoom),\n offset = this._map._latLngToNewLayerPoint(this._topLeft, zoom, center);\n if (L.Browser.any3d) {\n L.DomUtil.setTransform(this._container, offset, scale);\n } else {\n L.DomUtil.setPosition(this._container, offset);\n }\n },\n\n _update: function() {\n if (!this._map._rotate) {\n return rendererProto._update.call(this);\n }\n // Update pixel bounds of renderer container (for positioning/sizing/clipping later)\n // Subclasses are responsible of firing the 'update' event.\n var p = this.options.padding,\n map = this._map,\n size = this._map.getSize(),\n padMin = size.multiplyBy(-p),\n padMax = size.multiplyBy(1 + p),\n //// TODO: Somehow refactor this out into map.something() - the code is\n //// pretty much the same as in GridLayer.\n clip = new L.Bounds([\n map.containerPointToLayerPoint([padMin.x, padMin.y]).floor(),\n map.containerPointToLayerPoint([padMin.x, padMax.y]).floor(),\n map.containerPointToLayerPoint([padMax.x, padMin.y]).floor(),\n map.containerPointToLayerPoint([padMax.x, padMax.y]).floor()\n ]);\n //min = this._map.containerPointToLayerPoint(size.multiplyBy(-p)).round();\n\n this._bounds = clip;\n // this._topLeft = clip.min;\n this._topLeft = this._map.layerPointToLatLng(clip.min);\n\n this._center = this._map.getCenter();\n this._zoom = this._map.getZoom();\n },\n\n});\r\n","/**\n * L.SVG\n */\nconst svgProto = {\n _update: L.SVG.prototype._update,\n};\n\nL.SVG.include({\n\n _update: function() {\n svgProto._update.call(this);\n if (this._map._rotate) {\n this.fire('update');\n }\n },\n\n});\r\n","/**\n * L.Map\n */\nconst mapProto = {\n initialize: L.Map.prototype.initialize,\n createPane: L.Map.prototype.createPane,\n containerPointToLayerPoint: L.Map.prototype.containerPointToLayerPoint,\n getBounds: L.Map.prototype.getBounds,\n layerPointToContainerPoint: L.Map.prototype.layerPointToContainerPoint,\n _initPanes: L.Map.prototype._initPanes,\n _getCenterOffset: L.Map.prototype._getCenterOffset,\n _getNewPixelOrigin: L.Map.prototype._getNewPixelOrigin,\n _handleGeolocationResponse: L.Map.prototype._handleGeolocationResponse,\n};\n\nL.Map.mergeOptions({ rotate: false, });\n\nL.Map.include({\n\n initialize: function(id, options) { // (HTMLElement or String, Object)\n if (options.rotate) {\n this._rotate = true;\n this._bearing = 0;\n }\n mapProto.initialize.call(this, id, options);\n },\n\n createPane: function(name, container) {\n if (!this._rotate || name == 'mapPane') {\n return mapProto.createPane.call(this, name, container);\n }\n // init \"rotatePane\"\n if (!this._rotatePane) {\n // this._pivot = this.getSize().divideBy(2);\n this._rotatePane = mapProto.createPane.call(this, 'rotatePane', this._mapPane);\n L.DomUtil.setPosition(this._rotatePane, new L.Point(0, 0), this._bearing, this._pivot);\n }\n return mapProto.createPane.call(this, name, container || this._rotatePane);\n },\n\n containerPointToLayerPoint: function(point) { // (Point)\n if (!this._rotate) {\n return mapProto.containerPointToLayerPoint.call(this, point);\n }\n return L.point(point)\n .subtract(this._getMapPanePos())\n .rotateFrom(-this._bearing, this._getRotatePanePos())\n .subtract(this._getRotatePanePos());\n },\n\n getBounds: function() {\n if (!this._rotate) {\n return mapProto.getBounds.call(this);\n }\n var size = this.getSize();\n var topleft = this.layerPointToLatLng(this.containerPointToLayerPoint([0, 0])),\n topright = this.layerPointToLatLng(this.containerPointToLayerPoint([size.x, 0])),\n bottomright = this.layerPointToLatLng(this.containerPointToLayerPoint([size.x, size.y])),\n bottomleft = this.layerPointToLatLng(this.containerPointToLayerPoint([0, size.y]));\n\n // Use LatLngBounds' build-in constructor that automatically extends the bounds to fit the passed points\n return new L.LatLngBounds([topleft, topright, bottomright, bottomleft]);\n },\n\n layerPointToContainerPoint: function(point) { // (Point)\n if (!this._rotate) {\n return mapProto.layerPointToContainerPoint.call(this, point);\n }\n return L.point(point)\n .add(this._getRotatePanePos())\n .rotateFrom(this._bearing, this._getRotatePanePos())\n .add(this._getMapPanePos());\n },\n\n // Rotation methods\n // setBearing will work with just the 'theta' parameter.\n setBearing: function(theta) {\n if (!L.Browser.any3d || !this._rotate) { return; }\n\n var rotatePanePos = this._getRotatePanePos();\n var halfSize = this.getSize().divideBy(2);\n this._pivot = this._getMapPanePos().clone().multiplyBy(-1).add(halfSize);\n\n rotatePanePos = rotatePanePos.rotateFrom(-this._bearing, this._pivot);\n\n this._bearing = theta * L.DomUtil.DEG_TO_RAD; // TODO: mod 360\n this._rotatePanePos = rotatePanePos.rotateFrom(this._bearing, this._pivot);\n\n L.DomUtil.setPosition(this._rotatePane, rotatePanePos, this._bearing, this._pivot);\n\n this.fire('rotate');\n },\n\n getBearing: function() {\n return this._bearing * L.DomUtil.RAD_TO_DEG;\n },\n\n _initPanes: function() {\n var panes = this._panes = {};\n this._paneRenderers = {};\n\n // @section\n //\n // Panes are DOM elements used to control the ordering of layers on the map. You\n // can access panes with [`map.getPane`](#map-getpane) or\n // [`map.getPanes`](#map-getpanes) methods. New panes can be created with the\n // [`map.createPane`](#map-createpane) method.\n //\n // Every map has the following default panes that differ only in zIndex.\n //\n // @pane mapPane: HTMLElement = 'auto'\n // Pane that contains all other map panes\n\n this._mapPane = this.createPane('mapPane', this._container);\n L.DomUtil.setPosition(this._mapPane, new L.Point(0, 0));\n\n if (this._rotate) {\n this._rotatePane = this.createPane('rotatePane', this._mapPane);\n this._norotatePane = this.createPane('norotatePane', this._mapPane);\n\n // @pane tilePane: HTMLElement = 2\n // Pane for tile layers\n this.createPane('tilePane', this._rotatePane);\n // @pane overlayPane: HTMLElement = 4\n // Pane for overlays like polylines and polygons\n this.createPane('overlayPane', this._rotatePane);\n\n // @pane shadowPane: HTMLElement = 5\n // Pane for overlay shadows (e.g. marker shadows)\n this.createPane('shadowPane', this._norotatePane);\n // @pane markerPane: HTMLElement = 6\n // Pane for marker icons\n this.createPane('markerPane', this._norotatePane);\n // @pane tooltipPane: HTMLElement = 650\n // Pane for tooltips.\n this.createPane('tooltipPane', this._norotatePane);\n // @pane popupPane: HTMLElement = 700\n // Pane for popups.\n this.createPane('popupPane', this._norotatePane);\n } else {\n // @pane tilePane: HTMLElement = 2\n // Pane for tile layers\n this.createPane('tilePane');\n // @pane overlayPane: HTMLElement = 4\n // Pane for overlays like polylines and polygons\n this.createPane('overlayPane');\n // @pane shadowPane: HTMLElement = 5\n // Pane for overlay shadows (e.g. marker shadows)\n this.createPane('shadowPane');\n // @pane markerPane: HTMLElement = 6\n // Pane for marker icons\n this.createPane('markerPane');\n // @pane tooltipPane: HTMLElement = 650\n // Pane for tooltips.\n this.createPane('tooltipPane');\n // @pane popupPane: HTMLElement = 700\n // Pane for popups.\n this.createPane('popupPane');\n }\n\n if (!this.options.markerZoomAnimation) {\n L.DomUtil.addClass(panes.markerPane, 'leaflet-zoom-hide');\n L.DomUtil.addClass(panes.shadowPane, 'leaflet-zoom-hide');\n }\n },\n\n // @method rotatedPointToMapPanePoint(point: Point): Point\n // Converts a coordinate from the rotated pane reference system\n // to the reference system of the not rotated map pane.\n rotatedPointToMapPanePoint: function(point) {\n return L.point(point).rotate(this._bearing)._add(this._getRotatePanePos());\n },\n\n // @method mapPanePointToRotatedPoint(point: Point): Point\n // Converts a coordinate from the not rotated map pane reference system\n // to the reference system of the rotated pane.\n mapPanePointToRotatedPoint: function(point) {\n return L.point(point)._subtract(this._getRotatePanePos()).rotate(-this._bearing);\n },\n\n // offset of the specified place to the current center in pixels\n _getCenterOffset: function(latlng) {\n var centerOffset = mapProto._getCenterOffset.call(this, latlng);\n if (this._rotate) {\n centerOffset = centerOffset.rotate(this._bearing);\n }\n return centerOffset;\n },\n\n _getRotatePanePos: function() {\n return this._rotatePanePos || new L.Point(0, 0);\n },\n\n _getNewPixelOrigin: function(center, zoom) {\n var viewHalf = this.getSize()._divideBy(2);\n if (!this._rotate) {\n mapProto._getNewPixelOrigin.call(this, center, zoom);\n }\n return this.project(center, zoom)\n .rotate(this._bearing)\n ._subtract(viewHalf)\n ._add(this._getMapPanePos())\n ._add(this._getRotatePanePos())\n .rotate(-this._bearing)\n ._round();\n },\n\n _handleGeolocationResponse: function(pos) {\n var lat = pos.coords.latitude,\n lng = pos.coords.longitude,\n // TODO: use mapProto._handleGeolocationResponse\n hdg = pos.coords.heading,\n latlng = new L.LatLng(lat, lng),\n bounds = latlng.toBounds(pos.coords.accuracy),\n options = this._locateOptions;\n\n if (options.setView) {\n var zoom = this.getBoundsZoom(bounds);\n this.setView(latlng, options.maxZoom ? Math.min(zoom, options.maxZoom) : zoom);\n }\n\n var data = {\n latlng: latlng,\n bounds: bounds,\n timestamp: pos.timestamp,\n // TODO: use mapProto._handleGeolocationResponse\n heading: hdg\n };\n\n for (var i in pos.coords) {\n if (typeof pos.coords[i] === 'number') {\n data[i] = pos.coords[i];\n }\n }\n\n // @event locationfound: LocationEvent\n // Fired when geolocation (using the [`locate`](#map-locate) method)\n // went successfully.\n this.fire('locationfound', data);\n },\n\n});\r\n","/*\n * L.Map.CompassBearing will rotate the map according to a smartphone's compass.\n */\n\nL.Map.CompassBearing = L.Handler.extend({\n\n initialize: function(map) {\n if (!window.DeviceOrientationEvent) {\n this._capable = false;\n return;\n }\n this._capable = true;\n this._map = map;\n\n this._throttled = L.Util.throttle(this._onDeviceOrientation, 1000, this);\n },\n\n addHooks: function() {\n if (this._capable && this._map._rotate) {\n L.DomEvent.on(window, 'deviceorientation', this._throttled, this);\n }\n },\n\n removeHooks: function() {\n if (this._capable && this._map._rotate) {\n L.DomEvent.off(window, 'deviceorientation', this._throttled, this);\n }\n },\n\n _onDeviceOrientation: function(event) {\n if (event.alpha !== null) {\n this._map.setBearing(event.alpha - window.orientation);\n }\n },\n\n});\n\n// @section Handlers\n// @property compassBearing: Handler\n// Compass bearing handler.\nL.Map.addInitHook('addHandler', 'compassBearing', L.Map.CompassBearing);\r\n","/*\n * L.Handler.ContainerMutation triggers `invalidateResize` when the map's DOM container mutates.\n */\n\n// @namespace Map\n// @section Interaction Options\nL.Map.mergeOptions({\n\n // @option trackContainerMutation: Boolean = false\n // Whether the map uses [mutation observers](https://developer.mozilla.org/docs/Web/API/MutationObserver)\n // to detect changes in its container and trigger `invalidateSize`. Disabled\n // by default due to support not being available in all web browsers.\n trackContainerMutation: false\n\n});\n\nL.Map.ContainerMutation = L.Handler.extend({\n\n addHooks: function() {\n if (!L.Browser.mutation) {\n return;\n }\n\n if (!this._observer) {\n this._observer = new MutationObserver(L.Util.bind(this._onMutation, this));\n }\n\n this._observer.observe(this._map.getContainer(), {\n childList: false,\n attributes: true,\n characterData: false,\n subtree: false,\n attributeFilter: ['style']\n });\n },\n\n removeHooks: function() {\n if (!L.Browser.mutation) {\n return;\n }\n this._observer.disconnect();\n },\n\n _onMutation: function() {\n this._map.invalidateSize();\n },\n\n});\n\n// @section Handlers\n// @property containerMutation: Handler\n// Container mutation handler (disabled unless [`trackContainerMutation`](#map-trackcontainermutation) is set).\nL.Map.addInitHook('addHandler', 'trackContainerMutation', L.Map.ContainerMutation);\r\n","/*\n * L.Handler.TouchGestures is both TouchZoom plus TouchRotate.\n */\n\n// @namespace Map\n// @section Interaction Options\nL.Map.mergeOptions({\n\n // @option bounceAtZoomLimits: Boolean = true\n // Set it to false if you don't want the map to zoom beyond min/max zoom\n // and then bounce back when pinch-zooming.\n bounceAtZoomLimits: true,\n\n});\n\nL.Map.TouchGestures = L.Handler.extend({\n\n initialize: function(map) {\n this._map = map;\n this.rotate = !!this._map.options.touchRotate;\n this.zoom = !!this._map.options.touchZoom;\n },\n\n addHooks: function() {\n L.DomEvent.on(this._map._container, 'touchstart', this._onTouchStart, this);\n },\n\n removeHooks: function() {\n L.DomEvent.off(this._map._container, 'touchstart', this._onTouchStart, this);\n },\n\n _onTouchStart: function(e) {\n var map = this._map;\n\n if (!e.touches || e.touches.length !== 2 || map._animatingZoom || this._zooming || this._rotating) { return; }\n\n var p1 = map.mouseEventToContainerPoint(e.touches[0]),\n p2 = map.mouseEventToContainerPoint(e.touches[1]),\n vector = p1.subtract(p2);\n\n this._centerPoint = map.getSize()._divideBy(2);\n this._startLatLng = map.containerPointToLatLng(this._centerPoint);\n\n if (this.zoom) {\n if (map.options.touchZoom !== 'center') {\n this._pinchStartLatLng = map.containerPointToLatLng(p1.add(p2)._divideBy(2));\n }\n this._startDist = p1.distanceTo(p2);\n this._startZoom = map.getZoom();\n this._zooming = true;\n } else {\n this._zooming = false;\n }\n\n if (this.rotate) {\n this._startTheta = Math.atan(vector.x / vector.y);\n this._startBearing = map.getBearing();\n if (vector.y < 0) { this._startBearing += 180; }\n this._rotating = true;\n } else {\n this._rotating = false;\n }\n\n this._moved = false;\n\n map.stop();\n\n L.DomEvent\n .on(document, 'touchmove', this._onTouchMove, this)\n .on(document, 'touchend', this._onTouchEnd, this);\n\n L.DomEvent.preventDefault(e);\n },\n\n _onTouchMove: function(e) {\n if (!e.touches || e.touches.length !== 2 || !(this._zooming || this._rotating)) { return; }\n\n var map = this._map,\n p1 = map.mouseEventToContainerPoint(e.touches[0]),\n p2 = map.mouseEventToContainerPoint(e.touches[1]),\n vector = p1.subtract(p2),\n scale = p1.distanceTo(p2) / this._startDist,\n delta;\n\n if (this._rotating) {\n var theta = Math.atan(vector.x / vector.y);\n var bearingDelta = (theta - this._startTheta) * L.DomUtil.RAD_TO_DEG;\n if (vector.y < 0) { bearingDelta += 180; }\n if (bearingDelta) {\n /// TODO: The pivot should be the last touch point, but zoomAnimation manages to\n /// overwrite the rotate pane position. Maybe related to #3529.\n map.setBearing(this._startBearing - bearingDelta);\n }\n }\n\n if (this._zooming) {\n this._zoom = map.getScaleZoom(scale, this._startZoom);\n\n if (!map.options.bounceAtZoomLimits && (\n (this._zoom < map.getMinZoom() && scale < 1) ||\n (this._zoom > map.getMaxZoom() && scale > 1))) {\n this._zoom = map._limitZoom(this._zoom);\n }\n\n if (map.options.touchZoom === 'center') {\n this._center = this._startLatLng;\n if (scale === 1) { return; }\n } else {\n // Get delta from pinch to center, so centerLatLng is delta applied to initial pinchLatLng\n delta = p1._add(p2)._divideBy(2)._subtract(this._centerPoint);\n if (scale === 1 && delta.x === 0 && delta.y === 0) { return; }\n\n var alpha = -map.getBearing() * L.DomUtil.DEG_TO_RAD;\n\n this._center = map.unproject(map.project(this._pinchStartLatLng).subtract(delta.rotate(alpha)));\n }\n\n }\n\n if (!this._moved) {\n map._moveStart(true);\n this._moved = true;\n }\n\n L.Util.cancelAnimFrame(this._animRequest);\n\n var moveFn = L.bind(map._move, map, this._center, this._zoom, { pinch: true, round: false });\n this._animRequest = L.Util.requestAnimFrame(moveFn, this, true);\n\n L.DomEvent.preventDefault(e);\n },\n\n _onTouchEnd: function() {\n if (!this._moved || !this._zooming) {\n this._zooming = false;\n return;\n }\n\n this._zooming = false;\n this._rotating = false;\n L.Util.cancelAnimFrame(this._animRequest);\n\n L.DomEvent\n .off(document, 'touchmove', this._onTouchMove)\n .off(document, 'touchend', this._onTouchEnd);\n\n if (this.zoom) {\n // Pinch updates GridLayers' levels only when snapZoom is off, so snapZoom becomes noUpdate.\n if (this._map.options.zoomAnimation) {\n this._map._animateZoom(this._center, this._map._limitZoom(this._zoom), true, this._map.options.snapZoom);\n } else {\n this._map._resetView(this._center, this._map._limitZoom(this._zoom));\n }\n }\n },\n\n});\n\n// @section Handlers\n// @property touchGestures: Handler\n// Touch gestures handler.\nL.Map.addInitHook('addHandler', 'touchGestures', L.Map.TouchGestures);\r\n","/*\n * L.Handler.TouchRotate is used by L.Map to add two-finger rotation gestures.\n */\n\n// @namespace Map\n// @section Interaction Options\nL.Map.mergeOptions({\n\n // @section Touch interaction options\n // @option touchRotate: Boolean|String = *\n // Whether the map can be rotated with a two-finger rotation gesture\n touchRotate: false,\n\n});\n\nL.Map.TouchRotate = L.Handler.extend({\n\n addHooks: function() {\n this._map.touchGestures.enable();\n this._map.touchGestures.rotate = true;\n },\n\n removeHooks: function() {\n this._map.touchGestures.rotate = false;\n },\n\n});\n\n// @section Handlers\n// @property touchZoom: Handler\n// Touch rotate handler.\nL.Map.addInitHook('addHandler', 'touchRotate', L.Map.TouchRotate);\r\n","/*\n * L.Handler.ShiftKeyRotate is used by L.Map to add shift-wheel rotation.\n */\n\n// @namespace Map\n// @section Interaction Options\nL.Map.mergeOptions({\n\n // @section Touch interaction options\n // @option touchRotate: Boolean|String = *\n // Whether the map can be rotated with a two-finger rotation gesture\n shiftKeyRotate: true,\n\n});\n\nL.Map.ShiftKeyRotate = L.Handler.extend({\n\n addHooks: function() {\n L.DomEvent.on(this._map._container, \"wheel\", this._handleShiftScroll, this);\n // this._map.shiftKeyRotate.enable();\n this._map.shiftKeyRotate.rotate = true;\n },\n\n removeHooks: function() {\n L.DomEvent.off(this._map._container, \"wheel\", this._handleShiftScroll, this);\n this._map.shiftKeyRotate.rotate = false;\n },\n\n _handleShiftScroll: function(e) {\n if (e.shiftKey) {\n e.preventDefault();\n this._map.scrollWheelZoom.disable();\n this._map.setBearing((this._map._bearing * L.DomUtil.RAD_TO_DEG) + e.deltaY);\n } else {\n this._map.scrollWheelZoom.enable();\n }\n },\n\n});\n\n// @section Handlers\n// @property touchZoom: Handler\n// Touch rotate handler.\nL.Map.addInitHook('addHandler', 'shiftKeyRotate', L.Map.ShiftKeyRotate);\r\n","/*\n * L.Handler.TouchZoom is used by L.Map to add pinch zoom on supported mobile browsers.\n */\n\n// @namespace Map\n// @section Interaction Options\nL.Map.mergeOptions({\n\n // @section Touch interaction options\n // @option touchZoom: Boolean|String = *\n // Whether the map can be zoomed by touch-dragging with two fingers. If\n // passed `'center'`, it will zoom to the center of the view regardless of\n // where the touch events (fingers) were. Enabled for touch-capable web\n // browsers except for old Androids.\n touchZoom: L.Browser.touch && !L.Browser.android23,\n\n bounceAtZoomLimits: false,\n});\n\nL.Map.TouchZoom = L.Handler.extend({\n\n addHooks: function() {\n L.DomUtil.addClass(this._map._container, 'leaflet-touch-zoom');\n this._map.touchGestures.enable();\n this._map.touchGestures.zoom = true;\n },\n\n removeHooks: function() {\n L.DomUtil.removeClass(this._map._container, 'leaflet-touch-zoom');\n this._map.touchGestures.zoom = false;\n },\n\n});\n\n// @section Handlers\n// @property touchZoom: Handler\n// Touch zoom handler.\nL.Map.addInitHook('addHandler', 'touchZoom', L.Map.TouchZoom);\r\n","/**\n * L.Control.Rotate\n */\n\n// A tri-state control for map rotation. States are:\n// Locked (default)\n// Unlocked (user can pinch-rotate)\n// Follow (rotation follows device orientation, if available)\nL.Control.Rotate = L.Control.extend({\n\n options: {\n position: 'topleft',\n closeOnZeroBearing: true\n },\n\n onAdd: function(map) {\n this._onDeviceOrientation = L.Util.throttle(this._unthrottledOnDeviceOrientation, 100, this);\n\n var container = this._container = L.DomUtil.create('div', 'leaflet-control-rotate leaflet-bar');\n\n // this.button = L.Control.Zoom.prototype._createButton.call(this, 'R', 'leaflet-control-rotate', 'leaflet-control-rotate', container, this._toggleLock);\n\n var arrow = this._arrow = L.DomUtil.create('span', 'leaflet-control-rotate-arrow');\n\n arrow.style.backgroundImage = `url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M10.5 14l4-8 4 8h-8z'/%3E%3Cpath d='M10.5 16l4 8 4-8h-8z' fill='%23ccc'/%3E%3C/svg%3E\")`;\n arrow.style.cursor = 'grab';\n arrow.style.display = 'block';\n arrow.style.width = '100%';\n arrow.style.height = '100%';\n arrow.style.backgroundRepeat = 'no-repeat';\n arrow.style.backgroundPosition = '50%';\n\n // Copy-pasted from L.Control.Zoom\n var link = this._link = L.DomUtil.create('a', 'leaflet-control-rotate-toggle', container);\n link.appendChild(arrow);\n link.href = '#';\n link.title = 'leaflet-control-rotate-toggle';\n\n L.DomEvent\n .on(link, 'dblclick', L.DomEvent.stopPropagation)\n .on(link, 'mousedown', this._handleMouseDown, this)\n .on(link, 'click', L.DomEvent.stop)\n .on(link, 'click', this._cycleState, this)\n .on(link, 'click', this._refocusOnMap, this);\n\n if (!L.Browser.any3d) {\n L.DomUtil.addClass(link, 'leaflet-disabled');\n }\n\n this._restyle();\n\n map.on('rotate', this._restyle.bind(this));\n\n // State flag\n this._follow = false;\n this._canFollow = false;\n\n if (this.options.closeOnZeroBearing && map.getBearing() === 0) {\n container.style.display = 'none';\n }\n\n return container;\n },\n\n _handleMouseDown: function(e) {\n L.DomEvent.stopPropagation(e);\n this.dragging = true;\n this.dragstartX = e.pageX;\n this.dragstartY = e.pageY;\n L.DomEvent\n .on(document, 'mousemove', this._handleMouseDrag, this)\n .on(document, 'mouseup', this._handleMouseUp, this);\n },\n\n _handleMouseUp: function(e) {\n L.DomEvent.stopPropagation(e);\n this.dragging = false;\n\n L.DomEvent\n .off(document, 'mousemove', this._handleMouseDrag, this)\n .off(document, 'mouseup', this._handleMouseUp, this);\n },\n\n _handleMouseDrag: function(e) {\n if (!this.dragging) { return; }\n var deltaX = e.clientX - this.dragstartX;\n this._map.setBearing(deltaX);\n },\n\n _cycleState: function(ev) {\n var map = this._map;\n\n if (!map) { return; }\n\n if (!map.touchRotate.enabled() && !map.compassBearing.enabled()) {\n // Go from disabled to touch\n map.touchRotate.enable();\n\n // console.log('state is now: touch rotate');\n } else {\n\n if (!map.compassBearing.enabled()) {\n // Go from touch to compass\n map.touchRotate.disable();\n map.compassBearing.enable();\n\n // console.log('state is now: compass');\n\n // It is possible that compass is not supported. If so,\n // the hangler will automatically go from compass to disabled.\n } else {\n // Go from compass to disabled\n map.compassBearing.disable();\n\n // console.log('state is now: locked');\n\n map.setBearing(0);\n if (this.options.closeOnZeroBearing) {\n map.touchRotate.enable();\n }\n }\n }\n this._restyle();\n },\n\n _restyle: function() {\n if (this._map.options.rotate) {\n var map = this._map;\n var bearing = map.getBearing();\n if (this.options.closeOnZeroBearing && bearing) {\n this._container.style.display = 'block';\n }\n\n var cssTransform = 'rotate(' + bearing + 'deg)';\n this._arrow.style.transform = cssTransform;\n\n if (map.compassBearing.enabled()) {\n this._link.style.backgroundColor = 'orange';\n } else if (map.touchRotate.enabled()) {\n this._link.style.backgroundColor = null;\n } else {\n this._link.style.backgroundColor = 'grey';\n if (this.options.closeOnZeroBearing && map.getBearing() === 0) {\n this._container.style.display = 'none';\n }\n }\n } else {\n L.DomUtil.addClass(link, 'leaflet-disabled');\n }\n },\n\n});\n\nL.control.rotate = function(options) {\n return new L.Control.Rotate(options);\n};\n\nL.Map.mergeOptions({\n rotateControl: true,\n});\n\nL.Map.addInitHook(function() {\n if (this.options.rotateControl) {\n var options = typeof this.options.rotateControl === 'object' ? this.options.rotateControl : {};\n this.rotateControl = L.control.rotate(options);\n this.addControl(this.rotateControl);\n }\n});\r\n"],"names":["domUtilProto","setTransform","L","DomUtil","setPosition","extend","el","offset","scale","bearing","pivot","pos","Point","_round","call","this","rotateFrom","style","TRANSFORM","x","y","point","_leaflet_pos","Browser","any3d","undefined","left","top","DEG_TO_RAD","Math","PI","RAD_TO_DEG","Draggable","include","updateMapBearing","mapBearing","_mapBearing","prototype","rotate","theta","sinTheta","sin","cosTheta","cos","cx","cy","divOverlayProto","getEvents","DivOverlay","_updatePosition","_map","latLngToLayerPoint","_latlng","options","anchor","_getAnchor","_zoomAnimated","_rotate","rotatedPointToMapPanePoint","_container","add","bottom","_containerBottom","_containerLeft","round","_containerWidth","popupProto","_animateZoom","Popup","_adjustPan","e","_latLngToNewLayerPoint","zoom","center","autoPan","_panAnim","_inProgress","map","marginBottom","parseInt","getStyle","containerHeight","offsetHeight","containerWidth","layerPos","_add","getPosition","containerPos","_getMapPanePos","padding","autoPanPadding","paddingTL","autoPanPaddingTopLeft","paddingBR","autoPanPaddingBottomRight","size","getSize","dx","dy","fire","panBy","tooltipProto","Tooltip","_setPosition","Icon","_setIconStyles","img","name","sizeOption","shadowAnchor","iconAnchor","divideBy","className","marginLeft","marginTop","width","height","markerDragProto","_onDragStart","_onDrag","_onDragEnd","MarkerDrag","_marker","_draggable","_bearing","marker","rotated_marker","rotation","rotateWithView","shadow","_shadow","iconPos","_icon","mapPanePointToRotatedPoint","latlng","layerPointToLatLng","oldLatLng","_oldLatLng","setLatLng","update","markerProto","Marker","onAdd","_initInteraction","_setPos","_updateZIndex","mergeOptions","on","ret","dragging","bind","_zIndex","zIndexOffset","_resetZIndex","zIndex","setRotation","gridLayerProto","GridLayer","_getTiledPixelBounds","events","updateWhenIdle","_onRotate","Util","throttle","_onMoveEnd","updateInterval","mapZoom","_animatingZoom","max","_animateToZoom","getZoom","getZoomScale","_tileZoom","pixelCenter","project","floor","halfSize","Bounds","containerPointToLayerPoint","subtract","canvasProto","Canvas","onRemove","_update","_redraw","off","rendererProto","Renderer","_updateTransform","_zoom","_topLeft","p","padMin","multiplyBy","padMax","clip","_bounds","min","_center","getCenter","svgProto","SVG","mapProto","initialize","Map","createPane","getBounds","layerPointToContainerPoint","_initPanes","_getCenterOffset","_getNewPixelOrigin","_handleGeolocationResponse","id","container","_rotatePane","_mapPane","_pivot","_getRotatePanePos","topleft","topright","bottomright","bottomleft","LatLngBounds","setBearing","rotatePanePos","clone","_rotatePanePos","getBearing","panes","_panes","_paneRenderers","_norotatePane","markerZoomAnimation","addClass","markerPane","shadowPane","_subtract","centerOffset","viewHalf","_divideBy","lat","coords","latitude","lng","longitude","hdg","heading","LatLng","bounds","toBounds","accuracy","_locateOptions","setView","getBoundsZoom","maxZoom","data","timestamp","i","CompassBearing","Handler","window","DeviceOrientationEvent","_capable","_throttled","_onDeviceOrientation","addHooks","DomEvent","removeHooks","event","alpha","orientation","addInitHook","trackContainerMutation","ContainerMutation","mutation","_observer","MutationObserver","_onMutation","observe","getContainer","childList","attributes","characterData","subtree","attributeFilter","disconnect","invalidateSize","bounceAtZoomLimits","TouchGestures","touchRotate","touchZoom","_onTouchStart","touches","length","_zooming","_rotating","p1","mouseEventToContainerPoint","p2","vector","_centerPoint","_startLatLng","containerPointToLatLng","_pinchStartLatLng","_startDist","distanceTo","_startZoom","_startTheta","atan","_startBearing","_moved","stop","document","_onTouchMove","_onTouchEnd","preventDefault","delta","bearingDelta","getScaleZoom","getMinZoom","getMaxZoom","_limitZoom","unproject","_moveStart","cancelAnimFrame","_animRequest","moveFn","_move","pinch","requestAnimFrame","zoomAnimation","snapZoom","_resetView","TouchRotate","touchGestures","enable","shiftKeyRotate","ShiftKeyRotate","_handleShiftScroll","shiftKey","scrollWheelZoom","disable","deltaY","touch","android23","TouchZoom","removeClass","Control","Rotate","position","closeOnZeroBearing","_unthrottledOnDeviceOrientation","create","arrow","_arrow","backgroundImage","cursor","display","backgroundRepeat","backgroundPosition","link","_link","appendChild","href","title","stopPropagation","_handleMouseDown","_cycleState","_refocusOnMap","_restyle","_follow","_canFollow","dragstartX","pageX","dragstartY","pageY","_handleMouseDrag","_handleMouseUp","deltaX","clientX","ev","enabled","compassBearing","cssTransform","transform","backgroundColor","control","rotateControl","addControl"],"mappings":"2FAGA,MAAMA,EAAe,CACjBC,aAAcC,EAAEC,QAAQF,aACxBG,YAAaF,EAAEC,QAAQC,aAG3BF,EAAEG,OAAOH,EAA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ArBjR,EAAIsJ,eACvCpN,KAAK4C,WAAW1C,MAAMoV,QAAU,cAIxCnW,EAAEC,QAAQsO,SAAS+H,KAAM,uBAMrCtW,EAAEgY,QAAQ5V,OAAS,SAASe,GACxB,OAAO,IAAInD,EAAEyV,QAAQC,OAAOvS,IAGhCnD,EAAE0M,IAAI1D,aAAa,CACfiP,eAAe,IAGnBjY,EAAE0M,IAAImE,aAAY,WACd,GAAIhQ,KAAKsC,QAAQ8U,cAAe,CAC5B,IAAI9U,EAAgD,iBAA/BtC,KAAKsC,QAAQ8U,cAA6BpX,KAAKsC,QAAQ8U,cAAgB,GAC5FpX,KAAKoX,cAAgBjY,EAAEgY,QAAQ5V,OAAOe,GACtCtC,KAAKqX,WAAWrX,KAAKoX"} \ No newline at end of file +{"version":3,"file":"leaflet-rotate.js","sources":["../src/dom/DomUtil.js","../src/dom/Draggable.js","../src/geometry/Point.js","../src/layer/DivOverlay.js","../src/layer/Popup.js","../src/layer/Tooltip.js","../src/layer/marker/Icon.js","../src/layer/marker/Marker.js","../src/layer/tile/GridLayer.js","../src/layer/vector/Canvas.js","../src/layer/vector/Renderer.js","../src/layer/vector/SVG.js","../src/map/Map.js","../src/map/handler/CompassBearing.js","../src/map/handler/ContainerMutation.js","../src/map/handler/TouchGestures.js","../src/map/handler/TouchRotate.js","../src/map/handler/ShiftKeyRotate.js","../src/map/handler/TouchZoom.js","../src/control/Rotate.js"],"sourcesContent":["/**\n * L.DomUtil\n */\nconst domUtilProto = L.extend({}, L.DomUtil);\n\nL.extend(L.DomUtil, {\n\n setTransform: function(el, offset, scale, bearing, pivot) {\n var pos = offset || new L.Point(0, 0);\n\n if (!bearing) {\n offset = pos._round();\n return domUtilProto.setTransform.call(this, el, offset, scale);\n }\n\n pos = pos.rotateFrom(bearing, pivot);\n\n el.style[L.DomUtil.TRANSFORM] =\n 'translate3d(' + pos.x + 'px,' + pos.y + 'px' + ',0)' +\n (scale ? ' scale(' + scale + ')' : '') +\n ' rotate(' + bearing + 'rad)';\n },\n\n setPosition: function(el, point, bearing, pivot) { // (HTMLElement, Point[, Boolean])\n if (!bearing) {\n return domUtilProto.setPosition.call(this, el, point);\n }\n\n /*eslint-disable */\n el._leaflet_pos = point;\n /*eslint-enable */\n\n if (L.Browser.any3d) {\n L.DomUtil.setTransform(el, point, undefined, bearing, pivot);\n } else {\n el.style.left = point.x + 'px';\n el.style.top = point.y + 'px';\n }\n },\n\n // Constants for rotation\n DEG_TO_RAD: Math.PI / 180,\n RAD_TO_DEG: 180 / Math.PI,\n\n});\r\n","/**\n * L.Draggable\n */\nL.Draggable.include({\n\n updateMapBearing: function(mapBearing) {\n this._mapBearing = mapBearing;\n },\n\n});\r\n","/**\n * L.Point\n */\nL.extend(L.Point.prototype, {\n\n // Rotate around (0,0) by applying the 2D rotation matrix:\n // ⎡ x' ⎤ = ⎡ cos θ -sin θ ⎤ ⎡ x ⎤\n // ⎣ y' ⎦ ⎣ sin θ cos θ ⎦ ⎣ y ⎦\n // Theta must be given in radians.\n rotate: function(theta) {\n if (!theta) { return this; }\n var sinTheta = Math.sin(theta);\n var cosTheta = Math.cos(theta);\n\n return new L.Point(\n this.x * cosTheta - this.y * sinTheta,\n this.x * sinTheta + this.y * cosTheta\n );\n },\n\n // Rotate around (pivot.x, pivot.y) by:\n // 1. subtract (pivot.x, pivot.y)\n // 2. rotate around (0, 0)\n // 3. add (pivot.x, pivot.y) back\n // same as `this.subtract(pivot).rotate(theta).add(pivot)`\n rotateFrom: function(theta, pivot) {\n if (!theta) { return this; }\n var sinTheta = Math.sin(theta);\n var cosTheta = Math.cos(theta);\n var cx = pivot.x,\n cy = pivot.y;\n var x = this.x - cx,\n y = this.y - cy;\n\n return new L.Point(\n x * cosTheta - y * sinTheta + cx,\n x * sinTheta + y * cosTheta + cy\n );\n },\n\n});\r\n","/**\n * L.DivOverlay\n */\nconst divOverlayProto = L.extend({}, L.DivOverlay.prototype);\n\nL.DivOverlay.include({\n\n getEvents: function() {\n return L.extend(divOverlayProto.getEvents.call(this), { rotate: this._updatePosition });\n },\n\n _updatePosition: function() {\n if (!this._map) { return; }\n\n var pos = this._map.latLngToLayerPoint(this._latlng),\n offset = L.point(this.options.offset),\n anchor = this._getAnchor();\n\n if (this._zoomAnimated) {\n // TODO: use divOverlayProto._updatePosition\n if (this._map._rotate) {\n pos = this._map.rotatedPointToMapPanePoint(pos);\n }\n L.DomUtil.setPosition(this._container, pos.add(anchor));\n } else {\n offset = offset.add(pos).add(anchor);\n }\n\n var bottom = this._containerBottom = -offset.y,\n left = this._containerLeft = -Math.round(this._containerWidth / 2) + offset.x;\n\n // bottom position the popup in case the height of the popup changes (images loading etc)\n this._container.style.bottom = bottom + 'px';\n this._container.style.left = left + 'px';\n },\n\n});\n","/**\n * L.Popup\n */\nconst popupProto = L.extend({}, L.Popup.prototype);\n\nL.Popup.include({\n\n _animateZoom: function(e) {\n if (!this._map._rotate) {\n popupProto._animateZoom.call(this, e);\n }\n var pos = this._map._latLngToNewLayerPoint(this._latlng, e.zoom, e.center),\n anchor = this._getAnchor();\n\n pos = this._map.rotatedPointToMapPanePoint(pos);\n\n L.DomUtil.setPosition(this._container, pos.add(anchor));\n },\n\n _adjustPan: function() {\n if (!this.options.autoPan || (this._map._panAnim && this._map._panAnim._inProgress)) { return; }\n\n var map = this._map,\n marginBottom = parseInt(L.DomUtil.getStyle(this._container, 'marginBottom'), 10) || 0,\n containerHeight = this._container.offsetHeight + marginBottom,\n containerWidth = this._containerWidth,\n layerPos = new L.Point(this._containerLeft, -containerHeight - this._containerBottom);\n\n layerPos._add(L.DomUtil.getPosition(this._container));\n\n // var containerPos = map.layerPointToContainerPoint(layerPos);\n // TODO: use popupProto._adjustPan\n var containerPos = layerPos._add(this._map._getMapPanePos()),\n padding = L.point(this.options.autoPanPadding),\n paddingTL = L.point(this.options.autoPanPaddingTopLeft || padding),\n paddingBR = L.point(this.options.autoPanPaddingBottomRight || padding),\n size = map.getSize(),\n dx = 0,\n dy = 0;\n\n if (containerPos.x + containerWidth + paddingBR.x > size.x) { // right\n dx = containerPos.x + containerWidth - size.x + paddingBR.x;\n }\n if (containerPos.x - dx - paddingTL.x < 0) { // left\n dx = containerPos.x - paddingTL.x;\n }\n if (containerPos.y + containerHeight + paddingBR.y > size.y) { // bottom\n dy = containerPos.y + containerHeight - size.y + paddingBR.y;\n }\n if (containerPos.y - dy - paddingTL.y < 0) { // top\n dy = containerPos.y - paddingTL.y;\n }\n\n // @namespace Map\n // @section Popup events\n // @event autopanstart: Event\n // Fired when the map starts autopanning when opening a popup.\n if (dx || dy) {\n map\n .fire('autopanstart')\n .panBy([dx, dy]);\n }\n },\n\n});\n","/**\n * L.Tooltip\n */\nconst tooltipProto = L.extend({}, L.Tooltip.prototype);\n\nL.Tooltip.include({\n\n _updatePosition: function() {\n if (!this._map._rotate) {\n return tooltipProto._updatePosition.call(this);\n }\n var pos = this._map.latLngToLayerPoint(this._latlng);\n\n pos = this._map.rotatedPointToMapPanePoint(pos);\n this._setPosition(pos);\n },\n\n _animateZoom: function(e) {\n if (!this._map._rotate) {\n return tooltipProto._animateZoom.call(this, e);\n }\n var pos = this._map._latLngToNewLayerPoint(this._latlng, e.zoom, e.center);\n\n pos = this._map.rotatedPointToMapPanePoint(pos);\n this._setPosition(pos);\n },\n\n});\n","/**\n * L.Icon\n */\nconst iconProto = L.extend({}, L.Icon.prototype);\n\nL.Icon.include({\n\n _setIconStyles: function(img, name) {\n var options = this.options;\n var sizeOption = options[name + 'Size'];\n\n if (typeof sizeOption === 'number') {\n sizeOption = [sizeOption, sizeOption];\n }\n\n var size = L.point(sizeOption),\n anchor = L.point(name === 'shadow' && options.shadowAnchor || options.iconAnchor ||\n size && size.divideBy(2, true));\n\n img.className = 'leaflet-marker-' + name + ' ' + (options.className || '');\n\n if (anchor) {\n img.style.marginLeft = (-anchor.x) + 'px';\n img.style.marginTop = (-anchor.y) + 'px';\n // TODO: use iconProto._setIconStyles\n img.style[L.DomUtil.TRANSFORM + \"Origin\"] = anchor.x + \"px \" + anchor.y + \"px 0px\";\n }\n\n if (size) {\n img.style.width = size.x + 'px';\n img.style.height = size.y + 'px';\n }\n },\n\n});\n","/**\n * L.Handler.MarkerDrag\n */\nvar markerDragProto;\n\nvar MarkerDrag = {\n\n _onDragStart: function() {\n if (!this._marker._map._rotate) {\n return markerDragProto._onDragStart.call(this)\n }\n this._draggable.updateMapBearing(this._marker._map._bearing);\n },\n\n _onDrag: function(e) {\n var marker = this._marker,\n // TODO: use markerDragProto._onDrag\n rotated_marker = marker.options.rotation || marker.options.rotateWithView,\n shadow = marker._shadow,\n iconPos = L.DomUtil.getPosition(marker._icon);\n\n // TODO: use markerDragProto._onDrag\n // update shadow position\n if (!rotated_marker && shadow) {\n L.DomUtil.setPosition(shadow, iconPos);\n }\n\n // TODO: use markerDragProto._onDrag\n if (marker._map._rotate) {\n // Reverse calculation from mapPane coordinates to rotatePane coordinates\n iconPos = marker._map.mapPanePointToRotatedPoint(iconPos);\n }\n var latlng = marker._map.layerPointToLatLng(iconPos);\n\n marker._latlng = latlng;\n e.latlng = latlng;\n e.oldLatLng = this._oldLatLng;\n\n // TODO: use markerDragProto._onDrag\n if (rotated_marker) marker.setLatLng(latlng); // use `setLatLng` to presisit rotation. low efficiency\n else marker.fire('move', e); // `setLatLng` will trig 'move' event. we imitate here.\n\n // @event drag: Event\n // Fired repeatedly while the user drags the marker.\n marker\n .fire('drag', e);\n },\n\n _onDragEnd: function(e) {\n if (this._marker._map._rotate) {\n this._marker.update();\n }\n markerDragProto._onDragEnd.call(this, e);\n },\n\n};\n\n/**\n * L.Marker\n */\nconst markerProto = L.extend({}, L.Marker.prototype);\n\nL.Marker.mergeOptions({\n\n // @option rotation: Number = 0\n // Rotation of this marker in rad\n rotation: 0,\n\n // @option rotateWithView: Boolean = false\n // Rotate this marker when map rotates\n rotateWithView: false,\n\n});\n\nL.Marker.include({\n\n getEvents: function() {\n return L.extend(markerProto.getEvents.call(this), { rotate: this.update });\n },\n\n onAdd: function(map) {\n markerProto.onAdd.call(this, map);\n map.on('rotate', this.update, this);\n },\n\n _initInteraction: function() {\n var ret = markerProto._initInteraction.call(this);\n if (this.dragging && this._map && this._map._rotate) {\n // L.Handler.MarkerDrag is used internally by L.Marker to make the markers draggable\n markerDragProto = markerDragProto || Object.getPrototypeOf(this.dragging);\n this.dragging._onDragStart = MarkerDrag._onDragStart.bind(this.dragging);\n this.dragging._onDrag = MarkerDrag._onDrag.bind(this.dragging);\n this.dragging._onDragEnd = MarkerDrag._onDragEnd.bind(this.dragging);\n this.dragging.disable();\n this.dragging.enable();\n }\n return ret;\n },\n\n _setPos: function(pos) {\n\n // TODO: use markerProto._setPos\n if (this._map._rotate) {\n pos = this._map.rotatedPointToMapPanePoint(pos);\n }\n\n // TODO: use markerProto._setPos\n var bearing = this.options.rotation || 0;\n if (this.options.rotateWithView) {\n bearing += this._map._bearing;\n }\n\n // TODO: use markerProto._setPos\n L.DomUtil.setPosition(this._icon, pos, bearing, pos);\n\n // TODO: use markerProto._setPos\n if (this._shadow) {\n L.DomUtil.setPosition(this._shadow, pos, bearing, pos);\n }\n\n this._zIndex = pos.y + this.options.zIndexOffset;\n\n this._resetZIndex();\n },\n\n _updateZIndex: function(offset) {\n if (!this._map._rotate) {\n return markerProto._updateZIndex.call(this, offset)\n }\n this._icon.style.zIndex = Math.round(this._zIndex + offset);\n },\n\n setRotation: function(rotation) {\n this.options.rotation = rotation;\n this.update();\n },\n\n});\n","/**\n * L.GridLayer\n */\nconst gridLayerProto = L.extend({}, L.GridLayer.prototype);\n\nL.GridLayer.include({\n\n getEvents: function() {\n var events = gridLayerProto.getEvents.call(this);\n if (this._map._rotate && !this.options.updateWhenIdle) {\n if (!this._onRotate) {\n this._onRotate = L.Util.throttle(this._onMoveEnd, this.options.updateInterval, this);\n }\n events.rotate = this._onRotate;\n }\n return events;\n },\n\n _getTiledPixelBounds: function(center) {\n if (!this._map._rotate) {\n return gridLayerProto._getTiledPixelBounds.call(this, center);\n }\n\n var map = this._map,\n mapZoom = map._animatingZoom ? Math.max(map._animateToZoom, map.getZoom()) : map.getZoom(),\n scale = map.getZoomScale(mapZoom, this._tileZoom),\n pixelCenter = map.project(center, this._tileZoom).floor(),\n size = map.getSize(),\n halfSize = new L.Bounds([\n map.containerPointToLayerPoint([0, 0]).floor(),\n map.containerPointToLayerPoint([size.x, 0]).floor(),\n map.containerPointToLayerPoint([0, size.y]).floor(),\n map.containerPointToLayerPoint([size.x, size.y]).floor()\n ]).getSize().divideBy(scale * 2);\n\n return new L.Bounds(pixelCenter.subtract(halfSize), pixelCenter.add(halfSize));\n },\n\n});\n","/**\n * L.Canvas\n */\nconst canvasProto = L.extend({}, L.Canvas.prototype);\n\nL.Canvas.include({\n\n onAdd: function() {\n canvasProto.onAdd.call(this);\n // When rotating the canvas itself, it is cleared by some weird reason, so redraw.\n this._map.on('rotate', this._redraw, this);\n },\n\n onRemove: function() {\n canvasProto.onRemove.call(this);\n this._map.off('rotate', this._redraw, this);\n },\n\n _update: function() {\n canvasProto._update.call(this);\n // Tell paths to redraw themselves\n this.fire('update')\n },\n\n});\n","/**\n * L.Renderer\n */\nconst rendererProto = L.extend({}, L.Renderer.prototype);\n\nL.Renderer.include({\n\n onAdd: function() {\n rendererProto.onAdd.call(this);\n // this._map.on('rotate', this._update, this);\n },\n\n onRemove: function() {\n rendererProto.onRemove.call(this);\n // this._map.off('rotate', this._update, this);\n },\n\n _updateTransform: function(center, zoom) {\n if (!this._map._rotate) {\n return rendererProto._updateTransform.call(this, center, zoom);\n }\n var scale = this._map.getZoomScale(zoom, this._zoom),\n offset = this._map._latLngToNewLayerPoint(this._topLeft, zoom, center);\n if (L.Browser.any3d) {\n L.DomUtil.setTransform(this._container, offset, scale);\n } else {\n L.DomUtil.setPosition(this._container, offset);\n }\n },\n\n _update: function() {\n if (!this._map._rotate) {\n return rendererProto._update.call(this);\n }\n // Update pixel bounds of renderer container (for positioning/sizing/clipping later)\n // Subclasses are responsible of firing the 'update' event.\n var p = this.options.padding,\n map = this._map,\n size = this._map.getSize(),\n padMin = size.multiplyBy(-p),\n padMax = size.multiplyBy(1 + p),\n //// TODO: Somehow refactor this out into map.something() - the code is\n //// pretty much the same as in GridLayer.\n clip = new L.Bounds([\n map.containerPointToLayerPoint([padMin.x, padMin.y]).floor(),\n map.containerPointToLayerPoint([padMin.x, padMax.y]).floor(),\n map.containerPointToLayerPoint([padMax.x, padMin.y]).floor(),\n map.containerPointToLayerPoint([padMax.x, padMax.y]).floor()\n ]);\n //min = this._map.containerPointToLayerPoint(size.multiplyBy(-p)).round();\n\n this._bounds = clip;\n // this._topLeft = clip.min;\n this._topLeft = this._map.layerPointToLatLng(clip.min);\n\n this._center = this._map.getCenter();\n this._zoom = this._map.getZoom();\n },\n\n});\n","/**\n * L.SVG\n */\nconst svgProto = L.extend({}, L.SVG.prototype);\n\nL.SVG.include({\n\n _update: function() {\n svgProto._update.call(this);\n if (this._map._rotate) {\n this.fire('update');\n }\n },\n\n});\n","/**\n * L.Map\n */\nconst mapProto = L.extend({}, L.Map.prototype);\n\nL.Map.mergeOptions({ rotate: false, bearing: 0, });\n\nL.Map.include({\n\n initialize: function(id, options) { // (HTMLElement or String, Object)\n if (options.rotate) {\n this._rotate = true;\n this._bearing = 0;\n }\n mapProto.initialize.call(this, id, options);\n if(this.options.rotate){\n this.setBearing(this.options.bearing);\n }\n },\n\n // createPane: function(name, container) {\n // if (!this._rotate || name == 'mapPane') {\n // return mapProto.createPane.call(this, name, container);\n // }\n // // init \"rotatePane\"\n // if (!this._rotatePane) {\n // // this._pivot = this.getSize().divideBy(2);\n // this._rotatePane = mapProto.createPane.call(this, 'rotatePane', this._mapPane);\n // L.DomUtil.setPosition(this._rotatePane, new L.Point(0, 0), this._bearing, this._pivot);\n // }\n // return mapProto.createPane.call(this, name, container || this._rotatePane);\n // },\n\n containerPointToLayerPoint: function(point) { // (Point)\n if (!this._rotate) {\n return mapProto.containerPointToLayerPoint.call(this, point);\n }\n return L.point(point)\n .subtract(this._getMapPanePos())\n .rotateFrom(-this._bearing, this._getRotatePanePos())\n .subtract(this._getRotatePanePos());\n },\n\n getBounds: function() {\n if (!this._rotate) {\n return mapProto.getBounds.call(this);\n }\n var size = this.getSize();\n var topleft = this.layerPointToLatLng(this.containerPointToLayerPoint([0, 0])),\n topright = this.layerPointToLatLng(this.containerPointToLayerPoint([size.x, 0])),\n bottomright = this.layerPointToLatLng(this.containerPointToLayerPoint([size.x, size.y])),\n bottomleft = this.layerPointToLatLng(this.containerPointToLayerPoint([0, size.y]));\n\n // Use LatLngBounds' build-in constructor that automatically extends the bounds to fit the passed points\n return new L.LatLngBounds([topleft, topright, bottomright, bottomleft]);\n },\n\n layerPointToContainerPoint: function(point) { // (Point)\n if (!this._rotate) {\n return mapProto.layerPointToContainerPoint.call(this, point);\n }\n return L.point(point)\n .add(this._getRotatePanePos())\n .rotateFrom(this._bearing, this._getRotatePanePos())\n .add(this._getMapPanePos());\n },\n\n // Rotation methods\n // setBearing will work with just the 'theta' parameter.\n setBearing: function(theta) {\n if (!L.Browser.any3d || !this._rotate) { return; }\n\n var rotatePanePos = this._getRotatePanePos();\n var halfSize = this.getSize().divideBy(2);\n this._pivot = this._getMapPanePos().clone().multiplyBy(-1).add(halfSize);\n\n rotatePanePos = rotatePanePos.rotateFrom(-this._bearing, this._pivot);\n\n this._bearing = theta * L.DomUtil.DEG_TO_RAD; // TODO: mod 360\n this._rotatePanePos = rotatePanePos.rotateFrom(this._bearing, this._pivot);\n\n L.DomUtil.setPosition(this._rotatePane, rotatePanePos, this._bearing, this._pivot);\n\n this.fire('rotate');\n },\n\n getBearing: function() {\n return this._bearing * L.DomUtil.RAD_TO_DEG;\n },\n\n _initPanes: function() {\n var panes = this._panes = {};\n this._paneRenderers = {};\n\n // @section\n //\n // Panes are DOM elements used to control the ordering of layers on the map. You\n // can access panes with [`map.getPane`](#map-getpane) or\n // [`map.getPanes`](#map-getpanes) methods. New panes can be created with the\n // [`map.createPane`](#map-createpane) method.\n //\n // Every map has the following default panes that differ only in zIndex.\n //\n // @pane mapPane: HTMLElement = 'auto'\n // Pane that contains all other map panes\n\n this._mapPane = this.createPane('mapPane', this._container);\n L.DomUtil.setPosition(this._mapPane, new L.Point(0, 0));\n\n if (this._rotate) {\n this._rotatePane = this.createPane('rotatePane', this._mapPane);\n this._norotatePane = this.createPane('norotatePane', this._mapPane);\n\n // @pane tilePane: HTMLElement = 2\n // Pane for tile layers\n this.createPane('tilePane', this._rotatePane);\n // @pane overlayPane: HTMLElement = 4\n // Pane for overlays like polylines and polygons\n this.createPane('overlayPane', this._rotatePane);\n\n // @pane shadowPane: HTMLElement = 5\n // Pane for overlay shadows (e.g. marker shadows)\n this.createPane('shadowPane', this._norotatePane);\n // @pane markerPane: HTMLElement = 6\n // Pane for marker icons\n this.createPane('markerPane', this._norotatePane);\n // @pane tooltipPane: HTMLElement = 650\n // Pane for tooltips.\n this.createPane('tooltipPane', this._norotatePane);\n // @pane popupPane: HTMLElement = 700\n // Pane for popups.\n this.createPane('popupPane', this._norotatePane);\n } else {\n // @pane tilePane: HTMLElement = 2\n // Pane for tile layers\n this.createPane('tilePane');\n // @pane overlayPane: HTMLElement = 4\n // Pane for overlays like polylines and polygons\n this.createPane('overlayPane');\n // @pane shadowPane: HTMLElement = 5\n // Pane for overlay shadows (e.g. marker shadows)\n this.createPane('shadowPane');\n // @pane markerPane: HTMLElement = 6\n // Pane for marker icons\n this.createPane('markerPane');\n // @pane tooltipPane: HTMLElement = 650\n // Pane for tooltips.\n this.createPane('tooltipPane');\n // @pane popupPane: HTMLElement = 700\n // Pane for popups.\n this.createPane('popupPane');\n }\n\n if (!this.options.markerZoomAnimation) {\n L.DomUtil.addClass(panes.markerPane, 'leaflet-zoom-hide');\n L.DomUtil.addClass(panes.shadowPane, 'leaflet-zoom-hide');\n }\n },\n\n // @method rotatedPointToMapPanePoint(point: Point): Point\n // Converts a coordinate from the rotated pane reference system\n // to the reference system of the not rotated map pane.\n rotatedPointToMapPanePoint: function(point) {\n return L.point(point).rotate(this._bearing)._add(this._getRotatePanePos());\n },\n\n // @method mapPanePointToRotatedPoint(point: Point): Point\n // Converts a coordinate from the not rotated map pane reference system\n // to the reference system of the rotated pane.\n mapPanePointToRotatedPoint: function(point) {\n return L.point(point)._subtract(this._getRotatePanePos()).rotate(-this._bearing);\n },\n\n // offset of the specified place to the current center in pixels\n _getCenterOffset: function(latlng) {\n var centerOffset = mapProto._getCenterOffset.call(this, latlng);\n if (this._rotate) {\n centerOffset = centerOffset.rotate(this._bearing);\n }\n return centerOffset;\n },\n\n _getRotatePanePos: function() {\n return this._rotatePanePos || new L.Point(0, 0);\n },\n\n _getNewPixelOrigin: function(center, zoom) {\n var viewHalf = this.getSize()._divideBy(2);\n if (!this._rotate) {\n mapProto._getNewPixelOrigin.call(this, center, zoom);\n }\n return this.project(center, zoom)\n .rotate(this._bearing)\n ._subtract(viewHalf)\n ._add(this._getMapPanePos())\n ._add(this._getRotatePanePos())\n .rotate(-this._bearing)\n ._round();\n },\n\n _handleGeolocationResponse: function(pos) {\n var lat = pos.coords.latitude,\n lng = pos.coords.longitude,\n // TODO: use mapProto._handleGeolocationResponse\n hdg = pos.coords.heading,\n latlng = new L.LatLng(lat, lng),\n bounds = latlng.toBounds(pos.coords.accuracy),\n options = this._locateOptions;\n\n if (options.setView) {\n var zoom = this.getBoundsZoom(bounds);\n this.setView(latlng, options.maxZoom ? Math.min(zoom, options.maxZoom) : zoom);\n }\n\n var data = {\n latlng: latlng,\n bounds: bounds,\n timestamp: pos.timestamp,\n // TODO: use mapProto._handleGeolocationResponse\n heading: hdg\n };\n\n for (var i in pos.coords) {\n if (typeof pos.coords[i] === 'number') {\n data[i] = pos.coords[i];\n }\n }\n\n // @event locationfound: LocationEvent\n // Fired when geolocation (using the [`locate`](#map-locate) method)\n // went successfully.\n this.fire('locationfound', data);\n },\n\n});\n","/*\n * L.Map.CompassBearing will rotate the map according to a smartphone's compass.\n */\n\nL.Map.CompassBearing = L.Handler.extend({\n\n initialize: function(map) {\n if (!window.DeviceOrientationEvent) {\n this._capable = false;\n return;\n }\n this._capable = true;\n this._map = map;\n\n this._throttled = L.Util.throttle(this._onDeviceOrientation, 1000, this);\n },\n\n addHooks: function() {\n if (this._capable && this._map._rotate) {\n L.DomEvent.on(window, 'deviceorientation', this._throttled, this);\n }\n },\n\n removeHooks: function() {\n if (this._capable && this._map._rotate) {\n L.DomEvent.off(window, 'deviceorientation', this._throttled, this);\n }\n },\n\n _onDeviceOrientation: function(event) {\n if (event.alpha !== null) {\n this._map.setBearing(event.alpha - window.orientation);\n }\n },\n\n});\n\n// @section Handlers\n// @property compassBearing: Handler\n// Compass bearing handler.\nL.Map.addInitHook('addHandler', 'compassBearing', L.Map.CompassBearing);\r\n","/*\n * L.Handler.ContainerMutation triggers `invalidateResize` when the map's DOM container mutates.\n */\n\n// @namespace Map\n// @section Interaction Options\nL.Map.mergeOptions({\n\n // @option trackContainerMutation: Boolean = false\n // Whether the map uses [mutation observers](https://developer.mozilla.org/docs/Web/API/MutationObserver)\n // to detect changes in its container and trigger `invalidateSize`. Disabled\n // by default due to support not being available in all web browsers.\n trackContainerMutation: false\n\n});\n\nL.Map.ContainerMutation = L.Handler.extend({\n\n addHooks: function() {\n if (!L.Browser.mutation) {\n return;\n }\n\n if (!this._observer) {\n this._observer = new MutationObserver(L.Util.bind(this._onMutation, this));\n }\n\n this._observer.observe(this._map.getContainer(), {\n childList: false,\n attributes: true,\n characterData: false,\n subtree: false,\n attributeFilter: ['style']\n });\n },\n\n removeHooks: function() {\n if (!L.Browser.mutation) {\n return;\n }\n this._observer.disconnect();\n },\n\n _onMutation: function() {\n this._map.invalidateSize();\n },\n\n});\n\n// @section Handlers\n// @property containerMutation: Handler\n// Container mutation handler (disabled unless [`trackContainerMutation`](#map-trackcontainermutation) is set).\nL.Map.addInitHook('addHandler', 'trackContainerMutation', L.Map.ContainerMutation);\r\n","/*\n * L.Handler.TouchGestures is both TouchZoom plus TouchRotate.\n */\n\n// @namespace Map\n// @section Interaction Options\nL.Map.mergeOptions({\n\n // @option bounceAtZoomLimits: Boolean = true\n // Set it to false if you don't want the map to zoom beyond min/max zoom\n // and then bounce back when pinch-zooming.\n bounceAtZoomLimits: true,\n\n});\n\nL.Map.TouchGestures = L.Handler.extend({\n\n initialize: function(map) {\n this._map = map;\n this.rotate = !!this._map.options.touchRotate;\n this.zoom = !!this._map.options.touchZoom;\n },\n\n addHooks: function() {\n L.DomEvent.on(this._map._container, 'touchstart', this._onTouchStart, this);\n },\n\n removeHooks: function() {\n L.DomEvent.off(this._map._container, 'touchstart', this._onTouchStart, this);\n },\n\n _onTouchStart: function(e) {\n var map = this._map;\n\n if (!e.touches || e.touches.length !== 2 || map._animatingZoom || this._zooming || this._rotating) { return; }\n\n var p1 = map.mouseEventToContainerPoint(e.touches[0]),\n p2 = map.mouseEventToContainerPoint(e.touches[1]),\n vector = p1.subtract(p2);\n\n this._centerPoint = map.getSize()._divideBy(2);\n this._startLatLng = map.containerPointToLatLng(this._centerPoint);\n\n if (this.zoom) {\n if (map.options.touchZoom !== 'center') {\n this._pinchStartLatLng = map.containerPointToLatLng(p1.add(p2)._divideBy(2));\n }\n this._startDist = p1.distanceTo(p2);\n this._startZoom = map.getZoom();\n this._zooming = true;\n } else {\n this._zooming = false;\n }\n\n if (this.rotate) {\n this._startTheta = Math.atan(vector.x / vector.y);\n this._startBearing = map.getBearing();\n if (vector.y < 0) { this._startBearing += 180; }\n this._rotating = true;\n } else {\n this._rotating = false;\n }\n\n this._moved = false;\n\n map.stop();\n\n L.DomEvent\n .on(document, 'touchmove', this._onTouchMove, this)\n .on(document, 'touchend', this._onTouchEnd, this);\n\n L.DomEvent.preventDefault(e);\n },\n\n _onTouchMove: function(e) {\n if (!e.touches || e.touches.length !== 2 || !(this._zooming || this._rotating)) { return; }\n\n var map = this._map,\n p1 = map.mouseEventToContainerPoint(e.touches[0]),\n p2 = map.mouseEventToContainerPoint(e.touches[1]),\n vector = p1.subtract(p2),\n scale = p1.distanceTo(p2) / this._startDist,\n delta;\n\n if (this._rotating) {\n var theta = Math.atan(vector.x / vector.y);\n var bearingDelta = (theta - this._startTheta) * L.DomUtil.RAD_TO_DEG;\n if (vector.y < 0) { bearingDelta += 180; }\n if (bearingDelta) {\n /// TODO: The pivot should be the last touch point, but zoomAnimation manages to\n /// overwrite the rotate pane position. Maybe related to #3529.\n map.setBearing(this._startBearing - bearingDelta);\n }\n }\n\n if (this._zooming) {\n this._zoom = map.getScaleZoom(scale, this._startZoom);\n\n if (!map.options.bounceAtZoomLimits && (\n (this._zoom < map.getMinZoom() && scale < 1) ||\n (this._zoom > map.getMaxZoom() && scale > 1))) {\n this._zoom = map._limitZoom(this._zoom);\n }\n\n if (map.options.touchZoom === 'center') {\n this._center = this._startLatLng;\n if (scale === 1) { return; }\n } else {\n // Get delta from pinch to center, so centerLatLng is delta applied to initial pinchLatLng\n delta = p1._add(p2)._divideBy(2)._subtract(this._centerPoint);\n if (scale === 1 && delta.x === 0 && delta.y === 0) { return; }\n\n var alpha = -map.getBearing() * L.DomUtil.DEG_TO_RAD;\n\n this._center = map.unproject(map.project(this._pinchStartLatLng).subtract(delta.rotate(alpha)));\n }\n\n }\n\n if (!this._moved) {\n map._moveStart(true);\n this._moved = true;\n }\n\n L.Util.cancelAnimFrame(this._animRequest);\n\n var moveFn = L.bind(map._move, map, this._center, this._zoom, { pinch: true, round: false });\n this._animRequest = L.Util.requestAnimFrame(moveFn, this, true);\n\n L.DomEvent.preventDefault(e);\n },\n\n _onTouchEnd: function() {\n if (!this._moved || !this._zooming) {\n this._zooming = false;\n return;\n }\n\n this._zooming = false;\n this._rotating = false;\n L.Util.cancelAnimFrame(this._animRequest);\n\n L.DomEvent\n .off(document, 'touchmove', this._onTouchMove)\n .off(document, 'touchend', this._onTouchEnd);\n\n if (this.zoom) {\n // Pinch updates GridLayers' levels only when snapZoom is off, so snapZoom becomes noUpdate.\n if (this._map.options.zoomAnimation) {\n this._map._animateZoom(this._center, this._map._limitZoom(this._zoom), true, this._map.options.snapZoom);\n } else {\n this._map._resetView(this._center, this._map._limitZoom(this._zoom));\n }\n }\n },\n\n});\n\n// @section Handlers\n// @property touchGestures: Handler\n// Touch gestures handler.\nL.Map.addInitHook('addHandler', 'touchGestures', L.Map.TouchGestures);\r\n","/*\n * L.Handler.TouchRotate is used by L.Map to add two-finger rotation gestures.\n */\n\n// @namespace Map\n// @section Interaction Options\nL.Map.mergeOptions({\n\n // @section Touch interaction options\n // @option touchRotate: Boolean|String = *\n // Whether the map can be rotated with a two-finger rotation gesture\n touchRotate: false,\n\n});\n\nL.Map.TouchRotate = L.Handler.extend({\n\n addHooks: function() {\n this._map.touchGestures.enable();\n this._map.touchGestures.rotate = true;\n },\n\n removeHooks: function() {\n this._map.touchGestures.rotate = false;\n },\n\n});\n\n// @section Handlers\n// @property touchZoom: Handler\n// Touch rotate handler.\nL.Map.addInitHook('addHandler', 'touchRotate', L.Map.TouchRotate);\r\n","/*\n * L.Handler.ShiftKeyRotate is used by L.Map to add shift-wheel rotation.\n */\n\n// @namespace Map\n// @section Interaction Options\nL.Map.mergeOptions({\n\n // @section ShiftKey interaction options\n // @option shiftKeyRotate: Boolean|String = *\n // Whether the map can be rotated with a shit-wheel rotation\n shiftKeyRotate: true,\n\n});\n\nL.Map.ShiftKeyRotate = L.Handler.extend({\n\n addHooks: function() {\n L.DomEvent.on(this._map._container, \"wheel\", this._handleShiftScroll, this);\n // this._map.shiftKeyRotate.enable();\n this._map.shiftKeyRotate.rotate = true;\n },\n\n removeHooks: function() {\n L.DomEvent.off(this._map._container, \"wheel\", this._handleShiftScroll, this);\n this._map.shiftKeyRotate.rotate = false;\n },\n\n _handleShiftScroll: function(e) {\n if (e.shiftKey) {\n e.preventDefault();\n this._map.scrollWheelZoom.disable();\n this._map.setBearing((this._map._bearing * L.DomUtil.RAD_TO_DEG) + e.deltaY);\n } else {\n this._map.scrollWheelZoom.enable();\n }\n },\n\n});\n\n// @section Handlers\n// @property touchZoom: Handler\n// Touch rotate handler.\nL.Map.addInitHook('addHandler', 'shiftKeyRotate', L.Map.ShiftKeyRotate);\r\n","/*\n * L.Handler.TouchZoom is used by L.Map to add pinch zoom on supported mobile browsers.\n */\n\n// @namespace Map\n// @section Interaction Options\nL.Map.mergeOptions({\n\n // @section Touch interaction options\n // @option touchZoom: Boolean|String = *\n // Whether the map can be zoomed by touch-dragging with two fingers. If\n // passed `'center'`, it will zoom to the center of the view regardless of\n // where the touch events (fingers) were. Enabled for touch-capable web\n // browsers except for old Androids.\n touchZoom: L.Browser.touch && !L.Browser.android23,\n\n bounceAtZoomLimits: false,\n});\n\nL.Map.TouchZoom = L.Handler.extend({\n\n addHooks: function() {\n L.DomUtil.addClass(this._map._container, 'leaflet-touch-zoom');\n this._map.touchGestures.enable();\n this._map.touchGestures.zoom = true;\n },\n\n removeHooks: function() {\n L.DomUtil.removeClass(this._map._container, 'leaflet-touch-zoom');\n this._map.touchGestures.zoom = false;\n },\n\n});\n\n// @section Handlers\n// @property touchZoom: Handler\n// Touch zoom handler.\nL.Map.addInitHook('addHandler', 'touchZoom', L.Map.TouchZoom);\r\n","/**\n * L.Control.Rotate\n */\n\n// A tri-state control for map rotation. States are:\n// Locked (default)\n// Unlocked (user can pinch-rotate)\n// Follow (rotation follows device orientation, if available)\nL.Control.Rotate = L.Control.extend({\n\n options: {\n position: 'topleft',\n closeOnZeroBearing: true\n },\n\n onAdd: function(map) {\n this._onDeviceOrientation = L.Util.throttle(this._unthrottledOnDeviceOrientation, 100, this);\n\n var container = this._container = L.DomUtil.create('div', 'leaflet-control-rotate leaflet-bar');\n\n // this.button = L.Control.Zoom.prototype._createButton.call(this, 'R', 'leaflet-control-rotate', 'leaflet-control-rotate', container, this._toggleLock);\n\n var arrow = this._arrow = L.DomUtil.create('span', 'leaflet-control-rotate-arrow');\n\n arrow.style.backgroundImage = `url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='29' height='29' viewBox='0 0 29 29' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M10.5 14l4-8 4 8h-8z'/%3E%3Cpath d='M10.5 16l4 8 4-8h-8z' fill='%23ccc'/%3E%3C/svg%3E\")`;\n arrow.style.cursor = 'grab';\n arrow.style.display = 'block';\n arrow.style.width = '100%';\n arrow.style.height = '100%';\n arrow.style.backgroundRepeat = 'no-repeat';\n arrow.style.backgroundPosition = '50%';\n\n // Copy-pasted from L.Control.Zoom\n var link = this._link = L.DomUtil.create('a', 'leaflet-control-rotate-toggle', container);\n link.appendChild(arrow);\n link.href = '#';\n link.title = 'leaflet-control-rotate-toggle';\n\n L.DomEvent\n .on(link, 'dblclick', L.DomEvent.stopPropagation)\n .on(link, 'mousedown', this._handleMouseDown, this)\n .on(link, 'click', L.DomEvent.stop)\n .on(link, 'click', this._cycleState, this)\n .on(link, 'click', this._refocusOnMap, this);\n\n if (!L.Browser.any3d) {\n L.DomUtil.addClass(link, 'leaflet-disabled');\n }\n\n this._restyle();\n\n map.on('rotate', this._restyle.bind(this));\n\n // State flag\n this._follow = false;\n this._canFollow = false;\n\n if (this.options.closeOnZeroBearing && map.getBearing() === 0) {\n container.style.display = 'none';\n }\n\n return container;\n },\n\n _handleMouseDown: function(e) {\n L.DomEvent.stopPropagation(e);\n this.dragging = true;\n this.dragstartX = e.pageX;\n this.dragstartY = e.pageY;\n L.DomEvent\n .on(document, 'mousemove', this._handleMouseDrag, this)\n .on(document, 'mouseup', this._handleMouseUp, this);\n },\n\n _handleMouseUp: function(e) {\n L.DomEvent.stopPropagation(e);\n this.dragging = false;\n\n L.DomEvent\n .off(document, 'mousemove', this._handleMouseDrag, this)\n .off(document, 'mouseup', this._handleMouseUp, this);\n },\n\n _handleMouseDrag: function(e) {\n if (!this.dragging) { return; }\n var deltaX = e.clientX - this.dragstartX;\n this._map.setBearing(deltaX);\n },\n\n _cycleState: function(ev) {\n var map = this._map;\n\n if (!map) { return; }\n\n if (!map.touchRotate.enabled() && !map.compassBearing.enabled()) {\n // Go from disabled to touch\n map.touchRotate.enable();\n\n // console.log('state is now: touch rotate');\n } else {\n\n if (!map.compassBearing.enabled()) {\n // Go from touch to compass\n map.touchRotate.disable();\n map.compassBearing.enable();\n\n // console.log('state is now: compass');\n\n // It is possible that compass is not supported. If so,\n // the hangler will automatically go from compass to disabled.\n } else {\n // Go from compass to disabled\n map.compassBearing.disable();\n\n // console.log('state is now: locked');\n\n map.setBearing(0);\n if (this.options.closeOnZeroBearing) {\n map.touchRotate.enable();\n }\n }\n }\n this._restyle();\n },\n\n _restyle: function() {\n if (this._map.options.rotate) {\n var map = this._map;\n var bearing = map.getBearing();\n if (this.options.closeOnZeroBearing && bearing) {\n this._container.style.display = 'block';\n }\n\n var cssTransform = 'rotate(' + bearing + 'deg)';\n this._arrow.style.transform = cssTransform;\n\n if (map.compassBearing.enabled()) {\n this._link.style.backgroundColor = 'orange';\n } else if (map.touchRotate.enabled()) {\n this._link.style.backgroundColor = null;\n } else {\n this._link.style.backgroundColor = 'grey';\n if (this.options.closeOnZeroBearing && map.getBearing() === 0) {\n this._container.style.display = 'none';\n }\n }\n } else {\n L.DomUtil.addClass(link, 'leaflet-disabled');\n }\n },\n\n});\n\nL.control.rotate = function(options) {\n return new L.Control.Rotate(options);\n};\n\nL.Map.mergeOptions({\n rotateControl: true,\n});\n\nL.Map.addInitHook(function() {\n if (this.options.rotateControl) {\n var options = typeof this.options.rotateControl === 'object' ? this.options.rotateControl : {};\n this.rotateControl = L.control.rotate(options);\n this.addControl(this.rotateControl);\n }\n});\r\n"],"names":["domUtilProto","L","extend","DomUtil","setTransform","el","offset","scale","bearing","pivot","pos","Point","_round","call","this","rotateFrom","style","TRANSFORM","x","y","setPosition","point","_leaflet_pos","Browser","any3d","undefined","left","top","DEG_TO_RAD","Math","PI","RAD_TO_DEG","Draggable","include","updateMapBearing","mapBearing","_mapBearing","prototype","rotate","theta","sinTheta","sin","cosTheta","cos","cx","cy","divOverlayProto","DivOverlay","getEvents","_updatePosition","_map","latLngToLayerPoint","_latlng","options","anchor","_getAnchor","_zoomAnimated","_rotate","rotatedPointToMapPanePoint","_container","add","bottom","_containerBottom","_containerLeft","round","_containerWidth","popupProto","Popup","_animateZoom","e","_latLngToNewLayerPoint","zoom","center","_adjustPan","autoPan","_panAnim","_inProgress","map","marginBottom","parseInt","getStyle","containerHeight","offsetHeight","containerWidth","layerPos","_add","getPosition","containerPos","_getMapPanePos","padding","autoPanPadding","paddingTL","autoPanPaddingTopLeft","paddingBR","autoPanPaddingBottomRight","size","getSize","dx","dy","fire","panBy","tooltipProto","Tooltip","_setPosition","Icon","markerDragProto","_setIconStyles","img","name","sizeOption","shadowAnchor","iconAnchor","divideBy","className","marginLeft","marginTop","width","height","MarkerDrag","_onDragStart","_marker","_draggable","_bearing","_onDrag","marker","rotated_marker","rotation","rotateWithView","shadow","_shadow","iconPos","_icon","mapPanePointToRotatedPoint","latlng","layerPointToLatLng","oldLatLng","_oldLatLng","setLatLng","_onDragEnd","update","markerProto","Marker","mergeOptions","onAdd","on","_initInteraction","ret","dragging","Object","getPrototypeOf","bind","disable","enable","_setPos","_zIndex","zIndexOffset","_resetZIndex","_updateZIndex","zIndex","setRotation","gridLayerProto","GridLayer","events","updateWhenIdle","_onRotate","Util","throttle","_onMoveEnd","updateInterval","_getTiledPixelBounds","mapZoom","_animatingZoom","max","_animateToZoom","getZoom","getZoomScale","_tileZoom","pixelCenter","project","floor","halfSize","Bounds","containerPointToLayerPoint","subtract","canvasProto","Canvas","_redraw","onRemove","off","_update","rendererProto","Renderer","_updateTransform","_zoom","_topLeft","p","padMin","multiplyBy","padMax","clip","_bounds","min","_center","getCenter","svgProto","SVG","mapProto","Map","initialize","id","setBearing","_getRotatePanePos","getBounds","topleft","topright","bottomright","bottomleft","LatLngBounds","layerPointToContainerPoint","rotatePanePos","_pivot","clone","_rotatePanePos","_rotatePane","getBearing","_initPanes","panes","_panes","_paneRenderers","_mapPane","createPane","_norotatePane","markerZoomAnimation","addClass","markerPane","shadowPane","_subtract","_getCenterOffset","centerOffset","_getNewPixelOrigin","viewHalf","_divideBy","_handleGeolocationResponse","lat","coords","latitude","lng","longitude","hdg","heading","LatLng","bounds","toBounds","accuracy","_locateOptions","setView","getBoundsZoom","maxZoom","data","timestamp","i","CompassBearing","Handler","window","DeviceOrientationEvent","_capable","_throttled","_onDeviceOrientation","addHooks","DomEvent","removeHooks","event","alpha","orientation","addInitHook","trackContainerMutation","ContainerMutation","mutation","_observer","MutationObserver","_onMutation","observe","getContainer","childList","attributes","characterData","subtree","attributeFilter","disconnect","invalidateSize","bounceAtZoomLimits","TouchGestures","touchRotate","touchZoom","_onTouchStart","touches","length","_zooming","_rotating","p1","mouseEventToContainerPoint","p2","vector","_centerPoint","_startLatLng","containerPointToLatLng","_pinchStartLatLng","_startDist","distanceTo","_startZoom","_startTheta","atan","_startBearing","_moved","stop","document","_onTouchMove","_onTouchEnd","preventDefault","delta","bearingDelta","getScaleZoom","getMinZoom","getMaxZoom","_limitZoom","unproject","_moveStart","cancelAnimFrame","_animRequest","moveFn","_move","pinch","requestAnimFrame","zoomAnimation","snapZoom","_resetView","TouchRotate","touchGestures","shiftKeyRotate","ShiftKeyRotate","_handleShiftScroll","shiftKey","scrollWheelZoom","deltaY","touch","android23","TouchZoom","removeClass","Control","Rotate","position","closeOnZeroBearing","_unthrottledOnDeviceOrientation","container","create","arrow","_arrow","backgroundImage","cursor","display","backgroundRepeat","backgroundPosition","link","_link","appendChild","href","title","stopPropagation","_handleMouseDown","_cycleState","_refocusOnMap","_restyle","_follow","_canFollow","dragstartX","pageX","dragstartY","pageY","_handleMouseDrag","_handleMouseUp","deltaX","clientX","ev","enabled","compassBearing","cssTransform","transform","backgroundColor","control","rotateControl","addControl"],"mappings":"2FAGA,MAAMA,EAAeC,EAAEC,OAAO,GAAID,EAAEE,SAEpCF,EAAEC,OAAOD,EAAEE,QAAS,CAEhBC,aAAc,SAASC,EAAIC,EAAQC,EAAOC,EAASC,GAC/C,IAAIC,EAAMJ,GAAU,IAAIL,EAAEU,MAAM,EAAG,GAEnC,IAAKH,EAED,OADAF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,aAAY,WACd,GAAIpQ,KAAKuC,QAAQgV,cAAe,CAC5B,IAAIhV,EAAgD,iBAA/BvC,KAAKuC,QAAQgV,cAA6BvX,KAAKuC,QAAQgV,cAAgB,GAC5FvX,KAAKuX,cAAgBpY,EAAEmY,QAAQ9V,OAAOe,GACtCvC,KAAKwX,WAAWxX,KAAKuX"} \ No newline at end of file diff --git a/examples/leaflet-rotate.html b/examples/leaflet-rotate.html index f1df25e..4f31594 100644 --- a/examples/leaflet-rotate.html +++ b/examples/leaflet-rotate.html @@ -11,13 +11,13 @@ - + - - - - + + + +