(function(){var i=L.Marker.prototype._initIcon,n=L.Marker.prototype._setPos,s=L.DomUtil.TRANSFORM==="msTransform";L.Marker.addInitHook(function(){var t=this.options.icon&&this.options.icon.options,o=t&&this.options.icon.options.iconAnchor;o&&(o=o[0]+"px "+o[1]+"px"),this.options.rotationOrigin=this.options.rotationOrigin||o||"center bottom",this.options.rotationAngle=this.options.rotationAngle||0,this.on("drag",function(r){r.target._applyRotation()})}),L.Marker.include({_initIcon:function(){i.call(this)},_setPos:function(t){n.call(this,t),this._applyRotation()},_applyRotation:function(){this.options.rotationAngle&&(this._icon.style[L.DomUtil.TRANSFORM+"Origin"]=this.options.rotationOrigin,s?this._icon.style[L.DomUtil.TRANSFORM]="rotate("+this.options.rotationAngle+"deg)":this._icon.style[L.DomUtil.TRANSFORM]+=" rotateZ("+this.options.rotationAngle+"deg)")},setRotationAngle:function(t){return this.options.rotationAngle=t,this.update(),this},setRotationOrigin:function(t){return this.options.rotationOrigin=t,this.update(),this}})})();
