/*! * * iclient9-plot-leaflet.(http://iclient.supermapol.com) * Copyright© 2000-2017 SuperMap Software Co. Ltd * version: v9.1.0 * */ !function(t){function e(o){if(i[o])return i[o].exports;var n=i[o]={i:o,l:!1,exports:{}};return t[o].call(n.exports,n,n.exports,e),n.l=!0,n.exports}var i={};e.m=t,e.c=i,e.i=function(t){return t},e.d=function(t,i,o){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:o})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=139)}([function(t,e,i){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var i=0;i=this.minEditPts){var t={textContent:this.textContent,type:this.symbolType,surroundLineFlag:!1,positionPoints:this.controlPoints,style:{}};if(t.type===SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL&&t.positionPoints.push(t.positionPoints[0]),this.symbolType===SuperMap.Plot.SymbolType.PARALLELLINE){if(this.controlPoints&&this.controlPoints.length>=3){var e=!1;void 0!==this.controlPoints[0].z&&(e=!0);var i=SuperMap.Plot.PlottingUtil.distance(this.controlPoints[0],this.controlPoints[1]);SuperMap.Plot.PlottingUtil.isRight(this.controlPoints[0],this.controlPoints[1],this.controlPoints[2])&&(i=-i);for(var o=[],n=1;n=2&&this.controlPoints.lengtht||this.subSymbolScaleValue<=0)&&(this.subSymbolScaleValue=t),this.subSymbolScaleValue<=0&&(this.subSymbolScaleValue=t)}return this.subSymbolScaleValue}},{key:"modifyPoint",value:function(t,e){if(this.controlPoints=this.getControlPoints(),0===this.libID&&31===this.code){if(0===t)return this.controlPoints[0].x=(this.controlPoints[1].x+this.controlPoints[3].x)/2,void(this.controlPoints[0].y=(this.controlPoints[1].y+this.controlPoints[3].y)/2);var i=-1;0===(i=(t+2)%4)&&(i=4);var o=SuperMap.Plot.PlottingUtil.distance(this.controlPoints[0],this.controlPoints[t]),n=SuperMap.Plot.PlottingUtil.findPointInLine(this.controlPoints[0],this.controlPoints[i],o),s=new SuperMap.Geometry.Point(2*this.controlPoints[0].x-n.x,2*this.controlPoints[0].y-n.y);if(L.Map&&this.map instanceof L.Map)var a=this.map.latLngToLayerPoint(L.latLng(n.y,n.x)),l=this.map.latLngToLayerPoint(L.latLng(s.y,s.x));var r=!1;(SuperMap.Plot.PlottingUtil.equalFuzzy(a.x-l.x,0)||SuperMap.Plot.PlottingUtil.equalFuzzy(a.y-l.y,0))&&(r=!0),r?(this.addControlPoints(s,i),this.addControlPoints(n,t)):(this.addControlPoints(s,t),this.addControlPoints(n,i))}this.calculateParts()}},{key:"computeSubSymbol",value:function(t,e,i,o,n,s){if(null===t.symbolData||null===t.symbolData.innerCells)return null;void 0===n&&(n=0),void 0===s&&(s=0);for(var a=SuperMap.Plot.AnalysisSymbol.analysisSymbolCells(t.symbolData),l=0,r=0,u=0,p=0,h=0;hc[m].x&&(u=c[m].x),p>c[m].y&&(p=c[m].y)}var y=new SuperMap.Geometry.Point(l,r),g=new SuperMap.Geometry.Point(u,p),d=(y.y-g.y)/i,f=(y.x-g.x)/i,S=f>d?f:d,P=new SuperMap.Geometry.Point(.5*(y.x+g.x),.5*(y.y+g.y));P.x+=n*(y.x-g.x),P.y+=s*(y.y-g.y);for(var m=0,b=a.length;m2){for(var n=-1,s=t.length-2;s>=0;s--)if(i=s)return i.z;if(l>=s)return e.z}return n.x!=e.x&&e.x!=i.x?e.z+(n.x-e.x)/(e.x-i.x)*(e.z-i.z):n.y!=e.y&&e.y!=i.y?e.z+(n.y-e.y)/(e.y-i.y)*(e.z-i.z):0==(a=SuperMap.Plot.PlottingUtil.distance(e,n))?e.z:e.z-(e.z-i.z)*(a/s)}},{key:"ComputeBeizerZValueByDis",value:function(t,e,i){if(t.length<2)return!1;for(var o=[],n=0;ne?this.symbolData.scaleValues[e]=this.scaleValues[e]:this.symbolData.scaleValues.push(this.scaleValues[e]);else this.symbolData.scaleValues=[],this.symbolData.scaleValues=this.scaleValues;1016===this.code&&(this.symbolData.arrowTailType=this.arrowTailType,this.symbolData.arrowBodyType=this.arrowBodyType,this.symbolData.arrowHeadType=this.arrowHeadType)}},_calculateParts:function(){if("none"!==this.style.display)if(this.textContent&&""!==this.textContent&&"???"!==this.textContent||this.symbolType!==SuperMap.Plot.SymbolType.TEXTSYMBOL||(this.textContent="请输入文本"),0!==this.textContent.length&&0!==this.dRotate&&(void 0===this.style.labelRotation?this.style.labelRotation=-this.dRotate:this.style.labelRotation+=-this.dRotate),this.superMapAlgoSymbol&&0!==this.getLatLngs().length){if(this._sendDataToAlgo(),this.superMapAlgoSymbol.calculateParts(),this._getDatafromAlgo(),this._transSymbolCellsToLayers(this.superMapAlgoSymbol.components),this._setBasicSymbolText(),this.symbolType===SuperMap.Plot.SymbolType.ELLIPSESYMBOL){if(3===this.superMapAlgoSymbol.controlPoints.length){var t=new SuperMap.Geometry.Point(2*this.superMapAlgoSymbol.controlPoints[0].x-this.superMapAlgoSymbol.controlPoints[1].x,2*this.superMapAlgoSymbol.controlPoints[0].y-this.superMapAlgoSymbol.controlPoints[1].y);this.superMapAlgoSymbol.controlPoints.push(t);e=new SuperMap.Geometry.Point(2*this.superMapAlgoSymbol.controlPoints[0].x-this.superMapAlgoSymbol.controlPoints[2].x,2*this.superMapAlgoSymbol.controlPoints[0].y-this.superMapAlgoSymbol.controlPoints[2].y);this.superMapAlgoSymbol.controlPoints.push(e)}else if(5===this.superMapAlgoSymbol.controlPoints.length){var e=new SuperMap.Geometry.Point(2*this.superMapAlgoSymbol.controlPoints[0].x-this.superMapAlgoSymbol.controlPoints[2].x,2*this.superMapAlgoSymbol.controlPoints[0].y-this.superMapAlgoSymbol.controlPoints[2].y);this.superMapAlgoSymbol.controlPoints[4].x=e.x,this.superMapAlgoSymbol.controlPoints[4].y=e.y}this.latLngs=L.Util.superMapPointsToLatLngs(this.superMapAlgoSymbol.controlPoints)}}else!this.superMapAlgoSymbol&&this.getLatLngs().length>=this.minEditPts&&(this._calAccessServerSymbol(),this._setBasicSymbolText())},_calAccessServerSymbol:function(){for(var t=SuperMap.Plot.AnalysisSymbol.analysisSymbolCells(this.symbolData),e=0;e=this.strokeWidth&&(this.style.weight=this.strokeWidth),this.style.weight<=.5&&(this.style.weight=.5)}else!0===this.scaleStrokeWidth&&(this.style.weight=this.strokeWidth,this.scaleStrokeWidth=!1),this.strokeWidth=this.style.weight;this.prevStrokeWidth=this.style.weight,this.textContent.length>0&&(this.style.fontSize*=e);for(var p in this.components)this.components[p]instanceof n.Text&&(this.components[p].options.fontSize*=e),this.layer._map.getRenderer(this.layer)instanceof L.Canvas&&(!0!==this.components[p].options.fill||"LINEAR"!==this.style.fillGradientMode&&"RADIAL"!==this.style.fillGradientMode||this._computeGradientInCanvas(this.components[p],this.components[p].options,this.style));22!==this.libID||1012!==this.code&&1013!==this.code&&1014!==this.code&&1015!==this.code||(this.dScale>=1?(this.constantSize=!0,this.redraw()):this.constantSize=!1),this._updateSymbolTexts(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)}this.fromZoom=this._map.getZoom(),1!==this.surroundLineType&&2!==this.surroundLineType||this.redraw(),0!==this.avoidRegions.length&&this.redraw(),this.symbolType===SuperMap.Plot.SymbolType.TEXTSYMBOL&&this.isSelected&&this._map.getPlotEditControl()&&this._map.getPlotEditControl().fire(SuperMap.Plot.Event.featuresmodified,{features:[this]})}},_rotate:function(t,e){if(this.symbolType===SuperMap.Plot.SymbolType.TEXTSYMBOL)for(var i in this.components)this.components[i].options.labelRotation=this.style.labelRotation,this.components[i].redraw();else{L.Util.rotateLatLngs(this.getLatLngs(),e,t),L.Util.rotateLatLngs(this.scalePoints,e,t);Math.PI;var o=new SuperMap.Geometry.Point(e.lng,e.lat);if(SuperMap.AlgoSymbolFactory.isAccessServer(this.libID,this.code)){var n=new SuperMap.GetSymbolInfoParameters;n.libID=this.libID,n.code=this.code,n.inputPoints=L.Util.latLngsToSuperMapPoints(this.getLatLngs()),n.scaleValues=this.scaleValues,n.subSymbols=this.subSymbols,L.supermap.symbolInfoService(this.serverUrl).getSymbolInfo(n,function(t){this.symbolData.innerCells=t.result.innerCells,this.symbolData.scalePoints=t.result.scalePoints,this.symbolData.scaleValues=t.result.scaleValues,this.redraw(),this._updateSymbolTexts()},this)}else if(this.superMapAlgoSymbol){for(var s=0;si?(this.symbolData.localePoints[i].x=this.getLatLngs()[i].lng,this.symbolData.localePoints[i].y=this.getLatLngs()[i].lat):this.symbolData.localePoints.push({x:this.getLatLngs()[i].lng,y:this.getLatLngs()[i].lat,z:0})}},_parseSymbolData:function(){if(o.PlottingObject.prototype._parseSymbolData.call(this),null!==this.symbolData&&(this.style=SuperMap.Plot.AnalysisSymbol.getStyle(this.symbolData),this.maxEditPts=this.symbolData.algoMaxEditPts,this.minEditPts=this.symbolData.algoMinEditPts,void 0!==this.symbolData.isEdit&&(this.isEdit=this.symbolData.isEdit),void 0!==this.symbolData.scaleByMap&&(this.scaleByMap=this.symbolData.scaleByMap),this.surroundLineType=this.symbolData.surroundLineType,this.symbolData.localePoints)){this.latLngs=[];for(var t=0;tMath.abs(n.y-s.y)?Math.abs(n.x-s.x):Math.abs(n.y-s.y);e.fill=!0,e.fillOpacity=1,"LINEAR"===i.fillGradientMode&&(e.fillColor=this._map.getRenderer(t)._ctx.createLinearGradient(n.x,n.y,s.x,n.y)),"RADIAL"===i.fillGradientMode&&(e.fillColor=this._map.getRenderer(t)._ctx.createRadialGradient(a.x,a.y,0,a.x,a.y,l)),e.fillColor.addColorStop(0,SuperMap.PlotUtil.colorRGBA(i.fillColor,i.fillOpacity)),e.fillColor.addColorStop(1,SuperMap.PlotUtil.colorRGBA(i.fillBackColor,i.fillBackOpacity))}},_computeGradientInSVG:function(t,e,i){this.layer._renderer._container.defs||(this.layer._renderer._container.defs=L.SVG.create("defs"));var o,n,s;"LINEAR"===i.fillGradientMode&&(o=document.getElementById("linearGradient_"+this._leaflet_id)),"RADIAL"===i.fillGradientMode&&(o=document.getElementById("radialGradient_"+this._leaflet_id)),null===o?("LINEAR"===i.fillGradientMode&&((o=L.SVG.create("linearGradient")).setAttributeNS(null,"x1",0),o.setAttributeNS(null,"y1",0),o.setAttributeNS(null,"x2",1),o.setAttributeNS(null,"y2",0),o.setAttributeNS(null,"id","linearGradient_"+this._leaflet_id)),"RADIAL"===i.fillGradientMode&&((o=L.SVG.create("radialGradient")).setAttributeNS(null,"cx",.5),o.setAttributeNS(null,"cy",.5),o.setAttributeNS(null,"fx",.5),o.setAttributeNS(null,"fy",.5),o.setAttributeNS(null,"r",1),o.setAttributeNS(null,"id","radialGradient_"+this._leaflet_id)),(n=L.SVG.create("stop")).setAttributeNS(null,"offset",0),n.setAttributeNS(null,"style","stop-color:"+SuperMap.PlotUtil.colorRGBA(i.fillColor,i.fillOpacity)),(s=L.SVG.create("stop")).setAttributeNS(null,"offset",1),s.setAttributeNS(null,"style","stop-color:"+SuperMap.PlotUtil.colorRGBA(i.fillBackColor,i.fillBackOpacity)),o.appendChild(n),o.appendChild(s),this.layer._renderer._container.defs.appendChild(o),this.layer._renderer._container.appendChild(this.layer._renderer._container.defs)):(o.firstChild.setAttributeNS(null,"style","stop-color:"+SuperMap.PlotUtil.colorRGBA(i.fillColor,i.fillOpacity)),o.lastChild.setAttributeNS(null,"style","stop-color:"+SuperMap.PlotUtil.colorRGBA(i.fillBackColor,i.fillBackOpacity))),e.fill=!0,e.fillOpacity=1,e.fillColor="url(#"+o.id+")"},_copyStyleForCell:function(t,e,i){if(e.display&&"none"===e.display)t.display=e.display;else{if(!0===t.surroundLineFlag)this.surroundLineType===SuperMap.Plot.AlgoSurroundLineType.ALL?t.weight=2*e.surroundLineWidth+e.weight:t.weight=e.surroundLineWidth,t.color=e.surroundLineColor,t.opacity=e.surroundLineColorOpacity,t.dashArray=null;else if(t.lineWidthLimit||(t.weight=e.weight),t.lineColorLimit||(t.color=e.color,t.opacity=e.opacity),!t.lineTypeLimit){if(e.lineSymbolID){e.lineSymbolID=parseInt(e.lineSymbolID);var o=2*e.weight,s=3*e.weight;1===e.lineSymbolID?e.dashArray=[s,o].join(","):2===e.lineSymbolID?e.dashArray=[0,o].join(","):3===e.lineSymbolID?e.dashArray=[s,o,0,o].join(","):4===e.lineSymbolID?e.dashArray=[s,o,0,o,0,o].join(","):e.dashArray=null}t.dashArray=e.dashArray}t.strokeLinecap||void 0===e.strokeLinecap||(t.strokeLinecap=e.strokeLinecap),t.fillLimit||i instanceof n.Text?t.fillColorLimit||(t.fillColor=t.strokeColor,t.fillOpacity=t.strokeOpacity):"LINEAR"===e.fillGradientMode||"RADIAL"===e.fillGradientMode?(this.layer._map.getRenderer(this.layer)instanceof L.Canvas&&this._computeGradientInCanvas(i,t,e),this.layer._map.getRenderer(this.layer)instanceof L.SVG&&this._computeGradientInSVG(i,t,e)):(this._removeGradientNodeInSVG(),t.fill=e.fill,t.fillColor=e.fillColor,t.fillOpacity=e.fillOpacity),t.fontSizeLimit&&!1!==t.fontSizeLimit||(t.fontSize=e.fontSize),t.fontColorLimit&&!1!==t.fontColorLimit||(t.fontColor=e.fontColor),void 0===t.labelAlign&&void 0!==e.labelAlign&&(t.labelAlign=e.labelAlign),void 0===t.labelRotation&&void 0!==e.labelRotation&&(t.labelRotation=e.labelRotation),!0!==t.fontSizeLimit&&!0!==t.fontColorLimit&&(void 0!==e.fontWeight&&(t.fontWeight=e.fontWeight),void 0!==e.fontStyle&&(t.fontStyle=e.fontStyle),void 0!==e.fontStroke&&(t.fontStroke=e.fontStroke),void 0!==!e.fontStrokeColor&&(t.fontStrokeColor=e.fontStrokeColor),void 0!==e.fontStrokeWidth&&(t.fontStrokeWidth=e.fontStrokeWidth),void 0!==e.fontBackground&&(t.fontBackground=e.fontBackground),void 0!==e.fontBackgroundColor&&(t.fontBackgroundColor=e.fontBackgroundColor),void 0!==e.fontShadow&&(t.fontShadow=e.fontShadow),void 0!==e.fontShadowColor&&(t.fontShadowColor=e.fontShadowColor),void 0!==e.fontShadowOffsetX&&(t.fontShadowOffsetX=e.fontShadowOffsetX),void 0!==e.fontShadowOffsetY&&(t.fontShadowOffsetY=e.fontShadowOffsetY),void 0!==e.fontSpace&&(t.fontSpace=e.fontSpace),void 0!==e.fontPercent&&(t.fontPercent=e.fontPercent),void 0!==e.fontFamily&&(t.fontFamily=e.fontFamily),void 0!==e.fontOpacity&&(t.fontOpacity=e.fontOpacity)),"none"===e.display?t.display=e.display:t.display="display",t.graphicWidth<0&&(t.graphicWidth=Math.abs(t.graphicWidth)),t.graphicHeight<0&&(t.graphicHeight=Math.abs(t.graphicHeight)),t.fontSize<0&&(t.fontSize=Math.abs(t.fontSize))}}});L.supermap.plotting.GraphicObject=a},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.ArrowToolKit=SuperMap.Plot.ArrowToolKit=SuperMap.Plot.ArrowToolKit||{};SuperMap.Plot.ArrowToolKit.ConstValue={MAX_ARRAY_SIZE:128,sv_AtScaleParameter:1.5,sv_AtLenDivAtWidth:1.35,sv_AtWidthDivAwWidth:.5,DUOJIANTOU_TAIL_RATE_1:8,DUOJIANTOU_TAIL_RATE_2:3,DUOJIANTOU_TAIL_RATE_3:.6},SuperMap.Plot.ArrowToolKit.ArrowTailType={ARROWTAIL_NONE:0,ARROWTAIL_LINE:1,ARROWTAIL_CURVE:2,ARROWTAIL_COATTAIL:3,ARROWTAIL_COATTAIL_POLYBODY:4},SuperMap.Plot.ArrowToolKit.ArrowHeadType={ARROWHEAD_POLYLINE:0,ARROWHEAD_TRIANGLE:1,ARROWHEAD_COATTAIL:2,ARROWHEAD_TRIANGLE_SOLID:3,ARROWHEAD_WITH_EAR:4,ARROWHEAD_WITHOUT_EAR:5},SuperMap.Plot.ArrowToolKit.ArrowBodyType={ARROWBODY_POLYLINE:0,ARROWBODY_POLYBEZIER:1,ARROWBODY_PARALLEL:2,ARROWBODY_TRAPEZOID:3,ARROWBODY_MULTIPOLYBEZIER:4},SuperMap.Plot.ArrowToolKit.parallel=function(t,e){var i={};return i.leftParallelPts=[],i.rightParallelPts=[],1===t.length||2===t.length&&t[0].x===t[1].x&&t[0].y===t[1].y?i:(i.leftParallelPts=SuperMap.Plot.PlottingUtil.parallel(t,e),i.rightParallelPts=SuperMap.Plot.PlottingUtil.parallel(t,-e),i)},SuperMap.Plot.ArrowToolKit.trapezoid=function(t,e,i){var o={};if(o.leftParallelPts=[],o.rightParallelPts=[],1===t.length||2===t.length&&t[0].x===t[1].x&&t[0].y===t[1].y)return o;for(var n=0;n2){var r=t.length;t.splice(2,r-2)}var u=SuperMap.Plot.PlottingUtil.polylineDistance(t);SuperMap.Plot.PlottingUtil.distance(t[t.length-2],t[t.length-1]);o.arrowTouLen=u*n;for(var p=SuperMap.Plot.PlottingUtil.findPointInPolyLine(t,u-o.arrowTouLen).pt,h=[],c=o.arrowTouLen*a,y=o.arrowTouLen*s,g=t.length-1,d=0;dt.length)return{arrowHeadLen:o,arrowBodyPts:n};for(var s=0,a=0;at)return a;for(var l=0,r=0;r0&&P>0){var b=1/(d-t[2].x),L=-1/(f-t[2].y),M=1*t[2].y/(f-t[2].y)-1*t[2].x/(d-t[2].x);m=Math.abs(b*t[0].x+L*t[0].y+M)/Math.sqrt(b*b+L*L)}else P<=1e-4?m=Math.abs(f-t[1].y):S<=1e-4&&(m=Math.abs(d-t[1].x));var v=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(m,t[2],new SuperMap.Geometry.Point(d,f)),_=SuperMap.Plot.PlottingUtil.pointIsRightToLine(t[1],t[2],t[0]);_?(l[1]=t[1],r[1]=t[0]):(l[1]=t[0],r[1]=t[1]),t[1]=new SuperMap.Geometry.Point((t[0].x+t[1].x)/2,(t[0].y+t[1].y)/2);var T=Math.sqrt((v.pntLeft.x-v.pntRight.x)*(v.pntLeft.x-v.pntRight.x)+(v.pntLeft.y-v.pntRight.y)*(v.pntLeft.y-v.pntRight.y))*SuperMap.Plot.ArrowToolKit.ConstValue.sv_AtWidthDivAwWidth,x=(n=T*SuperMap.Plot.ArrowToolKit.ConstValue.sv_AtLenDivAtWidth)*g;SuperMap.Plot.PlottingUtil.equalFuzzy(y,0)||(x=(n=o*y)*g);var O=SuperMap.Plot.PlottingUtil.distance(t[e],t[e-1]),A=2*n;O0&&(t[e]=SuperMap.Plot.PlottingUtil.getIncentrePointOnSegmentByScale(n,t[e],C)),N=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(x,t[e+1],t[e]),(_=SuperMap.Plot.PlottingUtil.pointIsRightToLine(t[e],t[e+1],N.pntLeft))?(r[e]=new SuperMap.Geometry.Point(N.pntLeft.x,N.pntLeft.y),l[e]=new SuperMap.Geometry.Point(N.pntRight.x,N.pntRight.y)):(r[e]=new SuperMap.Geometry.Point(N.pntRight.x,N.pntRight.y),l[e]=new SuperMap.Geometry.Point(N.pntLeft.x,N.pntLeft.y));var G;for(E=2;E9?this.symbolType===SuperMap.Plot.SymbolType.REGULARPOLYGON?(t.handlePoints.push(this.getLatLngs()[0].clone()),t.handlePoints.push(this.getLatLngs()[this.getLatLngs().length-1].clone())):t.handlePoints=L.Util.cloneLatLngs(this.getLatLngs()):t.handlePoints=this._getHandlePointsByBounds(e);for(var i=0;ithis.symbolSizeInLib.w&&(e=this.symbolSizeInLib.h),0===e||0===t.dotSymbolSize)0!==this.symbolSize.w&&0!==this.symbolSize.h||(this.symbolSize.w=this.symbolSizeInLib.w,this.symbolSize.h=this.symbolSizeInLib.h);else{var i=t.dotSymbolSize/e;this.symbolSize.w=i*this.symbolSizeInLib.w,this.symbolSize.h=i*this.symbolSizeInLib.h}}-1!==t.dotTextSpace&&(this.space=t.dotTextSpace),-1!==t.flagTextSize&&(this.flagTextSize=t.flagTextSize)}this.symbolType!==SuperMap.Plot.SymbolType.DOTSYMBOL&&this.symbolType!==SuperMap.Plot.SymbolType.ALGOSYMBOL||(-1!==t.maxScale&&(this.maxScale=t.maxScale),-1!==t.minScale&&(this.minScale=t.minScale)),-1!==t.scaleByMap&&(this.scaleByMap=t.scaleByMap)}},_removeRedundancySymbolData:function(t){null!==t&&(t.hasOwnProperty("center")&&delete t.center,t.hasOwnProperty("id")&&delete t.id,t.hasOwnProperty("parts")&&delete t.parts,t.hasOwnProperty("points")&&delete t.points,t.hasOwnProperty("position")&&delete t.position,t.hasOwnProperty("prjCoordSys")&&delete t.prjCoordSys,t.hasOwnProperty("rotationX")&&delete t.rotationX,t.hasOwnProperty("rotationY")&&delete t.rotationY,t.hasOwnProperty("rotationZ")&&delete t.rotationZ,t.hasOwnProperty("scaleX")&&delete t.scaleX,t.hasOwnProperty("scaleY")&&delete t.scaleY,t.hasOwnProperty("scaleZ")&&delete t.scaleZ)},destroy:function(){this.dragging=null,this.uuid=null,this.libID=null,this.code=null,this.minEditPts=0,this.maxEditPts=0,this.symbolType=null,this.symbolName=null,this.isSelected=!1,this.enableEdit=!1,this.note="",this.extendProperty=null,this.custom=null,this.symbolData=null,this.dScale=null,this.textContent=null,this.annotationPosition=null,this.subSymbols=null,this.fromZoom=null,this.style=null,this.isLocked=!1,this.anchorPoint=null,this.avoidRegions=null,this.ownerGroup=null,this.geoSymbolTexts=null,this.isEdit=null,this.layer.removeFeatures(this),this._render=null,this.layer=null},toGeoJsonStr:function(){return this.getSymbolData(),SuperMap.PlotUtil.toJSON(this.symbolData)}}));L.supermap.plotting.PlottingObject=a,a.prototype._containsPoint=function(t){if(this.symbolType!==SuperMap.Plot.SymbolType.TEXTSYMBOL)return!1;for(var e in this.components)if(this.components[e]._containsPoint(t))return!0;return!1}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Route=void 0;var o=i(4),n=i(7),s=i(1),a=i(17),l=i(38),r=i(18),u=e.Route=o.PlottingObject.extend({routeNodes:[],nextRouteNodeType:SuperMap.Plot.RouteNodeType.TURNING,arrRoutePts:[],initialize:function(t,e,i,n){this.scaleByMap=!0,this.minEditPts=1,this.maxEditPts=9999,this.routeNodes=[],this.arrRoutePts=[],o.PlottingObject.prototype.initialize.call(this,t,e,i,n)},destroy:function(){this.routeNodes=null,this.arrRoutePts=null,o.PlottingObject.prototype.destroy.apply(this,arguments)},highlight:function(t){this.highlightFlag=!0,this.highlightStyle=t;for(var e in this.components)if(this.components[e]instanceof s.AlgoSymbol){var i=SuperMap.Util.copyAttributes(this.components[e].style,t);this.components[e].setStyle(i)}},unhighlight:function(){for(var t in this.components)if(this.components[t]instanceof s.AlgoSymbol){var e=SuperMap.Util.copyAttributes(this.components[t].style,this.style);this.components[t].setStyle(e)}this.highlightFlag=!1,this.highlightStyle=null},blinkRoute:function(t,e,i,o){void 0===i&&(i=2),void 0===t&&(t={color:"#ff0000"}),void 0===e&&(e={color:"#0000ff"}),void 0===o&&(o=300);for(var n=[],a=0;at)return!1;var e=this.getRatioByTime();return!(e>1&&this.lastExecute||e<0)},getRatioByTime:function(){if(this.animationState!==SuperMap.Plot.GOAnimationState.PLAYING)return 0;var t=(new Date).getTime()/1e3;if(this.innerStartTime+this.startTime>t)return 0;var e=(t-this.innerStartTime-this.startTime)/this.duration;return e>=1&&!this.lastExecute?this.repeat?(this.innerStartTime=(new Date).getTime()/1e3,e=0,this.lastExecute=!1,this.animationState=SuperMap.Plot.GOAnimationState.PLAYING):(e=1,this.lastExecute=!0,this.animationState=SuperMap.Plot.GOAnimationState.STOP):e<0&&(e=0),this.ratio=e,e},showAnimationFeature:function(t){if(null!==this.animationGOFeature&&null!==this.animationGOFeature.style&&(this.resetAnimationFeature(t),this.animationGOFeature.redraw()),null!==this.goFeature&&null!==this.goFeature.style){if(t){this.goFeature.style.display="none";for(e=0;e0?c+=this.options.fontShadowOffsetX:p+=this.options.fontShadowOffsetX,this.options.fontShadowOffsetY>0?y+=this.options.fontShadowOffsetY:h+=this.options.fontShadowOffsetY);for(var d in this._eventParents)if(this._eventParents[d].symbolType===SuperMap.Plot.SymbolType.TEXTSYMBOL&&0===this.options.fontPercent&&0===this.options.fontPercent){var f=c-p,S=(f+this.options.fontSpace*(this.options.text.length-1))*this.options.fontPercent/100-f;switch(g){case"lt":case"lm":case"lb":c+=S;break;case"rt":case"rm":case"rb":p-=S;break;case"ct":case"cm":case"cb":p-=S/2,c+=S/2}}var P=new L.Bounds;if(this.options.labelRotation&&0!==this.options.labelRotation){var m=[];m.push(L.point(p,h)),m.push(L.point(p,y)),m.push(L.point(c,h)),m.push(L.point(c,y));for(var b=this.options.labelRotation*(Math.PI/180),M=0;M1){var a=new o.GroupObject(0,SuperMap.Plot.SymbolType.GROUPOBJECT,[],{subObjects:i,uuid:e});return this.addFeatures(a),a}return null},unGroupObject:function(t){var e=[];return t.symbolType===SuperMap.Plot.SymbolType.GROUPOBJECT||t.symbolType===SuperMap.Plot.SymbolType.FLAGGROUP?(e=t._unGroupObject(),this.removeFeatures(t),t.destroy()):e.push(t),e},createInterferenceBeam:function(t,e,i,o,n,s){n||(n={}),n.associatedUuid=t,n.uuid=i,n.custom=s;var a=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.INTERFERENCEBEAM,e,n,o,s);return this.addFeatures(a),a},createSatellite:function(t,e,i,o,n,s,a,l,r){var u=this._getSymbolDataFromCache(t,e);if(null===u){var p=new SuperMap.GetSymbolInfoParameters({libID:t,code:e});L.supermap.symbolInfoService(this.serverUrl).getSymbolInfo(p,function(u){this._cacheSymbolData(u.result),a||(a={}),a.serverUrl=this.serverUrl,a.orbitPoints=i,a.textContent=o,a.uuid=n,a.custom=r,a.subSymbol={libID:t,code:e,symbolData:SuperMap.PlotUtil.cloneObject(u.result),textContent:o};var p=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.SATELLITE,[],a,s,r);this.addFeatures(p),"function"==typeof l&&l({feature:p})},this)}else{a||(a={}),a.serverUrl=this.serverUrl,a.orbitPoints=i,a.textContent=o,a.uuid=n,a.custom=r,a.subSymbol={libID:t,code:e,symbolData:u,textContent:o};var h=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.SATELLITE,[],a,s,r);this.addFeatures(h),"function"==typeof l&&l({feature:h})}},createSatelliteTimeWindows1:function(t,e,i,o,n,s){n||(n={}),n.associatedUuid=t,n.timeWindows=e,n.custom=s,n.type="Number",n.uuid=i;var a=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS,[],n,o,s);return this.addFeatures(a),a},createSatelliteTimeWindows2:function(t,e,i,o,n,s){n||(n={}),n.associatedUuid=t,n.timeWindows=e,n.custom=s,n.type="Time",n.uuid=i;var a=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS,[],n,o,s);return this.addFeatures(a),a},createSymbolText:function(t,e,i,o,n,s){n||(n={}),n.associatedUuid=t,n.symbolTexts=e,n.custom=s,n.uuid=i;var a=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.SYMBOLTEXT,[],n,o,s);return SuperMap.Plot.AnalysisSymbol.mergeDefaultStyleToLayer(a),o&&SuperMap.Util.extend(a.style,o),this.addFeatures(a),a},createSymbolText1:function(t,e,i,o,n,s){n||(n={}),n.associatedUuid=t,n.textContent=e,n.custom=s,n.uuid=i;var a=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.SYMBOLTEXT1,[],n,o,s);return this.addFeatures(a),a},createNavyDeployment:function(t,e,i,o,n,s,a){if(n||(n={}),n.associatedUuid=t,n.custom=a,n.serverUrl=this.serverUrl,e&&0!==e.length){for(var l=[],r=0,u=e.length;r=2800&&t[n].code<=2900&&o.push(t[n]);var a=null;return o.length>1&&(a=new s.FlagGroup(0,SuperMap.Plot.SymbolType.FLAGGROUP,[],{subObjects:o,ratio:e,uuid:i}),this.addFeatures(a)),a},createArcRegion:function(t,e,i,o,n,s,a,l,r,u,p){r||(r={}),r.centerPoint=t,r.radius=e,r.startAngle=i,r.endAngle=o,r.textContent=n,r.textPosition=s,r.uuid=a,r.custom=p,r.spatialAnalystUrl=this.spatialAnalystUrl;var h=new SuperMap.BufferDistance({value:1e3*r.radius}),c=new SuperMap.BufferSetting({endType:SuperMap.BufferEndType.ROUND,leftDistance:h,rightDistance:h,semicircleLineSegment:36}),y=new SuperMap.GeometryBufferAnalystParameters({sourceGeometry:L.marker(r.centerPoint),sourceGeometrySRID:parseInt(this._map.options.crs.code.split(":")[1]),bufferSetting:c}),g=this;L.supermap.spatialAnalystService(this.spatialAnalystUrl).bufferAnalysis(y,function(t){r.circlePts=[];for(var e=t.result.resultGeometry.points,i=0,o=e.length;i0&&(i.subSymbols[p].symbolData=this._getSymbolDataFromCache(i.subSymbols[p].libID,i.subSymbols[p].code),null===i.subSymbols[p].symbolData&&-1===SuperMap.Util.indexOf(u,i.subSymbols[p])&&u.push(i.subSymbols[p]))}for(var y=u.slice(),g=0;g=0&&null===(e=this._selectFeature(this.features[l],t.latlng,a));l--);return e},_getSymbolDataFromCache:function(t,e){var i=L.supermap.plotting.getControl(this._map,this.serverUrl).getSymbolLibManager().getSymbolLibByLibId(t);return null!==i?i.getSymbolData(e):null},_cacheSymbolData:function(t){var e=L.supermap.plotting.getControl(this._map,this.serverUrl).getSymbolLibManager().getSymbolLibByLibId(t.libID);null!==e&&e.cacheSymbolData(t)},_isAvoidRegion:function(){for(var t=arguments.length,e=Array(t),i=0;i=n.getWest()&&e.lng<=n.getEast()&&e.lat>=n.getSouth()&&e.lat<=n.getNorth())return t}else for(var s=this._map.latLngToLayerPoint(e),a=0,l=t.components.length;a0&&this.removeFeatures(l.geoSymbolTexts));var r=SuperMap.Util.indexOf(this.features,l);-1!==r&&this.features.splice(r,1)}}this._update()},getFeatures:function(){return this.features.slice()},removeAllFeatures:function(){this.removeFeatures(this.features.slice()),this.features=[]},_setCursorStyle:function(t){void 0===t&&(t="");var e=!1;if(this._map.getPlottingLayers().length>1){var i=this._map.getPlottingLayers();for(var o in i)i[o]._renderer instanceof L.Canvas?i[o]._renderer._container.style.cursor=t:i[o]._renderer instanceof L.SVG&&(i[o]._renderer._rootGroup.style.cursor=t);e=!0}e||(this._renderer instanceof L.Canvas?this._renderer._container.style.cursor=t:this._renderer instanceof L.SVG&&(this._renderer._rootGroup.style.cursor=t,this._map._panes.overlayPane.style.cursor=t,this._map._panes.overlayPane.style.width=this._renderer._svgSize.x+"px",this._map._panes.overlayPane.style.height=this._renderer._svgSize.y+"px"))},_update:function(){this._map&&this._updatePath()},_containsPoint:function(t){return!1},_updatePath:function(){this._renderer._drawPlottingLayers(this._getLayersInBounds())},_project:function(){var t=this;t._pxBounds=L.bounds(L.point(0,0),L.point(0,0)),t._getLayersInBounds().map(function(e){e._project(),t._pxBounds.extend(e._pxBounds.min),t._pxBounds.extend(e._pxBounds.max)})},_getLayersInBounds:function(){var t=[],e=this._map.getBounds();return this.features.map(function(i){var o=i.getBounds();o.isValid()&&e.contains(o)&&t.push(i)}),t},bringToBack:function(){return L.Path.prototype.beforeAdd.call(this),this._map&&(L.DomUtil.toBack(this._getContainer()),this._setAutoZIndex(Math.max)),this},bringToFront:function(){return L.Path.prototype.bringToFront.call(this),this._map&&(L.DomUtil.toFront(this._getContainer()),this._setAutoZIndex(Math.min)),this},_setAutoZIndex:function(t){for(var e,i=this.getPane().children,o=-t(-1/0,1/0),n=0,s=i.length;n2*h?o.push(a):(o[o.length-1]=p,o.push(a))}else o.push(a)}else o.push(s),o.push(a);(i=[]).push(o[o.length-2]),i.push(o[o.length-1])}}if(t[0].x===t[t.length-1].x&&t[0].y===t[t.length-1].y&&1Math.PI&&(o-=2*Math.PI),o}if(t.length<3)return 1;for(var i=0,o={x:0,y:0},n={x:0,y:0},s=2;s=0?-1:1},SuperMap.Plot.PlottingUtil.isNear=function(t,e){return e||(e=1e-18),t-e},SuperMap.Plot.PlottingUtil.equalFuzzy=function(t,e,i){return i||(i=1e-18),Math.abs(t-e)<=i},SuperMap.Plot.PlottingUtil.intersectLines=function(t,e,i,o){var n={};if(n.isIntersectLines=!1,t.x===e.x&&t.y===e.y||i.x===o.x&&i.y===o.y)return n;var s=e.x-t.x,a=e.y-t.y,l=o.x-i.x,r=o.y-i.y,u=s*r-l*a;if(this.isNear(u))return n;var p=(s*(t.y-i.y)-a*(t.x-i.x))/u,h=new SuperMap.Geometry.Point(0,0);return h.x=p*l+i.x,h.y=p*r+i.y,n.isIntersectLines=!0,n.intersectPoint=h,n},SuperMap.Plot.PlottingUtil.getEnvelopePoints=function(t){function e(t,e,i){for(var o=t.components[0].components,n=new SuperMap.Geometry.Point(0,0),s=0;s=0;s--)e.push(t[n][s]);t.splice(n,1);var a=i(t,e);if(void 0!==a&&0!==a.length)return a}return e}if(SuperMap.Util.isArray(t)||(t=[t]),0===t.length)return[];if(1===t.length)return t[0];for(n=0;n2&&d.push(f)}return d},SuperMap.Plot.PlottingUtil.isRight=function(t,e,i){var o=e,n=i,s=e,a=t;return(n.x-o.x)*(a.y-s.y)-(a.x-s.x)*(n.y-o.y)<0},SuperMap.Plot.PlottingUtil.radian=function(t,e){var i,o,n=0;return t instanceof L.LatLng&&e instanceof L.LatLng?(i=e.lng-t.lng,o=e.lat-t.lat):(i=e.x-t.x,o=e.y-t.y),(n=Math.atan2(o,i))<0&&(n+=2*Math.PI),n},SuperMap.Plot.PlottingUtil.findBisectorPoint=function(t,e,i,o){var n=this.radian(e,t),s=(n+this.radian(e,i))/2,a=Math.cos(s-n+Math.PI/2),l=o;this.isNear(a,.15)||(l=o/a);var r=e.x+l*Math.cos(s),u=e.y+l*Math.sin(s);return new SuperMap.Geometry.Point(r,u)},SuperMap.Plot.PlottingUtil.findPoint=function(t,e,i,o){if(t===e||Math.abs(i)<1e-18)return t;var n=this.radian(t,e)+o*Math.PI/180,s=t.x+i*Math.cos(n),a=t.y+i*Math.sin(n);return new SuperMap.Geometry.Point(s,a)},SuperMap.Plot.PlottingUtil.isSameQuadrant=function(t,e,i,o){var n=(e.x-t.x)*(o.x-i.x),s=(e.y-t.y)*(o.y-i.y);return!(Math.abs(n)<1e-18&&Math.abs(s)<1e-18)&&((n>0||Math.abs(n)<1e-18)&&(s>0||Math.abs(s)<1e-18))},SuperMap.Plot.PlottingUtil.isCross=function(t,e,i,o){var n=new SuperMap.Geometry.Point(0,0);return!(!this.intersectLineSegs(t,e,i,o,n)||n==t||n===e||n===i||n==o)},SuperMap.Plot.PlottingUtil.intersectLineSegs=function(t,e,i,o,n){if(this.equalFuzzy(t.x,e.x)&&SuperMap.Plot.PlottingUtil.equalFuzzy(t.y,e.y))return n.x=t.x,n.y=t.y,!1;if(this.equalFuzzy(i.x,o.x)&&this.equalFuzzy(i.y,o.y))return n.x=i.x,n.y=i.y,!1;var s=0,a=0;if(s=t.x>e.x?t.x:e.x,a=t.x1e-16&&o.x-s>1e-16||i.x-a<-1e-16&&o.x-a<-1e-16)return!1;if(s=t.y>e.y?t.y:e.y,a=t.y1e-16&&o.y-s>1e-16||i.y-a<-1e-16&&o.y-a<-1e-16)return!1;var l=e.x-t.x,r=e.y-t.y,u=o.x-i.x,p=o.y-i.y,h=t.x-i.x,c=t.y-i.y,y=l*p-u*r,g=y;if(Math.abs(l)>1e-18&&Math.abs(u)>1e-18&&(g/=l*u),Math.abs(g)<1e-18)return t===i?(n.x=t.x,n.y=t.y,!this.isSameQuadrant(t,e,i,o)):e===o?(n.x=e.x,n.y=e.y,!this.isSameQuadrant(t,e,i,o)):t===o?(n.x=t.x,n.y=t.y,this.isSameQuadrant(t,e,i,o)):e===i&&(n.x=e.x,n.y=e.y,this.isSameQuadrant(t,e,i,o));var d=(l*c-r*h)/y,f=(u*c-p*h)/y;return!(d<0&&(Math.abs(d*u)>1e-16||Math.abs(d*p)>1e-16))&&(!(d>1&&(Math.abs((d-1)*u)>1e-16||Math.abs((d-1)*p)>1e-16))&&(!(f<0&&(Math.abs(f*l)>1e-16||Math.abs(f*r)>1e-16))&&(!(f>1&&(Math.abs((f-1)*l)>1e-16||Math.abs((f-1)*r)>1e-16))&&(Math.abs(d)<1e-18?(n.x=i.x,n.y=i.y,!0):Math.abs(d-1)<1e-18?(n.x=o.x,n.y=o.y,!0):Math.abs(f)<1e-18?(n.x=t.x,n.y=t.y,!0):Math.abs(f-1)<1e-18?(n.x=e.x,n.y=e.y,!0):!(d<0&&(Math.abs(d*u)>1e-16||Math.abs(d*p)>1e-16))&&(!(d>1&&(Math.abs((d-1)*u)>1e-16||Math.abs((d-1)*p)>1e-16))&&(!(f<0&&(Math.abs(f*l)>1e-16||Math.abs(f*r)>1e-16))&&(!(f>1&&(Math.abs((f-1)*l)>1e-16||Math.abs((f-1)*r)>1e-16))&&(n.x=d*u+i.x,n.y=d*p+i.y,!0))))))))},SuperMap.Plot.PlottingUtil.parallel=function(t,e){var i=[];if(!t||null===t||t.length<2)return i;var o=!1;t.length>3&&t[0].x===t[t.length-1].x&&t[0].y===t[t.length-1].y&&(o=!0),o?(i[0]=this.findBisectorPoint(t[t.length-2],t[0],t[1],e),i[t.length-1]=i[0]):(i[0]=this.findPoint(t[0],t[1],e,90),i[t.length-1]=this.findPoint(t[t.length-1],t[t.length-2],-e,90));for(var n=t[0],s=t[1],a=t[1],l=1;l1&&(a=1);var l=(i.x-e.x)*a+e.x,r=(i.y-e.y)*a+e.y,u=(l-t.x)*(l-t.x)+(r-t.y)*(r-t.y);return Math.sqrt(u)},SuperMap.Plot.PlottingUtil.isCounterClockwise=function(t,e,i){return(i.x-e.x)*(t.y-e.y)-(t.x-e.x)*(i.y-e.y)>0},SuperMap.Plot.PlottingUtil.clearSamePts=function(t){for(var e=t.length,i=0;i=3*e);o+=3){var n=t[o].x,s=t[o].y,a=t[o+1].x,l=t[o+1].y,r=t[o+2].x,u=t[o+2].y,p=t[o+3].x,h=t[o+3].y;if(SuperMap.Plot.PlottingUtil.equalFuzzy(n,a,1e-10)&&SuperMap.Plot.PlottingUtil.equalFuzzy(s,l,1e-10)&&SuperMap.Plot.PlottingUtil.equalFuzzy(r,p,1e-10)&&SuperMap.Plot.PlottingUtil.equalFuzzy(u,h,1e-10))i.push(new SuperMap.Geometry.Point(n,s)),i.push(new SuperMap.Geometry.Point(r,u));else for(var c=0;c<=1;c+=.03125){var y,g,d,f,S=c*c,P=S*c;y=1-3*c+3*S-P,g=3*(c-2*S+P),d=3*(S-P),f=P;var m=new SuperMap.Geometry.Point(y*n+g*a+d*r+f*p,y*s+g*l+d*u+f*h);i.push(m)}}}return i},SuperMap.Plot.PlottingUtil.computeBeizerPoints=function(t,e,i){var o=SuperMap.Plot.PlottingUtil.polylineDistance(e),n=[],s=[],a=[];if(t){s.push(e[0]);var l=i[0],r=i[1],u=e[0].x+o*l,p=e[0].y+o*r;s.push(new SuperMap.Geometry.Point(u,p)),n.push(new SuperMap.Geometry.Point(u,p));for(f=1;f0?(p=e+(o-e)*d/g,h=i+(n-i)*d/g):(p=e,h=i),l.x=p+(r-p)*t,l.y=h+(u-h)*t,l},SuperMap.Plot.PlottingUtil.pointIsOnPolyLine=function(t,e,i){if(SuperMap.Plot.PlottingUtil.equalFuzzy(t.x,e.x)&&SuperMap.Plot.PlottingUtil.equalFuzzy(t.y,e.y)||SuperMap.Plot.PlottingUtil.equalFuzzy(t.x,i.x)&&SuperMap.Plot.PlottingUtil.equalFuzzy(t.y,i.y))return!0;var o=t.x-e.x,n=t.y-e.y,s=t.x-i.x,a=t.y-i.y,l=(o*s+n*a)/(Math.sqrt(o*o+n*n)*Math.sqrt(s*s+a*a));return!!SuperMap.Plot.PlottingUtil.equalFuzzy(l,-1,.1)},SuperMap.Plot.PlottingUtil.pointIsOnPolyLines=function(t,e){if(!e||null===e||0===e.length)return{isOnPolyLine:!1,index:-1};for(var i=!1,o=-1,n=0;nr&&(i=r,o=n)}}return o&&i<0&&(o=-1),{minDis:i,index:o}},SuperMap.Plot.PlottingUtil.findPointInLine=function(t,e,i){if(t===e||Math.abs(i)<1e-18)return t;var o=e.x-t.x,n=e.y-t.y,s=i/Math.sqrt(o*o+n*n),a=t.x+o*s,l=t.y+n*s;return new SuperMap.Geometry.Point(a,l)},SuperMap.Plot.PlottingUtil.operateControlPoints=function(t){var e=t,i=e.length;if(3==i){var o=new SuperMap.Geometry.Point(0,0);SuperMap.Plot.PlottingUtil.getTrapezoidPoints(1,t[0],t[1],t[2],o),e.push(o)}if(i>4&&(e.splice(4,i-4),i=e.length),SuperMap.Plot.PlottingUtil.pointIsRightToLine(t[0],t[1],e[2])){n=e[0];e[0]=e[1],e[1]=n}if(!SuperMap.Plot.PlottingUtil.pointIsRightToVerticle(e[0],e[1],e[2])){var n=e[2];e[2]=e[3],e[3]=n}return e},SuperMap.Plot.PlottingUtil.pointIsRightToLine=function(t,e,i){return(e.x-t.x)*(i.y-t.y)-(i.x-t.x)*(e.y-t.y)<0},SuperMap.Plot.PlottingUtil.pointIsRightToVerticle=function(t,e,i){var o=new SuperMap.Geometry.Point(.5*(e.x+t.x),.5*(e.y+t.y)),n=new SuperMap.Geometry.Point(e.x-t.x,e.y-t.y),s=new SuperMap.Geometry.Point(i.x-o.x,i.y-o.y);return n.x*s.x+n.y*s.y>0},SuperMap.Plot.PlottingUtil.linePnt=function(t,e,i){var o=SuperMap.Plot.PlottingUtil.distance(t,e);if(0==o)return t;var n=i/o;return SuperMap.Plot.PlottingUtil.findPointOnLineByRatio(n,t,e)},SuperMap.Plot.PlottingUtil.findPointOnLineByRatio=function(t,e,i){var o=new SuperMap.Geometry.Point(0,0);return o.x=e.x+(i.x-e.x)*t,o.y=e.y+(i.y-e.y)*t,o},SuperMap.Plot.PlottingUtil.rotateAngle=function(t,e,i){var o=e,n=Math.cos(o),s=Math.sin(o),a=i.x-t.x,l=i.y-t.y;return i.x=a*n-l*s+t.x,i.y=a*s+l*n+t.y,i},SuperMap.Plot.PlottingUtil.resize=function(t,e,i){return i.x=t.x+e*(i.x-t.x),i.y=t.y+e*(i.y-t.y),i},SuperMap.Plot.PlottingUtil.findPointInPolyLine=function(t,e){if(e<0||t.length<2)return{index:-1,pt:null};if(Math.abs(e)<1e-18)return{index:0,pt:t[0]};for(var i=0,o=0;oe||SuperMap.Plot.PlottingUtil.equalFuzzy(i,e)){var n=i-e,s=t[o+1],a=t[o],l=n/SuperMap.Plot.PlottingUtil.distance(s,a),r=new SuperMap.Geometry.Point(0,0);return r.x=s.x+(a.x-s.x)*l,r.y=s.y+(a.y-s.y)*l,{index:o,pt:r}}return{index:-1,pt:null}},SuperMap.Plot.PlottingUtil.polylineDistance=function(t){if(0===t.length)return 0;for(var e=0,i=0;i=t.x&&e.y>=t.y?1:e.xt.y?2:e.x<=t.x&&e.y<=t.y?3:4,n=i.x>t.x&&i.y>t.y?1:i.xt.y?2:i.xs&&l>s)&&(r=0);else switch(o){case 1:(4==n&&as)&&(r=0);break;case 2:(1==n&&as)&&(r=0);break;case 3:(2==n&&as)&&(r=0);break;case 4:(3==n&&as)&&(r=0)}var u=new SuperMap.Geometry.Point(0,0);return SuperMap.Plot.PlottingUtil.equalFuzzy(s-1.7976931348623157e308,0)?(u.x=t.x,u.y=e.y):SuperMap.Plot.PlottingUtil.equalFuzzy(s,0)?(u.x=e.x,u.y=t.y):(u.x=(s*(e.y-t.y)+s*s*t.x+e.x)/(s*s+1),u.y=t.y+s*(u.x-t.x)),{isOnline:1===r,projectPoint:u}},SuperMap.Plot.PlottingUtil.coordinateTrans=function(t,e,i){var o=SuperMap.Plot.PlottingUtil.distance(new SuperMap.Geometry.Point(0,0),e),n=SuperMap.Plot.PlottingUtil.radian(new SuperMap.Geometry.Point(0,0),e)+i*Math.PI/180,s=o*Math.cos(n)+t.x,a=o*Math.sin(n)+t.y;return new SuperMap.Geometry.Point(s,a)},SuperMap.Plot.PlottingUtil.triangleHeightAndPartBottomLen=function(t,e,i){var o,n,s=(i.x-e.x)*(i.x-e.x)+(i.y-e.y)*(i.y-e.y),a=Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y)),l=Math.sqrt((t.x-i.x)*(t.x-i.x)+(t.y-i.y)*(t.y-i.y));if(0==l||0==a)o=0,n=0;else if(0==s)o=a,n=0;else{var r=(a*a+l*l-s)/2/a/l,u=0;r>=1?(r=1,u=0):u=Math.sqrt(1-r*r),o=l*r,n=l*u}return{dLen1:o,dLen2:n}},SuperMap.Plot.PlottingUtil.paraLine=function(t,e,i){var o=[];if(2>t.length)return o;if(i){r=t[1].clone();r=SuperMap.Plot.PlottingUtil.rotateAngle(t[0],Math.PI/2,r),o.push(SuperMap.Plot.PlottingUtil.linePnt(t[0],r,e));for(u=1;uMath.PI/2?l-Math.PI/2:Math.PI/2-l;y=e/Math.cos(a);r=t[u+1].clone(),r=SuperMap.Plot.PlottingUtil.rotateAngle(t[u],l,r),o.push(SuperMap.Plot.PlottingUtil.linePnt(t[u],r,y))}r=t[t.length-2].clone(),r=SuperMap.Plot.PlottingUtil.rotateAngle(t[t.length-1],-1*Math.PI/2,r),o.push(SuperMap.Plot.PlottingUtil.linePnt(t[t.length-1],r,e))}else{var r=t[1].clone();r=SuperMap.Plot.PlottingUtil.rotateAngle(t[0],-Math.PI/2,r),o.push(SuperMap.Plot.PlottingUtil.linePnt(t[0],r,e));for(var u=1;uMath.PI/2?c-Math.PI/2:Math.PI/2-c;var y=e/Math.cos(h);r=t[u-1].clone(),r=SuperMap.Plot.PlottingUtil.rotateAngle(t[u],c,r),o.push(SuperMap.Plot.PlottingUtil.linePnt(t[u],r,y))}r=t[t.length-2].clone(),r=SuperMap.Plot.PlottingUtil.rotateAngle(t[t.length-1],Math.PI/2,r),o.push(SuperMap.Plot.PlottingUtil.linePnt(t[t.length-1],r,e))}return o},SuperMap.Plot.PlottingUtil.circlePoint=function(t,e,i,o){o*=Math.PI/180;var n=t.x+e*Math.cos(o),s=t.y+i*Math.sin(o);return new SuperMap.Geometry.Point(n,s)},SuperMap.Plot.PlottingUtil.getPolygonCenterPt=function(t){if(!t||null===t||0===t.length)return null;for(var e=0,i=0,o=0;oa.y?s.y:a.y;e.yr||(e.y-s.y)*(a.x-s.x)/(a.y-s.y)+s.x>e.x&&i++}}return i%2==1},SuperMap.Plot.PlottingUtil.projectPtOnPolyLine=function(t,e){if(2>e.length)return{index:-1,pt:null};for(var i=0;i0?0:1}},SuperMap.Plot.PlottingUtil.isSamePt=function(t,e){return!(!SuperMap.Plot.PlottingUtil.equalFuzzy(t.x,e.x)||!SuperMap.Plot.PlottingUtil.equalFuzzy(t.y,e.y))},SuperMap.Plot.PlottingUtil.getPtsIndexByDistance=function(t,e){var i=SuperMap.Plot.PlottingUtil.findPointInPolyLine(e,t);return{index:i.index,pts:i.pt,bfind:-1!==i.index}},SuperMap.Plot.PlottingUtil.ptInBounds=function(t,e){return t.x>e.left&&t.xe.bottom},SuperMap.Plot.PlottingUtil.InnerAngle=function(t,e,i){if(t==e||t==i)return 0;var o=SuperMap.Plot.PlottingUtil.distance(t,e),n=SuperMap.Plot.PlottingUtil.distance(t,i),s=SuperMap.Plot.PlottingUtil.distance(e,i),a=(o*o+n*n-s*s)/(2*o*n);return a>1&&SuperMap.Plot.PlottingUtil.equalFuzzy(a,1)?a=1:a<1&&SuperMap.Plot.PlottingUtil.equalFuzzy(a,-1)&&(a=-1),Math.acos(a)},SuperMap.Plot.PlottingUtil.plumbLineLen=function(t,e,i){return SuperMap.Plot.PlottingUtil.distance(t,e)*Math.sin(SuperMap.Plot.PlottingUtil.InnerAngle(e,t,i))},SuperMap.Plot.PlottingUtil.paraPolygon=function(t,e,i){var o=[],n=SuperMap.Plot.PlottingUtil.clonePoints(t),s=n.length;if(s<2)return o;r=new SuperMap.Geometry.Point(0,0);if(i){if(s<3)r=n[1].clone(),SuperMap.Plot.PlottingUtil.rotateAngle(n[0],Math.PI,r),o.push(SuperMap.Plot.PlottingUtil.linePnt(n[0],r,e));else{for(var a=SuperMap.Plot.PlottingUtil.radian(n[0],n[1]),l=(p=SuperMap.Plot.PlottingUtil.radian(n[0],n[n.length-1]))-a;l<0;)l+=2*Math.PI;h=(c=l/2)>Math.PI/2?c-Math.PI/2:Math.PI/2-c;y=e/Math.cos(h);r=n[1].clone(),r=SuperMap.Plot.PlottingUtil.rotateAngle(n[0],c,r),o.push(SuperMap.Plot.PlottingUtil.linePnt(n[0],r,y))}for(u=1;uMath.PI/2?c-Math.PI/2:Math.PI/2-c;y=e/Math.cos(h);r=n[u+1].clone(),r=SuperMap.Plot.PlottingUtil.rotateAngle(n[u],c,r),o.push(SuperMap.Plot.PlottingUtil.linePnt(n[u],r,y))}if(s<3)r=n[s-2].clone(),SuperMap.Plot.PlottingUtil.rotateAngle(n[s-1],0,r),o.push(SuperMap.Plot.PlottingUtil.linePnt(n[s-1],r,e));else{for(var a=SuperMap.Plot.PlottingUtil.radian(n[s-1],n[0]),l=(p=SuperMap.Plot.PlottingUtil.radian(n[s-1],n[s-2]))-a;l<0;)l+=2*Math.PI;h=(c=l/2)>Math.PI/2?c-Math.PI/2:Math.PI/2-c;y=e/Math.cos(h);r=n[0].clone(),r=SuperMap.Plot.PlottingUtil.rotateAngle(n[s-1],c,r),o.push(SuperMap.Plot.PlottingUtil.linePnt(n[s-1],r,y))}}else{if(s<3){var r=n[1].clone();SuperMap.Plot.PlottingUtil.rotateAngle(n[0],0,r),o.push(SuperMap.Plot.PlottingUtil.linePnt(n[0],r,e))}else{for(var a=SuperMap.Plot.PlottingUtil.radian(n[0],n[1]),l=(p=SuperMap.Plot.PlottingUtil.radian(n[0],n[s-1]))-a;l<0;)l+=2*Math.PI;h=(c=Math.PI-l/2)>Math.PI/2?c-Math.PI/2:Math.PI/2-c;y=e/Math.cos(h);r=n[s-1].clone(),r=SuperMap.Plot.PlottingUtil.rotateAngle(n[0],c,r),o.push(SuperMap.Plot.PlottingUtil.linePnt(n[0],r,y))}for(var u=1;uMath.PI/2?c-Math.PI/2:Math.PI/2-c;y=e/Math.cos(h);r=n[u-1].clone(),r=SuperMap.Plot.PlottingUtil.rotateAngle(n[u],c,r),o.push(SuperMap.Plot.PlottingUtil.linePnt(n[u],r,y))}if(s<3)r=n[s-2].clone(),SuperMap.Plot.PlottingUtil.rotateAngle(n[s-1],Math.PI,r),o.push(SuperMap.Plot.PlottingUtil.linePnt(n[s-1],r,e));else{for(var a=SuperMap.Plot.PlottingUtil.radian(n[s-1],n[0]),p=SuperMap.Plot.PlottingUtil.radian(n[s-1],n[s-2]),l=p-a;l<0;)l+=2*Math.PI;var h,c=Math.PI-l/2;h=c>Math.PI/2?c-Math.PI/2:Math.PI/2-c;var y=e/Math.cos(h);r=n[s-2].clone(),r=SuperMap.Plot.PlottingUtil.rotateAngle(n[s-1],c,r),o.push(SuperMap.Plot.PlottingUtil.linePnt(n[s-1],r,y))}}return o},SuperMap.Plot.PlottingUtil.getOutRectangleDis=function(t){if(2>t.length)return 0;for(var e=t[0].x,i=t[0].x,o=t[0].y,n=t[0].y,s=1;st[s].x&&(i=t[s].x),ot[s].y&&(n=t[s].y);return SuperMap.Plot.PlottingUtil.distance(new SuperMap.Geometry.Point(e,o),new SuperMap.Geometry.Point(i,n))},SuperMap.Plot.PlottingUtil.clonePoints=function(t){var e=[];if(void 0===t||null===t)return e;if(SuperMap.Util.isArray(t)||(t=[t]),t&&null!==t)for(var i=0;i=2&&t.length=2;p--)h.push(i[p]);h.push({x:c.x,y:c.y,z:f});var P=[];this.ComputeBeizerZValueByDis(h,a,P);for(var m=[],b=0;b0&&P.length>0&&m.length>0){u=(u=(u=(u=[]).concat(S)).concat(m)).concat(P),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,u,{surroundLineFlag:!1});for(var M=[],p=0;p=0;g--)e.push(u[g]),o.push(u[g])}return{shapePts:e,leftBodyPts:i,rightBodyPts:o,arrowHeadPts:n}}},{key:"updateScalePoints",value:function(t){var e=t.length,i=[];if(!(e<3)){var o=SuperMap.Plot.PlottingUtil.polylineDistance(t);if(!SuperMap.Plot.PlottingUtil.equalFuzzy(o,0)){var n=this.operateCtrlPts(t);e=n.length,e--;for(var s=[],a=0;a0&&P>0){var b=1/(d-g[2].x),L=-1/(f-g[2].y),M=1*g[2].y/(f-g[2].y)-1*g[2].x/(d-g[2].x);m=Math.abs(b*g[0].x+L*g[0].y+M)/Math.sqrt(b*b+L*L)}else P<=1e-4?m=Math.abs(f-g[1].y):S<=1e-4&&(m=Math.abs(d-g[1].x));var v=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(m,g[2],new SuperMap.Geometry.Point(d,f)),_=SuperMap.Plot.PlottingUtil.pointIsRightToLine(g[1],g[2],g[0]);_?(n[1]=g[1],s[1]=g[0]):(n[1]=g[0],s[1]=g[1]),g[1]=new SuperMap.Geometry.Point((g[0].x+g[1].x)/2,(g[0].y+g[1].y)/2);var T=Math.sqrt((v.pntLeft.x-v.pntRight.x)*(v.pntLeft.x-v.pntRight.x)+(v.pntLeft.y-v.pntRight.y)*(v.pntLeft.y-v.pntRight.y))*this.sv_AtWidthDivAwWidth,x=(o=T*this.sv_AtLenDivAtWidth)*c;SuperMap.Plot.PlottingUtil.equalFuzzy(h,0)||(x=(o=t*h)*c);var O=SuperMap.Plot.PlottingUtil.distance(g[p],g[p-1]),A=2*o;O0&&(g[p]=SuperMap.Plot.PlottingUtil.getIncentrePointOnSegmentByScale(o,g[p],C)),N=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(x,g[p+1],g[p]),(_=SuperMap.Plot.PlottingUtil.pointIsRightToLine(g[p],g[p+1],N.pntLeft))?(s[p]=new SuperMap.Geometry.Point(N.pntLeft.x,N.pntLeft.y),n[p]=new SuperMap.Geometry.Point(N.pntRight.x,N.pntRight.y)):(s[p]=new SuperMap.Geometry.Point(N.pntRight.x,N.pntRight.y),n[p]=new SuperMap.Geometry.Point(N.pntLeft.x,N.pntLeft.y));var G;for(E=2;E0&&(this.latLngs=L.Util.isArray(i)?i:[i]),SuperMap.Util.extend(this,o),void 0!==this.uuid&&null!==this.uuid||(this.uuid=SuperMap.PlotUtil.generateUuid())},destroy:function(){this.libID=null,this.code=null,this.symbolType=null,this.symbolName=null,this.uuid=null,this.associatedUuid=null,this.minEditPts=null,this.maxEditPts=null,this.latLngs=null,this.components=[]},onAdd:function(t){this.layer=t,this._renderer=t._renderer,this._map=t._map,this.redraw(),o.PlottingObjectDrag&&(this.dragging||(this.dragging=new o.PlottingObjectDrag(this)))},_clearComponents:function(){for(var t=0;t=this.minEditPts){t=new L.Polygon(this.getLatLngs(),{smoothFactor:.05});this._addComponents(t),t.setStyle(this.style)}else if(this.getLatLngs().length>=2&&this.getLatLngs().length=s&&h<=l||s>l&&h<=s&&h>=l)){y=-1;break}r<=p||n!==a&&(rMath.max(n,a))||(s=s&&hl&&h=l)&&++y}else if(h===s&&(n<=a&&p>=n&&p<=a||n>=a&&p<=n&&p>=a)){y=-1;break}return-1===y?1:!!(1&y)},_relationToLayer:function(t){var e=2,i=[];if(t instanceof L.Polygon)(i=L.Util.latLngsToSuperMapPoints(t.getLatLngs()[0])).push(i[0].clone());else if(t instanceof L.Polyline)i=L.Util.latLngsToSuperMapPoints(t.getLatLngs());else if(t instanceof n.Text){var o=t.getBounds();i.push(new SuperMap.Geometry.Point(o.left,o.top)),i.push(new SuperMap.Geometry.Point(o.left,o.bottom)),i.push(new SuperMap.Geometry.Point(o.right,o.bottom)),i.push(new SuperMap.Geometry.Point(o.top,o.right))}if(0===i.length)e=2;else{var s=this._containsPoint(i[0]);s&&(e=1);for(l=1;l1&&(o.push(n),n=[]);0!==n.length&&o.push(n);var r=o.length;if(!0===e&&r>1&&SuperMap.Plot.PlottingUtil.equalFuzzy(o[0][0].x,o[r-1][o[r-1].length-1].x)&&SuperMap.Plot.PlottingUtil.equalFuzzy(o[0][0].y,o[r-1][o[r-1].length-1].y)){for(var u=0;u0;)if(1===o.length)a.push(o[0]),o.splice(0,1);else{for(var l=0,r=SuperMap.Plot.PlottingUtil.distance(t,o[0]),u=1;uthis.maxScale?this.dScale=this.maxScale:this.dScalethis.maxScale?this.dScale=this.maxScale:this.actualScalethis.symbolSize.h?this.symbolSize.w:this.symbolSize.h;this.style.weight=Math.round(i/10),this.style.weight>=this.weight&&(this.style.weight=this.weight),this.style.weight<=.5&&(this.style.weight=.5)}else!0===this.scaleStrokeWidth&&(this.scaleStrokeWidth=!1),this.style.weight=this.strokeWidth;if(this.prevStrokeWidth=this.style.weight,this.style.fontSize=this.style.fontSize*this._map.getZoomScale(this._map.getZoom(),this.fromZoom),this.prevFontSize=this.style.fontSize,0!==this.textContent.length&&8===this.annotationPosition){var o=this.middleMarkBounds.scale(this.dScale*this.initialScale,this.anchorPoint),n=96*o.getWidth()/25.4/10,a=96*o.getHeight()/25.4/10;this.components[this._annotationId].options.graphicWidth=n,this.components[this._annotationId].options.graphicHeight=a}for(var l in this.components)l===this._annotationId&&this.components[l]instanceof s.Text?this.components[l].options.fontSize=this.style.fontSize:l!==this._annotationId&&this.components[l]instanceof s.Text?this.components[l].options.fontSize=t*(this.components[l].options.fontSize/this.prevScale/this.initialScale):l!==this._annotationId&&!0!==this.components[l].isLeadLine&&(this.components[l].options.weight=this.style.weight);for(var r=0;rthis.symbolSizeInLib.w&&(e=this.symbolSizeInLib.h),0===e||0===t.dotSymbolSize)this.symbolSize.w=this.symbolSizeInLib.w,this.symbolSize.h=this.symbolSizeInLib.h;else if(0!==this.symbolSize.w||0===this.symbolData.symbolSize.x||0!==this.symbolSize.h||0===this.symbolData.symbolSize.y||this.minEditPts)if(0!==this.symbolSize.w||0!==this.symbolSize.h);else{var i=t.dotSymbolSize/e;this.symbolSize.w=i*this.symbolSizeInLib.w,this.symbolSize.h=i*this.symbolSizeInLib.h}else{this.symbolSize.w=96*this.symbolData.symbolSize.x/25.4/10,this.symbolSize.h=96*this.symbolData.symbolSize.y/25.4/10;var o=this.symbolSize.w/this.dScale/this.symbolSizeInLib.w,n=this.symbolSize.h/this.dScale/this.symbolSizeInLib.h;this.initialScale!==o?this.initialScale=o:this.initialScale!==n&&(this.initialScale=n),this.symbolSize.w=this.initialScale*this.dScale*this.symbolSizeInLib.w,this.symbolSize.h=this.initialScale*this.dScale*this.symbolSizeInLib.h}}var s=this.symbolSizeInLib.w,a=this.symbolSize.w;this.symbolSizeInLib.w45&&r<135||r>225&&r<315){var u=L.point(e.x-this.style.weight/2,e.y),p=L.point(e.x+this.style.weight/2,e.y);n=this._map.layerPointToLatLng(u),s=this._map.layerPointToLatLng(p)}else{var u=L.point(e.x,e.y-this.style.weight/2),p=L.point(e.x,e.y+this.style.weight/2);n=this._map.layerPointToLatLng(u),s=this._map.layerPointToLatLng(p)}o=[this.getLatLngs()[0],n,s];this._createAndDrawLayer(32,o,{surroundLineFlag:!1,lineWidthLimit:!0,weight:0,fillLimit:!0,fill:!0}).isLeadLine=!0}},_handleAnnotation:function(){-1!==this._annotationId&&(this.components[this._annotationId].removeEventParent(this),this.components[this._annotationId].onRemove(),delete this.components[this._annotationId],this.components.splice(this._annotationId,1),this._annotationId=-1),this.textContent=SuperMap.PlotUtil.trim(this.textContent);var t=this.getBounds();if(this.textContent&&null!==this.textContent&&0!==this.textContent.length&&null!==t&&t.isValid()){var e=SuperMap.PlotUtil.cloneObject(this.style),i=this.space*this.dScale,o=null;if(0===this.annotationPosition){e.labelAlign="rb";n=L.latLng(t.getNorth(),t.getWest());(s=this._map.latLngToLayerPoint(n)).x-=i,o=this._map.layerPointToLatLng(s)}else if(1===this.annotationPosition){e.labelAlign="rt";n=L.latLng(t.getSouth(),t.getWest());(s=this._map.latLngToLayerPoint(n)).x-=i,o=this._map.layerPointToLatLng(s)}else if(2===this.annotationPosition){e.labelAlign="lb";n=L.latLng(t.getNorth(),t.getEast());(s=this._map.latLngToLayerPoint(n)).x+=i,o=this._map.layerPointToLatLng(s)}else if(3===this.annotationPosition){e.labelAlign="lt";n=L.latLng(t.getSouth(),t.getEast());(s=this._map.latLngToLayerPoint(n)).x+=i,o=this._map.layerPointToLatLng(s)}else if(4===this.annotationPosition){e.labelAlign="cb";n=L.latLng(t.getNorth(),(t.getWest()+t.getEast())/2);(s=this._map.latLngToLayerPoint(n)).y-=i,o=this._map.layerPointToLatLng(s)}else if(5===this.annotationPosition){e.labelAlign="ct";n=L.latLng(t.getSouth(),(t.getWest()+t.getEast())/2);(s=this._map.latLngToLayerPoint(n)).y+=i,o=this._map.layerPointToLatLng(s)}else if(6===this.annotationPosition){e.labelAlign="rm";n=L.latLng((t.getSouth()+t.getNorth())/2,t.getWest());(s=this._map.latLngToLayerPoint(n)).x-=i,o=this._map.layerPointToLatLng(s)}else if(7===this.annotationPosition){e.labelAlign="lm";var n=L.latLng((t.getSouth()+t.getNorth())/2,t.getEast()),s=this._map.latLngToLayerPoint(n);s.x+=i,o=this._map.layerPointToLatLng(s)}else if(8===this.annotationPosition&&this.symbolData.middleMarkExist){var a=this.middleMarkBounds.scale(this.dScale*this.initialScale,this.anchorPoint),l=new SuperMap.Geometry.Point((a.left+a.right)/2,(a.top+a.bottom)/2);if(this.negativeImage){var r=SuperMap.Plot.PlottingUtil.projectPoint(l,new SuperMap.Geometry.Point(this.anchorPoint.x,100),new SuperMap.Geometry.Point(this.anchorPoint.x,this.anchorPoint.y));SuperMap.Plot.PlottingUtil.rotateAngle(r,Math.PI,l)}l.x-=this.anchorPoint.x,l.y-=this.anchorPoint.y;var u=this.dRotate*(Math.PI/180);SuperMap.Plot.PlottingUtil.rotateAngle(new SuperMap.Geometry.Point(0,0),u,l);var p=this._map.latLngToLayerPoint(this.getLatLngs()[0]);!0===this.positionOffset&&(p.x+=this.positionOffsetX*this.dScale,p.y+=this.positionOffsetY*this.dScale);var h=96*a.getWidth()/25.4/10,c=96*a.getHeight()/25.4/10;e.graphicWidth=h,e.graphicHeight=c,o=this._transitionPoint(l,p),this.positionOffset}if(8===this.annotationPosition&&this.symbolData.middleMarkExist){e.rotation=-this.dRotate,e.labelAlign="cm",e.graphicOpacity=1,e.fontColor=this.style.fontColor,e.fontFamily=this.style.fontFamily,e.fontWeight=this.style.fontWeight,e.fontStyle=this.style.fontStyle,e.externalGraphic=this._getTextGraphic(this.textContent,e);var y={externalGraphic:e.externalGraphic,graphicWidth:e.graphicWidth,graphicHeight:e.graphicHeight,rotation:-this.dRotate},g=L.supermap.plotting.pointImage([o],y);this._annotationId=this.components.length,this._addComponents(g)}else 8!==this.annotationPosition&&(void 0!==this.prevFontSize&&this.prevFontSize!==this.style.fontSize&&(this.fontSize=this.style.fontSize/this.dScale/this.initialScale,this.prevFontSize=this.style.fontSize),void 0!==this.fontSize?(this.style.fontSize=this.fontSize*this.dScale*this.initialScale,this.prevFontSize=this.style.fontSize):(this.fontSize=this.style.fontSize/this.dScale/this.initialScale,this.prevFontSize=this.style.fontSize),e.fontSize=this.style.fontSize,e.fontSizeLimit=!1,e.labelRotation=0,this._annotationId=this.components.length,(g=this._createAndDrawLayer(34,[o],e,this.textContent)).isAnnotation=!0)}},_getTextGraphic:function(t,e){var i=SuperMap.PlotUtil.cloneObject(e);i.fontPercent=100,i.fontSpace=0,void 0!==this.flagTextSize?i.fontSize=this.flagTextSize:i.fontSize=60,i.labelAlign="cm";var o=document.createElement("canvas"),n=SuperMap.PlotUtil.getTextWidth(i,t);o.width=n+20,o.height=parseFloat(i.fontSize)+10,document.body.appendChild(o);var s=o.getContext("2d");s.fillStyle=i.fontColor,s.globalAlpha=i.fontOpacity||1;var a=[i.fontStyle?i.fontStyle:"normal","normal",i.fontWeight?i.fontWeight:"normal",i.fontSize?new String(i.fontSize)+"px":"1em",i.fontFamily?i.fontFamily:"sans-serif"].join(" ");if(s.fillText)s.font=a,s.textAlign="center",s.textBaseline="middle",s.fillText(t,o.width/2,o.height/2);else if(s.mozDrawText){s.mozTextStyle=a;var l=-.5;L.PlotCanvas.LABEL_FACTOR[e.labelAlign[0]],null==l&&(l=-.5);var r=-.5;L.PlotCanvas.LABEL_FACTOR[e.labelAlign[1]],null==r&&(r=-.5);var u=[0,0],p=s.mozMeasureText("xx");u[1]+=p*(1+r*numRows);var h=u[0]+l*s.mozMeasureText(t),c=u[1]+p;s.translate(h,c),s.mozDrawText(t),s.translate(-h,-c)}var y=o.toDataURL("image/png","image/octet-stream");return document.body.removeChild(o),y},_transitionPoint:function(t,e){var i=e.x+t.x*(96/254),o=e.y-t.y*(96/254);return this._map.layerPointToLatLng(L.point(i,o))},_resizeCells:function(t,e){for(var i in this.components)L.Util.resizeLatLngs(this.components[i].getLatLngs(),e,t),this.components[i].setLatLngs(this.components[i].getLatLngs()),this._renderer instanceof L.Canvas&&(!0!==this.components[i].options.fill||"LINEAR"!==this.style.fillGradientMode&&"RADIAL"!==this.style.fillGradientMode||this._computeGradientInCanvas(this.components[i],this.components[i].options,this.style))},_rotate:function(t,e){o.GraphicObject.prototype._rotate.call(this,t,e),this.dRotate+=t},_resize:function(t,e){o.GraphicObject.prototype._resize.call(this,t,e),this.initialScale*=t,this.symbolSize.w=this.initialScale*this.dScale*this.symbolSizeInLib.w,this.symbolSize.h=this.initialScale*this.dScale*this.symbolSizeInLib.h,this.style.fontSize=this.fontSize*this.dScale*this.initialScale,this.prevFontSize=this.style.fontSize}}),l=e.dotSymbol=function(t,e,i,o){return new a(t,e,i,o)};L.supermap.plotting.dotSymbol=l},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.flagGroup=e.FlagGroup=void 0;var o=i(7),n=e.FlagGroup=o.GroupObject.extend({ratio:null,scalePoints:null,scaleValues:null,initialize:function(t,e,i,n){o.GroupObject.prototype.initialize.call(this,t,e,i,n),this.libID=0,this.code=SuperMap.Plot.SymbolType.FLAGGROUP,this.symbolType=SuperMap.Plot.SymbolType.FLAGGROUP,this.symbolName="多旗",n.subObjects&&(this.subObjects=n.subObjects),null===this.ratio&&(this.ratio=.8)},destroy:function(){o.GroupObject.prototype.destroy.call(this),this.ratio=[]},setRotate:function(t){isNaN(t)||(this.dRotate+=t,this.redraw())},redraw:function(){if("none"!==this.style.display){if(L.Util.isArray(this.ratio)||(this.ratio=[this.ratio]),0===this.components.length&&0!==this.subObjects.length)for(var t=0,e=this.subObjects.length;t=0?t.negativeImage?new L.latLng(i.getNorth(),i.getEast()):new L.latLng(i.getNorth(),i.getWest()):t.negativeImage?new L.latLng(i.getSouth(),i.getWest()):new L.latLng(i.getSouth(),i.getEast())},_projectPoint:function(t,e,i){if(e===i)return e;var o=new L.latLng(0,0),n=i.lng-e.lng,s=e.lat-i.lat,a=n*n,l=s*s,r=n*s,u=n*n+s*s;return o.lng=(r*(e.lat-t.lat)+e.lng*l+t.lng*a)/u,o.lat=(r*(e.lng-t.lng)+e.lat*a+t.lat*l)/u,o},_modifyPoint:function(t,e){if(0===t)this.subObjects[0].setLatLngs([e]);else{var i=this.subObjects[t-1].latLngs[0],o=this._calculateFlagTop(this.subObjects[t-1]);o=this._pointRotate(this.dRotate,this.subObjects[0].latLngs[0],o);var n=Math.sqrt(Math.pow(i.lng-o.lng,2)+Math.pow(i.lat-o.lat,2)),s=this._projectPoint(e,i,o),a=Math.sqrt(Math.pow(i.lng-s.lng,2)+Math.pow(i.lat-s.lat,2));this.ratio[t-1]=a/n}this.redraw()},_reView:function(){for(var t in this.components)this.components[t].scaleByMap=this.scaleByMap,this.components[t]._reView();this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)},_parseSymbolData:function(){o.GroupObject.prototype._parseSymbolData.call(this),this.symbolData&&(this.ratio=this.symbolData.ratio)},_setSymbolData:function(){o.GroupObject.prototype._setSymbolData.call(this),this.symbolData&&(this.symbolData.ratio=this.ratio)}}),s=e.flagGroup=function(t,e,i,o){return new n(t,e,i,o)};L.supermap.plotting.flagGroup=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LiterateSign=void 0;var o=i(2);e.LiterateSign=o.GraphicObject.extend({route:null,towardNode:null,startRouteNode:null,textAnchor:null,space:null,inner:null,setPosition:function(t){this.textPosition=t,this._calculateOffset()},initialize:function(t,e,i,n){this.symbolName="标牌文字",this.symbolType=SuperMap.Plot.SymbolType.LITERATESIGN,o.GraphicObject.prototype.initialize.call(this,t,e,i,n)},destroy:function(){this.space=null,this.inner=null,this.textAnchor=null,o.GraphicObject.prototype.destroy.call(this)},_calculateParts:function(){if(null!==this.startRouteNode&&null!==this.towardNode&&null!==this.towardNode.textContent&&0!==this.towardNode.textContent.length){for(var t=this.route._getNodeByUuid(this.towardNode.routeNodeId),e=new SuperMap.Geometry.Point(this.startRouteNode.x,this.startRouteNode.y),i=new SuperMap.Geometry.Point(t.x,t.y),o=L.latLng((e.y+i.y)/2,(e.x+i.x)/2),n=SuperMap.PlotUtil.getTextCount(this.towardNode.textContent[0]),s=1;s5?this.dScale=5:this.dScale<1&&(this.dScale=1),this.redraw()):this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues),this.fromZoom=this._map.getZoom()},_calculateOffset:function(){var t=this.route._getNodeByUuid(this.towardNode.routeNodeId),e=L.latLng((this.startRouteNode.y+t.y)/2,(this.startRouteNode.x+t.x)/2),i=this._map.latLngToLayerPoint(e),o=this._map.latLngToLayerPoint(this.latLngs[0]);this.towardNode.offsetX=o.x-i.x,this.towardNode.offsetY=o.y-i.y},_getTextContentsCells:function(t){var e=this.towardNode.textContent,i=(this.route._getNodeByUuid(this.towardNode.routeNodeId),this.dScale*this.style.fontSize+1),o=this._map.layerPointToLatLng(L.point(0,0)),n=this._map.layerPointToLatLng(L.point(i,0)),s=SuperMap.Plot.PlottingUtil.distance({x:o.lng,y:o.lat},{x:n.lng,y:n.lat}),a=s,l=s*t,r=e.length+2,u=[],p=r*a*.5,h=new Object;h.type=SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,h.positionPoints=[],h.positionPoints.push(new SuperMap.Geometry.Point(p,0)),h.positionPoints.push(new SuperMap.Geometry.Point(-2*a+p,.5*l)),h.positionPoints.push(new SuperMap.Geometry.Point(-r*a+p,.5*l)),h.positionPoints.push(new SuperMap.Geometry.Point(-r*a+p,-.5*l)),h.positionPoints.push(new SuperMap.Geometry.Point(-2*a+p,-.5*l)),h.style={surroundLineFlag:!1,fontSize:12},u.push(h);for(var c=1;c<=e.length;c++){var y=new Object;y.type=SuperMap.Plot.SymbolType.POLYLINESYMBOL,y.positionPoints=[],y.positionPoints.push(new SuperMap.Geometry.Point(-(c+1)*a+p,.5*l)),y.positionPoints.push(new SuperMap.Geometry.Point(-(c+1)*a+p,-.5*l)),y.style={surroundLineFlag:!1,fontSize:12},u.push(y);var g=new Object;g.type=SuperMap.Plot.SymbolType.TEXTSYMBOL,g.positionPoints=[],g.positionPoints.push(new SuperMap.Geometry.Point(-(.5+c+1)*a+p,0)),g.textContent=e[c-1],g.style={surroundLineFlag:!1,fontSize:12,fontFamily:"Microsoft YaHei"},g.style.labelAlign="cm",u.push(g)}var d=new SuperMap.Geometry.Point(-1.4*a+p,0),f=new Object;f.type=SuperMap.Plot.SymbolType.TEXTSYMBOL,f.positionPoints=[],f.positionPoints.push(d),f.textContent=this.towardNode.index.toString(),f.style={surroundLineFlag:!1,fontSize:12,fontSizeLimit:!0,fontFamily:"Microsoft YaHei"},f.style.labelAlign="cm",u.push(f);var S=new Object;return S.type=SuperMap.Plot.SymbolType.CIRCLESYMBOL,S.positionPoints=[],S.positionPoints.push(d),S.positionPoints.push(new SuperMap.Geometry.Point(d.x,.4*a)),S.style={surroundLineFlag:!1,fontSize:12},u.push(S),u}})},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RouteNode=void 0;var o=i(2),n=i(17);e.RouteNode=o.GraphicObject.extend({route:null,routeNode:null,_isFirstNode:function(){for(var t=0;t=this.minEditPts){if(this.routeNode.type===SuperMap.Plot.RouteNodeType.STANDBY){var t=SuperMap.Plot.RouteNodePrimitives.getRouteNodeCells(this.routeNode.type,!1,this.routeNode.rotate);this._transformSymbolCellsToGeometrys(t);var e=SuperMap.Plot.RouteNodePrimitives.getRouteNodeCells(this.routeNode.type,!0);this._transformSymbolCellsToGeometrys(e)}else{var i=SuperMap.Plot.RouteNodePrimitives.getRouteNodeCells(this.routeNode.type);this._transformSymbolCellsToGeometrys(i)}if(null!==this.routeNode.name&&""!==this.routeNode.name){var o=this.getBounds(),n=L.latLng(o.getNorth(),o.getEast()),s=this.routeNode.style;s.labelAlign="lb",this._createAndDrawLayer(SuperMap.Plot.SymbolType.TEXTSYMBOL,[n],s,this.routeNode.name).isNameLayer=!0}}},_transformSymbolCellsToGeometrys:function(t){for(var e=this._map.latLngToLayerPoint(this.latLngs[0]),i=0;i5?this.dScale=5:this.dScale<1&&(this.dScale=1),this.redraw()):this.redraw(),this.fromZoom=this._map.getZoom(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues))}})},function(t,e,i){"use strict";function o(t,e){var i=t.x-e.x,o=t.y-e.y;return Math.sqrt(i*i+o*o)}Object.defineProperty(e,"__esModule",{value:!0});var n={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},s={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},a=e.PlottingObjectDrag=L.Handler.extend({statics:{DRAGGING_CLS:"leaflet-plottingObject-draggable"},initialize:function(t){this._plottingObject=t,this._startPoint=null,this._dragStartPoint=null,this._mapDraggingWasEnabled=!1},addHooks:function(){this._plottingObject.on("mousedown",this._onDragStart,this),this._plottingObject.options.className=this._plottingObject.options.className?this._plottingObject.options.className+" "+a.DRAGGING_CLS:a.DRAGGING_CLS,this._plottingObject._plottingObject&&L.DomUtil.addClass(this._plottingObject._plottingObject,a.DRAGGING_CLS)},removeHooks:function(){this._plottingObject.off("mousedown",this._onDragStart,this),this._plottingObject.options.className=this._plottingObject.options.className.replace(new RegExp("\\s+"+a.DRAGGING_CLS),""),this._plottingObject._plottingObject&&L.DomUtil.removeClass(this._plottingObject._plottingObject,a.DRAGGING_CLS)},moved:function(){return this._plottingObject._dragMoved},_onDragStart:function(t){var e=t.originalEvent._simulated?"touchstart":t.originalEvent.type;this._mapDraggingWasEnabled=!1,this._startPoint=t.latlng.clone(),this._dragStartPoint=t.latlng.clone(),L.DomEvent.stop(t.originalEvent),L.DomUtil.addClass(this._plottingObject._map._container,"leaflet-dragging"),L.DomEvent.on(document,s[e],this._onDrag,this).on(document,n[e],this._onDragEnd,this),this._plottingObject._map.dragging.enabled()&&(this._plottingObject._map.dragging.disable(),this._mapDraggingWasEnabled=!0),this._plottingObject._dragMoved=!1},_onDrag:function(t){L.DomEvent.stop(t);var e=t.touches&&t.touches.length>=1?t.touches[0]:t,i=this._plottingObject._map.mouseEventToLatLng(e);if("touchmove"===t.type&&!this._plottingObject._dragMoved){var o=this._plottingObject._map.latLngToLayerPoint(this._dragStartPoint),n=this._plottingObject._map.mouseEventToContainerPoint(e);if(o.distanceTo(n)<=this._plottingObject._map.options.tapTolerance)return}var s=i.lat,a=i.lng,l=s-this._startPoint.lat,r=a-this._startPoint.lng;(l||r)&&(this._plottingObject._dragMoved||(this._plottingObject._dragMoved=!0,this._plottingObject.fire("dragstart",t)),this._startPoint.lat=s,this._startPoint.lng=a,this._plottingObject.fire("predrag",t),t.dLat=l,t.dLng=r,this._plottingObject.fire("drag",t))},_onDragEnd:function(t){var e=this._plottingObject._map.mouseEventToLatLng(t),i=this.moved();if(i&&L.DomEvent.stop(t),L.DomEvent.off(document,"mousemove touchmove",this._onDrag,this),L.DomEvent.off(document,"mouseup touchend",this._onDragEnd,this),i){this._plottingObject.fire("dragend",{distance:o(this._dragStartPoint,e)});var n=this._plottingObject._containsPoint;this._plottingObject._containsPoint=L.Util.falseFn,L.Util.requestAnimFrame(function(){L.DomEvent.skipped({type:"click"}),this._plottingObject._containsPoint=n},this)}this._startPoint=null,this._dragStartPoint=null,this._plottingObject._dragMoved=!1,this._mapDraggingWasEnabled&&(i&&L.DomEvent.fakeStop({type:"click"}),this._plottingObject._map.dragging.enable()),i&&(this._plottingObject.moveend=!0)}})},function(t,e,i){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var i=0;i255?e++:i++;return e+i/2},SuperMap.PlotUtil.toJSON=function(t){var e=t;if(null==e)return null;switch(e.constructor){case String:return e='"'+e.replace(/(["\\])/g,"\\$1")+'"',e=e.replace(/\n/g,"\\n"),e=e.replace(/\r/g,"\\r"),e=e.replace("<","<"),e=e.replace(">",">"),e=e.replace(/%/g,"%2525"),e=e.replace(/&/g,"%26");case Array:for(var i=[],n=0,s=e.length;n0?"{"+i.join(",")+"}":"{}"}return e.toString()}},SuperMap.PlotUtil.copyFeature=function(t){var e=null;if(null!==t&&t.geometry){var i=t.geometry.clone();e=new SuperMap.Feature.Vector(i),t.style&&(e.style=SuperMap.Util.copyAttributes(e.style,t.style)),i.feature=e,i.calculateParts()}return e}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DrawGraphicObject=void 0;var o=i(5),n=i(2),s=i(10);e.DrawGraphicObject=L.Handler.extend({symbolData:null,plotting:null,_isDrawing:!1,libID:0,code:24,serverUrl:"",isFreeCure:!1,_drawingLayer:null,_tempDrawingLayer:null,_control:null,options:{tolerancePixel:6,allowIntersection:!0,repeatMode:!0,icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),touchIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-touch-icon"}),guidelineDistance:20,maxGuideLineLength:4e3,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!1,clickable:!0},metric:!0,feet:!0,nautic:!1,showLength:!0,zIndexOffset:2e3},initialize:function(t,e,i){this._map=t,this._drawingLayer=e,this._tempDrawingLayer=new s.PlottingLayerBase("drawControl-temportary"),this._container=t._container,this._overlayPane=t._panes.overlayPane,L.setOptions(this,i)},addHooks:function(){this._map&&(this._isDrawing=!1,this._markers=[],this._latlngs=[],this._markerGroup=new L.LayerGroup,this._map.addLayer(this._markerGroup),this._map.addLayer(this._tempDrawingLayer),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("mousedown",this._onMouseDown,this).on("mouseup",this._onMouseUp,this).addTo(this._map),this._map.on("mouseup",this._onMouseUp,this).on("mousemove",this._onMouseMove,this).on("zoomlevelschange",this._onZoomEnd,this).on("touchstart",this._onTouch,this).on("zoomend",this._onZoomEnd,this),this._map.getPlotEditControl()&&this._map.getPlotEditControl()._avoidEditing&&this._map.getPlotEditControl().avoidEdit(!1))},removeHooks:function(){this._isDrawing=!1,this._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers,delete this._latlngs,delete this.isFreeCure,this.plotting&&(this._tempDrawingLayer.removeFeatures(this.plotting),delete this.plotting,this.plotting=null),this._map.removeLayer(this._tempDrawingLayer),this._mouseMarker.off("mousedown",this._onMouseDown,this).off("mouseup",this._onMouseUp,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._map.off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this).off("zoomlevelschange",this._onZoomEnd,this).off("zoomend",this._onZoomEnd,this).off("touchstart",this._onTouch,this).off("click",this._onTouch,this)},deleteLastVertex:function(){if(!(this._markers.length<=1)){this._latlngs.pop();var t=this._markers.pop(),e=this.plotting.getLatLngs(),i=e.splice(-1,1)[0];this.plotting.setLatLngs(e),this._markerGroup.removeLayer(t),this.plotting.getLatLngs().length<2&&this._tempDrawingLayer.removeFeatures(this.plotting),this._vertexChanged(i,!1)}},addVertex:function(t){if(this._markers.push(this._createMarker(t)),this._latlngs.push(t),0===this.libID&&1023===this.code&&!0===this.isFreeCure)this.plotting.addLatLng(t);else if(SuperMap.AlgoSymbolFactory.isAccessServer(this.plotting.libID,this.plotting.code)&&this._latlngs.length>=this.plotting.minEditPts){var e=new SuperMap.GetSymbolInfoParameters({libID:this.libID,code:this.code});e.inputPoints=L.Util.latLngsToSuperMapPoints(this._latlngs),L.supermap.symbolInfoService(this._drawingLayer.serverUrl).getSymbolInfo(e,function(t){this.plotting.symbolData=t.result,this.plotting.setLatLngs(this._latlngs)},this)}else if(this.plotting instanceof o.Route){var i=this._map.layerPointToLatLng(L.point(0,0)),n=this._map.layerPointToLatLng(L.point(this.options.tolerancePixel,0)),s=SuperMap.Plot.PlottingUtil.distance({x:i.lng,y:i.lat},{x:n.lng,y:n.lat});this.plotting._addRouteNodeByPos(t,s)}else this.plotting.setLatLngs(this._latlngs);this._vertexChanged(t,!0)},_finishShape:function(){this._markers.length>1&&this._markers[this._markers.length-1].off("click",this._finishShape,this),0===this.libID&&this.code===SuperMap.Plot.SymbolType.FREECURVE&&!0===this.isFreeCure&&(this.plotting.latLngs=L.Util.superMapPointsToLatLngs(this.plotting.superMapAlgoSymbol.controlPoints),this.isFreeCure=!1),-1===this.plotting.libID&&(this.plotting.libID=this.libID,this.plotting.code=this.code);var t=this.plotting.clone();this._markerGroup.clearLayers(),this._markers=[],this._latlngs=[],this._tempDrawingLayer.removeFeatures(this.plotting),delete this.plotting,this._drawingLayer.addFeatures(t),this._drawingLayer._renderer instanceof L.SVG&&(t.isFirstAdd=!0),this._control.fire(SuperMap.Plot.Event.featureadded,{feature:t}),this._isDrawing=!1,this.options.repeatMode||this.disable()},_onZoomEnd:function(){this._markers},_onMouseMove:function(t){var e=this._map.mouseEventToLayerPoint(t.originalEvent),i=this._map.layerPointToLatLng(e);if(this._currentLatLng=i,!this.plotting||!0!==this._isDrawing||this.plotting instanceof o.Route){if(!1===this._isDrawing)if(this._isDrawing=!0,SuperMap.AlgoSymbolFactory.isAccessServer(this.libID,this.code))if(this.symbolData=this._drawingLayer._getSymbolDataFromCache(this.libID,this.code),null===this.symbolData){var n=new SuperMap.GetSymbolInfoParameters({libID:this.libID,code:this.code});L.supermap.symbolInfoService(this._drawingLayer.serverUrl).getSymbolInfo(n,function(t){this.libID!==t.result.libID||this.code!==t.result.code?this.symbolData=null:this.symbolData=t.result,this.plotting=L.supermap.plotting.PlottingObject.createSymbol(this.libID,this.code,[],{symbolData:this.symbolData,serverUrl:this._drawingLayer.serverUrl,map:this._map}),this._control.fire(SuperMap.Plot.Event.beforefeatureadded,{feature:this.plotting}),this._tempDrawingLayer.addFeatures(this.plotting),this.plotting.isEdit=!1},this)}else this.plotting=L.supermap.plotting.PlottingObject.createSymbol(this.libID,this.code,[],{symbolData:this.symbolData,serverUrl:this._drawingLayer.serverUrl,map:this._map}),this._control.fire(SuperMap.Plot.Event.beforefeatureadded,{feature:this.plotting}),this._tempDrawingLayer.addFeatures(this.plotting),this.plotting.isEdit=!1;else if(this.plotting=L.supermap.plotting.PlottingObject.createSymbol(this.libID,this.code,[],{serverUrl:this._drawingLayer.serverUrl,spatialAnalystUrl:this._drawingLayer.spatialAnalystUrl,map:this._map}),this.plotting.subSymbols&&0!==this.plotting.subSymbols.length){for(var s=[],a=0,l=this.plotting.subSymbols.length;a=this.plotting.minEditPts?((n=new SuperMap.GetSymbolInfoParameters({libID:this.libID,code:this.code})).inputPoints=L.Util.latLngsToSuperMapPoints(h),L.supermap.symbolInfoService(this._drawingLayer.serverUrl).getSymbolInfo(n,function(t){this.plotting.symbolData=t.result,this.plotting.setLatLngs(h)},this)):this.plotting.symbolType===SuperMap.Plot.SymbolType.ARCREGION?(this.plotting.latLngs=h,this.plotting._generateArcRegionFromServer()):this.plotting.setLatLngs(h)}this._mouseMarker.setLatLng(i),L.DomEvent.preventDefault(t.originalEvent)},_vertexChanged:function(){var t=this._markers.length;t>1&&this._markers[t-1].on("click",this._finishShape,this),t>2&&this._markers[t-2].off("click",this._finishShape,this)},_onMouseDown:function(t){if((!t||2!==t.originalEvent.button)&&!this._clickHandled&&!this._touchHandled&&!this._disableMarkers&&this._drawingLayer&&this._drawingLayer.isEditable&&this._drawingLayer._map){this._onMouseMove(t),this._clickHandled=!0,this._disableNewMarkers();var e=t.originalEvent,i=e.clientX,o=e.clientY;this._startPoint.call(this,i,o)}},_startPoint:function(t,e){0===this.libID&&this.code===SuperMap.Plot.SymbolType.FREECURVE&&(this.isFreeCure=!0),this._mouseDownOrigin=L.point(t,e)},_onMouseUp:function(t){!L.Browser.ie||null!==this._mouseDownOrigin&&void 0!==this._mouseDownOrigin||this._onMouseDown.call(this,t);var e=t.originalEvent,i=e.clientX,o=e.clientY;this._endPoint.call(this,i,o,t),this._clickHandled=null,L.DomEvent.stopPropagation(t)},_endPoint:function(t,e,i){if(this._mouseDownOrigin){var o=L.point(t,e).distanceTo(this._mouseDownOrigin),s=this._calculateFinishDistance(i.latlng);this.plotting instanceof n.GraphicObject&&(this.plotting.getLatLngs().length>=this.plotting.maxEditPts||s<10&&L.Browser.touch)?this._finishShape():Math.abs(o)<9*(window.devicePixelRatio||1)&&this.addVertex(i.latlng),this._enableNewMarkers()}this._mouseDownOrigin=null},_onTouch:function(t){var e,i,o=t.originalEvent;!o.touches||!o.touches[0]||this._clickHandled||this._touchHandled||this._disableMarkers||(e=o.touches[0].clientX,i=o.touches[0].clientY,this._disableNewMarkers(),this._touchHandled=!0,this._startPoint.call(this,e,i),this._endPoint.call(this,e,i,t),this._touchHandled=null),this._clickHandled=null},_calculateFinishDistance:function(t){var e;if(this._markers.length>0){var i=this._markers[this._markers.length-1],o=this._map.latLngToContainerPoint(i.getLatLng()),n=new L.Marker(t,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset}),s=this._map.latLngToContainerPoint(n.getLatLng());e=o.distanceTo(s)}else e=1/0;return e},_createMarker:function(t){var e=new L.Marker(t,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset});return this._markerGroup.addLayer(e),e},_disableNewMarkers:function(){this._disableMarkers=!0},_enableNewMarkers:function(){setTimeout(function(){this._disableMarkers=!1}.bind(this),50)}})},function(t,e,i){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.sitDataManager=e.SitDataManager=void 0;o(i(23)),o(i(110)),o(i(107)),o(i(109)),o(i(106)),i(4),o(i(102)),o(i(97));var n=e.SitDataManager=L.Evented.extend({map:null,serverUrl:null,smlInfo:null,smlFileName:null,initialize:function(t,e,i){i&&SuperMap.Util.extend(this,i),t&&null!==t&&null===this.map&&(n.prototype.map=t),e&&null===this.serverUrl&&(n.prototype.serverUrl=e),null===this.smlInfo&&(n.prototype.smlInfo=new SuperMap.Plot.SMLInfoStruct),null===this.smlFileName&&(n.prototype.smlFileName="situationMap")},destroy:function(){n.prototype.map=null,n.prototype.smlInfo.destroy(),n.prototype.smlInfo=null,n.prototype.smlFileName=null,n.prototype.serverUrl=null},getSitDataLayers:function(){return this.map.getPlottingLayers()},openSmlData:function(t){if(this.smlInfo.fromJSON(t.smlInfo),t.mapInfo){var e=new SuperMap.Plot.MapInfoStruct;e.fromJSON(t.mapInfo),null!==e.zoom&&null!==e.centerX&&null!==e.centerY&&this.map.setView(L.latLng(e.centerY,e.centerX),e.zoom,{reset:!0})}var i=t.layerDatas;this.map.clearPlottingLayers();for(var o,n=0,s=i.length;n=this.libIDs.length?-1:this.libIDs[t]},getSymbolLibJSONInfo:function(t){return t>=this.libIDs.length?null:this.symbolLibJsons[t]},getSymbolLibByIndex:function(t){return t>=this.libIDs.length?null:this.symbolLibs[t]},getSymbolLibByLibId:function(t){for(var e=0;e1&&t.push(n),n=[],e=l.GetX(),i=l.GetY(),n.push(new SuperMap.Geometry.Point(e,i));break;case 1:e=l.GetX(),i=l.GetY(),n.push(new SuperMap.Geometry.Point(e,i));break;case 2:3!=o.elements[a+1].GetType()||o.elements[a+1].GetType();for(var r=o.elements[a-1].GetX(),u=o.elements[a-1].GetY(),p=l.GetX(),h=l.GetY(),c=o.elements[a+1].GetX(),y=o.elements[a+1].GetY(),g=o.elements[a+2].GetX(),d=o.elements[a+2].GetY(),f=0;f<=1;f+=.03125){var S=f*f,P=S*f,m=1-3*f+3*S-P,b=3*(f-2*S+P),L=3*(S-P),M=P;n.push(new SuperMap.Geometry.Point(m*r+b*p+L*c+M*g,m*u+b*h+L*y+M*d))}a+=2}}return n.length>1&&t.push(n),!0}},{key:"ensureData",value:function(){null==this.m_pData&&this.ensureData_helper()}},{key:"ensureData_helper",value:function(){var t=new SuperMap.Plot.UGPath2DData,e=new SuperMap.Plot.Element(0,0,0);t.elements.push(e),null==this.m_pData||this.mtDeRef(m_pData.ref)||(this.m_pData=null),this.m_pData=t}},{key:"detach",value:function(){1!=this.m_pData.ref&&this.detach_helper(),this.setBoundsDirty(!0)}},{key:"detach_helper",value:function(){var t=new SuperMap.Plot.UGPath2DData;null==this.m_pData||this.mtDeRef(this.m_pData.ref)||(this.m_pData=null),this.m_pData=t}},{key:"setBoundsDirty",value:function(t){this.getDataPtr().isBoundsDirty=t}},{key:"getDataPtr",value:function(){return this.m_pData}},{key:"IsEmpty",value:function(){if(null==this.m_pData)return!0;var t=this.m_pData.elements.length;return 0==t||1==t&&0==this.m_pData.elements[0].GetType()}},{key:"GetElementCount",value:function(){return null!=this.m_pData?this.m_pData.elements.length:0}}],[{key:"mtRef",value:function(t){return 0!=++t}},{key:"mtDeRef",value:function(t){return 0!=--t}}]),t}());e.default=s,SuperMap.Plot.Path2D=s},function(t,e,i){"use strict";function o(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}Object.defineProperty(e,"__esModule",{value:!0}),e.AvoidRegionControl=void 0;i(133),i(14);var n,s=i(10);e.AvoidRegionControl=L.Control.extend((n={_mouseTolerance:10,_editMarkers:null,_editMode:SuperMap.Plot.EditMode.EDITCIRCUMRECTANGLE,feature:null,_temportary:null,options:{avoidRegionStyle:{fill:!1,color:"#0000ff",dashArray:"2, 2",opacity:1,weight:1},draggable:!0,avoidIcon:L.divIcon({className:"leaflet-supermap-plot-avoid-icon-path",iconSize:[8,8]}),icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"})},initialize:function(t,e){if(L.version<"0.7")throw new Error("Leaflet.draw 0.2.3+ requires Leaflet 0.7.0+. Download latest from https://github.com/Leaflet/Leaflet/");L.Control.prototype.initialize.call(this,e),L.setOptions(this,e),this._temportary=new s.PlottingLayerBase("avoidRegionControl-temportary",this.serverUrl),this._editMarkers={},this.feature=t},onAdd:function(t){if(this.feature&&!this.feature.getLocked())return this.controlDiv=L.DomUtil.create("div","supermap-iclient-avoidregion"),this._map=t,this._markers=[],this._latlngs=[],this._markerGroup=new L.LayerGroup,this._map.addLayer(this._markerGroup),this._map.addLayer(this._temportary),this._map.on("mousemove",this._onMouseMove,this).on("click",this._onMapClick,this),this._showAvoidRegions(),this.controlDiv},onRemove:function(){this._hideAvoidRegions(),this._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers,delete this._latlngs,this.plotting&&(this._temportary.removeFeatures(this.plotting),delete this.plotting,this.plotting=null),this._map.removeLayer(this._temportary),delete this._temportary,this._map.off("mousemove",this._onMouseMove,this).off("click",this._onMapClick,this),this._map=null},_showAvoidRegions:function(){for(var t=0;t1&&this._markers[i-1].on("click",this._finishShape,this),i>2&&this._markers[i-2].off("click",this._finishShape,this)},_finishShape:function(){this._markers.length>1&&this._markers[this._markers.length-1].off("click",this._finishShape,this);var t=this.plotting.clone();this._markerGroup.clearLayers(),this._markers=[],this._latlngs=[],this._temportary.removeFeatures(this.plotting),delete this.plotting,this.plotting=null,this._temportary.addFeatures(t),this.feature.addAvoidRegion(t),this._selectFeature(t),t.on("contextmenu",function(t){})},_onDragStart:function(t){var e=t.target,i=this._editMarkers[e.uuid];for(var o in i)i[o].setOpacity(0)},_onDrag:function(t){t.target.move(t.dLat,t.dLng)}},o(n,"_onDragEnd",function(t){var e=t.target;this._collectEditMarkers(e),this.moveend=!0}),o(n,"_onMouseMove",function(t){var e=this._map.mouseEventToLayerPoint(t.originalEvent),i=this._map.layerPointToLatLng(e);if(this.plotting){var o=L.Util.cloneLatLngs(this._latlngs);0===o.length?o.push(i):o[o.length-1].lat===i.lat&&o[o.length-1].lng===i.lng||o.push(i),this.plotting.setLatLngs(o)}L.DomEvent.preventDefault(t.originalEvent)}),n))},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.PlotControl=L.Evented.extend({options:{position:"topright"},initialize:function(t){L.setOptions(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),o=t._controlCorners[i];return L.DomUtil.addClass(e,"leaflet-control"),-1!==i.indexOf("bottom")?o.insertBefore(e,o.firstChild):o.appendChild(e),this},remove:function(){return this._map?(L.DomUtil.remove(this._container),this.onRemove&&this.onRemove(this._map),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}});L.control=function(t){return new L.Control(t)},L.Map.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){function t(t,n){var s=i+t+" "+i+n;e[t+n]=L.DomUtil.create("div",s,o)}var e=this._controlCorners={},i="leaflet-",o=this._controlContainer=L.DomUtil.create("div",i+"control-container",this._container);t("top","left"),t("top","right"),t("bottom","left"),t("bottom","right")},_clearControlPos:function(){L.DomUtil.remove(this._controlContainer)}})},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.lineRelation=e.LineRelation=void 0;var o=i(1),n=i(15),s=(function(t){t&&t.__esModule}(i(28)),e.LineRelation=o.AlgoSymbol.extend({startAssociatedUuid:null,endAssociatedUuid:null,lineRelationType:SuperMap.Plot.LineRelation.ARROW,setLineRelationType:function(t){this.lineRelationType!==t&&(this.lineRelationType=t,this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues))},getLineRelationType:function(){return this.lineRelationType},initialize:function(t,e,i,n){this.libID=0,this.code=SuperMap.Plot.SymbolType.LINERELATION,this.symbolType=SuperMap.Plot.SymbolType.LINERELATION,this.symbolName="连接线",o.AlgoSymbol.prototype.initialize.call(this,t,e,i,n)},onAdd:function(t){o.AlgoSymbol.prototype.onAdd.call(this,t),this.setJoinLineToDotSymbol(this.startAssociatedUuid),this.setJoinLineToDotSymbol(this.endAssociatedUuid)},setStartFeature:function(t){null!==this.startAssociatedUuid&&(this.removeJoinLineFromDotSymbol(this.startAssociatedUuid),this.startAssociatedUuid=null);var e=this._map.getFeatureByUuid(t);null!=e&&e instanceof n.DotSymbol&&(null!==this.endAssociatedUuid&&t===this.endAssociatedUuid||(this.startAssociatedUuid=t,this.setJoinLineToDotSymbol(this.startAssociatedUuid),null!==this.endAssociatedUuid&&this.setFeatures(this.startAssociatedUuid,this.endAssociatedUuid)))},setEndFeature:function(t){null!==this.endAssociatedUuid&&(this.removeJoinLineFromDotSymbol(this.endAssociatedUuid),this.endAssociatedUuid="");var e=this._map.getFeatureByUuid(t);null!==e&&e instanceof n.DotSymbol&&(null!==this.startAssociatedUuid&&t===this.startAssociatedUuid||(this.endAssociatedUuid=t,this.setJoinLineToDotSymbol(this.endAssociatedUuid),null!==this.startAssociatedUuid&&this.setFeatures(this.startAssociatedUuid,this.endAssociatedUuid)))},setFeatures:function(t,e){var i=this._map.getFeatureByUuid(t),o=this._map.getFeatureByUuid(e);null!==i&&null!==o&&i instanceof n.DotSymbol&&o instanceof n.DotSymbol&&(this.startAssociatedUuid=t,this.endAssociatedUuid=e,this.setJoinLineToDotSymbol(this.startAssociatedUuid),this.setJoinLineToDotSymbol(this.endAssociatedUuid),this.redraw())},destroy:function(){this.startFeature=null,this.endFeature=null,o.AlgoSymbol.prototype.destroy.call(this)},_calculateParts:function(){var t=null,e=this._map.getFeatureByUuid(this.startAssociatedUuid);if(null!==e){var i=L.Util.latLngsToSuperMapPoints(e.latLngs);null!==i&&0=this.subSymbols[i].symbolData.innerCells[A].positionPoints[w].x&&(T=this.subSymbols[i].symbolData.innerCells[A].positionPoints[w].x),x<=this.subSymbols[i].symbolData.innerCells[A].positionPoints[w].y&&(x=this.subSymbols[i].symbolData.innerCells[A].positionPoints[w].y),O>=this.subSymbols[i].symbolData.innerCells[A].positionPoints[w].y&&(O=this.subSymbols[i].symbolData.innerCells[A].positionPoints[w].y);var D=L.latLng(v,M),E=this._map.latLngToLayerPoint(L.latLng(v,M)),I=new SuperMap.Geometry.Point(_,(x+O)/2),N=new SuperMap.Geometry.Point(I.x,I.y),C=new SuperMap.Geometry.Point(this.subSymbols[i].symbolData.anchorPoint.x,this.subSymbols[i].symbolData.anchorPoint.y),R=this._transitionPoint(N,E),U=this._transitionPoint(C,E);D.lat+=U.lat-R.lat,D.lng+=U.lng-R.lng;var G=this.subSymbols[i].symbolData.libID,B=this.subSymbols[i].symbolData.code;this.subSymbols[i].symbolData.annotationPosition=6;var F=SuperMap.Util.cloneObject(this.subSymbols[i].symbolData),k=L.supermap.plotting.PlottingObject.createSymbol(G,B,D,{serverUrl:this.serverUrl,symbolData:F,scaleByMap:!0,minScale:0,maxScale:2048,space:0});k.enableEdit=!0,k.ownerGroup=this,this._addComponents(k),this.bounds=this._calculateBounds(),this.subObjects.push(k)}if(this.bounds=new L.LatLngBounds,this.bounds=this._calculateBounds(),null!==this.textContent&&0!==this.textContent.length){var j=L.latLng(n[0].lat+g/2+l,n[0].lng-5*l),z=L.supermap.plotting.PlottingObject.createSymbol(0,34,[j],{textContent:this.textContent,serverUrl:this.serverUrl});z.style.labelAlign="rb",z.style.scaleByMap=!0,z.enableEdit=!0,z.ownerGroup=this,this._addComponents(z),this.bounds.extend(z.getBounds()),this.subObjects.push(z)}var Y=new L.LatLngBounds(L.latLng(this.bounds.getSouth()-l,this.bounds.getWest()-l),L.latLng(this.bounds.getNorth()+l,this.bounds.getEast()+l)),V=[];V.push(L.latLng(Y.getNorth(),Y.getWest())),V.push(L.latLng(Y.getSouth(),Y.getEast()));var W=L.latLng(n[0].lat,n[0].lng);W.isFixedPos=!0,V.push(W);var H=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.ANNOFRAMESYMBOL,V,{serverUrl:this.serverUrl});H.enableEdit=!0,H.ownerGroup=this,this.subObjects.splice(0,0,H),this._addComponents(H)}}},_reView:function(){for(var t in this.subObjects)this.subObjects[t].layer&&this.subObjects[t]._reView();this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)},move:function(t,e){for(var i in this.subObjects)this.subObjects[i].move(t,e);this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)},_resize:function(t,e){for(var i in this.subObjects)this.subObjects[i]._resize(t,this.anchorPoint)},_transitionPoint:function(t,e){var i=e.x+t.x*(96/254),o=e.y-t.y*(96/254);return this._map.layerPointToLatLng(L.point(i,o))},_getSubSymbolCount:function(t){var e=0;if(t<0)return e;t>this.subSymbols.length-1&&(t=this.subSymbols.length-1);for(var i=0;i<=t;i++)e+=this.subSymbols[t].totalNum;return e},_calculateBounds:function(){this.bounds=new L.LatLngBounds;for(var t in this.components)this.components[t].symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL&&this.bounds.extend(this.components[t].getBoundsWithText());return this.bounds},_parseSymbolData:function(){o.GroupObject.prototype._parseSymbolData.call(this),this.symbolData&&(this.colNum=this.symbolData.colNum,this.speceDis=this.symbolData.speceDis,this.subSymbols=this.symbolData.subSymbols)},_setSymbolData:function(){o.GroupObject.prototype._setSymbolData.call(this),this.symbolData&&(this.symbolData.colNum=this.colNum,this.symbolData.speceDis=this.speceDis,this.symbolData.subSymbols=this.subSymbols)}}),s=e.navyDeployment=function(t,e,i,o){return new n(t,e,i,o)};L.supermap.plotting.navyDeployment=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.pathText=e.PathText=void 0;var o=i(1),n=e.PathText=o.AlgoSymbol.extend({relLineText:0,showPathLine:!0,showPathLineArrow:!1,isCurve:!1,isAvoid:!1,textToLineDistance:0,getRelLineText:function(){return this.relLineText},setRelLineText:function(t){this.relLineText!==t&&(this.relLineText=t,this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues))},getShowPathLine:function(){return this.showPathLine},setShowPathLine:function(t){this.showPathLine!==t&&(this.showPathLine=t,this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues))},getShowPathLineArrow:function(){return this.showPathLineArrow},setShowPathLineArrow:function(t){this.showPathLineArrow!==t&&(this.showPathLineArrow=t,this.showPathLine&&(this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)))},getIsCurveLine:function(){return this.isCurve},setCurveLine:function(t){this.isCurve!==t&&(this.isCurve=t,this.showPathLine&&(this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)))},getIsAvoidLine:function(){return this.isAvoid},setAvoidLine:function(t){this.isAvoid!==t&&(this.isAvoid=t,this.relLineText===SuperMap.Plot.RelLineText.ONLINE&&this.showPathLine&&(this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)))},getSpace:function(){return this.textToLineDistance},setSpace:function(t){this.textToLineDistance!==t&&(this.textToLineDistance=t,this.relLineText!==SuperMap.Plot.RelLineText.ONLINE&&(this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)))},initialize:function(t,e,i,n){this.code=SuperMap.Plot.SymbolType.PATHTEXT,this.libID=0,this.symbolType=SuperMap.Plot.SymbolType.PATHTEXT,this.symbolName="沿线注记",this.minEditPts=2,this.maxEditPts=9999,o.AlgoSymbol.prototype.initialize.call(this,t,e,i,n)},_parseSymbolData:function(){o.AlgoSymbol.prototype._parseSymbolData.call(this),this.symbolData&&(this.symbolData.hasOwnProperty("isAvoid")&&(this.isAvoid=this.symbolData.isAvoid),this.symbolData.hasOwnProperty("isCurve")&&(this.isCurve=this.symbolData.isCurve),this.symbolData.hasOwnProperty("relLineText")&&(this.relLineText=this.symbolData.relLineText),this.symbolData.hasOwnProperty("showPathLine")&&(this.showPathLine=this.symbolData.showPathLine),this.symbolData.hasOwnProperty("textToLineDistance")&&(this.textToLineDistance=this.symbolData.textToLineDistance),this.symbolData.hasOwnProperty("showPathLineArrow")&&(this.showPathLineArrow=this.symbolData.showPathLineArrow))},_setSymbolData:function(){o.AlgoSymbol.prototype._setSymbolData.call(this),this.symbolData&&(this.symbolData.isAvoid=this.isAvoid,this.symbolData.isCurve=this.isCurve,this.symbolData.relLineText=this.relLineText,this.symbolData.showPathLine=this.showPathLine,this.symbolData.textToLineDistance=this.textToLineDistance,this.symbolData.showPathLineArrow=this.showPathLineArrow)},_reView:function(){this.fromZoom!==this._map.getZoom()&&(this.redraw(),this.fromZoom=this._map.getZoom())},_setDefaultOptions:function(t){o.AlgoSymbol.prototype._setDefaultOptions.call(this,t),t.relLineText=this.relLineText,t.showPathLine=this.showPathLine,t.showPathLineArrow=this.showPathLineArrow,t.isCurve=this.isCurve,t.isAvoid=this.isAvoid,t.textToLineDistance=this.textToLineDistance},_sendDataToAlgo:function(){o.AlgoSymbol.prototype._sendDataToAlgo.call(this),this.superMapAlgoSymbol.relLineText=this.relLineText,this.superMapAlgoSymbol.showPathLine=this.showPathLine,this.superMapAlgoSymbol.showPathLineArrow=this.showPathLineArrow,this.superMapAlgoSymbol.isCurve=this.isCurve,this.superMapAlgoSymbol.isAvoid=this.isAvoid,this.superMapAlgoSymbol.textToLineDistance=this.textToLineDistance,this.superMapAlgoSymbol.style=this.style}}),s=e.pathText=function(t,e,i,o){return new n(t,e,i,o)};L.supermap.plotting.pathText=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=e.PointImage=L.Path.extend({options:{externalGraphic:"",graphicWidth:0,graphicHeight:0,graphicOpacity:1,graphicXOffset:void 0,graphicYOffset:void 0,rotation:0,graphicTitle:"",interactive:!0},_imageNode:null,initialize:function(t,e){L.setOptions(this,e),this._latlng=L.latLng(t[0])},onRemove:function(){this._imageNode&&this._imageNode.parentNode&&(this._renderer._rootGroup.removeChild(this._imageNode),delete this._imageNode,this._imageNode=null),this._imageNode&&(delete this._imageNode,this._imageNode=null),L.Path.prototype.onRemove.call(this)},setLatLngs:function(t){return this._latlng=L.latLng(t[0]),this.redraw(),this.fire("move",{latlng:this._latlng})},getLatLngs:function(){return[this._latlng]},getBounds:function(){return this._updateBounds()},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},getPxBounds:function(){var t=void 0!=this.options.graphicXOffset?this.options.graphicXOffset:-.5*this.options.graphicWidth,e=void 0!=this.options.graphicYOffset?this.options.graphicYOffset:-.5*this.options.graphicHeight,i=this._point.x+t,o=this._point.y+e,n=i+this.options.graphicWidth,s=o+this.options.graphicHeight,a=new L.Bounds;if(this.options.rotation&&0!==this.options.rotation){var l=[];l.push(L.point(i,o)),l.push(L.point(i,s)),l.push(L.point(n,o)),l.push(L.point(n,s));for(var r=this.options.rotation*(Math.PI/180),u=0;u=3){var e=SuperMap.Plot.PlottingUtil.distance(t[0],t[1]);SuperMap.Plot.PlottingUtil.isRight(t[0],t[1],t[2])&&(e=-e);for(var i=[],o=1;o=3){var e=t[0].x+(t[2].x-t[1].x),i=t[0].y+(t[2].y-t[1].y),o=new SuperMap.Geometry.Point(e,i),n=[];return n.push.apply(n,t),n.push(o),n.push(n[0]),n}},polygon:function(t){if(t&&t.length>2)return t},circle:function(t){if(t&&2===t.length){for(var e=t[0],i=t[1],o=[],n=Math.sqrt((i.x-e.x)*(i.x-e.x)+(i.y-e.y)*(i.y-e.y)),s=360/this.nSegmentCount,a=0;a=3){var e=this.getArcInfo(t[0],t[1],t[2]);e.dStartAngle*=Math.PI/180,e.dEndAngle*=Math.PI/180;var i=(e.dEndAngle-e.dStartAngle)/this.nSegmentCount,o=this.getArcSpatialData(e.pntCenter,e.dRadius,e.dRadius,0,e.dStartAngle,e.dEndAngle,i);if(o.push(e.pntCenter),0!==o.length)return o}},lune:function(t){if(t&&t.length>=3){var e=this.getArcInfo(t[0],t[1],t[2]);e.dStartAngle*=Math.PI/180,e.dEndAngle*=Math.PI/180;var i=(e.dEndAngle-e.dStartAngle)/this.nSegmentCount,o=this.getArcSpatialData(e.pntCenter,e.dRadius,e.dRadius,0,e.dStartAngle,e.dEndAngle,i);if(0!==o.length)return o}},arc:function(t){if(t&&t.length>=3){var e=this.getArcInfo(t[0],t[1],t[2]);e.dStartAngle*=Math.PI/180,e.dEndAngle*=Math.PI/180;var i=(e.dEndAngle-e.dStartAngle)/this.nSegmentCount,o=this.getArcSpatialData(e.pntCenter,e.dRadius,e.dRadius,0,e.dStartAngle,e.dEndAngle,i);if(0!==o.length)return o}},ellipse:function(t,e,i,o,n){if(!0===i){if((!o||null===o)&&t&&t.length>=3&&(o=SuperMap.Plot.PlottingUtil.distance(t[0],t[1])),(!n||null===n)&&t&&t.length>=3){var s=SuperMap.Plot.PlottingUtil.projectPoint(t[2],t[0],t[1]);n=SuperMap.Plot.PlottingUtil.distance(s,t[2])}}else n=SuperMap.Plot.PlottingUtil.distance(t[0],t[2]),o=SuperMap.Plot.PlottingUtil.distance(t[0],t[1]);if(e&&null!==e?e*=Math.PI/180:e=SuperMap.Plot.PlottingUtil.radian(t[0],t[1]),t&&t.length>0){var a=2*Math.PI,l=a/this.nSegmentCount,r=this.getArcSpatialData(t[0],o,n,e,0,a,l);if(!0===i){var u=Math.sin(e),p=Math.cos(e);t[2].x>t[1].x?(t[2].x=t[0].x-n*u,t[2].y=t[0].y+n*p):(t[2].x=t[0].x+n*u,t[2].y=t[0].y-n*p)}return r}},getArcSpatialData:function(t,e,i,o,n,s,a){var l=[];if(Math.abs(a)<1e-9)return l;for(;sn+2*Math.PI;)n+=2*Math.PI;var r=Math.cos(o)*e,u=Math.sin(o)*e,p=Math.cos(o)*i,h=Math.sin(o)*i,c=this.calcEllipseRadian(n,e,i),y=this.calcEllipseRadian(s,e,i);y-c<1e-5&&(y+=2*Math.PI);var g=Math.round(Math.abs((y-c)/a)+1);if(g<2)return l;for(var d=0;dl.length&&(l[l.length-1].x=t.x+r*Math.cos(y)-h*Math.sin(y),l[l.length-1].y=t.y+u*Math.cos(y)+p*Math.sin(y)),l},getArcInfo:function(t,e,i){var o={};o.pntCenter=new SuperMap.Geometry.Point(0,0),o.dRadius=0,o.dStartAngle=0,o.dEndAngle=0;var n=e.x-t.x,s=e.y-t.y;if(Math.abs(n)<1e-9){r={};(l={}).x=(e.x+t.x)/2,l.y=(e.y+t.y)/2,r.x=(e.x+i.x)/2,r.y=(e.y+i.y)/2;var a=0;Math.abs(i.x-e.x)>=1e-9&&(a=(i.y-e.y)/(i.x-e.x)),o.pntCenter.y=l.y,Math.abs(a)<1e-9?o.pntCenter.x=r.x:o.pntCenter.x=r.x-a*(l.y-r.y)}else{var l={},r={};l.x=(e.x+t.x)/2,l.y=(e.y+t.y)/2,r.x=(e.x+i.x)/2,r.y=(e.y+i.y)/2;var u=s/n,p=1;Math.abs(u)<1e-9?(o.pntCenter.x=l.x,Math.abs(i.x-e.x<1e-9)?o.pntCenter.y=r.y:o.pntCenter.y=-(i.x-e.x)/(i.y-e.y)*(o.pntCenter.x-r.x)+r.y):Math.abs(i.x-e.x)<1e-9?(o.pntCenter.y=r.y,o.pntCenter.x=-u*(o.pntCenter.y-l.y)+l.x):(p=(i.y-e.y)/(i.x-e.x),o.pntCenter.x=(u*p*(l.y-r.y)+p*l.x-u*r.x)/(p-u),o.pntCenter.y=(r.x-l.x+p*r.y-u*l.y)/(p-u))}var h=Math.atan2(t.y-o.pntCenter.y,t.x-o.pntCenter.x),c=Math.atan2(i.y-o.pntCenter.y,i.x-o.pntCenter.x);if(SuperMap.Plot.PlottingUtil.isCounterClockwise(t,e,i)){for(;h>=2*Math.PI;)h-=2*Math.PI;for(;h<0;)h+=2*Math.PI;for(;c>2*Math.PI;)c-=2*Math.PI;for(;c=2*Math.PI;)c-=2*Math.PI;for(;c<0;)c+=2*Math.PI;for(;h>2*Math.PI;)h-=2*Math.PI;for(;c>h;)h+=2*Math.PI;var y=h;h=c,c=y}return o.dRadius=Math.sqrt((o.pntCenter.x-t.x)*(o.pntCenter.x-t.x)+(o.pntCenter.y-t.y)*(o.pntCenter.y-t.y)),o.dEndAngle=180*c/Math.PI,o.dStartAngle=180*h/Math.PI,o},calcEllipseRadian:function(t,e,i){var o=t,n=e*Math.sin(t),s=i*Math.cos(t),a=Math.atan2(n,s);if(t>Math.PI)for(;o>Math.PI;)o-=2*Math.PI,a+=2*Math.PI;else if(t<-Math.PI)for(;o<-Math.PI;)o+=2*Math.PI,a-=2*Math.PI;return a},getKendyShapePts:function(t){var e=[];if(2>(t=SuperMap.Plot.PlottingUtil.clearSamePts(t)).length)return e;var i=this.calcShapePoints(t);if(12!=i.length)return e;i.push(i[0]),i.push(i[1]),i.splice(0,1);for(var o=0;o=a&&l>=r){u=o.clone();o=s.clone(),s=u.clone()}else if(r>=a&&r>=l){u=s.clone();s=n.clone(),n=u.clone()}if(!SuperMap.Plot.PlottingUtil.isRight(s,o,n)){var u=o.clone();o=n.clone(),n=u.clone()}e[0]=o,e[1]=n,e[2]=s}return e},GetPtsByTriangle:function(t,e,i,o,n){var s=new SuperMap.Geometry.Point(0,0),a=(new SuperMap.Geometry.Point(0,0),0),l=0;return a=SuperMap.Plot.PlottingUtil.distance(n,i),l=SuperMap.Plot.PlottingUtil.distance(o,n),1==e&&(a*=2),2==e&&(l*=2),s.x=(a*o.x+l*i.x)/(a+l),s.y=(a*o.y+l*i.y)/(a+l),{pl:this.GetWhichPtOfNormal(t,i,s,n),pr:this.GetWhichPtOfNormal(t,o,s,n)}},GetWhichPtOfNormal:function(t,e,i,o){new SuperMap.Geometry.Point(0,0),new SuperMap.Geometry.Point(0,0);var n=0,s=0;s=SuperMap.Plot.PlottingUtil.distance(o,e)/t;var a=this.GetPointsOfNormal(s,i,o);return n=SuperMap.Plot.PlottingUtil.distance(e,a.pt4),s=SuperMap.Plot.PlottingUtil.distance(e,a.pt3),n>=s?a.pt3:a.pt4},getBezierPtsWithScalePts:function(t,e,i,o){var n=[],s=t.x,a=t.y,l=e.x,r=e.y,u=i.x,p=i.y,h=o.x,c=o.y;if(SuperMap.Plot.PlottingUtil.equalFuzzy(s,l,1e-10)&&SuperMap.Plot.PlottingUtil.equalFuzzy(a,r,1e-10)&&SuperMap.Plot.PlottingUtil.equalFuzzy(u,h,1e-10)&&SuperMap.Plot.PlottingUtil.equalFuzzy(p,c,1e-10))n.push(new SuperMap.Geometry.Point(s,a)),n.push(new SuperMap.Geometry.Point(u,p));else for(var y=0;y<=1;y+=.03125){var g,d,f,S,P=y*y,m=P*y;g=1-3*y+3*P-m,d=3*(y-2*P+m),f=3*(P-m),S=m;var b=new SuperMap.Geometry.Point(g*s+d*l+f*u+S*h,g*a+d*r+f*p+S*c);n.push(b)}return n},getSpatialData:function(t,e,i,o){switch(void 0!==o&&null!==o||(o=!0),t){case 24:return this.polyline(e);case 390:return this.kidney(e,o);case 590:return this.bezier(e,o);case 360:return this.loopbezier(e,o);case 28:return this.parallelogram(e);case 32:return this.polygon(e);case 29:return this.circle(e);case 26:return this.rectangle(e);case 380:return this.sector(e);case 370:return this.lune(e);case 44:return this.arc(e);case 31:return this.ellipse(e,i,o);case 48:return this.parallelline(e);default:return e}}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.RouteNodePrimitives=SuperMap.Plot.RouteNodePrimitives=SuperMap.Plot.RouteNodePrimitives||{};SuperMap.Plot.RouteNodePrimitives={initialize:function(t){},rendezvousPoint:function(){var t=[],e=new Object;e.type=SuperMap.Plot.SymbolType.CIRCLESYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMap.Geometry.Point(0,0)),e.positionPoints.push(new SuperMap.Geometry.Point(0,30)),e.style={surroundLineFlag:!1,fillLimit:!0,fill:!1};var i=new Object;return i.type=SuperMap.Plot.SymbolType.TEXTSYMBOL,i.positionPoints=[],i.positionPoints.push(new SuperMap.Geometry.Point(0,0)),i.textContent="会",i.style={surroundLineFlag:!1,fontSize:14,fontSizeLimit:!0},i.style.labelAlign="cm",t.push(i),t.push(e),t},expandingPoint:function(){var t=[],e=new Object;e.type=SuperMap.Plot.SymbolType.CIRCLESYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMap.Geometry.Point(0,0)),e.positionPoints.push(new SuperMap.Geometry.Point(0,30)),e.style={surroundLineFlag:!1,fillLimit:!0,fill:!1};var i=new Object;return i.type=SuperMap.Plot.SymbolType.TEXTSYMBOL,i.positionPoints=[],i.positionPoints.push(new SuperMap.Geometry.Point(0,0)),i.textContent="展",i.style={surroundLineFlag:!1,fontSize:14,fontSizeLimit:!0},i.style.labelAlign="cm",t.push(i),t.push(e),t},volleyPoint:function(){var t=[],e=new Object;e.type=SuperMap.Plot.SymbolType.CIRCLESYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMap.Geometry.Point(0,0)),e.positionPoints.push(new SuperMap.Geometry.Point(0,30)),e.style={surroundLineFlag:!1,fillLimit:!0,fill:!1};var i=new Object;return i.type=SuperMap.Plot.SymbolType.TEXTSYMBOL,i.positionPoints=[],i.positionPoints.push(new SuperMap.Geometry.Point(0,0)),i.textContent="齐",i.style={surroundLineFlag:!1,fontSize:14,fontSizeLimit:!0},i.style.labelAlign="cm",t.push(i),t.push(e),t},standbyPoint_Outer:function(t,e){var i=[],o=new SuperMap.Geometry.Point(0,0),n=new SuperMap.Geometry.Point(0,30);t||(t=90);var s=new Object;s.type=SuperMap.Plot.SymbolType.POLYLINESYMBOL,s.positionPoints=[];for(P=t+10;P<170+t;P+=10){c=SuperMap.Plot.PlottingUtil.findPoint(o,n,30,P);s.positionPoints.push(c)}s.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},i.push(s);var a=s.positionPoints[s.positionPoints.length-1],l=s.positionPoints[s.positionPoints.length-2],r=SuperMap.Plot.PlottingUtil.findPoint(a,l,9,22.5),u=SuperMap.Plot.PlottingUtil.findPoint(a,l,9,-22.5),p=new Object;p.type=SuperMap.Plot.SymbolType.POLYLINESYMBOL,p.positionPoints=[],p.positionPoints.push(r),p.positionPoints.push(a.clone()),p.positionPoints.push(u),p.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},i.push(p);var h=new Object;h.type=SuperMap.Plot.SymbolType.POLYLINESYMBOL,h.positionPoints=[];for(P=190+t;P<350+t;P+=10){var c=SuperMap.Plot.PlottingUtil.findPoint(o,n,30,P);h.positionPoints.push(c)}h.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},i.push(h);var y=h.positionPoints[h.positionPoints.length-1],g=h.positionPoints[h.positionPoints.length-2],d=SuperMap.Plot.PlottingUtil.findPoint(y,g,9,22.5),f=SuperMap.Plot.PlottingUtil.findPoint(y,g,9,-22.5),S=new Object;S.type=SuperMap.Plot.SymbolType.POLYLINESYMBOL,S.positionPoints=[],S.positionPoints.push(d),S.positionPoints.push(y.clone()),S.positionPoints.push(f),S.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},i.push(S);for(var P=0;P=t.maxEditPts)){var i=t._getSymbolWayType();if(SuperMap.Plot.AddPoint_WayType.UNKNOWN!==i){var o=new SuperMap.Geometry.Point(e.lng,e.lat),n=-1;SuperMap.Plot.AddPoint_WayType.CURVE===i&&(n=this._addPointByCurve(t,o)),SuperMap.Plot.AddPoint_WayType.POLYLINE===i&&(n=this._addPointByPolyLine(t,o));var s=L.Util.latLngsToSuperMapPoints(t.getLatLngs());if(n>0&&no.length)return-1;for(var n=[],s=0,a=1,l=i.length;ay&&(c=y,h=u+1))}return h},_addPointByPolyLine:function(t,e){var i=-1,o=L.Util.latLngsToSuperMapPoints(t.getLatLngs());return(i=this._computePointToLineMinDis(e,o).index)>=0&&i++,i},_computePointToLineMinDis:function(t,e){var i=this._getAddPointTolerance(),o=SuperMap.Plot.PlottingUtil.computePointToLineMinDis(t,e);return o.minDis>i&&(o.index=-1),o},_getAddPointTolerance:function(){var t=this._mouseTolerance,e=this._map.layerPointToLatLng(L.point(0,0)),i=this._map.layerPointToLatLng(L.point(t,0));return SuperMap.Plot.PlottingUtil.distance(new SuperMap.Geometry.Point(e.lng,e.lat),new SuperMap.Geometry.Point(i.lng,i.lat))},_collectEditMarkers:function(t){void 0!==this._editMarkers[t.uuid]&&this._removeMarkers(t);var e,i=[];if(t.layer instanceof u.PlottingLayer&&(t.layer.getLocked()||!t.layer.getEditable())){var o=t.getBounds();if(null!==o&&o.isValid()){var s=L.latLng(o.getNorth(),o.getEast()),a=L.latLng(o.getNorth(),o.getWest()),p=L.latLng(o.getSouth(),o.getEast()),h=L.latLng(o.getSouth(),o.getWest()),c=new L.Polygon([s,a,h,p],{smoothFactor:.5}),y={weight:1,opacity:.5,color:"#0000ff",fillOpacity:.3,fillColor:"#0000ff"};L.setOptions(c,y),this._map.addLayer(c),e=c}}else if(t.getLocked()){var g=t._getHandlePointsByBounds();for(var d in g){var f=new L.LatLng(g[d].lat,g[d].lng),S=L.supermap.plotting.editMarker(f,{icon:this.options.lockedIcon,nHandle:-3});this._addToMapAndBindMarker(S),S.owner=t,i.push(S)}}else if(t instanceof n.GroupObject||t instanceof l.RouteNode)if(t instanceof r.FlagGroup&&this._editMode!==SuperMap.Plot.EditMode.EDITCIRCUMRECTANGLE)for(var P=0;P9&&(v=-1);var f=new L.LatLng(b.handlePoints[d].lat,b.handlePoints[d].lng),S=L.supermap.plotting.editMarker(f,{icon:this.options.editIcon,nHandle:v,tag:d});this._addToMapAndBindMarker(S),S.owner=t,i.push(S)}for(var d=0,M=b.rotatePoints.length;d0?this._dragResize(t,t.target.options.nHandle):this._dragLatLngs(t)}this.fire(SuperMap.Plot.Event.featuresmodified,{features:this.selectedFeatures})}},_dragRotate:function(t){var e=this,i=t.target.owner,o=null;o=i.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL?i.getLatLngs()[0]:i.anchorPoint;var n=this._map.latLngToLayerPoint(o);i.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL&&!0===i.positionOffset&&(n.x+=i.positionOffsetX*i.dScale,n.y+=i.positionOffsetY*i.dScale);var s=this._map.latLngToLayerPoint(t.latlng),a=this._map.latLngToLayerPoint(t.oldLatLng),l=s.x-n.x-(a.x-n.x),r=s.y-n.y-(a.y-n.y);if(0!==l&&0!==r){var u=180*(Math.atan2(a.y-n.y,a.x-n.x)-Math.atan2(s.y-n.y,s.x-n.x))/Math.PI,p=u;void 0!==this._lastPixel&&(p=180*(Math.atan2(this._lastPixel.y-n.y,this._lastPixel.x-n.x)-Math.atan2(s.y-n.y,s.x-n.x))/Math.PI),function(t,i){for(var o=0;o0&&i.selectedFeatures[a].setScale(r)}else{if(9===i.selectedFeatures[a]._getHandleCount()&&e&&e>0){var u=i._dragStartBounds[i.selectedFeatures[a].uuid],p=i._dragStartLatLngs[i.selectedFeatures[a].uuid],h=i.selectedFeatures[a]._getLatLng(e,u,n);i.selectedFeatures[a]._resizeLatLngs(h,e,u,p)}if(0===i.selectedFeatures[a].libID&&i.selectedFeatures[a].code===SuperMap.Plot.SymbolType.ARCREGION)i.selectedFeatures[a]._generateArcRegionFromServer();else if(SuperMap.AlgoSymbolFactory.isAccessServer(i.selectedFeatures[a].libID,i.selectedFeatures[a].code)){var c=new SuperMap.GetSymbolInfoParameters;c.libID=i.selectedFeatures[a].libID,c.code=i.selectedFeatures[a].code,c.inputPoints=L.Util.latLngsToSuperMapPoints(i.selectedFeatures[a].getLatLngs()),c.scaleValues=i.selectedFeatures[a].scaleValues,c.subSymbols=i.selectedFeatures[a].subSymbols,s.push(i.selectedFeatures[a]),L.supermap.symbolInfoService(o.serverUrl).getSymbolInfo(c,function(t){for(var e=0;e3||Math.abs(a.y-this._lastDragPixel.y)>3)&&s-this.lastDownTime>100))return;var l=new SuperMap.GetSymbolInfoParameters;l.libID=e.libID,l.code=e.code,n?(l.inputPoints=L.Util.latLngsToSuperMapPoints(e.getLatLngs()),l.scalePoints=L.Util.latLngsToSuperMapPoints(e.scalePoints),l.scaleValues=e.scaleValues,l.newScalePoint=new SuperMap.Geometry.Point(t.latlng.lng,t.latlng.lat),l.newScalePointIndex=parseInt(t.target.options.tag)):(e.getLatLngs()[o]=t.target.getLatLng(),l.inputPoints=L.Util.latLngsToSuperMapPoints(e.getLatLngs()),l.scaleValues=e.scaleValues),l.subSymbols=e.subSymbols,L.supermap.symbolInfoService(e.serverUrl).getSymbolInfo(l,function(t){e.symbolData.innerCells=t.result.innerCells,e.symbolData.scalePoints=t.result.scalePoints,e.symbolData.scaleValues=t.result.scaleValues,e.redraw(),e._updateSymbolTexts(),this._resetEditMarkersValue(e)},this),this._lastDragPixel=a,this.lastDownTime=(new Date).getTime()}else if(e.symbolType===SuperMap.Plot.SymbolType.ARCREGION){if(void 0===e.isRedraw&&(e.isRedraw=!0),e.isRedraw){e.getLatLngs()[o]=t.latlng;var r=t.target.getLatLng();-2===t.target.options.nHandle&&(r.isScalePoint=!0),e._modifyPoint(parseInt(t.target.options.tag),r)}}else if(-1===t.target.options.nHandle){switch(e.symbolType){case SuperMap.Plot.SymbolType.REGULARPOLYGON:1===o?e.getLatLngs()[e.getLatLngs().length-1]=t.latlng:e.getLatLngs()[0]=t.latlng;break;case SuperMap.Plot.SymbolType.ELLIPSESYMBOL:e.getLatLngs()[o]=t.latlng;break;case SuperMap.Plot.SymbolType.DOTSYMBOL:e.setLatLngs(e.positionOffset?[e.latLngs[0]]:[t.latlng]);break;default:e.getLatLngs()[o]=t.latlng}e.symbolType===SuperMap.Plot.SymbolType.LINERELATION||e.symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT||e.symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT1||e.symbolType===SuperMap.Plot.SymbolType.ELLIPSESYMBOL?e._modifyPoint(parseInt(t.target.options.tag),t.latlng):e.redraw(),e._updateSymbolTexts(),this._resetEditMarkersValue(e)}else if(-2===t.target.options.nHandle){if((r=t.target.getLatLng()).isScalePoint=!0,e._modifyPoint(parseInt(t.target.options.tag),r),e.symbolType===SuperMap.Plot.SymbolType.FLAGGROUP)for(var u=0,p=e.components.length;uc&&!0===this.pasteGeoSel[c])if(h instanceof a.Route){var g=y.getNodeFeature(y.getNodeByUuid(h.routeNode.id));this.selectedFeatures(g)}else this.selectFeatures(y);if(s[c]&&s[c].geoSymbolTexts)for(S=0;S400&&(t.options.fontPercent=400),void 0===t.options.fontSpace&&(t.options.fontSpace=0),t.options.fontSpace>30?t.options.fontSpace=30:t.options.fontSpace<0&&(t.options.fontSpace=0);var i=t._latlng,o=this._map.latLngToLayerPoint(i);if(void 0!=o){if(t.options.labelXOffset||t.options.labelYOffset){var n=isNaN(t.options.labelXOffset)?0:t.options.labelXOffset,s=isNaN(t.options.labelYOffset)?0:t.options.labelYOffset;o.x+=n,o.y-=s}if(!0===t.options.fontBackground){this._ctx.font=[t.options.fontStyle?t.options.fontStyle:"normal","normal",t.options.fontWeight?t.options.fontWeight:"normal",t.options.fontSize?t.options.fontSize+"px":"1em",t.options.fontFamily?t.options.fontFamily:"sans-serif"].join(" ");var a=t.options.labelRotation;t.options.labelRotation=0;var l=t.getPxBounds();t.options.labelRotation=a;var r=l.min.x,u=l.min.y,p=l.max.x-l.min.x,h=l.max.y-l.min.y;this._ctx.fillStyle=t.options.fontBackgroundColor,this._ctx.globalAlpha=1,this._ctx.save(),this._ctx.translate(r,u),0!=t.options.labelRotation&&this._ctx.rotate(t.options.labelRotation*Math.PI/180),this._ctx.fillRect(0,0,p,h),this._ctx.restore()}if(!0===t.options.fontShadow){var c=L.point(o.x,o.y);if(t.options.fontShadowOffsetX&&(c.x+=t.options.fontShadowOffsetX),t.options.fontShadowOffsetY&&(c.y+=t.options.fontShadowOffsetY),0!==t.options.labelRotation){var y=o.x,g=o.y,d=t.options.labelRotation*Math.PI/180,f=Math.sqrt(Math.pow(c.x-y,2)+Math.pow(c.y-g,2)),S=d+Math.atan2(c.y-g,c.x-y);c.x=y+f*Math.cos(S),c.y=g+f*Math.sin(S)}var P=t.options.fontStroke;t.options.fontStroke=!1;var m=t.options.fontColor;t.options.fontColor=t.options.fontShadowColor,this._updateTextPt(c,t),t.options.fontColor=m,t.options.fontStroke=P}this._updateTextPt(o,t)}}},_updateImage:function(t){var e=this,i=function(){var t=this.style,i=t.graphicWidth||t.graphicHeight,o=t.graphicHeight||t.graphicWidth;i=i||2*t.pointRadius,o=o||2*t.pointRadius;var n=void 0!==t.graphicXOffset?t.graphicXOffset:-.5*i,s=void 0!==t.graphicYOffset?t.graphicYOffset:-.5*o,a=t.graphicOpacity||t.fillOpacity,l=this.point,r=l.x,u=l.y;if(!isNaN(r)&&!isNaN(u)){e._ctx.save();var p;t.rotation&&(p=t.rotation/180*Math.PI),e._ctx.translate(r,u),p&&e._ctx.rotate(p),e._ctx.translate(n,s),e._ctx.globalAlpha=a;var h=L.Canvas.drawImageScaleFactor||(L.Canvas.drawImageScaleFactor=/android 2.1/.test(navigator.userAgent.toLowerCase())?320/window.screen.width:1);e._ctx.drawImage(this.img,0,0,i*h,o*h),e._ctx.restore()}},o=new Image;"firefox"==SuperMap.Browser.name?(o.onload=function(){i.call({point:t._point,style:t.options,img:o}),o.onload=null},t.options.graphicTitle&&(o.title=t.options.graphicTitle),o.src=t.options.externalGraphic):(t.options.graphicTitle&&(o.title=t.options.graphicTitle),o.onload=function(){o.src=t.options.externalGraphic,i.call({point:t._point,style:t.options,img:o}),o.onload=null}),window.ActiveXObject||"ActiveXObject"in window?o.onload():o.complete&&o.onload()},_updateArc:function(t){if(this._drawing&&!t._empty()){var e=t._point,i=this._ctx,o=t._radius,n=(t._radiusY||o)/o,s=(360-t.options.endAngle)*(Math.PI/180),a=(360-t.options.startAngle)*(Math.PI/180);this._drawnLayers[t._leaflet_id]=t,1!==n&&(i.save(),i.scale(1,n)),i.beginPath(),i.arc(e.x,e.y/n,o,s,a,!1),1!==n&&i.restore(),this._fillStroke(i,t)}},_handleMouseHover:function(t,e){var i,o=null;for(var n in this._map._layers)if((i=this._map._layers[n])._drawFirst)for(var s=i._drawFirst;s;s=s.next)s.layer.options.interactive&&s.layer._containsPoint(e)&&!this._map._draggableMoved(s.layer)&&(o=s.layer);o!==this._hoveredLayer&&(this._handleMouseOut(t),o&&(L.DomUtil.addClass(this._container,"leaflet-interactive"),this._fireEvent([o],t,"mouseover"),this._hoveredLayer=o)),this._hoveredLayer&&this._fireEvent([this._hoveredLayer],t)},_onClick:function(t){var e,i=this._map.mouseEventToLayerPoint(t),o=[],n=[];for(var s in this._map._layers)if(this._map._layers[s]._drawFirst)for(var a=this._map._layers[s]._drawFirst;a;a=a.next)if(a.layer.options.interactive&&a.layer._containsPoint(i)&&!this._map._draggableMoved(a.layer)&&(e=a.layer).hasOwnProperty("_eventParents")&&null!==e._eventParents)for(var l in e._eventParents)n.push(e),o.push(e._eventParents[l]);if(e&&n.length>1){if(o.length>0){for(var r=!1,u=[],p=[],s=0,h=o.length;s1){this._fireEvent([p[s]],t);break}if(!r){this._fireEvent([p[p.length-1]],t);break}}}}else e&&(L.DomEvent.fakeStop(t),this._fireEvent([e],t))}}),L.Polyline.prototype._containsPoint=function(t,e){var i,o,n,s,a,l,r=this._clickTolerance()+5;if(!this._pxBounds.contains(t))return!1;for(i=0,s=this._parts.length;iu;)t.removeChild(t.lastChild);for(var p=0;p400&&(t.options.fontPercent=400),void 0===t.options.fontSpace&&(t.options.fontSpace=0),t.options.fontSpace>30?t.options.fontSpace=30:t.options.fontSpace<0&&(t.options.fontSpace=0);var i=t._latlng,o=this._map.latLngToLayerPoint(i);if(void 0!=o){if(L.Browser.ie||L.Browser.ielt9){var n=.35*parseFloat(t.options.fontSize);o.y=o.y-n}if(t.options.labelXOffset||t.options.labelYOffset){var s=isNaN(t.options.labelXOffset)?0:t.options.labelXOffset,a=isNaN(t.options.labelYOffset)?0:t.options.labelYOffset;o.x+=s,o.y-=a}if(!0===t.options.fontShadow){t._shadowTextNode&&t._shadowTextNode.parentNode||(t._shadowTextNode=L.SVG.create("text"),this._rootGroup.appendChild(t._shadowTextNode));var l=L.point(o.x,o.y);if(t.options.fontShadowOffsetX&&(l.x+=t.options.fontShadowOffsetX),t.options.fontShadowOffsetY&&(l.y+=t.options.fontShadowOffsetY),0!==t.options.labelRotation){var r=o.x,u=o.y,p=t.options.labelRotation*Math.PI/180,h=Math.sqrt(Math.pow(l.x-r,2)+Math.pow(l.y-u,2)),c=p+Math.atan2(l.y-u,l.x-r);l.x=r+h*Math.cos(c),l.y=u+h*Math.sin(c)}var y=t.options.fontStroke;t.options.fontStroke=!1;var g=t.options.fontColor;t.options.fontColor=t.options.fontShadowColor,this._updateTextPt(t._shadowTextNode,l,t,"shadow"),t.options.fontColor=g,t.options.fontStroke=y}else t._shadowTextNode&&t._shadowTextNode.parentNode&&(this._rootGroup.removeChild(t._shadowTextNode),delete t._shadowTextNode);if(t._textNode&&t._textNode.parentNode||(t._textNode=L.SVG.create("text"),this._rootGroup.appendChild(t._textNode),t.options.interactive&&L.DomUtil.addClass(t._textNode,"leaflet-interactive"),t.addInteractiveTarget(t._textNode)),this._updateTextPt(t._textNode,o,t,"label"),!0===t.options.fontBackground){var d=t._shadowTextNode;if(d&&d.parentNode||(d=t._textNode),!d||!d.parentNode)return;t._backgroundTextNode&&t._backgroundTextNode.parentNode||(t._backgroundTextNode=L.SVG.create("rect"),!0===t.options.fontShadow?this._rootGroup.insertBefore(t._backgroundTextNode,t._shadowTextNode):this._rootGroup.insertBefore(t._backgroundTextNode,t._textNode));var f=t._textNode.getBBox();t._backgroundTextNode.x.baseVal.value=f.x,t._backgroundTextNode.y.baseVal.value=f.y,t._backgroundTextNode.width.baseVal.value=f.width,t._backgroundTextNode.height.baseVal.value=f.height,t._backgroundTextNode.style.fill=t.options.fontBackgroundColor,t.options.labelRotation&&t._backgroundTextNode.setAttributeNS(null,"transform","rotate("+t.options.labelRotation+" "+o.x+","+o.y+")")}else t._backgroundTextNode&&t._backgroundTextNode.parentNode&&(this._rootGroup.removeChild(t._backgroundTextNode),delete t._backgroundTextNode)}else t._removeNode()}else t._removeNode()},_updateImage:function(t){if(t._imageNode&&t._imageNode.parentNode||(t._imageNode=L.SVG.create("image"),this._rootGroup.appendChild(t._imageNode)),t._imageNode.setAttributeNS(null,"cx",t._point.x),t._imageNode.setAttributeNS(null,"cy",t._point.y),t._imageNode.setAttributeNS(null,"r",1),t._imageNode.style.visibility="",t.options.graphicTitle){t._imageNode.setAttributeNS(null,"title",t.options.graphicTitle);var e=L.SVG.create("title");e.textContent=style.graphicTitle,t._imageNode.appendChild(e)}t.options.graphicWidth&&t.options.graphicHeight&&t._imageNode.setAttributeNS(null,"preserveAspectRatio","none");var i=t.options.graphicWidth||t.options.graphicHeight,o=t.options.graphicHeight||t.options.graphicWidth;i=i||2*t.options.pointRadius,o=o||2*t.options.pointRadius;var n=void 0!=t.options.graphicXOffset?t.options.graphicXOffset:-.5*i,s=void 0!=t.options.graphicYOffset?t.options.graphicYOffset:-.5*o,a=t.options.graphicOpacity||t.options.fillOpacity;t._imageNode.setAttributeNS(null,"x",(t._point.x+n).toFixed()),t._imageNode.setAttributeNS(null,"y",(t._point.y+s).toFixed()),t._imageNode.setAttributeNS(null,"width",i),t._imageNode.setAttributeNS(null,"height",o),t._imageNode.setAttributeNS("http://www.w3.org/1999/xlink","href",t.options.externalGraphic),t._imageNode.setAttributeNS(null,"style","opacity: "+a),t._imageNode.onclick=L.SVG.preventDefault;var l=t.options.rotation;void 0===l&&void 0===t._imageNode._rotation||!t._point||(t._imageNode._rotation=l,l|=0,t._imageNode.setAttributeNS(null,"transform","rotate("+l+" "+t._point.x+" "+t._point.y+")")),t._imageNode.setAttributeNS(null,"fill","none"),t._imageNode.setAttributeNS(null,"stroke","none"),t.options.pointerEvents?(t._imageNode.setAttributeNS(null,"pointer-events",t.options.pointerEvents),t._imageNode.style.pointerEvents=t.options.pointerEvents):(t._imageNode.setAttributeNS(null,"pointer-events","visiblepainted"),t._imageNode.style.pointerEvents="visiblepainted"),null!=t.options.cursor&&t._imageNode.setAttributeNS(null,"cursor",style.cursor)},_updateArc:function(t){if(this._drawing&&!t._empty()){var e=t._point,i=t._radius,o="a"+i+","+(t._radiusY||i)+" 0 1,0 ";sRadian=(360-t.options.endAngle)*(Math.PI/180),eRadian=(360-t.options.startAngle)*(Math.PI/180);var n=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+o+2*i+",0 "+o+2*-i+",0 ";this._setPath(t,n)}}}),L.SVG.LABEL_ALIGN={l:"start",r:"end",b:"bottom",t:"hanging"},L.SVG.LABEL_VSHIFT={t:"-83%",b:"0"},L.SVG.LABEL_VFACTOR={t:0,b:-1},L.SVG.preventDefault=function(t){t.preventDefault&&t.preventDefault()}},function(t,e,i){"use strict";var o=i(9);i(136),i(4);L.Map.include({getFeatureByUuid:function(t){var e=[];for(var i in this._layers)if(this._layers[i]instanceof o.PlottingLayer){var n=this._layers[i].getFeatureByUuid(t);null!==n&&e.push(n)}return 0===e.length?null:e[0]},getPlottingLayers:function(){var t=[],e=this._layers;for(var i in e)e[i]instanceof o.PlottingLayer&&t.push(e[i]);return t},clearPlottingLayers:function(){var t=this._layers;for(var e in t)t[e]instanceof o.PlottingLayer&&(t[e].removeAllFeatures(),this.removeLayer(t[e]))},getLayersByName:function(t){return this.getLayersBy("name",t)},getLayersBy:function(t,e){return this.getBy("_layers",t,e)},getBy:function(t,e,i){var o="function"==typeof i.test,n=[];for(var s in this[t])n.push(this[t][s]);return SuperMap.Array.filter(n,function(t){return t[e]===i||o&&i.test(t[e])})},latLngToLayerPoint:function(t){return this.project(L.latLng(t))._subtract(this.getPixelOrigin())}})},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.plottingGraphicLayer=e.PlottingGraphicLayer=void 0;var o=i(134),n=i(135),s=i(137),a=e.PlottingGraphicLayer=L.Path.extend({cacheImages:null,graphics:null,_tempDrawingLayer:null,_currentLatLng:null,options:{renderer:L.canvas()},initialize:function(t){this._tempDrawingLayer=new s.GraphicEditLayer("temportary"),t=t||{},L.Util.setOptions(this,t),this.cacheImages={},this.graphics=[],this.selectGraphics=[]},getEvents:function(){var t={click:this._handleClick,mousemove:this._onMapMouseMove};return this._map._zoomAnimated&&(t.zoomanim=this._zoomAnim),t},_zoomAnim:function(t){var e=this._map.getZoomScale(t.zoom),i=this._map._getCenterOffset(t.center)._multiplyBy(-e).subtract(this._map._getMapPanePos());L.DomUtil.setTransform?L.DomUtil.setTransform(this._canvas,i,e):L.DomUtil.setPosition(this._canvas,i)},_onMapMouseMove:function(t){var e=this._getGraphicsInBounds();if(0!==e.length)for(var i=0,o=e.length;iI.maxEditPts&&(i=i.slice(0,I.maxEditPts)),I.latLngs=L.Util.cloneLatLngs(i)),I}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Plotting=void 0;!function(t){t&&t.__esModule}(i(104));var o=i(25),n=i(27),s=i(138),a=null,l=e.Plotting=L.Evented.extend({serverUrl:null,map:null,defaultStyle:null,sitDataManager:null,symbolLibManager:null,clientID:null,animationManager:null,initialize:function(t,e,i){t&&null!==t&&(l.prototype.map=t),e&&(l.prototype.serverUrl=e),this.defaultStyle=new SuperMap.Plot.DefaultStyle,this.sitDataManager=new o.SitDataManager(this.map,this.serverUrl),this.symbolLibManager=new n.SymbolLibManager(this.serverUrl),this.animationManager=new s.GOAnimationManager(this.map,this.serverUrl)},destroy:function(){l.prototype.serverUrl=null,l.prototype.map=null,this.defaultStyle&&(this.defaultStyle.destroy(),this.defaultStyle=null),this.sitDataManager&&(this.sitDataManager.destroy(),this.sitDataManager=null),this.symbolLibManager&&(this.symbolLibManager.destroy(),this.symbolLibManager=null),this.clientID=null,null!==this.animationManager&&(this.animationManager.destroy(),this.animationManager=null),a=null},getDefaultStyle:function(){return this.defaultStyle},getSitDataManager:function(){return this.sitDataManager},getSymbolLibManager:function(){return this.symbolLibManager},getGOAnimationManager:function(){return this.animationManager},getClientID:function(){return this.clientID},setClientID:function(t){this.clientID=t},setMap:function(t){l.prototype.map=t,null===this.sitDataManager.map&&(o.SitDataManager.prototype.map=t),null===this.animationManager.map&&this.animationManager.setMap(t)},setPlotUrl:function(t){l.prototype.serverUrl=t,null===this.sitDataManager.serverUrl&&(o.SitDataManager.prototype.serverUrl=t),null===this.symbolLibManager.url&&(n.SymbolLibManager.prototype.url=t),null===this.animationManager.serverUrl&&(s.GOAnimationManager.prototype.serverUrl=t)}});L.supermap.plotting.getControl=function(t,e){return null===a&&(a=new l(t,e)),t&&null!==t&&null===a.map&&a.setMap(t),e&&null!==e&&null===a.serverUrl&&a.setPlotUrl(e),a}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.query=e.Query=void 0;var o=i(4),n=e.Query=L.Class.extend({map:null,initialize:function(t){t&&null!==t&&(this.map=t)},destroy:function(){this.map=null,delete this.map},captureGObject:function(t){var e=[];if(t){for(var i=this.map.getPlottingLayers(),n=0;na.lat?s.lat:a.lat;e.latr||(e.lat-s.lat)*(a.lng-s.lng)/(a.lat-s.lat)+s.lng>e.lng&&i++}}return i%2==1},getGObjectsInCircle:function(t,e){if(t&&e){for(var i=[],n=this.map.getPlottingLayers(),s=0;sMath.sqrt(Math.pow(t.lng-u.lng,2)+Math.pow(t.lat-u.lat,2))&&i.push(r)}}}return i}},getGObjectsInRect:function(t,e){if(t&&e){for(var i=[],n=this.map.getPlottingLayers(),s=0;se.lat?u.lng>t.lng&&u.lnge.lat&&i.push(r):u.lnge.lng&&u.late.lat&&i.push(r)}}}return i}}}),s=e.query=function(t){return new n(t)};L.supermap.plotting.query=s},function(t,e,i){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.smlFileService=e.SMLFileService=void 0;var n=o(i(101)),s=o(i(98)),a=(o(i(100)),e.SMLFileService=L.supermap.ServiceBase.extend({initialize:function(t,e){L.supermap.ServiceBase.prototype.initialize.call(this,t,e)},getSMLInfos:function(t,e,i){var o=this;return i||(i=o),new n.default(o.url,{eventListeners:{scope:i,processCompleted:e,processFailed:e}}).processAsync(t),o},editSMLFile:function(t,e,i){var o=this;return i||(i=o),new s.default(o.url,{eventListeners:{scope:i,processCompleted:e,processFailed:e}}).processAsync(t),o}})),l=e.smlFileService=function(t,e){return new a(t,e)};L.supermap.smlFileService=l},function(t,e,i){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.symbolInfoService=e.SymbolInfoService=void 0;var n=o(i(22)),s=(o(i(103)),e.SymbolInfoService=L.supermap.ServiceBase.extend({initialize:function(t,e){L.supermap.ServiceBase.prototype.initialize.call(this,t,e)},getSymbolInfo:function(t,e,i){var o=this;return i||(i=o),new n.default(o.url,{serverType:o.options.serverType,eventListeners:{scope:i,processCompleted:e,processFailed:e}}).processAsync(t),o}})),a=e.symbolInfoService=function(t,e){return new s(t,e)};L.supermap.symbolInfoService=a},function(t,e,i){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.symbolLibService=e.SymbolLibService=void 0;var n=o(i(20)),s=o(i(21)),a=(o(i(99)),e.SymbolLibService=L.supermap.ServiceBase.extend({initialize:function(t,e){L.supermap.ServiceBase.prototype.initialize.call(this,t,e)},getLibIDs:function(t,e){var i=this;return e||(e=i),new n.default(i.url,{eventListeners:{scope:e,processCompleted:t,processFailed:t}}).processAsync(),i},getLibInfo:function(t,e,i){var o=this;return i||(i=o),new s.default(o.url,{eventListeners:{scope:i,processCompleted:e,processFailed:e}}).processAsync(t),o}})),l=e.symbolLibService=function(t,e){return new a(t,e)};L.supermap.symbolLibService=l},function(t,e,i){"use strict";L.supermap.plotting=L.supermap.plotting||{},L.Util.latLngsToSuperMapPoints=function(t){var e=[];L.Util.isArray(t)||(t=[t]);for(var i=0;i=this.minEditPts){this.clearScalePoints();var i=SuperMap.Plot.PlottingUtil.clonePoints(t),o=!1;void 0!==i[0].z&&(o=!0);var n=SuperMap.Plot.ArrowToolKit.generateArrowBodyShapePts(t,this.getScaleValues(),SuperMap.Plot.ArrowToolKit.ArrowBodyType.ARROWBODY_PARALLEL),s=n.arrowTouLen,a=n.leftBodyPts,l=n.rightBodyPts,r=[];r.push(a[a.length-1]),r.push(l[l.length-1]);var u=[];u.push(this.getScaleValues()[3]),u.push(this.getScaleValues()[4]),u.push(this.getScaleValues()[0]),u.push(this.getScaleValues()[1]);var p=SuperMap.Plot.ArrowToolKit.generateArrowHeadShapePts(t,r,u,s,SuperMap.Plot.ArrowToolKit.ArrowHeadType.ARROWHEAD_WITHOUT_EAR),h=[];if(o){for(var c=[],y=[],g=[],d=0;d=0;M--)h.push(g[M]);v=new SuperMap.Geometry.Point((r[0].x+r[1].x)/2,(r[0].y+r[1].y)/2);(_=new SuperMap.Geometry.Point(v.x,v.y)).isScalePoint=!0,_.tag=0,this.addScalePoint(_),(T=new SuperMap.Geometry.Point(a[a.length-1].x,a[a.length-1].y)).isScalePoint=!0,T.tag=1,this.addScalePoint(T),(x=new SuperMap.Geometry.Point(p[0].x,p[0].y)).isScalePoint=!0,x.tag=2,this.addScalePoint(x);for(d=0;d=0;M--)h.push(l[M]);var v=new SuperMap.Geometry.Point((r[0].x+r[1].x)/2,(r[0].y+r[1].y)/2),_=new SuperMap.Geometry.Point(v.x,v.y);_.isScalePoint=!0,_.tag=0,this.addScalePoint(_);var T=new SuperMap.Geometry.Point(a[a.length-1].x,a[a.length-1].y);T.isScalePoint=!0,T.tag=1,this.addScalePoint(T);var x=new SuperMap.Geometry.Point(p[0].x,p[0].y);x.isScalePoint=!0,x.tag=2,this.addScalePoint(x)}this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,h)}}},{key:"modifyPoint",value:function(t,e){if(!0===e.isScalePoint){var i=new SuperMap.Geometry.Point(this.getScalePoints()[0].x,this.getScalePoints()[0].y),o=new SuperMap.Geometry.Point(this.getScalePoints()[1].x,this.getScalePoints()[1].y),n=new SuperMap.Geometry.Point(this.getScalePoints()[2].x,this.getScalePoints()[2].y),s=this.getScaleValues()[0],a=SuperMap.Plot.PlottingUtil.polylineDistance(this.controlPoints),l=a*s;if(0==t){var r=SuperMap.Plot.PlottingUtil.pointProjectToSegment(e,this.controlPoints[this.controlPoints.length-2],this.controlPoints[this.controlPoints.length-1]),u=r.projectPoint;if(r.isOnline){g=SuperMap.Plot.PlottingUtil.distance(u,this.controlPoints[this.controlPoints.length-1]);this.getScaleValues()[0]=g/a}}else if(1==t){var u=SuperMap.Plot.PlottingUtil.pointProjectToSegment(e,o,n).projectPoint,p=SuperMap.Plot.PlottingUtil.distance(u,i);this.getScaleValues()[1]=p/l}else if(2==t){var h=SuperMap.Plot.PlottingUtil.pointProjectToSegment(e,this.controlPoints[1],n).projectPoint,c=SuperMap.Plot.PlottingUtil.pointProjectToSegment(h,i,this.controlPoints[1]),y=c.projectPoint,g=SuperMap.Plot.PlottingUtil.distance(y,i);!0===c.inOnline?this.getScaleValues()[4]=-g/l:this.getScaleValues()[4]=g/l}}this.calculateParts()}}]),e}());e.default=u,SuperMap.Geometry.AlgoSymbol1001=u},function(t,e,i){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var i=0;i=2&&t.length2*o-1){for(a=0;ay[a].length)){for(var m=p[a][p[a].length-1],b=h[a][0],L=new SuperMap.Geometry.Point(.5*(m.x+b.x),.5*(m.y+b.y)),M=y[a][y[a].length-1],v=y[a][y[a].length-2],_=this.ComputeZValue(L,M,v),T={x:L.x,y:L.y,z:_},x=[],O=[],A=0;A=0;A--)if(a==o-1)w.push(y[a][A]);else{var D={x:y[a][A].x,y:y[a][A].y,z:.5*(y[a][A].z+y[a+1][A].z)};w.push(D)}this.ComputeBeizerZValueByDis(w,h[a],x),S.push(x),x=[];for(var E=c[a],A=0;A0&&this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,I,{surroundLineFlag:!1}),this.clearScalePoints(),this.setScalePoints(this.getScalePoints().concat(this.m_scalePoints)),!0}l.shapePts.length>0&&this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,l.shapePts,{surroundLineFlag:!1}),this.clearScalePoints();for(a=0;athis.MAX_SCALEVALUE?s=this.MAX_SCALEVALUE:s3)for(var a=o-1,l=0,r=a;l3)for(var s=o-1,a=0,l=s;a0)if(1==t)i.push(0);else{var o=SuperMap.Plot.PlottingUtil.distance(e[0],e[this.MIN_PTCOUNT_PERARROW]);i.push(o);for(var n=1,s=this.MIN_PTCOUNT_PERARROW;nb&&(m=.5*b);var L=m*c;d.push(d[p].clone());var M=0,v=0;M=f-m;var _=[],T=0;for(T=2;T<=p;T++)v+=SuperMap.Plot.PlottingUtil.distance(d[T-1],d[T-2]),SuperMap.Plot.PlottingUtil.equalFuzzy(M,0,1e-14)?_[T]=0:SuperMap.Plot.PlottingUtil.equalFuzzy(M-v,0,1e-14)?_[T]=L:_[T]=L+(S-L)*Math.pow((M-v)/M,this.SV_ATScaleParameter);_[p+1]=L;var x=new SuperMap.Geometry.Point(0,0),O=new SuperMap.Geometry.Point(0,0),A=new SuperMap.Geometry.Point(0,0);for(T=2;T<=p;T++){SuperMap.Plot.PlottingUtil.getTrianglePoints(this.AB_CTRLPT_RATE1,this.AB_CTRLPT_RATE2,d[T-2],d[T-1],d[T],O,A),p==T&&SuperMap.Plot.PlottingUtil.getTrapezoidPoints(this.AB_CTRLPT_RATE3,d[p],d[p-1],A,x);P=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(_[T],O,d[T-1]);s[T]=P.pntLeft,n[T]=P.pntRight}var w=x.clone();if(SuperMap.Plot.PlottingUtil.distance(d[p],w)>0){var D=SuperMap.Plot.PlottingUtil.getIncentrePointOnSegmentByScale(m,d[p],x);d[p]=D.clone()}P=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(L,d[p+1],d[p]);for(n[p+1]=P.pntLeft,s[p+1]=P.pntRight,T=2;T<=p;T++)SuperMap.Plot.PlottingUtil.getTrianglePoints(this.AB_CTRLPT_RATE2,this.AB_CTRLPT_RATE2,n[T-1],n[T],n[T+1],O,A),a[T]=O.clone(),l[T]=A.clone(),SuperMap.Plot.PlottingUtil.getTrianglePoints(this.AB_CTRLPT_RATE2,this.AB_CTRLPT_RATE2,s[T-1],s[T],s[T+1],O,A),r[T]=O.clone(),u[T]=A.clone();SuperMap.Plot.PlottingUtil.getTrapezoidPoints(this.AB_CTRLPT_RATE3,n[1],n[2],a[2],x),l[1]=x.clone(),SuperMap.Plot.PlottingUtil.getTrapezoidPoints(this.AB_CTRLPT_RATE3,s[1],s[2],r[2],x),u[1]=x.clone();var E,I;I=SuperMap.Plot.PlottingUtil.distance(n[p+1],n[p])*(1/3),(E=SuperMap.Plot.PlottingUtil.getExcentrePointOnSegmentByScale(I,d[p],d[p+1])).x+=n[p+1].x-d[p].x,E.y+=n[p+1].y-d[p].y,I=(S-L)*Math.pow(I/M,this.SV_ATScaleParameter+.3),P=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(I,n[p+1],E),a[p+1]=P.pntLeft.clone(),I=SuperMap.Plot.PlottingUtil.distance(s[p+1],s[p])*(1/3),(E=SuperMap.Plot.PlottingUtil.getExcentrePointOnSegmentByScale(I,d[p],d[p+1])).x+=s[p+1].x-d[p].x,E.y+=s[p+1].y-d[p].y,I=(S-L)*Math.pow(I/M,this.SV_ATScaleParameter+.3),P=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(I,s[p+1],E),r[p+1]=P.pntRight.clone();var N=[],C=m*g,R=SuperMap.Plot.PlottingUtil.getExcentrePointOnSegmentByScale(C,d[p],d[p+1]);this.m_scalePoints.push(R.clone()),C=m*y,P=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(C,d[p+1],R),N.push(P.pntRight),N.push(d[p+1]),N.push(P.pntLeft);var U=[];for(U.push(n[p+1]),T=p;T>=1;T--)U.push(a[T+1]),U.push(l[T]),U.push(n[T]);var G=[];for(T=1;T<=p;T++)G.push(s[T]),G.push(u[T]),G.push(r[T+1]);G.push(s[p+1]),o.push.apply(o,G),o.push.apply(o,N),o.push.apply(o,U),i=m/f;var B=[];for(T=U.length-1;T>=0;T--)B.push(U[T]);return{dATLenDivABLen:i,arrowBodyPts:o}}},{key:"generateAYPts",value:function(t,e,i,o,n){var s=new SuperMap.Geometry.Point(.5*(t[2].x+i[2].x),.5*(t[2].y+i[2].y)),a=new SuperMap.Geometry.Point(.5*(t[1].x+i[1].x),.5*(t[1].y+i[1].y)),l=new SuperMap.Geometry.Point(.5*(t[0].x+i[0].x),.5*(t[0].y+i[0].y)),r=SuperMap.Plot.PlottingUtil.distance(s,a),u=SuperMap.Plot.PlottingUtil.distance(l,a),p=n*(r+u),h=new SuperMap.Geometry.Point(0,0),c=new SuperMap.Geometry.Point(0,0),y=new SuperMap.Geometry.Point(0,0);if(p>r){p=r+u-p,h=SuperMap.Plot.PlottingUtil.getIncentrePointOnSegmentByScale(p,l,a);var g=SuperMap.Plot.PlottingUtil.distance(t[1],t[0]),d=SuperMap.Plot.PlottingUtil.distance(i[1],i[0]);g=g*p/u,c=SuperMap.Plot.PlottingUtil.getIncentrePointOnSegmentByScale(g,t[0],t[1]),d=d*p/u,y=SuperMap.Plot.PlottingUtil.getIncentrePointOnSegmentByScale(d,i[0],i[1])}else{h=SuperMap.Plot.PlottingUtil.getIncentrePointOnSegmentByScale(p,s,a);var f=SuperMap.Plot.PlottingUtil.distance(t[1],t[2]),S=SuperMap.Plot.PlottingUtil.distance(i[1],i[2]);f=f*p/r,c=SuperMap.Plot.PlottingUtil.getIncentrePointOnSegmentByScale(f,t[2],t[1]),S=S*p/r,y=SuperMap.Plot.PlottingUtil.getIncentrePointOnSegmentByScale(S,i[2],i[1])}this.m_scalePoints.push(h.clone());var P=this.SV_ArrowWoCtrl*SuperMap.Plot.PlottingUtil.distance(h,c),m=this.SV_ArrowWoCtrl*SuperMap.Plot.PlottingUtil.distance(h,y),b=SuperMap.Plot.PlottingUtil.getIncentrePointOnSegmentByScale(P,h,c),L=SuperMap.Plot.PlottingUtil.getIncentrePointOnSegmentByScale(m,h,y),M=e[11].clone(),v=e[10].clone(),_=o[5].clone(),T=o[6].clone(),x=SuperMap.Plot.PlottingUtil.intersectLines(v,M,h,c),O=SuperMap.Plot.PlottingUtil.distance(x.intersectPoint,v),A=SuperMap.Plot.PlottingUtil.distance(v,h);O=O>A?this.SV_AJCtrl*A:this.SV_AJCtrl*O;var w=SuperMap.Plot.PlottingUtil.getIncentrePointOnSegmentByScale(O,v,M);M=w.clone(),e[11]=w.clone(),x=SuperMap.Plot.PlottingUtil.intersectLines(T,_,h,y),O=(O=SuperMap.Plot.PlottingUtil.distance(x.intersectPoint,T))>(A=SuperMap.Plot.PlottingUtil.distance(T,h))?this.SV_AJCtrl*A:this.SV_AJCtrl*O,_=(w=SuperMap.Plot.PlottingUtil.getIncentrePointOnSegmentByScale(O,T,_)).clone(),o[5]=w.clone();var D=[];D.push(v),D.push(M),D.push(b),D.push(h);var E=[];return E.push(h),E.push(L),E.push(_),E.push(T),{arrowLeftYaoPts:D,arrowRightYaoPts:E}}}]),e}());e.default=u,SuperMap.Geometry.AlgoSymbol1002=u},function(t,e,i){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var i=0;i=this.minEditPts){if(SuperMap.Plot.PlottingUtil.equalFuzzy(this.controlPoints[0].x,this.controlPoints[1].x)&&SuperMap.Plot.PlottingUtil.equalFuzzy(this.controlPoints[0].y,this.controlPoints[1].y))return;var i=SuperMap.Plot.PlottingUtil.clonePoints(t),o=!1;void 0!==i[0].z&&(o=!0);var n=SuperMap.Plot.ArrowToolKit.generateArrowBodyShapePts(t,this.getScaleValues(),SuperMap.Plot.ArrowToolKit.ArrowBodyType.ARROWBODY_TRAPEZOID),s=n.arrowTouLen,a=n.leftBodyPts,l=n.rightBodyPts,r=[];r.push(a[a.length-1]),r.push(l[l.length-1]);var u=[];u.push(this.getScaleValues()[3]),u.push(this.getScaleValues()[4]),u.push(0),u.push(0);var p=SuperMap.Plot.ArrowToolKit.generateArrowHeadShapePts(t,r,u,s,SuperMap.Plot.ArrowToolKit.ArrowHeadType.ARROWHEAD_WITHOUT_EAR),h=[];h=(h=h.concat(a)).concat(p);for(var c=l.length-1;c>=0;c--)h.push(l[c]);if(h.push(a[0]),o){for(var y=[],g={x:i[1].x,y:i[1].y,z:i[1].z},d={x:i[0].x,y:i[0].y,z:i[0].z},f=0;f=2&&t.length0&&this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,y,{surroundLineFlag:!1}),this.m_scalePoints.length>0&&(this.m_scalePoints[0]={x:this.m_scalePoints[0].x,y:this.m_scalePoints[0].y,z:L});for(a=0;a0&&this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,A,{surroundLineFlag:!1}),this.clearScalePoints();for(a=0;athis.SV1_MaxValue&&(i=this.SV1_MaxValue)}else i=SuperMap.Plot.PlottingUtil.distance(a.projectPoint,n)=2&&t.length=0;f--)e.push(p[f]),o.push(p[f]);for(f=1;f=0;g--)e.push(u[g]),o.push(u[g])}return{shapePts:e,leftBodyPts:i,rightBodyPts:o,arrowHeadPts:n}}},{key:"updateScalePoints",value:function(t){var e=t.length,i=[];if(!(e<3)){var o=SuperMap.Plot.PlottingUtil.polylineDistance(t);if(!SuperMap.Plot.PlottingUtil.equalFuzzy(o,0)){var n=this.operateCtrlPts(t);e=n.length,e--;for(var s=[],a=0;a0&&P>0){var b=1/(d-g[2].x),L=-1/(f-g[2].y),M=1*g[2].y/(f-g[2].y)-1*g[2].x/(d-g[2].x);m=Math.abs(b*g[0].x+L*g[0].y+M)/Math.sqrt(b*b+L*L)}else P<=1e-4?m=Math.abs(f-g[1].y):S<=1e-4&&(m=Math.abs(d-g[1].x));var v=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(m,g[2],new SuperMap.Geometry.Point(d,f)),_=SuperMap.Plot.PlottingUtil.pointIsRightToLine(g[1],g[2],g[0]);_?(n[1]=g[1],s[1]=g[0]):(n[1]=g[0],s[1]=g[1]),g[1]=new SuperMap.Geometry.Point((g[0].x+g[1].x)/2,(g[0].y+g[1].y)/2);var T=Math.sqrt((v.pntLeft.x-v.pntRight.x)*(v.pntLeft.x-v.pntRight.x)+(v.pntLeft.y-v.pntRight.y)*(v.pntLeft.y-v.pntRight.y))*this.sv_AtWidthDivAwWidth,x=(o=T*this.sv_AtLenDivAtWidth)*c;SuperMap.Plot.PlottingUtil.equalFuzzy(h,0)||(x=(o=t*h)*c);var O=SuperMap.Plot.PlottingUtil.distance(g[p],g[p-1]),A=2*o;O0&&(g[p]=SuperMap.Plot.PlottingUtil.getIncentrePointOnSegmentByScale(o,g[p],C)),N=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(x,g[p+1],g[p]),(_=SuperMap.Plot.PlottingUtil.pointIsRightToLine(g[p],g[p+1],N.pntLeft))?(s[p]=new SuperMap.Geometry.Point(N.pntLeft.x,N.pntLeft.y),n[p]=new SuperMap.Geometry.Point(N.pntRight.x,N.pntRight.y)):(s[p]=new SuperMap.Geometry.Point(N.pntRight.x,N.pntRight.y),n[p]=new SuperMap.Geometry.Point(N.pntLeft.x,N.pntLeft.y));var G;for(E=2;E=2&&t.length.3||this.subSymbolScaleValue<=0)&&(this.subSymbolScaleValue=.3),this.subSymbolScaleValue<=0&&(this.subSymbolScaleValue=.3)}this.arrowLength=this.subSymbolScaleValue*t;var i=this.arrowAngle*Math.PI/180/2,o=SuperMap.Plot.PlottingUtil.radian(this.controlPoints[1],this.controlPoints[0]),n=o-i,s=this.controlPoints[1].x+this.arrowLength*Math.cos(n),a=this.controlPoints[1].y+this.arrowLength*Math.sin(n),l=new SuperMap.Geometry.Point(s,a),r=o+i,u=this.controlPoints[1].x+this.arrowLength*Math.cos(r),p=this.controlPoints[1].y+this.arrowLength*Math.sin(r),h=new SuperMap.Geometry.Point(u,p),c=[];c.push(l),c.push(this.controlPoints[1].clone()),c.push(h);this.arrowTypeEnd===SuperMap.Plot.ArrowLineType.DOUBLELINE?SuperMap.Plot.SymbolType.POLYLINESYMBOL:SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL;var y={surroundLineFlag:!1,fillLimit:!0,lineTypeLimit:!0},g={surroundLineFlag:!1,fillLimit:!0,lineTypeLimit:!0},d=new SuperMap.Geometry.Point((s+u)/2,(a+p)/2);n=(o+=Math.PI)-i,s=this.controlPoints[0].x+this.arrowLength*Math.cos(n),a=this.controlPoints[0].y+this.arrowLength*Math.sin(n),l=new SuperMap.Geometry.Point(s,a),r=o+i,u=this.controlPoints[0].x+this.arrowLength*Math.cos(r),p=this.controlPoints[0].y+this.arrowLength*Math.sin(r),h=new SuperMap.Geometry.Point(u,p);var f=[];f.push(l),f.push(this.controlPoints[0].clone()),f.push(h);var S=this.arrowTypeStart===SuperMap.Plot.ArrowLineType.DOUBLELINE?SuperMap.Plot.SymbolType.POLYLINESYMBOL:SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,P=this.arrowTypeEnd===SuperMap.Plot.ArrowLineType.DOUBLELINE?SuperMap.Plot.SymbolType.POLYLINESYMBOL:SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,m=new SuperMap.Geometry.Point((s+u)/2,(a+p)/2),b=[];this.arrowTypeStart===SuperMap.Plot.ArrowLineType.DOUBLELINE?(b.push(this.controlPoints[0].clone()),this.addCell(S,f,y)):this.arrowTypeStart===SuperMap.Plot.ArrowLineType.TRIANGLESOLID?(b.push(m),this.addCell(S,f,y)):b.push(this.controlPoints[0].clone()),this.arrowTypeEnd===SuperMap.Plot.ArrowLineType.DOUBLELINE?(b.push(this.controlPoints[1].clone()),this.addCell(P,c,y)):this.arrowTypeEnd===SuperMap.Plot.ArrowLineType.TRIANGLESOLID?(b.push(d),this.addCell(P,c,g)):b.push(this.controlPoints[1].clone()),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,b)}}},{key:"_setDefaultOptions",value:function(){l.default.prototype._setDefaultOptions.call(this),this.arrowTypeEnd=this.graphicObject2D.arrowTypeEnd,this.arrowTypeStart=this.graphicObject2D.arrowTypeStart}}]),e}();e.default=r,SuperMap.Geometry.ArrowLine=r},function(t,e,i){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var i=0;i0&&s<.4&&(this.getScaleValues()[0]=s);else if(1==t){var n=new SuperMap.Geometry.Point((i[0].x+i[1].x)/2,(i[0].y+i[1].y)/2),s=(new SuperMap.Geometry.Point(e.x,n.y),SuperMap.Plot.PlottingUtil.distance(e,n)/o);0s&&(this.getScaleValues()[1]=s)}}this.calculateParts()}}]),e}();e.default=r,SuperMap.Geometry.Brace=r},function(t,e,i){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var i=0;iMath.abs(this.radius[i]-this.radius[M]))for(var n=0;n<2;n++){var s,a;0==n?(a=i,s=SuperMap.Plot.PlottingUtil.radian(e[i],e[M])*this.RTOD,d=Math.acos((o*o+this.radius[i]*this.radius[i]-this.radius[M]*this.radius[M])/(2*o*this.radius[i]))*this.RTOD):(a=M,s=SuperMap.Plot.PlottingUtil.radian(e[M],e[i])*this.RTOD,d=Math.acos((o*o+this.radius[M]*this.radius[M]-this.radius[i]*this.radius[i])/(2*o*this.radius[M]))*this.RTOD);var l=s-d,r=s+d,u=l<0&&r>0||l>360||r>360;l=this.adjustAngle(l),r=this.adjustAngle(r);for(L=this.angleRange[a].length-1;L>=0;L--)if(u){if(r>this.angleRange[a][L].End||SuperMap.Plot.PlottingUtil.equalFuzzy(r,this.angleRange[a][L].End)){this.angleRange[a].splice(L,1);continue}if(r>this.angleRange[a][L].Start&&(this.angleRange[a][L].Start=r),lthis.angleRange[a][L].End)this.angleRange[a].splice(L,1);else if(l>this.angleRange[a][L].Start&&rthis.angleRange[a][L].End)continue;if(l>this.angleRange[a][L].Start&&(this.angleRange[a][L].End=l),r=0;L--){for(var h=this.adjustAngle(this.angleRange[i][L].Start),c=this.adjustAngle(this.angleRange[i][L].End);c=0;i--)for(var M=0;M=0;n--)e.push(t[o][n]);t.splice(o,1);var s=this.generatePolygon(t,e);if(void 0!==s&&0!==s.length)return s}}},{key:"modifyPoint",value:function(t,e){if(!0===e.isScalePoint){if(t<0||t>=this.controlPoints.length)return;var i=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints),o=SuperMap.Plot.PlottingUtil.distance(i[t],e);this.radius[t]=o}this.calculateParts()}},{key:"adjustAngle",value:function(t){for(;t>360;)t-=360;for(;t<0;)t+=360;return t}}]),e}();e.default=r,SuperMap.Geometry.CombinationalCircle=r},function(t,e,i){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var i=0;i360;)this.startAngle-=360;for(;this.startAngle<0;)this.startAngle+=360;for(;this.endAngle>360;)this.endAngle-=360;for(;this.endAngle<0;)this.endAngle+=360;for(;this.endAngle<=this.startAngle;)this.endAngle+=360;for(var e=SuperMap.Plot.PlottingUtil.distance(t[0],t[1]),i=SuperMap.Plot.PlottingUtil.distance(t[0],t[2]),o=[],n=[],s=Math.PI/180,a=(this.endAngle-this.startAngle)/72,l=this.startAngle;l=0;d--)y.push(n[d]);this.addCell(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,y,c),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,o),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,n);var f=t[0].x+e/2*Math.cos(this.startAngle*s),S=t[0].y+e/2*Math.sin(this.startAngle*s),P=t[0].x+i/2*Math.cos(this.endAngle*s),m=t[0].y+i/2*Math.sin(this.endAngle*s),b=new SuperMap.Geometry.Point(f,S);b.isScalePoint=!0,b.tag=0,this.addScalePoint(b);var L=new SuperMap.Geometry.Point(P,m);L.isScalePoint=!0,L.tag=1,this.addScalePoint(L)}}},{key:"modifyPoint",value:function(t,e){if(!0===e.isScalePoint){for(var i=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints),o=180*SuperMap.Plot.PlottingUtil.radian(i[0],e)/Math.PI;o>360;)o-=360;for(;o<0;)o+=360;0==t?this.startAngle=o:1==t&&(this.endAngle=o)}this.calculateParts()}}]),e}();e.default=r,SuperMap.Geometry.ConcentricCircle=r},function(t,e,i){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var i=0;ithis.controlPoints.length))if(2===this.controlPoints.length){var t=this.controlPoints[0].clone(),e=this.controlPoints[1].clone(),i=SuperMap.Plot.PlottingUtil.distance(t,e)/2,o=180*SuperMap.Plot.PlottingUtil.radian(t,e)/Math.PI,n=new SuperMap.Geometry.Point((t.x+e.x)/2,(t.y+e.y)/2),s=SuperMap.Plot.PlottingUtil.circlePoint(n,i,i,o+90),a=SuperMap.Plot.PlottingUtil.circlePoint(n,3*i,3*i,o+90);this.addCell(SuperMap.Plot.SymbolType.CIRCLESYMBOL,[s,new SuperMap.Geometry.Point(s.x+i,s.y)]),this.addCell(SuperMap.Plot.SymbolType.CIRCLESYMBOL,[a,new SuperMap.Geometry.Point(a.x+i,a.y)])}else{var t=this.controlPoints[0].clone(),e=this.controlPoints[1].clone(),l=this.controlPoints[2].clone(),o=0;o=SuperMap.Plot.PlottingUtil.isRight(l,t,e)?180*SuperMap.Plot.PlottingUtil.radian(e,t)/Math.PI+90:180*SuperMap.Plot.PlottingUtil.radian(t,e)/Math.PI+90;var i=SuperMap.Plot.PlottingUtil.distance(t,e)/2,n=new SuperMap.Geometry.Point((t.x+e.x)/2,(t.y+e.y)/2),s=SuperMap.Plot.PlottingUtil.circlePoint(n,i,i,o),r=SuperMap.Plot.PlottingUtil.plumbLineLen(l,t,e);if(r<=4*i){a=SuperMap.Plot.PlottingUtil.circlePoint(n,3*i,3*i,o);this.addCell(SuperMap.Plot.SymbolType.CIRCLESYMBOL,[s,new SuperMap.Geometry.Point(s.x+i,s.y)]),this.addCell(SuperMap.Plot.SymbolType.CIRCLESYMBOL,[a,new SuperMap.Geometry.Point(a.x+i,a.y)])}else{for(var a=SuperMap.Plot.PlottingUtil.circlePoint(n,r-i,r-i,o),u=180*Math.acos(i/(r-2*i))/Math.PI,p=o-u,h=o-180+u,c=o-180-u+360,y=[],g=o+u-360;g<=p;g+=4){S=SuperMap.Plot.PlottingUtil.circlePoint(s,i,i,g);y.push(S)}var d=SuperMap.Plot.PlottingUtil.circlePoint(s,i,i,p);y.push(d);for(var f=[],g=h;g=0;g--)m.push(f[g]);this.addCell(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,m)}}}}]),e}();e.default=u,SuperMap.Geometry.CurveEight=u},function(t,e,i){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var i=0;i2*this.controlPoints.length-1)return;var i=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints);if(2>i.length)return;var o=SuperMap.Plot.PlottingUtil.polylineDistance(i),n=-1;n=t%2==0?Math.floor(t/2):Math.floor((t+1)/2);var s=(e.x-i[n].x)/o,a=(e.y-i[n].y)/o;this.getScaleValues()[2*t]=s,this.getScaleValues()[2*t+1]=a}this.calculateParts()}},{key:"parseSymbolData",value:function(){l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"parseSymbolData",this).call(this)}},{key:"setSymbolData",value:function(){l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"setSymbolData",this).call(this)}},{key:"reSample",value:function(t,e){var i=[];if(null==t||e<0)return i;var o=t.length;if(o>2){var n=new SuperMap.Geometry.Point(0,0),s=0,a=0,l=0,r=2*Math.PI;n=t[0],i.push(n);for(var u=!1,p=!1,h=!1,c=1;c0||SuperMap.Plot.PlottingUtil.equalFuzzy(0,g)?Math.acos(y):2*Math.PI-Math.acos(y),r>2*Math.PI&&s+2*Math.PIl&&(s-=2*Math.PI,r>2*Math.PI&&(r-=2*Math.PI)),s>l&&ss+d&&(r=s+d):(h=!0,r=s+d),u=!0}else n=t[c-1],c--,i.push(n),l=0,r=2*Math.PI,u=!1,p=!1,h=!1}return i.push(t[o-1]),i}return i}},{key:"reSampleByAngle",value:function(t,e){var i=[],o=t.length;if(null==t||o<=0||e<=0)return i;for(var n=t,s=o,a=!1;SuperMap.Plot.PlottingUtil.equalFuzzy(n[0].x,n[s-1].x)&&SuperMap.Plot.PlottingUtil.equalFuzzy(n[0].y,n[s-1].y);){if((s-=1)<=0)return i;a=!0}var l,r,u=[];for(l=0;l1e-10&&SuperMap.Plot.PlottingUtil.distance(n[r],n[l+1])>1e-10){var p=180*SuperMap.Plot.PlottingUtil.InnerAngle(n[l],n[r],n[l+1])/Math.PI;p>e&&p<180-e&&(u[l]=1,r++)}var h=0;for(l=0;l0){for(a&&h++,i=[],r=0,l=0;l1))if(t=(1-t)/2,this.controlPoints.length>=this.minEditPts){this.controlPoints[2]&&(this.controlPoints[2].isFixedPos=!0);var e,i,o,n,s,a;this.controlPoints[0].xi?Math.abs((a-i)/(s-e))>r?2:1:ar?4:1:s>o?a>i?Math.abs((a-i)/(s-o))>r?2:3:ar?4:3:a>i?2:a=2&&this.controlPoints.lengtho?Math.abs((l-o)/(a-i))>u?2:1:lu?4:1:a>n?l>o?Math.abs((l-o)/(a-n))>u?2:3:lu?4:3:l>o?2:lo&&(h=o),h<(o+s)/2&&(h=(o+s)/2),p=1-2*(o-h)/(o-s);break;case 2:case 4:var c=r.x+(e.x-r.x);c>n&&(c=n),c<(i+n)/2&&(c=(i+n)/2),p=1-2*(n-c)/(n-i)}p<0&&(p=0),p>1&&(p=1),this.getScaleValues()[0]=p}this.calculateParts()}}]),e}();e.default=u,SuperMap.Geometry.GeoTooltipBox=u},function(t,e,i){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var i=0;i=this.minEditPts){this.controlPoints[2]&&(this.controlPoints[2].isFixedPos=!0),this.controlPoints[3]&&(this.controlPoints[3].isFixedPos=!0);var e=this.getScaleValues()[0];if(e<0||e>1)return;e=(1-e)/2;var i=this.getScaleValues()[1];if(i<0||i>1)return;i=(1-i)/2;var o,n,s,a,l,r;t[0].xp?(0!==u&&(h.splice(u,0,d),h.splice(u,0,t[2].clone()),h.splice(u,0,g)),0!==p&&(h.splice(p,0,S),h.splice(p,0,t[3].clone()),h.splice(p,0,f))):(0!==p&&(h.splice(p,0,S),h.splice(p,0,t[3].clone()),h.splice(p,0,f)),0!==u&&(h.splice(u,0,d),h.splice(u,0,t[2].clone()),h.splice(u,0,g)))}this.addCell(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,h,{surroundLineFlag:!1})}else if(t.length>=2&&t.length1&&(h=1),this.getScaleValues()[t]=h}this.calculateParts()}},{key:"getAction",value:function(t,e,i,o,n,s){var a=(o-s)/(n-i);return to?Math.abs((e-o)/(t-i))>a?2:1:ea?4:1:t>n?e>o?Math.abs((e-o)/(t-n))>a?2:3:ea?4:3:e>o?2:e1))if(t=(1-t)/2,this.controlPoints.length>=this.minEditPts){this.clearScalePoints();var e,i,o,n,s,a,l=[];if(this.controlPoints[0].xi?Math.abs((a-i)/(s-e))>u?2:1:au?4:1:s>o?a>i?Math.abs((a-i)/(s-o))>u?2:3:au?4:3:a>i?2:a=2&&this.controlPoints.lengtho?Math.abs((l-o)/(a-i))>u?2:1:lu?4:1:a>n?l>o?Math.abs((l-o)/(a-n))>u?2:3:lu?4:3:l>o?2:lo&&(h=o),h<(o+s)/2&&(h=(o+s)/2),p=1-2*(o-h)/(o-s);break;case 2:case 4:var c=r.x+(e.x-r.x);c>n&&(c=n),c<(i+n)/2&&(c=(i+n)/2),p=1-2*(n-c)/(n-i)}p<0&&(p=0),p>1&&(p=1),this.getScaleValues()[0]=p}this.calculateParts()}}]),e}();e.default=u,SuperMap.Geometry.LineMarking=u},function(t,e,i){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var i=0;i=this.minEditPts&&this.computeLine(e)}},{key:"computeLine",value:function(t){this.components=[];var e=t[0],i=t[t.length-1];this.subSectionCount<=1&&(this.subSectionCount=10);var o=SuperMap.Plot.PlottingUtil.distance(e,i)/(2*this.subSectionCount-1);if(this.lineRelationType===SuperMap.Plot.LineRelation.SOLID)this.addCell(24,t,{surroundLineFlag:!1});else if(this.lineRelationType===SuperMap.Plot.LineRelation.DASH)for(a=0;a0)for(var n=0;n1?this.computeText(o,this.textContent[1],t):this.computeText(o,this.textContent[0],t),this.relLineText=SuperMap.Plot.RelLineText.ONBOTHLINE,this.showPathLine=i}else{var n=[];n=this.getRelLineText()===SuperMap.Plot.RelLineText.ONRIGHTLINE?this.getTextPathPts(t,!1):this.getRelLineText()===SuperMap.Plot.RelLineText.ONLEFTLINE?this.getTextPathPts(t,!0):t,this.computeText(n,this.textContent[0],t)}}}},{key:"getTextPathPts",value:function(t,e){t=SuperMap.Plot.PlottingUtil.clearSamePts(t);var i=this.getLonLatDistanceFromPixel(this.getTextToLineDistance());if(0>=i)return SuperMap.Plot.PlottingUtil.clonePoints(t);var o=SuperMap.Plot.PlottingUtil.paraLine(t,i,e);return SuperMap.Plot.PlottingUtil.clearSamePts(o)}},{key:"computeText",value:function(t,e,i){if(!(t.length<2)){for(var o=e.length,n=t,s=n.length,a=0,l=0;l180&&(_-=360),_<-180&&(_+=360),_>90&&_<=180?(b=-180,P=!0,m=!0):_>-180&&_<-90&&(b=180,P=!0,m=!0);0!=b?this.relLineText===SuperMap.Plot.RelLineText.ONLINE||(y=this.relLineText===SuperMap.Plot.RelLineText.ONLEFTLINE?"lt":"lb"):this.relLineText===SuperMap.Plot.RelLineText.ONLINE||(y=this.relLineText===SuperMap.Plot.RelLineText.ONLEFTLINE?"lb":"lt");for(l=0;la);l++){var T=l;for(m&&(T=o-l-1),L=(S=d[T]).getWidth(),P&&(g+=L);u<=g&&p=0){for(var D=[],l=0;l<=v.index;l++)D.push(i[l]);D.push(v.pt),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,D)}if(w.index>=0){var E=[];E.push(w.pt);for(l=w.index+1;l2){for(var n=-1,s=t.length-2;s>=0;s--)if(i=this.minEditPts){this.addCell(32,t,{surroundLineFlag:!1});SuperMap.Plot.PlottingUtil.isPloyClockwise(t);if(this.textContent&&null!==this.textContent&&this.textContent.length>0){var e=[];this.annotationPosition>t.length&&(this.annotationPosition=0);var i={labelRotation:0,surroundLineFlag:!1,labelAlign:"lt"};if(0===this.annotationPosition)e=[SuperMap.Plot.PlottingUtil.getPolygonCenterPt(t)];else{var o=null,n=null;this.annotationPosition===t.length?(o=t[t.length-1],n=t[0]):(o=t[this.annotationPosition-1],n=t[this.annotationPosition]),i.labelRotation=-SuperMap.Plot.PlottingUtil.radian(o,n)/Math.PI*180;var s=this.getScaleValues()[0]*SuperMap.Plot.PlottingUtil.distance(o,n);e=[SuperMap.Plot.PlottingUtil.findPoint(o,n,s,0)]}this.addCell(34,e,i,this.textContent);var a=new SuperMap.Geometry.Point(e[0].x,e[0].y);a.isScalePoint=!0,a.tag=0,this.clearScalePoints(),this.addScalePoint(a)}}else this.controlPoints.length>=2&&this.controlPoints.length=this.minEditPts){for(var t=this.controlPoints[0],e=this.controlPoints[1],i=SuperMap.Plot.PlottingUtil.distance(t,e),o=this.getScaleValues()[0]*i,n=SuperMap.Plot.PlottingUtil.parallel(this.controlPoints,o/2),s=SuperMap.Plot.PlottingUtil.parallel(this.controlPoints,-o/2),a=180*SuperMap.Plot.PlottingUtil.radian(t,e)/Math.PI,l=[],r=a+90;r<=a+270;r+=10){h=SuperMap.Plot.PlottingUtil.circlePoint(t,o/2,o/2,r);l.push(h)}for(var u=[],p=a-90;p<=a+90;p+=10){var h=SuperMap.Plot.PlottingUtil.circlePoint(e,o/2,o/2,p);u.push(h)}var c=[];(c=(c=(c=(c=c.concat(l)).concat(s)).concat(u)).concat(n)).push(c[0]),this.addCell(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,c);var y=new SuperMap.Geometry.Point(l[0].x,l[0].y);this.addScalePoint(y)}}},{key:"modifyPoint",value:function(t,e){if(!0===e.isScalePoint&&0==t){var i=SuperMap.Plot.PlottingUtil.distance(e,this.controlPoints[0]),o=SuperMap.Plot.PlottingUtil.distance(this.controlPoints[0],this.controlPoints[1]);this.getScaleValues()[0]=2*i/o}this.calculateParts()}}]),e}();e.default=u,SuperMap.Geometry.Runway=u},function(t,e,i){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var i=0;i1))if(t=(1-t)/2,this.controlPoints.length>=this.minEditPts){this.clearScalePoints();var e,i,o,n,s,a,l=[];this.controlPoints[0].xi?Math.abs((a-i)/(s-e))>T?2:1:aT?4:1:s>o?a>i?Math.abs((a-i)/(s-o))>T?2:3:aT?4:3:a>i?2:a=2&&this.controlPoints.lengtho?Math.abs((l-o)/(a-i))>u?2:1:lu?4:1:a>n?l>o?Math.abs((l-o)/(a-n))>u?2:3:lu?4:3:l>o?2:lo&&(h=o),h<(o+s)/2&&(h=(o+s)/2),p=1-2*(o-h)/(o-s);break;case 2:case 4:var c=r.x+(e.x-r.x);c>n&&(c=n),c<(i+n)/2&&(c=(i+n)/2),p=1-2*(n-c)/(n-i)}p<0&&(p=0),p>1&&(p=1),this.getScaleValues()[0]=p}this.calculateParts()}},{key:"calculateArc",value:function(t,e,i,o,n,s){(!n||1!=n&&-1!=n)&&(n=-1),s||(s=360);for(var a=Math.PI/s/2,l=a*n,r=Math.abs(o-i),u=[],p=i,h=0;h2*Math.PI?p-2*Math.PI:p}return u}}]),e}();e.default=u,SuperMap.Geometry.SymbolTextBox=u},function(t,e,i){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var i=0;i=2&&t.lengthi.x&&l.xi.y&&l.yo.x||l.yo.y)&&(e[0]=s,e[3]=i),4==e.length&&this.addCell(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,e)}}},{key:"GetPointsByTrapezoid",value:function(t,e,i,o,n){var s=e.x,a=e.y,l=i.x,r=i.y,u=o.x,p=o.y,h=0,c=0,y=0,g=0;if(SuperMap.Plot.PlottingUtil.equalFuzzy(Math.abs(a-r),0))h=s+l-u,c=p;else if(SuperMap.Plot.PlottingUtil.equalFuzzy(Math.abs(s-l),0))h=u,c=a+r-p;else{var d=1*(a-r)/(s-l),f=p-d*u;c=d*(h=((r+a)/2+(s+l)/(2*d)-f)/(d+1/d))+f,h=2*h-u,c=2*c-p}var S=Math.sqrt(1*(s-l)*(s-l)+1*(a-r)*(a-r)),P=Math.sqrt(1*(s-h)*(s-h)+1*(a-c)*(a-c));S>0?(y=s+(l-s)*P/S,g=a+(r-a)*P/S):(y=s,g=a);var m=y+(h-y)*t,b=g+(c-g)*t;n.x=m,n.y=b}}]),e}();e.default=r,SuperMap.Geometry.Trapezoid=r},function(t,e,i){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var i=0;i.7&&(P=.7),this.getScaleValues()[2]=P}}this.calculateParts()}}]),e}();e.default=r,SuperMap.Geometry.AlgoSymbol15200=r},function(t,e,i){"use strict";function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var i=0;ie.length?(this._executeAndRatioIsZero(),!0):(this.animationGOFeature.setLatLngs(L.Util.superMapPointsToLatLngs(e)),!0)},_execute_Generalization:function(t){if(0===this.lineLength&&(this.controlPoints=L.Util.latLngsToSuperMapPoints(this.goFeature.getLatLngs()),this.lineLength=SuperMap.Plot.PlottingUtil.polylineDistance(this.controlPoints)),0===t)return this._executeAndRatioIsZero(),!0;for(var e=[],i=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints),o=this._findPos(this.lineLength*t,i),n=0;n<=o.pos;n++)e.push(i[n]);return e.push(o.pts),SuperMap.AlgoSymbolFactory.isAccessServer(this.animationGOFeature.libID,this.animationGOFeature.code)&&this.goFeature.symbolData.algoMinEditPts>e.length?(this._executeAndRatioIsZero(),!0):(this.animationGOFeature.setLatLngs(L.Util.superMapPointsToLatLngs(e)),!0)},_execute_Rect:function(t){0===this.controlPoints.length&&(this.controlPoints=L.Util.latLngsToSuperMapPoints(this.goFeature.getLatLngs()));var e=new SuperMap.Geometry.Point((this.controlPoints[0].x+this.controlPoints[1].x)/2,(this.controlPoints[0].y+this.controlPoints[1].y)/2),i=Math.abs(this.controlPoints[0].x-this.controlPoints[1].x)/2*t,o=Math.abs(this.controlPoints[0].y-this.controlPoints[1].y)/2*t,n=new SuperMap.Geometry.Point(e.x-i,e.y+o),s=new SuperMap.Geometry.Point(e.x+i,e.y-o);return this.animationGOFeature.setLatLngs(L.Util.superMapPointsToLatLngs([n,s])),!0},_execute_Circle:function(t){0===this.controlPoints.length&&(this.controlPoints=L.Util.latLngsToSuperMapPoints(this.goFeature.getLatLngs()));var e=this.controlPoints[0].clone(),i=t*Math.sqrt((this.controlPoints[0].x-this.controlPoints[1].x)*(this.controlPoints[0].x-this.controlPoints[1].x)+(this.controlPoints[0].y-this.controlPoints[1].y)*(this.controlPoints[0].y-this.controlPoints[1].y));return this.animationGOFeature.setLatLngs(L.Util.superMapPointsToLatLngs([e,new SuperMap.Geometry.Point(e.x+i,e.y)])),!0},_execute_Kidney:function(t){if(0===this.controlPoints.length&&(this.controlPoints=L.Util.latLngsToSuperMapPoints(this.goFeature.getLatLngs())),0===t)return this._executeAndRatioIsZero(),!0;var e=[],i=this.controlPoints.length,o=SuperMap.Plot.PlottingUtil.getPolygonCenterPt(this.controlPoints);if(null===o)return this._executeAndRatioIsZero(),!0;for(var n=0;ns)return!1;var l=SuperMap.Plot.PlottingUtil.linePnt(o,this.controlPoints[n],a);e.push(l)}return this.animationGOFeature.setLatLngs(L.Util.superMapPointsToLatLngs(e)),!0},_execute_RegularPloygon:function(t){if(0===this.controlPoints.length&&(this.controlPoints=L.Util.latLngsToSuperMapPoints(this.goFeature.getLatLngs())),0===t)return this._executeAndRatioIsZero(),!0;var e=this.controlPoints.length,i=SuperMap.Plot.PlottingUtil.distance(this.controlPoints[0],this.controlPoints[this.controlPoints.length-1])*t,o=new SuperMap.Geometry.Point(this.controlPoints[0].x+i,this.controlPoints[0].y),n=2*Math.PI/(e+1),s=Math.PI/2+this.animationGOFeature.dRotate,a=o;SuperMap.Plot.PlottingUtil.rotateAngle(this.controlPoints[0],s,a);var l=[];l.push(this.controlPoints[0].clone()),l.push(a);for(var r=a.clone(),u=1;u1&&(this.startScale=1),this.endScale<0&&(this.endScale=0),this.endScale>1&&(this.endScale=1)},execute:function(){if(!(this.goFeature instanceof n.AlgoSymbol))return!1;if(!this.canExecute())return!1;this.endScale>1&&(this.endScale=1);var t=(new Date).getTime();if(this.lastDrawTime>0&&t-this.timeSpace=t));i++)o+=n;var s=new Object;if(i1?1:parseFloat(t),this.animationGOFeature.style.display="display",this.animationGOFeature.style.opacity=e,this.animationGOFeature.style.fontOpacity=e,this.animationGOFeature.style.surroundLineColorOpacity=this.goFeature.style.surroundLineColorOpacity*t,this.animationGOFeature.style.fill&&(this.animationGOFeature.style.fillOpacity=this.goFeature.style.fillOpacity*t,this.animationGOFeature.style.fillBackOpacity=this.goFeature.style.fillBackOpacity*t),this.animationGOFeature.redraw()},getJSONData:function(){var t=o.GOAnimation.prototype.getJSONData.call(this);return t.showEffect=this.showEffect,t.finalDisplay=this.finalDisplay,t},fromJSONData:function(t){o.GOAnimation.prototype.fromJSONData.call(this,t),this.showEffect=t.showEffect,this.finalDisplay=t.finalDisplay}});L.supermap.plotting.GOAnimationShow=n},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GOAnimationWay=void 0;var o=i(6),n=e.GOAnimationWay=o.GOAnimation.extend({showPath:!1,tangentDirection:!1,pathWidth:.5,pathColor:"#00FFFF",currentPt:null,pathType:SuperMap.Plot.WayPathType.POLYLINE,wayPoints:null,shapePoints:null,pathFeature:null,pathLength:0,destroy:function(){null!==this.pathFeature&&(L.supermap.plotting.getControl().getGOAnimationManager().map.removeLayer(this.pathFeature),this.pathFeature=null),o.GOAnimation.prototype.destroy.call(this)},getGOAnimationType:function(){return SuperMap.Plot.GOAnimationType.ANIMATION_WAY},setShowPath:function(t){this.showPath=t},resetAnimationFeature:function(t){o.GOAnimation.prototype.resetAnimationFeature.call(this,t);var e=this.goFeature.dRotate,i=this.animationGOFeature.dRotate;this.animationGOFeature._rotate(e-i,this.animationGOFeature.getLatLngs()[0]),t&&(null!==this.pathFeature&&null!==this.shapePoints||(this._makePath(),this.pathColor&&(this.pathFeature.options.color=this.pathColor),this.pathWidth&&(this.pathFeature.options.weight=this.pathWidth)),this.pathFeature.options.opacity=0,1!==this.animationGOFeature.symbolType&&(this.pathFeature.options.opacity=0),this.pathFeature.setStyle())},execute:function(){if(this.goFeature.symbolType!==SuperMap.Plot.SymbolType.DOTSYMBOL)return null!==this.pathFeature&&(this.pathFeature.options.opacity=0),!1;if(!this.canExecute())return!1;this.showPath&&0===this.pathFeature.options.opacity&&(this.pathFeature.options.opacity=1,this.pathFeature.setStyle());var t=this.ratio,e=t*this.pathLength,i=new Object,o=this._findPos(e,this.shapePoints,i);this.currentPt=o.clone();var n=this.animationGOFeature.getLatLngs()[0],s=o.y-n.lat,a=o.x-n.lng;if(this.animationGOFeature.move(s,a),this.tangentDirection){var l=i.angle;1===t&&(l=0);var r=this.animationGOFeature.dRotate;this.animationGOFeature._rotate(l-r,this.animationGOFeature.getLatLngs()[0])}return!0},setWayPoints:function(t){(!t||!SuperMap.Util.isArray(t)||2>t.length)&&(t=[this.goFeature.getLatLngs()[0],this.goFeature.getLatLngs()[0]]),this.wayPoints=[],this.wayPoints=L.Util.cloneLatLngs(t),null!==this.pathFeature&&(L.supermap.plotting.getControl().getGOAnimationManager().map.removeLayer(this.pathFeature),this.pathFeature.destroy(),this.pathFeature=null)},getWayPoints:function(){return this.wayPoints},getCurrentPt:function(){return this.currentPt},setPathColor:function(t){t&&(this.pathColor=t,this.pathFeature&&null!==this.pathFeature&&(this.pathFeature.options.color=this.pathColor,this.pathFeature.setStyle(this.pathFeature.options)))},getPathColor:function(){return this.pathColor},setPathWidth:function(t){t&&(this.pathWidth=t,this.pathFeature&&null!==this.pathWidth&&(this.pathFeature.options.weight=this.pathWidth,this.pathFeature.setStyle(this.pathFeature.options)))},getPathWidth:function(){return this.pathWidth},setPathType:function(t){void 0!==t&&null!==t&&this.pathType!==t&&(this.pathType=t,null!==this.pathFeature&&(L.supermap.plotting.getControl().getGOAnimationManager().map.removeLayer(this.pathFeature),this.pathFeature.destroy(),this.pathFeature=null))},getPathType:function(){return this.pathType},_makePath:function(){(null===this.wayPoints||2>this.wayPoints.length)&&(this.wayPoints=[this.goFeature.getLatLngs()[0],this.goFeature.getLatLngs()[0]]),null===this.pathFeature&&(this.pathType===SuperMap.Plot.WayPathType.POLYLINE?this.shapePoints=L.Util.latLngsToSuperMapPoints(this.wayPoints):this.shapePoints=SuperMap.Plot.PlottingUtil.generateBeizerPointsNoCtrlPt(L.Util.latLngsToSuperMapPoints(this.wayPoints)),this.pathFeature=L.polyline(L.Util.superMapPointsToLatLngs(this.shapePoints),SuperMap.PlotUtil.cloneObject(this.animationGOFeature.style)),L.supermap.plotting.getControl().getGOAnimationManager().map.addLayer(this.pathFeature)),this.pathLength=0;for(var t=1;t=t));o++)n+=s;var a=SuperMap.Plot.PlottingUtil.findPoint(e[o-1],e[o],t-n,0);return this.tangentDirection&&(i.angle=SuperMap.Plot.PlottingUtil.radian(a,e[o])/Math.PI*180),a},getJSONData:function(){var t=o.GOAnimation.prototype.getJSONData.call(this);t.showPath=this.showPath,t.tangentDirection=this.tangentDirection,t.pathType=this.pathType,t.pathWidth=this.pathWidth,t.pathColor=this.pathColor,t.wayPoints=[];for(var e=0;e=f.length);S++){var m=f[P];if(void 0!==m.symbolData&&null!==m.symbolData){for(var b=m.symbolData.libID,M=m.symbolData.code,v=d.lng+S*(l+Math.abs(c.getEast()-c.getWest())),_=d.lat-(2*l+Math.abs(c.getNorth()-c.getSouth())/2),T=0,x=0,O=0,A=0,w=0;w=m.symbolData.innerCells[w].positionPoints[D].x&&(x=m.symbolData.innerCells[w].positionPoints[D].x),O<=m.symbolData.innerCells[w].positionPoints[D].y&&(O=m.symbolData.innerCells[w].positionPoints[D].y),A>=m.symbolData.innerCells[w].positionPoints[D].y&&(A=m.symbolData.innerCells[w].positionPoints[D].y);var E=L.latLng(_,v),I=this._map.latLngToLayerPoint(L.latLng(_,v)),N=new SuperMap.Geometry.Point((T+x)/2,O),C=new SuperMap.Geometry.Point(N.x,N.y),R=new SuperMap.Geometry.Point(f[P].symbolData.anchorPoint.x,f[P].symbolData.anchorPoint.y),U=this._transitionPoint(C,I),G=this._transitionPoint(R,I);E.lat+=G.lat-U.lat,E.lng+=G.lng-U.lng,m.symbolData.annotationPosition=5;var B=SuperMap.Util.cloneObject(m.symbolData),F=L.supermap.plotting.PlottingObject.createSymbol(b,M,E,{symbolData:B,scaleByMap:!0,minScale:0,maxScale:2048,space:0});F.enableEdit=!0,F.ownerGroup=this,this._addComponents(F),this.subObjects.push(F),P++}}this.bounds=this._calculateBounds(),d.lat=this.bounds.getSouth()}if(this.isShowTooltip){var k=new L.LatLngBounds(L.latLng(this.bounds.getSouth()-l,this.bounds.getWest()-l),L.latLng(this.bounds.getNorth()+l+1.2,this.bounds.getEast()+l)),j=[];j.push(L.latLng(k.getNorth(),k.getWest())),j.push(L.latLng(k.getSouth(),k.getEast()));var z=L.latLng(n[0].lat,n[0].lng);z.isFixedPos=!0,j.push(z);var Y=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.ANNOFRAMESYMBOL,j,{serverUrl:this.serverUrl});Y.enableEdit=!0,Y.ownerGroup=this,this.subObjects.splice(0,0,Y),this._addComponents(Y)}}}},_setSubSymbolText:function(){for(var t=0;t=n){var a=t.split("");t="";for(var l=1,r=parseFloat(this.style.fontSize)+2*this.style.weight+.2*parseFloat(this.style.fontSize)+l,u="",p=0,h=a.length;p=n){var c=a[p];if(a[p]="\n",l++,!((r=parseFloat(this.style.fontSize)*l+l+2*this.style.weight+.2*parseFloat(this.style.fontSize))1&&(e=1),e<0&&(e=0),this.radiusText[e]!==t&&(this.radiusText[e]=t,this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues))},getRadiusText:function(t){return t>1&&(t=1),t<0&&(t=0),this.radiusText[t]},setRadiusTextPos:function(t){this.radiusPosAngle!==t&&(this.radiusPosAngle=t,0!==this.radiusText.length&&(this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)))},getRadiusTextPos:function(){return this.radiusPosAngle},setRadiusLineType:function(t){this.radiusLineType!==t&&(this.radiusLineType=t,0!==this.radiusText.length&&(this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)))},getRadiusLineType:function(){return this.radiusLineType},initialize:function(t,e,i,n){this.scalePoints=[],this.scaleValues=[],o.AlgoSymbol.prototype.initialize.call(this,t,e,i,n),this.libID=0,this.code=SuperMap.Plot.SymbolType.ARCREGION,this.symbolType=SuperMap.Plot.SymbolType.ARCREGION,this.symbolName="扇形区域",this.minEditPts=2,this.maxEditPts=4,null===this.circlePts&&(this.circlePts=[]),null===this.textPosition&&(this.textPosition=(this.startAngle+this.endAngle)/2),null===this.radiusText&&(this.radiusText=[]),null===this.radiusPosAngle&&(this.radiusPosAngle=(this.startAngle+this.endAngle)/2),null===this.radiusLineType&&(this.radiusLineType=SuperMap.Plot.RadiusLineType.SOLID),void 0!==n.constantSize&&null!==n.constantSize||!1!==this.isEdit||(this.constantSize=!0),this.subSymbolDefaultPixelSize=15},destroy:function(){this.centerPoint=null,this.radius=null,this.startAngle=null,this.endAngle=null,this.textPosition=null,this.radiusText=null,this.radiusPosAngle=null,this.radiusLineType=null,this.circlePts=null,o.AlgoSymbol.prototype.destroy.call(this)},_calculateParts:function(){if(this.scalePoints=[],0!==this.circlePts.length&&this.centerPoint&&this.radius){0===this.getLatLngs().length&&(this.latLngs=[this.centerPoint.clone()]),3===this.getLatLngs().length&&(this.startAngle=180*SuperMap.Plot.PlottingUtil.radian(this.latLngs[0],this.latLngs[2])/Math.PI),4===this.getLatLngs().length&&(this.endAngle=180*SuperMap.Plot.PlottingUtil.radian(this.latLngs[0],this.latLngs[3])/Math.PI),!0===this.isEdit&&this.getLatLngs().length>2&&this.getLatLngs().splice(2,this.getLatLngs().length-2),this.startAngle%=360,this.endAngle%=360,this.startAngle>this.endAngle&&(this.endAngle+=360);var t=[];if(SuperMap.Plot.PlottingUtil.equalFuzzy(this.startAngle,this.endAngle))t=L.Util.superMapPointsToLatLngs(SuperMap.Plot.PlottingUtil.clearSamePts(this.circlePts));else{var e=(t=this._getArcPts(this.startAngle,this.endAngle))[0].clone();e.isScalePoint=!0,e.tag=0;var i=t[t.length-1].clone();i.isScalePoint=!0,i.tag=1,this.scalePoints.push(e),this.scalePoints.push(i),t.push(this.centerPoint.clone())}this._createAndDrawLayer(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,t,{surroundLineFlag:!1}),1===this.latLngs.length&&this.latLngs.push(t[Math.ceil(t.length/2)].clone()),this._textGeometry(),this._radiusGeometry()}},_textGeometry:function(){if(0!==this.textContent.length){var t=90,e=!1;this.textPosition%=360,this.endAngle>this.startAngle&&(this.textPositionthis.startAngle?(this.endAngle-this.textPositionthis.startAngle?(this.textPosition+=360,this.endAngle-this.textPositionthis.endAngle&&(this.textPosition>this.startAngle||this.textPosition=0;p--)u.push(r[p]);this._addComponents(L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.PATHTEXT,u,{textContent:this.textContent,showPathLine:!1,isCurve:!1,relLineText:l},this.style)),i=a[Math.ceil(a.length/2)].clone()}i.isScalePoint=!0,i.tag=2,this.scalePoints>0?this.scalePoints[0]=i:this.scalePoints.push(i)}},_radiusGeometry:function(){if(0!==this.radiusText.length){this.radiusPosAngle%=360;for(var t=new SuperMap.Geometry.Point(this.centerPoint.lng,this.centerPoint.lat),e=0,i=SuperMap.Plot.PlottingUtil.distance(t,this.circlePts[0]),o=1;oi&&(i=n,e=o)}var s=SuperMap.Plot.PlottingUtil.isPloyClockwise(this.circlePts),a=180*SuperMap.Plot.PlottingUtil.radian(t,this.circlePts[e])/Math.PI,l=this.circlePts[e].clone(),r=(this.radiusPosAngle-a)*(Math.PI/180);SuperMap.Plot.PlottingUtil.rotateAngle(t,r,l);for(var u=this.circlePts[0].clone(),p=0;p=c&&this.radiusPosAngle<=h||0===s&&this.radiusPosAngle>=h&&this.radiusPosAngle<=c){if(!0===SuperMap.Plot.PlottingUtil.intersectLineSegs(t,l,this.circlePts[p],this.circlePts[p+1],u))break;u=Math.abs(this.radiusPosAngle-h)>=Math.abs(this.radiusPosAngle-c)?this.circlePts[p].clone():this.circlePts[p+1].clone();break}}var y=SuperMap.Plot.PlottingUtil.distance(t,u),g=L.latLng(u.y,u.x),d=[];if(d.push(this.centerPoint),d.push(g),SuperMap.Plot.RadiusLineType.NONE!==this.radiusLineType&&this._createAndDrawLayer(SuperMap.Plot.SymbolType.POLYLINESYMBOL,d,{surroundLineFlag:!1}),this.radiusLineType===SuperMap.Plot.RadiusLineType.ARROW){var f=this._map.unproject(L.point(this.subSymbolDefaultPixelSize,0)).lat;f/y>.3&&(f=.3*y);var S=SuperMap.Plot.PlottingUtil.findPoint(u,t,f,12.5),P=SuperMap.Plot.PlottingUtil.findPoint(u,t,f,-12.5),m=L.latLng(S.y,S.x),b=L.latLng(P.y,P.x),M=[];M.push(g.clone()),M.push(m),M.push(b),this._createAndDrawLayer(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,M,{surroundLineFlag:!1,fill:!0,fillLimit:!0,lineTypeLimit:!0})}SuperMap.Util.isArray(this.radiusText)||(this.radiusText=[this.radiusText]);var v,_;if(this.radiusText.length>=1){v=SuperMap.Plot.PlottingUtil.findPoint(t,u,.2*y,0),_=SuperMap.Plot.PlottingUtil.findPoint(t,u,.8*y,0);var T=SuperMap.Plot.PlottingUtil.findPoint(v,u,.02*y,90),x=SuperMap.Plot.PlottingUtil.findPoint(_,u,.02*y,90),O=L.latLng(T.y,T.x),A=L.latLng(x.y,x.x),w=SuperMap.Plot.RelLineText.ONLEFTLINE,D=[];T.x1?this.scalePoints[1]=U:this.scalePoints.push(U)}},_parseSymbolData:function(){if(o.AlgoSymbol.prototype._parseSymbolData.call(this),this.symbolData){if(this.centerPoint=L.latLng(this.symbolData.centerPoint.y,this.symbolData.centerPoint.x),this.endAngle=this.symbolData.endAngle,this.radius=this.symbolData.radius,this.radiusPosAngle=this.symbolData.radiusPosAngle,this.startAngle=this.symbolData.startAngle,this.textPosition=this.symbolData.textPosition,this.radiusLineType=this.symbolData.radiusLineType,this.radiusText=this.symbolData.radiusText,this.symbolData.circlePts){for(var t=[],e=0;e2)return this.redraw(),void(this.isRedraw=!0);if(null===this.centerPoint?this.centerPoint=this.latLngs[0].clone():(this.centerPoint.lat=this.latLngs[0].lat,this.centerPoint.lng=this.latLngs[0].lng),this.radius=this.latLngs[0].distanceTo(this.latLngs[1])/1e3,0!==this.radius){var t=new SuperMap.BufferDistance({value:1e3*this.radius}),e=new SuperMap.BufferSetting({endType:SuperMap.BufferEndType.ROUND,leftDistance:t,rightDistance:t,semicircleLineSegment:36}),i=new SuperMap.GeometryBufferAnalystParameters({sourceGeometry:L.marker(this.centerPoint),sourceGeometrySRID:parseInt(this._map.options.crs.code.split(":")[1]),bufferSetting:e}),o=this;L.supermap.spatialAnalystService(this.spatialAnalystUrl).bufferAnalysis(i,function(t){o.circlePts=[];for(var e=t.result.resultGeometry.points,i=0,n=e.length;ithis.startAngle&&ithis.startAngle&&i+360s&&(s=l,n=a)}var r=0,u=0,p=this.circlePts[0].clone(),h=this.circlePts[0].clone(),c=(t-180*SuperMap.Plot.PlottingUtil.radian(o,this.circlePts[n])/Math.PI)*(Math.PI/180),y=new SuperMap.Geometry.Point(this.centerPoint.lng,this.centerPoint.lat),g=this.circlePts[n].clone();SuperMap.Plot.PlottingUtil.rotateAngle(y,c,g);var d=this.circlePts[n].clone();SuperMap.Plot.PlottingUtil.rotateAngle(y,c,d);for(var f=180*SuperMap.Plot.PlottingUtil.radian(o,this.circlePts[0])/Math.PI,S=f,P=SuperMap.Plot.PlottingUtil.isPloyClockwise(this.circlePts),m=0;mS&&(M-=360),0===P&&M=M&&t<=S||0===P&&t>=S&&t<=M){!0===SuperMap.Plot.PlottingUtil.intersectLineSegs(o,g,this.circlePts[m],this.circlePts[m+1],p)?r=0===P?m+1:m:(v=Math.abs(t-S))>=(_=Math.abs(t-M))?(r=m,p=this.circlePts[m].clone()):(r=m+1,p=this.circlePts[m+1].clone()),S=f;break}S=b}for(m=0;mS&&(M-=360),0===P&&M=M&&e<=S||0===P&&e>=S&&e<=M){if(!0===SuperMap.Plot.PlottingUtil.intersectLineSegs(o,d,this.circlePts[m],this.circlePts[m+1],h))u=0===P?m:m+1;else{var v=Math.abs(e-S),_=Math.abs(e-M);v>=_?(u=m,h=this.circlePts[m].clone()):(u=m+1,h=this.circlePts[m+1].clone())}break}S=b}if(0===P)if(r=u;T--)i.push(this.circlePts[T].clone());i.push(h)}else{i.push(p);for(T=r;T>0;T--)i.push(this.circlePts[T].clone());for(var T=this.circlePts.length-1;T>=u;T--)i.push(this.circlePts[T].clone());i.push(h)}return L.Util.superMapPointsToLatLngs(SuperMap.Plot.PlottingUtil.clearSamePts(i))}}),s=e.arcRegion=function(t,e,i,o){return new n(t,e,i,o)};L.supermap.plotting.arcRegion=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ArrowLine=void 0;var o=i(1);e.ArrowLine=o.AlgoSymbol.extend({arrowTypeStart:0,arrowTypeEnd:0,getStartArrowType:function(){return this.arrowTypeStart},setStartArrowType:function(t){this.arrowTypeStart!==t&&(this.arrowTypeStart=t,this.redraw())},getEndArrowType:function(){return this.arrowTypeEnd},setEndArrowType:function(t){this.arrowTypeEnd!==t&&(this.arrowTypeEnd=t,this.redraw())},_parseSymbolData:function(){o.AlgoSymbol.prototype._parseSymbolData.call(this),this.symbolData&&(this.symbolData.hasOwnProperty("arrowTypeEnd")&&(this.arrowTypeEnd=this.symbolData.arrowTypeEnd),this.symbolData.hasOwnProperty("arrowTypeStart")&&(this.arrowTypeStart=this.symbolData.arrowTypeStart))},_setSymbolData:function(){o.AlgoSymbol.prototype._setSymbolData.call(this),this.symbolData&&(this.symbolData.arrowTypeEnd=this.arrowTypeEnd,this.symbolData.arrowTypeStart=this.arrowTypeStart)},_setDefaultOptions:function(t){o.AlgoSymbol.prototype._setDefaultOptions.call(this,t),t.arrowTypeEnd=this.arrowTypeEnd,t.arrowTypeStart=this.arrowTypeStart},_sendDataToAlgo:function(){o.AlgoSymbol.prototype._sendDataToAlgo.call(this),this.superMapAlgoSymbol.arrowTypeEnd=this.arrowTypeEnd,this.superMapAlgoSymbol.arrowTypeStart=this.arrowTypeStart}})},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CombinationalCircle=void 0;var o=i(1);e.CombinationalCircle=o.AlgoSymbol.extend({radius:null,_parseSymbolData:function(){if(o.AlgoSymbol.prototype._parseSymbolData.call(this),this.symbolData&&this.symbolData.radius&&0!==this.symbolData.radius.length){this.radius=[];for(var t=0;t=this.minEditPts&&this._createAndDrawLayer(32,this.latLngs,this.style,"")},move:function(t,e){L.Util.moveLatLngs(this.getLatLngs(),t,e);for(var i=0,o=this.avoidRegions.length;ie&&(this.symbolTexts[e]=t,this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues))},removeSymbolTextsFromDotSymbol:function(t){if(t&&"string"==typeof t){var e=this.layer.getFeatureByUuid(t);if(e)for(var i=0,o=e.geoSymbolTexts.length;i0){var i=this.layer.getFeatureByUuid(this.associatedUuid);if(null===i||void 0===i)return;for(var o=!1,n=i.geoSymbolTexts,s=0,a=n.length;s