leaflet-rotate 0.1.1 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- !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._zoom<e.getMinZoom()&&s<1||this._zoom>e.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)}}))}));
1
+ !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.dragging.enabled()&&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._zoom<e.getMinZoom()&&s<1||this._zoom>e.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+5*Math.sign(t.deltaY))):this._map.scrollWheelZoom.enable()}}),L.Map.addInitHook("addHandler","shiftKeyRotate",L.Map.ShiftKeyRotate),L.Map.addInitHook((function(){this.scrollWheelZoom.enabled()&&this.shiftKeyRotate.enabled()&&(this.scrollWheelZoom.disable(),this.scrollWheelZoom.enable())})),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="Rotate map",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(this._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)}}))}));
2
2
  //# sourceMappingURL=leaflet-rotate.js.map
@@ -1 +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 = 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,EAASI,EAAIE,SACNZ,EAAaI,aAAaS,KAAKC,KAAMT,EAAIC,EAAQC,GAG5DG,EAAMA,EAAIK,WAAWP,EAASC,GAE9BJ,EAAGW,MAAMf,EAAEE,QAAQc,WACf,eAAiBP,EAAIQ,EAAI,MAAQR,EAAIS,EAArC,SACCZ,EAAQ,UAAYA,EAAQ,IAAM,IACnC,WAAaC,EAAU,QAG/BY,YAAa,SAASf,EAAIgB,EAAOb,EAASC,GACtC,IAAKD,EACD,OAAOR,EAAaoB,YAAYP,KAAKC,KAAMT,EAAIgB,GAInDhB,EAAGiB,aAAeD,EAGdpB,EAAEsB,QAAQC,MACVvB,EAAEE,QAAQC,aAAaC,EAAIgB,OAAOI,EAAWjB,EAASC,IAEtDJ,EAAGW,MAAMU,KAAOL,EAAMH,EAAI,KAC1Bb,EAAGW,MAAMW,IAAMN,EAAMF,EAAI,OAKjCS,WAAYC,KAAKC,GAAK,IACtBC,WAAY,IAAMF,KAAKC,KCvC3B7B,EAAE+B,UAAUC,QAAQ,CAEhBC,iBAAkB,SAASC,GACvBrB,KAAKsB,YAAcD,KCH3BlC,EAAEC,OAAOD,EAAEU,MAAM0B,UAAW,CAMxBC,OAA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AKsV,OAAOpV,MAAMkX,UAAYD,EAE1BpT,EAAImT,eAAeD,UACnBjX,KAAK6V,MAAM3V,MAAMmX,gBAAkB,SAC5BtT,EAAIuN,YAAY2F,UACvBjX,KAAK6V,MAAM3V,MAAMmX,gBAAkB,MAEnCrX,KAAK6V,MAAM3V,MAAMmX,gBAAkB,OAC/BrX,KAAKuC,QAAQ0S,oBAA2C,IAArBlR,EAAImJ,eACvClN,KAAK6C,WAAW3C,MAAMuV,QAAU,cAIxCtW,EAAEE,QAAQsO,SAASiI,KAAM,uBAMrCzW,EAAEmY,QAAQ9V,OAAS,SAASe,GACxB,OAAO,IAAIpD,EAAE2V,QAAQC,OAAOxS,IAGhCpD,EAAE8M,IAAIjE,aAAa,CACfuP,eAAe,IAGnBpY,EAAE8M,IAAImE,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"}
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 = 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});\n","/**\n * L.Draggable\n */\nL.Draggable.include({\n\n updateMapBearing: function(mapBearing) {\n this._mapBearing = mapBearing;\n },\n\n});\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});\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.dragging.enabled() && 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);\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);\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);\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);\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) + Math.sign(e.deltaY) * 5);\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);\n\n// decrease \"scrollWheelZoom\" handler priority over \"shiftKeyRotate\" handler\nL.Map.addInitHook(function() {\n if (this.scrollWheelZoom.enabled() && this.shiftKeyRotate.enabled()) {\n this.scrollWheelZoom.disable();\n this.scrollWheelZoom.enable();\n }\n});\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);\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 = 'Rotate map';\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(this._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});\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","enabled","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","sign","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","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,EAASI,EAAIE,SACNZ,EAAaI,aAAaS,KAAKC,KAAMT,EAAIC,EAAQC,GAG5DG,EAAMA,EAAIK,WAAWP,EAASC,GAE9BJ,EAAGW,MAAMf,EAAEE,QAAQc,WACf,eAAiBP,EAAIQ,EAAI,MAAQR,EAAIS,EAArC,SACCZ,EAAQ,UAAYA,EAAQ,IAAM,IACnC,WAAaC,EAAU,QAG/BY,YAAa,SAASf,EAAIgB,EAAOb,EAASC,GACtC,IAAKD,EACD,OAAOR,EAAaoB,YAAYP,KAAKC,KAAMT,EAAIgB,GAInDhB,EAAGiB,aAAeD,EAGdpB,EAAEsB,QAAQC,MACVvB,EAAEE,QAAQC,aAAaC,EAAIgB,OAAOI,EAAWjB,EAASC,IAEtDJ,EAAGW,MAAMU,KAAOL,EAAMH,EAAI,KAC1Bb,EAAGW,MAAMW,IAAMN,EAAMF,EAAI,OAKjCS,WAAYC,KAAKC,GAAK,IACtBC,WAAY,IAAMF,KAAKC,KCvC3B7B,EAAE+B,UAAUC,QAAQ,CAEhBC,iBAAkB,SAASC,GACvBrB,KAAKsB,YAAcD,KCH3BlC,EAAEC,OAAOD,EAAEU,MAAM0B,UAAW,CAMxBC,OAAQ,SAASC,GACb,IAAKA,EAAS,OAAOzB,KACrB,IAAI0B,EAAWX,KAAKY,IAAIF,GACpBG,EAAWb,KAAKc,IAAI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M,KAAK6C,WAAW3C,MAAMyV,QAAU,SAGpC,IAAIyB,EAAe,UAAY1X,EAAU,OACzCM,KAAKwV,OAAOtV,MAAMmX,UAAYD,EAE1BrT,EAAIoT,eAAe7O,UACnBtI,KAAK+V,MAAM7V,MAAMoX,gBAAkB,SAC5BvT,EAAIwN,YAAYjJ,UACvBtI,KAAK+V,MAAM7V,MAAMoX,gBAAkB,MAEnCtX,KAAK+V,MAAM7V,MAAMoX,gBAAkB,OAC/BtX,KAAKuC,QAAQ4S,oBAA2C,IAArBpR,EAAIoJ,eACvCnN,KAAK6C,WAAW3C,MAAMyV,QAAU,cAIxCxW,EAAEE,QAAQuO,SAAS5N,KAAK+V,MAAO,uBAM3C5W,EAAEoY,QAAQ/V,OAAS,SAASe,GACxB,OAAO,IAAIpD,EAAE6V,QAAQC,OAAO1S,IAGhCpD,EAAE+M,IAAIlE,aAAa,CACfwP,eAAe,IAGnBrY,EAAE+M,IAAImE,aAAY,WACd,GAAIrQ,KAAKuC,QAAQiV,cAAe,CAC5B,IAAIjV,EAAgD,iBAA/BvC,KAAKuC,QAAQiV,cAA6BxX,KAAKuC,QAAQiV,cAAgB,GAC5FxX,KAAKwX,cAAgBrY,EAAEoY,QAAQ/V,OAAOe,GACtCvC,KAAKyX,WAAWzX,KAAKwX"}
@@ -1 +1 @@
1
- var loremIpsum = "<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p><p>Donec nec justo eget felis facilisis fermentum. Aliquam porttitor mauris sit amet orci. Aenean dignissim pellentesque.</p>";
1
+ var loremIpsum = "<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec odio. Quisque volutpat mattis eros. Nullam malesuada erat ut turpis. Suspendisse urna nibh, viverra non, semper suscipit, posuere a, pede.</p><p>Donec nec justo eget felis facilisis fermentum. Aliquam porttitor mauris sit amet orci. Aenean dignissim pellentesque.</p>";
package/misc/places.js CHANGED
@@ -1,7 +1,7 @@
1
- var places = {
2
- 'Kyiv': [50.5, 30.5],
3
- 'London': [51.51, -0.12],
4
- 'San Francisco': [37.77, -122.42],
5
- 'Washington': [38.91, -77.04],
6
- 'Trondheim': [63.41, 10.41],
7
- };
1
+ var places = {
2
+ 'Kyiv': [50.5, 30.5],
3
+ 'London': [51.51, -0.12],
4
+ 'San Francisco': [37.77, -122.42],
5
+ 'Washington': [38.91, -77.04],
6
+ 'Trondheim': [63.41, 10.41],
7
+ };
package/package.json CHANGED
@@ -1,56 +1,56 @@
1
- {
2
- "name": "leaflet-rotate",
3
- "version": "0.1.1",
4
- "description": "A Leaflet plugin that allows to add rotation functionality to map tiles",
5
- "main": "dist/leaflet-rotate.js",
6
- "module": "src/index.js",
7
- "scripts": {
8
- "test": "echo \"Error: no test specified\" && exit 1",
9
- "build": "rollup -c build/rollup.config.js",
10
- "watch": "rollup -c build/rollup.config.js --watch",
11
- "version": "npm run build && git add -A dist"
12
- },
13
- "repository": {
14
- "type": "git",
15
- "url": "https://github.com/Raruto/leaflet-rotate.git"
16
- },
17
- "keywords": [
18
- "leaflet",
19
- "javascript",
20
- "tiles",
21
- "rotation",
22
- "leaflet-rotate"
23
- ],
24
- "author": {
25
- "name": "Iván Sánchez Ortega",
26
- "url": "https://github.com/Leaflet/Leaflet/tree/rotate"
27
- },
28
- "contributors": [
29
- {
30
- "name": "Raruto",
31
- "url": "https://github.com/Raruto/leaflet-rotate"
32
- },
33
- {
34
- "name": "Fabien Nicollet",
35
- "url": "https://github.com/fnicollet/Leaflet/tree/rotate-master"
36
- },
37
- {
38
- "name": "Zsolt “Hyperknot” Ero",
39
- "url": "https://github.com/hyperknot"
40
- }
41
- ],
42
- "license": "GPL-3.0",
43
- "bugs": {
44
- "url": "https://github.com/Raruto/leaflet-rotate/issues"
45
- },
46
- "homepage": "https://github.com/Raruto/leaflet-rotate#readme",
47
- "devDependencies": {
48
- "rollup": "^1.31.0",
49
- "rollup-plugin-commonjs": "^10.1.0",
50
- "rollup-plugin-node-resolve": "^5.2.0",
51
- "rollup-plugin-terser": "^7.0.2"
52
- },
53
- "peerDependencies": {
54
- "leaflet": "^1.7.0"
55
- }
56
- }
1
+ {
2
+ "name": "leaflet-rotate",
3
+ "version": "0.1.4",
4
+ "description": "A Leaflet plugin that allows to add rotation functionality to map tiles",
5
+ "main": "dist/leaflet-rotate.js",
6
+ "module": "src/index.js",
7
+ "scripts": {
8
+ "test": "echo \"Error: no test specified\" && exit 1",
9
+ "build": "rollup -c build/rollup.config.js",
10
+ "watch": "rollup -c build/rollup.config.js --watch",
11
+ "version": "npm run build && git add -A dist"
12
+ },
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "https://github.com/Raruto/leaflet-rotate.git"
16
+ },
17
+ "keywords": [
18
+ "leaflet",
19
+ "javascript",
20
+ "tiles",
21
+ "rotation",
22
+ "leaflet-rotate"
23
+ ],
24
+ "author": {
25
+ "name": "Iván Sánchez Ortega",
26
+ "url": "https://github.com/Leaflet/Leaflet/tree/rotate"
27
+ },
28
+ "contributors": [
29
+ {
30
+ "name": "Raruto",
31
+ "url": "https://github.com/Raruto/leaflet-rotate"
32
+ },
33
+ {
34
+ "name": "Fabien Nicollet",
35
+ "url": "https://github.com/fnicollet/Leaflet/tree/rotate-master"
36
+ },
37
+ {
38
+ "name": "Zsolt “Hyperknot” Ero",
39
+ "url": "https://github.com/hyperknot"
40
+ }
41
+ ],
42
+ "license": "GPL-3.0",
43
+ "bugs": {
44
+ "url": "https://github.com/Raruto/leaflet-rotate/issues"
45
+ },
46
+ "homepage": "https://github.com/Raruto/leaflet-rotate#readme",
47
+ "devDependencies": {
48
+ "rollup": "^1.31.0",
49
+ "rollup-plugin-commonjs": "^10.1.0",
50
+ "rollup-plugin-node-resolve": "^5.2.0",
51
+ "rollup-plugin-terser": "^7.0.2"
52
+ },
53
+ "peerDependencies": {
54
+ "leaflet": "^1.7.0"
55
+ }
56
+ }