=0;g--){for(var P=this.adjustAngle(this.angleRange[S][g].Start),d=this.adjustAngle(this.angleRange[S][g].End);d=0;x--)for(var w=0;w<_[x].length;w++){for(var I in _)if(parseInt(I)!==x){var D=_[I];if(SuperMap.Plot.PlottingUtil.ptIsInPolygon(D,_[x][w])){var E=x,C=parseInt(I);_[C].push(_[C][0]),_[E].push(_[E][0]),_[C]=_[C].concat(_[E]),_.splice(E,1);break}}if(!isNaN(E)&&!isNaN(C))break}for(var R=0;R<_.length;R++){var N={type:SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,positionPoints:_[R],style:{surroundLineFlag:!1,lineWidthLimit:!0,weight:0,strokeWidth:0}};this.components.splice(0,0,N)}for(var U=0;U=0;l--)e.push(t[n][l]);if(t.splice(n,1),void 0!==(i=this.generatePolygon(t,e))&&0!==i.length)return i}}},{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.scaleValues[t]=o}this.calculateParts()}},{key:"adjustAngle",value:function(t){for(;t>360;)t-=360;for(;t<0;)t+=360;return t}},{key:"getCircleLonLat",value:function(t,e){return null===this.map?2*this.getDefaultSubSymbolSize():this.map&&"undefined"!=typeof L&&void 0!==L.Map&&this.map instanceof L.Map?((i=this.map.latLngToLayerPoint(L.latLng(t.y,t.x))).x+=e,this.map.layerPointToLatLng(L.point(i.x,i.y)).lng-t.x):this.map&&"undefined"!=typeof SuperMap&&void 0!==SuperMap.Map&&this.map instanceof SuperMap.Map?((i=this.map.getPixelFromLonLat(new SuperMap.LonLat(t.x,t.y))).x+=e,this.map.getLonLatFromPixel(new SuperMap.Pixel(i.x,i.y)).lon-t.x):void 0;var i}}]),e}();SuperMap.Plot.CombinationalCircle=n},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var i=0;i360;)this.scaleValues[0]-=360;for(;this.scaleValues[0]<0;)this.scaleValues[0]+=360;for(;this.scaleValues[1]>360;)this.scaleValues[1]-=360;for(;this.scaleValues[1]<0;)this.scaleValues[1]+=360;for(;this.scaleValues[1]<=this.scaleValues[0];)this.scaleValues[1]+=360;for(var e=SuperMap.Plot.PlottingUtil.distance(t[0],t[1]),i=SuperMap.Plot.PlottingUtil.distance(t[0],t[2]),o=[],n=[],l=Math.PI/180,a=(this.scaleValues[1]-this.scaleValues[0])/72,s=this.scaleValues[0];s=0;f--)c.push(n[f]);this.addCell(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,c,{surroundLineFlag:!1,lineWidthLimit:!0,weight:0,strokeWidth:0}),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,o),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,n);var S=t[0].x+e/2*Math.cos(this.scaleValues[0]*l),g=t[0].y+e/2*Math.sin(this.scaleValues[0]*l),P=t[0].x+i/2*Math.cos(this.scaleValues[1]*l),d=t[0].y+i/2*Math.sin(this.scaleValues[1]*l),m=new SuperMap.Geometry.Point(S,g);m.isScalePoint=!0,m.tag=0,this.addScalePoint(m);var b=new SuperMap.Geometry.Point(P,d);b.isScalePoint=!0,b.tag=1,this.addScalePoint(b)}}},{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.scaleValues[0]=o:1==t&&(this.scaleValues[1]=o)}this.calculateParts()}}]),e}();SuperMap.Plot.ConcentricCircle=n},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var i=0;i1)){if(t=(1-t)/2,this.controlPoints.length>=this.minEditPts){var e,i,o,n;this.scalePoints=[];var l=[];this.controlPoints[0].x=2&&this.controlPoints.lengtho?Math.abs((s-o)/(a-i))>u?2:1:su?4:1:a>n?s>o?Math.abs((s-o)/(a-n))>u?2:3:su?4:3:s>o?2:so&&(h=o),h<(o+l)/2&&(h=(o+l)/2),p=1-2*(o-h)/(o-l);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.scaleValues[0]=p}this.calculateParts()}},{key:"calculateArc",value:function(t,e,i,o,n,l){(!n||1!=n&&-1!=n)&&(n=-1),l||(l=360);for(var a=Math.PI/l/2,s=a*n,r=Math.abs(o-i),u=[],p=i,h=0;h2*Math.PI?p-2*Math.PI:p}return u}},{key:"getAction",value:function(t,e,i,o,n,l){var a=(o-l)/(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:e=this.minEditPts){var e,i,o,n;t[0].xo?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){var e,i,o,n,l,a;this.controlPoints[2]&&(this.controlPoints[2].isFixedPos=!0),this.controlPoints[0].xi?Math.abs((a-i)/(l-e))>r?2:1:ar?4:1:l>o?a>i?Math.abs((a-i)/(l-o))>r?2:3:ar?4:3:a>i?2:ao?Math.abs((s-o)/(a-i))>u?2:1:su?4:1:a>n?s>o?Math.abs((s-o)/(a-n))>u?2:3:su?4:3:s>o?2:so&&(h=o),h<(o+l)/2&&(h=(o+l)/2),p=1-2*(o-h)/(o-l);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.scaleValues[0]=p}this.calculateParts()}}]),e}();SuperMap.Plot.GeoTooltipBox=n},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var i=0;i=2&&t.lengthi.x&&s.xi.y&&s.yo.x||s.yo.y)&&(e[0]=l,e[3]=i),4==e.length&&this.addCell(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,e)}}},{key:"GetPointsByTrapezoid",value:function(t,e,i,o,n){var l=e.x,a=e.y,s=i.x,r=i.y,u=o.x,p=o.y,h=0,c=0,y=0,f=0;if(SuperMap.Plot.PlottingUtil.equalFuzzy(Math.abs(a-r),0))h=l+s-u,c=p;else if(SuperMap.Plot.PlottingUtil.equalFuzzy(Math.abs(l-s),0))h=u,c=a+r-p;else{var S=1*(a-r)/(l-s),g=p-S*u;c=S*(h=((r+a)/2+(l+s)/(2*S)-g)/(S+1/S))+g,h=2*h-u,c=2*c-p}var P=Math.sqrt(1*(l-s)*(l-s)+1*(a-r)*(a-r)),d=Math.sqrt(1*(l-h)*(l-h)+1*(a-c)*(a-c));P>0?(y=l+(s-l)*d/P,f=a+(r-a)*d/P):(y=l,f=a);var m=y+(h-y)*t,b=f+(c-f)*t;n.x=m,n.y=b}}]),e}();SuperMap.Plot.Trapezoid=n},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var i=0;i0&&n<.4&&(this.scaleValues[0]=n)}else if(1==t){var l=new SuperMap.Geometry.Point((i[0].x+i[1].x)/2,(i[0].y+i[1].y)/2),a=SuperMap.Plot.PlottingUtil.distance(e,l)/o;0a&&(this.scaleValues[1]=a)}}this.calculateParts()}}]),e}();SuperMap.Plot.Brace=n},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var i=0;i2?SuperMap.Plot.PlottingUtil.radian(e[e.length-1],e[e.length-2]):SuperMap.Plot.PlottingUtil.radian(e[1],e[0]))-l,s=e[e.length-1].x+n*Math.cos(a),r=e[e.length-1].y+n*Math.sin(a),u=new SuperMap.Geometry.Point(s,r),p=o+l,h=e[e.length-1].x+n*Math.cos(p),c=e[e.length-1].y+n*Math.sin(p),y=new SuperMap.Geometry.Point(h,c),f=[];f.push(u),f.push(e[e.length-1].clone()),f.push(y);var S={surroundLineFlag:!1,fillLimit:!0,lineTypeLimit:!0},g=SuperMap.Plot.PlottingUtil.radian(e[0],e[1]);a=g-l,s=e[0].x+n*Math.cos(a),r=e[0].y+n*Math.sin(a),u=new SuperMap.Geometry.Point(s,r),p=g+l,h=e[0].x+n*Math.cos(p),c=e[0].y+n*Math.sin(p),y=new SuperMap.Geometry.Point(h,c);var P=[];P.push(u),P.push(e[0].clone()),P.push(y);var d=this.scaleValues[1]===SuperMap.Plot.ArrowLineType.DOUBLELINE?SuperMap.Plot.SymbolType.POLYLINESYMBOL:SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,m=this.scaleValues[2]===SuperMap.Plot.ArrowLineType.DOUBLELINE?SuperMap.Plot.SymbolType.POLYLINESYMBOL:SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL;this.scaleValues[1]===SuperMap.Plot.ArrowLineType.DOUBLELINE?this.addCell(d,P,S):this.scaleValues[1]===SuperMap.Plot.ArrowLineType.TRIANGLESOLID&&this.addCell(d,P,S),this.scaleValues[2]===SuperMap.Plot.ArrowLineType.DOUBLELINE?this.addCell(m,f,S):this.scaleValues[2]===SuperMap.Plot.ArrowLineType.TRIANGLESOLID&&this.addCell(m,f,S),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,e),this.finish()}}}]),e}();SuperMap.Plot.ArrowLine=n},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var i=0;i=2&&this.controlPoints.length=this.minEditPts){var e={textContent:this.textContent,type:this.symbolType,surroundLineFlag:!1,positionPoints:t,style:{}};if(e.type===SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL&&e.positionPoints.push(e.positionPoints[0]),this.symbolType===SuperMap.Plot.SymbolType.PARALLELLINE){if(this.controlPoints&&this.controlPoints.length>=3){var i=!1;void 0!==this.controlPoints[0].z&&(i=!0);var o=SuperMap.Plot.PlottingUtil.distance(this.controlPoints[0],this.controlPoints[1]);SuperMap.Plot.PlottingUtil.isRight(this.controlPoints[0],this.controlPoints[1],this.controlPoints[2])&&(o=-o);for(var n=[],l=1;l=r){var p=n.split("");n="";var h=1,c=0;this.style.weight?c=parseFloat(this.style.fontSize)+2*this.style.weight+.2*parseFloat(this.style.fontSize)+h:this.style.strokeWidth&&(c=parseFloat(this.style.fontSize)+2*this.style.strokeWidth+.2*parseFloat(this.style.fontSize)+h);for(var y="",f=0,S=p.length;f=r){var g=p[f];if(p[f]="\n",h++,this.style.weight?c=parseFloat(this.style.fontSize)*h+h+2*this.style.weight+.2*parseFloat(this.style.fontSize):this.style.strokeWidth&&(c=parseFloat(this.style.fontSize)*h+h+2*this.style.strokeWidth+.2*parseFloat(this.style.fontSize)),!(c.5)return o.startIndex=0,o.startPt=t[0],o.endIndex=t.length-1,o.endPt=t[t.length-1],o;null==i&&(i=.5);var n=SuperMap.Plot.PlottingUtil.polylineDistance(t),l=SuperMap.Plot.PlottingUtil.getPtsIndexByDistance(n*(i-e),t),a=SuperMap.Plot.PlottingUtil.getPtsIndexByDistance(n*(i+e),t);return o.startIndex=l.index,o.startPt=l.pts,o.endIndex=a.index,o.endPt=a.pts,o}},{key:"computeDashLine",value:function(t,e,i){var o=[],n=SuperMap.Plot.PlottingUtil.polylineDistance(i);if(n<=0)return[];for(var l,a=i[0],s=1,r=0,u=!0,p=!0;r2){for(var r=-1,u=t.length-2;u>=0;u--)if(i1){SuperMap.Plot.PlottingUtil.distance(t[t.length-1],t[t.length-2])>s&&(l=SuperMap.Plot.PlottingUtil.getPtsIndexByDistance(s,[t[t.length-1],t[t.length-2]])).bfind&&(t.splice(t.length-1,1),t.push(l.pts)),this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,t);var p=t[t.length-1],h=a,c=i;if(void 0===p)return t;var y=SuperMap.Plot.PlottingUtil.radian(p,h)*SuperMap.Plot.PlottingUtil.RTOD,f=SuperMap.Plot.PlottingUtil.circlePoint(h,c,c,y+157.5),S=SuperMap.Plot.PlottingUtil.circlePoint(h,c,c,y+202.5),g={surroundLineFlag:!1,fillLimit:!0,fillColorLimit:!1,fill:!0,lineTypeLimit:!0,surroundLineLimit:!0,surroundLineType:SuperMap.Plot.AlgoSurroundLineType.NONE};this.addCell(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,[f,a,S],g)}else this.addCell(SuperMap.Plot.SymbolType.POLYLINESYMBOL,n)}},{key:"addDovetailArrow",value:function(t,e){if(t.length<2)return t;var i,o=SuperMap.Plot.PlottingUtil.polylineDistance(this.controlPoints);void 0===e&&(e=(this.isEdit,.5*this.getSubSymbolScaleValue())),i=o*e;var n=t[t.length-1];if(t.length>2){for(var l=-1,a=t.length-2;a>=0;a--)if(ie||o<=0)&&(o=e),o}},{key:"computeSubSymbol",value:function(t,e,i,o,n,l){if(null==t.symbolData||null==t.symbolData.innerCells)return null;void 0===n&&(n=0),void 0===l&&(l=0);for(var a=SuperMap.Plot.AnalysisSymbol.analysisSymbolCells(t.symbolData,!0),s=0,r=0,u=0,p=0,h=0;hc[y].x&&(u=c[y].x),p>c[y].y&&(p=c[y].y);var S=new SuperMap.Geometry.Point(s,r),g=new SuperMap.Geometry.Point(u,p),P=(S.y-g.y)/i,d=(S.x-g.x)/i,m=d>P?d:P,b=new SuperMap.Geometry.Point(.5*(S.x+g.x),.5*(S.y+g.y));b.x+=n*(S.x-g.x),b.y+=l*(S.y-g.y);for(var L=0,M=a.length;L=l)return i.z;if(s>=l)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/l)}},{key:"ComputeBeizerZValueByDis",value:function(t,e,i){if(t.length<2)return!1;for(var o=[],n=0;n2){var r=t.length;t.splice(2,r-2)}var u=SuperMap.Plot.PlottingUtil.polylineDistance(t);o.arrowTouLen=u*n;for(var p=SuperMap.Plot.PlottingUtil.findPointInPolyLine(t,u-o.arrowTouLen).pt,h=[],c=o.arrowTouLen*a,y=o.arrowTouLen*l,f=t.length-1,S=0;St.length)return n;var l,a=SuperMap.Plot.PlottingUtil.polylineDistance(t),s=SuperMap.Plot.PlottingUtil.equalFuzzy(e,0);switch(i){case SuperMap.Plot.ArrowToolkit.ArrowBodyType.ARROWBODY_POLYLINE:n=n.concat(t),o&&!s&&SuperMap.Plot.PlottingUtil.distance(t[t.length-1],t[t.length-2])>e&&(l=SuperMap.Plot.PlottingUtil.findPointInPolyLine(t,a-e),n.splice(n.length-1,1),n.push(l.pt));break;case SuperMap.Plot.ArrowToolkit.ArrowBodyType.ARROWBODY_POLYBEZIER:if(2==t.length)n=n.concat(t),o&&!s&&SuperMap.Plot.PlottingUtil.distance(t[t.length-1],t[t.length-2])>e&&(l=SuperMap.Plot.PlottingUtil.findPointInPolyLine(t,a-e),n.splice(n.length-1,1),n.push(l.pt));else{var r=SuperMap.Plot.PlottingUtil.generateBeizerPointsNoCtrlPt(t);if(s)n=n.concat(r);else{var u=r[r.length-1];if(!s&&(e1;p--){if(!(e>SuperMap.Plot.PlottingUtil.distance(u,r[p]))){var h=SuperMap.Plot.PlottingUtil.findPoint(u,r[p],e,0);r.push(h),n=r;break}r.splice(p,1)}o||n.push(u)}else n=n.concat(r)}}break;case SuperMap.Plot.ArrowToolkit.ArrowBodyType.ARROWBODY_COATTAIL:var c=e;if(c>a)return n;for(var y,f,S=Math.ceil(a/(1.4*c)),g=0,P=[],d=0;dt.length)return o;switch(i){case SuperMap.Plot.ArrowToolkit.ArrowHeadType.ARROWHEAD_POLYLINE:var n=t[0],l=t[1],a=SuperMap.Plot.PlottingUtil.distance(n,l);if(SuperMap.Plot.PlottingUtil.equalFuzzy(a,e,1e-7)||a>e){var s=SuperMap.Plot.PlottingUtil.findPoint(n,l,e,0),r=e*Math.tan(.125*Math.PI),u=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(r,t[0],s);o.push(u.pntLeft),o.push(t[0]),o.push(u.pntRight)}break;case SuperMap.Plot.ArrowToolkit.ArrowHeadType.ARROWHEAD_TRIANGLE:break;case SuperMap.Plot.ArrowToolkit.ArrowHeadType.ARROWHEAD_TRIANGLE_SOLID:var p=t[0],h=t[1],c=SuperMap.Plot.PlottingUtil.distance(p,h);if(SuperMap.Plot.PlottingUtil.equalFuzzy(c,e,1e-7)||c>e){var y=e*Math.tan(.125*Math.PI),f=SuperMap.Plot.PlottingUtil.findPoint(p,h,e,0),S=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(y,t[0],f);o.push(S.pntLeft),o.push(p),o.push(S.pntRight),o.push(S.pntLeft)}break;case SuperMap.Plot.ArrowToolkit.ArrowHeadType.ARROWHEAD_COATTAIL:var g=t[0],P=2*Math.sqrt(e*e/3),d=SuperMap.Plot.PlottingUtil.distance(t[0],t[1]);if(SuperMap.Plot.PlottingUtil.equalFuzzy(P/2,d,1e-7)||d>P/2){var m=SuperMap.Plot.PlottingUtil.findPoint(t[0],t[1],P,20),b=SuperMap.Plot.PlottingUtil.findPoint(t[0],t[1],P,-20),L=SuperMap.Plot.PlottingUtil.findPoint(t[0],t[1],P/2,0);o.push(g),o.push(m),o.push(L),o.push(b),o.push(g)}break;case SuperMap.Plot.ArrowToolkit.ArrowHeadType.ARROWHEAD_COATTAIL_HOLLOW:var M=[],v=t[0],T=2*Math.sqrt(e*e/3),A=SuperMap.Plot.PlottingUtil.distance(t[0],t[1]);if(SuperMap.Plot.PlottingUtil.equalFuzzy(T/1.4,A,1e-7)||A>T/1.4){var _=SuperMap.Plot.PlottingUtil.findPoint(t[0],t[1],T,20),O=SuperMap.Plot.PlottingUtil.findPoint(t[0],t[1],T,-20),x=SuperMap.Plot.PlottingUtil.findPoint(t[0],t[1],T/1.4,0);M.push(v),M.push(_),M.push(x),M.push(O),M.push(v);var w=new SuperMap.Geometry.Point((M[0].x+M[1].x)/2,(M[0].y+M[1].y)/2),I=new SuperMap.Geometry.Point((M[3].x+M[4].x)/2,(M[3].y+M[4].y)/2),D=new SuperMap.Geometry.Point((w.x+I.x)/2,(w.y+I.y)/2),E=.75*SuperMap.Plot.PlottingUtil.distance(w,I)/2,C=SuperMap.Plot.PlottingUtil.findPointInLine(D,w,E),R=SuperMap.Plot.PlottingUtil.findPointInLine(D,I,E);o.push(M[0]),o.push(C),o.push(M[1]),o.push(M[2]),o.push(M[3]),o.push(R),o.push(M[4])}}return o},SuperMap.Plot.ArrowToolkit.generateArrowTailShapePts=function(t,e,i,o){for(var n=e.length,l=[],a=0,s=0;s0&&g>0){var d=1/(y-t[2].x),m=-1/(f-t[2].y),b=1*t[2].y/(f-t[2].y)-1*t[2].x/(y-t[2].x);P=Math.abs(d*t[0].x+m*t[0].y+b)/Math.sqrt(d*d+m*m)}else g<=1e-4?P=Math.abs(f-t[1].y):S<=1e-4&&(P=Math.abs(y-t[1].x));var L=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(P,t[2],new SuperMap.Geometry.Point(y,f)),M=SuperMap.Plot.PlottingUtil.pointIsRightToLine(t[1],t[2],t[0]);M?(l[1]=t[1],a[1]=t[0]):(l[1]=t[0],a[1]=t[1]),t[1]=new SuperMap.Geometry.Point((t[0].x+t[1].x)/2,(t[0].y+t[1].y)/2);var v=Math.sqrt((L.pntLeft.x-L.pntRight.x)*(L.pntLeft.x-L.pntRight.x)+(L.pntLeft.y-L.pntRight.y)*(L.pntLeft.y-L.pntRight.y))*SuperMap.Plot.ArrowToolkit.ConstValue.sv_AtWidthDivAwWidth,T=(n=v*SuperMap.Plot.ArrowToolkit.ConstValue.sv_AtLenDivAtWidth)*c;SuperMap.Plot.PlottingUtil.equalFuzzy(h,0)||(T=(n=o*h)*c);var A,_,O=SuperMap.Plot.PlottingUtil.distance(t[e],t[e-1]),x=2*n;O0&&(t[e]=SuperMap.Plot.PlottingUtil.getIncentrePointOnSegmentByScale(n,t[e],C)),D=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(T,t[e+1],t[e]),(M=SuperMap.Plot.PlottingUtil.pointIsRightToLine(t[e],t[e+1],D.pntLeft))?(a[e]=new SuperMap.Geometry.Point(D.pntLeft.x,D.pntLeft.y),l[e]=new SuperMap.Geometry.Point(D.pntRight.x,D.pntRight.y)):(a[e]=new SuperMap.Geometry.Point(D.pntRight.x,D.pntRight.y),l[e]=new SuperMap.Geometry.Point(D.pntLeft.x,D.pntLeft.y)),w=2;w1&&t.push(n),n=[],e=s.GetX(),i=s.GetY(),n.push(new SuperMap.Geometry.Point(e,i));break;case 1:e=s.GetX(),i=s.GetY(),n.push(new SuperMap.Geometry.Point(e,i));break;case 2:if(3!=o.elements[a+1].GetType()||3!=o.elements[a+1].GetType())break;for(var r=o.elements[a-1].GetX(),u=o.elements[a-1].GetY(),p=s.GetX(),h=s.GetY(),c=o.elements[a+1].GetX(),y=o.elements[a+1].GetY(),f=o.elements[a+2].GetX(),S=o.elements[a+2].GetY(),g=0;g<=1;g+=.03125){var P=g*g,d=P*g,m=1-3*g+3*P-d,b=3*(g-2*P+d),L=3*(P-d),M=d;n.push(new SuperMap.Geometry.Point(m*r+b*p+L*c+M*f,m*u+b*h+L*y+M*S))}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.Path2DData,e=new SuperMap.Plot.Element(0,0,0);t.elements.push(e),null==this.m_pData||this.mtDeRef(this.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.Path2DData;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}();SuperMap.Plot.Path2D=n},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AlgoSymbol15200=e.AlgoSymbol315=e.AlgoSymbol1022=e.AlgoSymbol1021=e.AlgoSymbol1020=e.AlgoSymbol1019=e.AlgoSymbol1018=e.AlgoSymbol1017=e.AlgoSymbol1016=e.AlgoSymbol1015=e.AlgoSymbol1014=e.AlgoSymbol1013=e.AlgoSymbol1012=e.AlgoSymbol1011=e.AlgoSymbol1010=e.AlgoSymbol1009=e.AlgoSymbol1008=e.AlgoSymbol1007=e.AlgoSymbol1006=e.AlgoSymbol1005=e.AlgoSymbol1004=e.AlgoSymbol1003=e.AlgoSymbol1002=e.AlgoSymbol1001=e.Wire=e.PolygonRegion=e.LineRelation=e.LineMarking=e.PathText=e.CurveEight=e.Runway=e.NodeChain=e.FreeCurve=e.CombinationalCircle=e.ConcentricCircle=e.SymbolTextBox=e.GeoTooltipBoxM=e.GeoTooltipBox=e.Trapezoid=e.Brace=e.RegularPolygon=e.ArrowLine=e.AlgoSymbol=e.ArrowToolkit=e.Path2DData=e.Element=e.Path2D=void 0;var o=i(125),n=i(124),l=i(123),a=i(122),s=i(121),r=i(120),u=i(119),p=i(118),h=i(117),c=i(116),y=i(115),f=i(114),S=i(113),g=i(112),P=i(111),d=i(110),m=i(109),b=i(108),L=i(107),M=i(106),v=i(105),T=i(104),A=i(103),_=i(102),O=i(101),x=i(100),w=i(99),I=i(98),D=i(97),E=i(96),C=i(95),R=i(94),N=i(93),U=i(92),G=i(91),B=i(90),k=i(89),F=i(88),z=i(87),j=i(86),Y=i(85),V=i(84),W=i(83),H=i(82),X=i(81),J=i(80),q=i(79);e.Path2D=o.Path2D,e.Element=n.Element,e.Path2DData=l.Path2DData,e.ArrowToolkit=a.ArrowToolkit,e.AlgoSymbol=s.AlgoSymbol,e.ArrowLine=r.ArrowLine,e.RegularPolygon=u.RegularPolygon,e.Brace=p.Brace,e.Trapezoid=h.Trapezoid,e.GeoTooltipBox=c.GeoTooltipBox,e.GeoTooltipBoxM=y.GeoTooltipBoxM,e.SymbolTextBox=f.SymbolTextBox,e.ConcentricCircle=S.ConcentricCircle,e.CombinationalCircle=g.CombinationalCircle,e.FreeCurve=P.FreeCurve,e.NodeChain=d.NodeChain,e.Runway=m.Runway,e.CurveEight=b.CurveEight,e.PathText=L.PathText,e.LineMarking=M.LineMarking,e.LineRelation=v.LineRelation,e.PolygonRegion=T.PolygonRegion,e.Wire=A.Wire,e.AlgoSymbol1001=_.AlgoSymbol1001,e.AlgoSymbol1002=O.AlgoSymbol1002,e.AlgoSymbol1003=x.AlgoSymbol1003,e.AlgoSymbol1004=w.AlgoSymbol1004,e.AlgoSymbol1005=I.AlgoSymbol1005,e.AlgoSymbol1006=D.AlgoSymbol1006,e.AlgoSymbol1007=E.AlgoSymbol1007,e.AlgoSymbol1008=C.AlgoSymbol1008,e.AlgoSymbol1009=R.AlgoSymbol1009,e.AlgoSymbol1010=N.AlgoSymbol1010,e.AlgoSymbol1011=U.AlgoSymbol1011,e.AlgoSymbol1012=G.AlgoSymbol1012,e.AlgoSymbol1013=B.AlgoSymbol1013,e.AlgoSymbol1014=k.AlgoSymbol1014,e.AlgoSymbol1015=F.AlgoSymbol1015,e.AlgoSymbol1016=z.AlgoSymbol1016,e.AlgoSymbol1017=j.AlgoSymbol1017,e.AlgoSymbol1018=Y.AlgoSymbol1018,e.AlgoSymbol1019=V.AlgoSymbol1019,e.AlgoSymbol1020=W.AlgoSymbol1020,e.AlgoSymbol1021=H.AlgoSymbol1021,e.AlgoSymbol1022=X.AlgoSymbol1022,e.AlgoSymbol315=J.AlgoSymbol315,e.AlgoSymbol15200=q.AlgoSymbol15200},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AlgoSymbolFactory=e.BasicAlgoSymbolFactory=void 0;var o=i(35),n=i(78);e.BasicAlgoSymbolFactory=o.BasicAlgoSymbolFactory,e.AlgoSymbolFactory=n.AlgoSymbolFactory},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.AddPoint_WayType=SuperMap.Plot.AddPoint_WayType={UNKNOWN:0,POLYLINE:1,CURVE:2}},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(){},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 l=new Object;l.type=SuperMap.Plot.SymbolType.POLYLINESYMBOL,l.positionPoints=[];for(var a=t+10;a<170+t;a+=10){var s=SuperMap.Plot.PlottingUtil.findPoint(o,n,30,a);l.positionPoints.push(s)}l.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},i.push(l);var r=l.positionPoints[l.positionPoints.length-1],u=l.positionPoints[l.positionPoints.length-2],p=SuperMap.Plot.PlottingUtil.findPoint(r,u,9,22.5),h=SuperMap.Plot.PlottingUtil.findPoint(r,u,9,-22.5),c=new Object;c.type=SuperMap.Plot.SymbolType.POLYLINESYMBOL,c.positionPoints=[],c.positionPoints.push(p),c.positionPoints.push(r.clone()),c.positionPoints.push(h),c.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},i.push(c);var y=new Object;y.type=SuperMap.Plot.SymbolType.POLYLINESYMBOL,y.positionPoints=[];for(var f=190+t;f<350+t;f+=10){var S=SuperMap.Plot.PlottingUtil.findPoint(o,n,30,f);y.positionPoints.push(S)}y.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},i.push(y);var g=y.positionPoints[y.positionPoints.length-1],P=y.positionPoints[y.positionPoints.length-2],d=SuperMap.Plot.PlottingUtil.findPoint(g,P,9,22.5),m=SuperMap.Plot.PlottingUtil.findPoint(g,P,9,-22.5),b=new Object;b.type=SuperMap.Plot.SymbolType.POLYLINESYMBOL,b.positionPoints=[],b.positionPoints.push(d),b.positionPoints.push(g.clone()),b.positionPoints.push(m),b.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},i.push(b);for(var L=0;L=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)),l=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 l=SuperMap.Plot.PlottingUtil.projectPoint(t[2],t[0],t[1]);n=SuperMap.Plot.PlottingUtil.distance(l,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,s=a/this.nSegmentCount,r=this.getArcSpatialData(t[0],o,n,e,0,a,s);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,l,a){var s=[];if(Math.abs(a)<1e-9)return s;for(;ln+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(l,e,i);y-c<1e-5&&(y+=2*Math.PI);var f=Math.round(Math.abs((y-c)/a)+1);if(f<2)return s;for(var S=0;Ss.length&&(s[s.length-1].x=t.x+r*Math.cos(y)-h*Math.sin(y),s[s.length-1].y=t.y+u*Math.cos(y)+p*Math.sin(y)),s},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,l=e.y-t.y;if(Math.abs(n)<1e-9){var a={},s={};a.x=(e.x+t.x)/2,a.y=(e.y+t.y)/2,s.x=(e.x+i.x)/2,s.y=(e.y+i.y)/2;var r=0;Math.abs(i.x-e.x)>=1e-9&&(r=(i.y-e.y)/(i.x-e.x)),o.pntCenter.y=a.y,Math.abs(r)<1e-9?o.pntCenter.x=s.x:o.pntCenter.x=s.x-r*(a.y-s.y)}else{var u={},p={};u.x=(e.x+t.x)/2,u.y=(e.y+t.y)/2,p.x=(e.x+i.x)/2,p.y=(e.y+i.y)/2;var h=l/n,c=1;Math.abs(h)<1e-9?(o.pntCenter.x=u.x,Math.abs(i.x-e.x<1e-9)?o.pntCenter.y=p.y:o.pntCenter.y=-(i.x-e.x)/(i.y-e.y)*(o.pntCenter.x-p.x)+p.y):Math.abs(i.x-e.x)<1e-9?(o.pntCenter.y=p.y,o.pntCenter.x=-h*(o.pntCenter.y-u.y)+u.x):(c=(i.y-e.y)/(i.x-e.x),o.pntCenter.x=(h*c*(u.y-p.y)+c*u.x-h*p.x)/(c-h),o.pntCenter.y=(p.x-u.x+c*p.y-h*u.y)/(c-h))}var y=Math.atan2(t.y-o.pntCenter.y,t.x-o.pntCenter.x),f=Math.atan2(i.y-o.pntCenter.y,i.x-o.pntCenter.x);if(SuperMap.Plot.PlottingUtil.isCounterClockwise(t,e,i)){for(;y>=2*Math.PI;)y-=2*Math.PI;for(;y<0;)y+=2*Math.PI;for(;f>2*Math.PI;)f-=2*Math.PI;for(;f=2*Math.PI;)f-=2*Math.PI;for(;f<0;)f+=2*Math.PI;for(;y>2*Math.PI;)y-=2*Math.PI;for(;f>y;)y+=2*Math.PI;var S=y;y=f,f=S}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*f/Math.PI,o.dStartAngle=180*y/Math.PI,o},calcEllipseRadian:function(t,e,i){var o=t,n=e*Math.sin(t),l=i*Math.cos(t),a=Math.atan2(n,l);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=o&&n>=l){var u=a.clone();a=r.clone(),r=u.clone()}else if(l>=o&&l>=n){var p=r.clone();r=s.clone(),s=p.clone()}if(!SuperMap.Plot.PlottingUtil.isRight(r,a,s)){var h=a.clone();a=s.clone(),s=h.clone()}e[0]=a,e[1]=s,e[2]=r}return e},GetPtsByTriangle:function(t,e,i,o,n){var l=new SuperMap.Geometry.Point(0,0),a=0,s=0;return a=SuperMap.Plot.PlottingUtil.distance(n,i),s=SuperMap.Plot.PlottingUtil.distance(o,n),1==e&&(a*=2),2==e&&(s*=2),l.x=(a*o.x+s*i.x)/(a+s),l.y=(a*o.y+s*i.y)/(a+s),{pl:this.GetWhichPtOfNormal(t,i,l,n),pr:this.GetWhichPtOfNormal(t,o,l,n)}},GetWhichPtOfNormal:function(t,e,i,o){var n=0;n=SuperMap.Plot.PlottingUtil.distance(o,e)/t;var l=this.GetPointsOfNormal(n,i,o);return SuperMap.Plot.PlottingUtil.distance(e,l.pt4)>=(n=SuperMap.Plot.PlottingUtil.distance(e,l.pt3))?l.pt3:l.pt4},getBezierPtsWithScalePts:function(t,e,i,o){var n=[],l=t.x,a=t.y,s=e.x,r=e.y,u=i.x,p=i.y,h=o.x,c=o.y;if(SuperMap.Plot.PlottingUtil.equalFuzzy(l,s,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(l,a)),n.push(new SuperMap.Geometry.Point(u,p));else for(var y=0;y<=1;y+=.03125){var f,S,g,P,d=y*y,m=d*y;f=1-3*y+3*d-m,S=3*(y-2*d+m),g=3*(d-m),P=m;var b=new SuperMap.Geometry.Point(f*l+S*s+g*u+P*h,f*a+S*r+g*p+P*c);n.push(b)}return n},getSpatialData:function(t,e,i,o){switch(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});var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.PlottingUtil=SuperMap.Plot.PlottingUtil=SuperMap.Plot.PlottingUtil||{};SuperMap.Plot.PlottingUtil.DEFAULT_PRECISION=14,SuperMap.Plot.PlottingUtil.DPI=96,SuperMap.Plot.PlottingUtil.RTOD=57.29577951308232,SuperMap.Plot.PlottingUtil.DTOR=.017453292519943295,SuperMap.Plot.PlottingUtil.dirAngle=function(t,e){var i,o,n,l;i=e.x,o=e.y,n=i-t.x,l=o-t.y;var a=Math.atan2(l,n);return a<0&&(a+=2*Math.PI),a},SuperMap.Plot.PlottingUtil.generateUuid=function(){for(var t=[],e=0;e<36;e++)t[e]="0123456789abcdef".substr(Math.floor(16*Math.random()),1);return t[14]="4",t[19]="0123456789abcdef".substr(3&t[19]|8,1),t[8]=t[13]=t[18]=t[23]="-",t.join("")},SuperMap.Plot.PlottingUtil.cloneObject=function(t){return JSON.parse(JSON.stringify(t))},SuperMap.Plot.PlottingUtil.colorRGBA=function(t,e){var i=t.substring(1,3),o=parseInt(i,16),n=t.substring(3,5),l=parseInt(n,16),a=t.substring(5);return"rgba("+o+","+l+","+parseInt(a,16)+","+e+")"},SuperMap.Plot.PlottingUtil.colorRGBToString=function(t){var e=t.red.toString(16);e.length<2&&(e="0"+e);var i=t.green.toString(16);i.length<2&&(i="0"+i);var o=t.blue.toString(16);return o.length<2&&(o="0"+o),"#"+e+i+o},SuperMap.Plot.PlottingUtil.colorStringToRGB=function(t){var e={},i=t.substring(1,3);e.red=parseInt(i,16);var o=t.substring(3,5);e.green=parseInt(o,16);var n=t.substring(5);return e.blue=parseInt(n,16),e},SuperMap.Plot.PlottingUtil.decimalToHex=function(t){for(var e=t.toString(16);e.length<8;)e="0"+e;var i=e.substring(0,2),o=e.substring(2,4),n=e.substring(4,6);return{color:"#"+e.substring(6)+n+o,alpha:parseInt(i,16)/255}},SuperMap.Plot.PlottingUtil.hexToDecimal=function(t,e){var i=t.substring(1,3),o=t.substring(3,5),n=t.substring(5),l=parseInt(n+o+i,16),a=Math.round(255*e).toString(16);return parseInt(a+"000000",16)+l},SuperMap.Plot.PlottingUtil.getAlign=function(t){return"TOPLEFT"===t?"lt":"TOPCENTER"===t?"ct":"TOPRIGHT"===t?"rt":"BOTTOMLEFT"===t?"lb":"BOTTOMCENTER"===t?"cb":"BOTTOMRIGHT"===t?"rb":"MIDDLELEFT"===t?"lm":"MIDDLECENTER"===t?"cm":"MIDDLERIGHT"===t?"rm":"lt"},SuperMap.Plot.PlottingUtil.trim=function(t){return null==t?"":t.replace(/(^\s*)|(\s*$)/g,"")},SuperMap.Plot.PlottingUtil.getTextWidth=function(t,e){" "===e&&(e="_");var i=document.createElement("span");document.body.appendChild(i),i.style.width="auto",i.style.height="auto",t.fontSize&&(i.style.fontSize=new String(t.fontSize)+"px"),t.fontFamily&&(i.style.fontFamily=t.fontFamily),t.fontWeight&&(i.style.fontWeight=t.fontWeight),i.style.position="absolute",i.style.visibility="hidden",i.style.display="inline-block",i.innerHTML=e;var o=i.clientWidth,n=e.length;return void 0===t.fontSpace&&void 0===t.fontPercent||(0!==t.fontSpace&&100!==t.fontPercent&&void 0!==t.fontSpace||void 0!==t.fontPercent?o=t.fontPercent/100*o+t.fontSpace*(t.fontPercent/100)*(n-1):0===t.fontSpace&&100!==t.fontPercent&&void 0!==t.fontPercent?o=t.fontPercent/100*o:0!==t.fontSpace&&100===t.fontPercent&&void 0!==t.fontSpace&&(o+=t.fontSpace*(n-1))),document.body.removeChild(i),o},SuperMap.Plot.PlottingUtil.getTextCount=function(t){for(var e=0,i=0,o=0;o255?e++:i++;return e+i/2},SuperMap.Plot.PlottingUtil.toJSON=function(t){var e=t;if(null==e)return null;switch(e.constructor){case String:return e=(e=(e=(e=(e=(e=(e='"'+e.replace(/(["\\])/g,"\\$1")+'"').replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace("<","<")).replace(">",">")).replace(/%/g,"%2525")).replace(/&/g,"%26");case Array:for(var i=[],n=0,l=e.length;n0?"{"+u.join(",")+"}":"{}"}return e.toString()}},SuperMap.Plot.PlottingUtil.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.Plot.PlottingUtil.copyAttributes(e.style,t.style)),i.feature=e,i.calculateParts()}return e},SuperMap.Plot.PlottingUtil.getSurroundLinePts=function(t,e){for(var i=[],o=[],n=0;n2*h?o.push(a):(o[o.length-1]=p,o.push(a))}else o.push(a)}else o.push(l),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},l=2;l=0?-1:1},SuperMap.Plot.PlottingUtil.isNear=function(t,e){return e||(e=SuperMap.Plot.PlottingUtil.TORLERANCE_STATIC),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={isIntersectLines:!1};if(t.x===e.x&&t.y===e.y||i.x===o.x&&i.y===o.y)return n;var l=e.x-t.x,a=e.y-t.y,s=o.x-i.x,r=o.y-i.y,u=l*r-s*a;if(SuperMap.Plot.PlottingUtil.isNear(u))return n;var p=(l*(t.y-i.y)-a*(t.x-i.x))/u,h=new SuperMap.Geometry.Point(0,0);return h.x=p*s+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){if(t.length!==e.length)return!1;for(var i=0;i=0;a--)e.push(t[o][a]);t.splice(o,1);var s=n(t,e);if(void 0!==s&&0!==s.length)return s}return e}if(SuperMap.Plot.PlottingUtil.isArray(t)||(t=[t]),0===t.length)return[];if(1===t.length)return t[0];for(var l=0;l2&&L.push(M)}return L},SuperMap.Plot.PlottingUtil.isRight=function(t,e,i){var o=e,n=i,l=e,a=t;return(n.x-o.x)*(a.y-l.y)-(a.x-l.x)*(n.y-o.y)<0},SuperMap.Plot.PlottingUtil.radian=function(t,e){var i,o,n=0;return 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=SuperMap.Plot.PlottingUtil.radian(e,t),l=(n+SuperMap.Plot.PlottingUtil.radian(e,i))/2,a=Math.cos(l-n+Math.PI/2),s=o;SuperMap.Plot.PlottingUtil.isNear(a,.15)||(s=o/a);var r=e.x+s*Math.cos(l),u=e.y+s*Math.sin(l);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=SuperMap.Plot.PlottingUtil.radian(t,e)+o*Math.PI/180,l=t.x+i*Math.cos(n),a=t.y+i*Math.sin(n);return new SuperMap.Geometry.Point(l,a)},SuperMap.Plot.PlottingUtil.isSameQuadrant=function(t,e,i,o){var n=(e.x-t.x)*(o.x-i.x),l=(e.y-t.y)*(o.y-i.y);return!(Math.abs(n)<1e-18&&Math.abs(l)<1e-18)&&((n>0||Math.abs(n)<1e-18)&&(l>0||Math.abs(l)<1e-18))},SuperMap.Plot.PlottingUtil.isCross=function(t,e,i,o){var n=new SuperMap.Geometry.Point(0,0);return!(!SuperMap.Plot.PlottingUtil.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(SuperMap.Plot.PlottingUtil.equalFuzzy(t.x,e.x)&&SuperMap.Plot.PlottingUtil.equalFuzzy(t.y,e.y))return n.x=t.x,n.y=t.y,!1;if(SuperMap.Plot.PlottingUtil.equalFuzzy(i.x,o.x)&&SuperMap.Plot.PlottingUtil.equalFuzzy(i.y,o.y))return n.x=i.x,n.y=i.y,!1;var l=0,a=0;if(l=t.x>e.x?t.x:e.x,a=t.x1e-16&&o.x-l>1e-16||i.x-a<-1e-16&&o.x-a<-1e-16)return!1;if(l=t.y>e.y?t.y:e.y,a=t.y1e-16&&o.y-l>1e-16||i.y-a<-1e-16&&o.y-a<-1e-16)return!1;var s=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=s*p-u*r,f=y;if(Math.abs(s)>1e-18&&Math.abs(u)>1e-18&&(f/=s*u),Math.abs(f)<1e-18)return t===i?(n.x=t.x,n.y=t.y,!SuperMap.Plot.PlottingUtil.isSameQuadrant(t,e,i,o)):e===o?(n.x=e.x,n.y=e.y,!SuperMap.Plot.PlottingUtil.isSameQuadrant(t,e,i,o)):t===o?(n.x=t.x,n.y=t.y,SuperMap.Plot.PlottingUtil.isSameQuadrant(t,e,i,o)):e===i&&(n.x=e.x,n.y=e.y,SuperMap.Plot.PlottingUtil.isSameQuadrant(t,e,i,o));var S=(s*c-r*h)/y,g=(u*c-p*h)/y;return!(S<0&&(Math.abs(S*u)>1e-16||Math.abs(S*p)>1e-16))&&(!(S>1&&(Math.abs((S-1)*u)>1e-16||Math.abs((S-1)*p)>1e-16))&&(!(g<0&&(Math.abs(g*s)>1e-16||Math.abs(g*r)>1e-16))&&(!(g>1&&(Math.abs((g-1)*s)>1e-16||Math.abs((g-1)*r)>1e-16))&&(Math.abs(S)<1e-18?(n.x=i.x,n.y=i.y,!0):Math.abs(S-1)<1e-18?(n.x=o.x,n.y=o.y,!0):Math.abs(g)<1e-18?(n.x=t.x,n.y=t.y,!0):Math.abs(g-1)<1e-18?(n.x=e.x,n.y=e.y,!0):!(S<0&&(Math.abs(S*u)>1e-16||Math.abs(S*p)>1e-16))&&(!(S>1&&(Math.abs((S-1)*u)>1e-16||Math.abs((S-1)*p)>1e-16))&&(!(g<0&&(Math.abs(g*s)>1e-16||Math.abs(g*r)>1e-16))&&(!(g>1&&(Math.abs((g-1)*s)>1e-16||Math.abs((g-1)*r)>1e-16))&&(n.x=S*u+i.x,n.y=S*p+i.y,!0))))))))},SuperMap.Plot.PlottingUtil.parallel=function(t,e){var i=[],o=t.length;if(!t||null==t||t.length<2)return i;var n=!1;t.length>3&&t[0].x===t[t.length-1].x&&t[0].y===t[t.length-1].y&&(n=!0),n?(i[0]=SuperMap.Plot.PlottingUtil.findBisectorPoint(t[t.length-2],t[0],t[1],e),i[t.length-1]=i[0]):(i[0]=SuperMap.Plot.PlottingUtil.findPoint(t[0],t[1],e,90),i[t.length-1]=SuperMap.Plot.PlottingUtil.findPoint(t[t.length-1],t[t.length-2],-e,90));for(var l=t[0],a=t[1],s=t[1],r=1;r1&&(a=1);var s=(i.x-e.x)*a+e.x,r=(i.y-e.y)*a+e.y,u=(s-t.x)*(s-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=e)){var l=t[n].x,a=t[n].y,s=t[n+2].x,r=t[n+2].y,u=t[n+4].x,p=t[n+4].y,h=t[n+3].x,c=t[n+3].y;if(SuperMap.Plot.PlottingUtil.equalFuzzy(l,s,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))i.push(new SuperMap.Geometry.Point(l,a)),i.push(new SuperMap.Geometry.Point(u,p));else for(var y=0;y<=1;y+=.03125){var f,S,g,P,d=y*y,m=d*y;f=1-3*y+3*d-m,S=3*(y-2*d+m),g=3*(d-m),P=m;var b=new SuperMap.Geometry.Point(f*l+S*s+g*u+P*h,f*a+S*r+g*p+P*c);i.push(b)}}return i},SuperMap.Plot.PlottingUtil.computeBeizerPoints=function(t,e,i){var o=SuperMap.Plot.PlottingUtil.polylineDistance(e),n=[],l=[],a=[];if(t){l.push(e[0]);var s=i[0],r=i[1],u=e[0].x+o*s,p=e[0].y+o*r;l.push(new SuperMap.Geometry.Point(u,p)),n.push(new SuperMap.Geometry.Point(u,p));for(var h=1;h0?(p=e+(o-e)*S/f,h=i+(n-i)*S/f):(p=e,h=i),s.x=p+(r-p)*t,s.y=h+(u-h)*t,s},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,l=t.x-i.x,a=t.y-i.y,s=(o*l+n*a)/(Math.sqrt(o*o+n*n)*Math.sqrt(l*l+a*a));return!!SuperMap.Plot.PlottingUtil.equalFuzzy(s,-1,.1)},SuperMap.Plot.PlottingUtil.pointIsOnPolyLines=function(t,e){if(!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,l=i/Math.sqrt(o*o+n*n),a=t.x+o*l,s=t.y+n*l;return new SuperMap.Geometry.Point(a,s)},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])){var n=e[0];e[0]=e[1],e[1]=n}if(!SuperMap.Plot.PlottingUtil.pointIsRightToVerticle(e[0],e[1],e[2])){var l=e[2];e[2]=e[3],e[3]=l}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),l=new SuperMap.Geometry.Point(i.x-o.x,i.y-o.y);return n.x*l.x+n.y*l.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),l=Math.sin(o),a=i.x-t.x,s=i.y-t.y;return i.x=a*n-s*l+t.x,i.y=a*l+s*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,l=t[o+1],a=t[o],s=n/SuperMap.Plot.PlottingUtil.distance(l,a),r=new SuperMap.Geometry.Point(0,0);return r.x=l.x+(a.x-l.x)*s,r.y=l.y+(a.y-l.y)*s,{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)==(r=i.x>t.x&&i.y>t.y?1:i.xt.y?2:i.xo&&l>o)&&(a=0);else switch(s){case 1:(4==r&&no)&&(a=0);break;case 2:(1==r&&no)&&(a=0);break;case 3:(2==r&&no)&&(a=0);break;case 4:(3==r&&no)&&(a=0)}var u=new SuperMap.Geometry.Point(0,0);return SuperMap.Plot.PlottingUtil.equalFuzzy(o-1.7976931348623157e308,0)?(u.x=t.x,u.y=e.y):SuperMap.Plot.PlottingUtil.equalFuzzy(o,0)?(u.x=e.x,u.y=t.y):(u.x=(o*(e.y-t.y)+o*o*t.x+e.x)/(o*o+1),u.y=t.y+o*(u.x-t.x)),{isOnline:1===a,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,l=o*Math.cos(n)+t.x,a=o*Math.sin(n)+t.y;return new SuperMap.Geometry.Point(l,a)},SuperMap.Plot.PlottingUtil.triangleHeightAndPartBottomLen=function(t,e,i){var o=void 0,n=void 0,l=(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)),s=Math.sqrt((t.x-i.x)*(t.x-i.x)+(t.y-i.y)*(t.y-i.y));if(0==s||0==a)o=0,n=0;else if(0==l)o=a,n=0;else{var r=(a*a+s*s-l)/2/a/s,u=0;r>=1?(r=1,u=0):u=Math.sqrt(1-r*r),o=s*r,n=s*u}return{dLen1:o,dLen2:n}},SuperMap.Plot.PlottingUtil.paraLine=function(t,e,i){var o=[];if(2>t.length)return o;if(i){var n=t[1].clone();n=SuperMap.Plot.PlottingUtil.rotateAngle(t[0],Math.PI/2,n),o.push(SuperMap.Plot.PlottingUtil.linePnt(t[0],n,e));for(var l=1;lMath.PI/2?r-Math.PI/2:Math.PI/2-r;var p=e/Math.cos(u);n=t[l+1].clone(),n=SuperMap.Plot.PlottingUtil.rotateAngle(t[l],r,n),o.push(SuperMap.Plot.PlottingUtil.linePnt(t[l],n,p))}n=t[t.length-2].clone(),n=SuperMap.Plot.PlottingUtil.rotateAngle(t[t.length-1],-1*Math.PI/2,n),o.push(SuperMap.Plot.PlottingUtil.linePnt(t[t.length-1],n,e))}else{var h=t[1].clone();h=SuperMap.Plot.PlottingUtil.rotateAngle(t[0],-Math.PI/2,h),o.push(SuperMap.Plot.PlottingUtil.linePnt(t[0],h,e));for(var c=1;cMath.PI/2?S-Math.PI/2:Math.PI/2-S;var P=e/Math.cos(g);h=t[c-1].clone(),h=SuperMap.Plot.PlottingUtil.rotateAngle(t[c],S,h),o.push(SuperMap.Plot.PlottingUtil.linePnt(t[c],h,P))}h=t[t.length-2].clone(),h=SuperMap.Plot.PlottingUtil.rotateAngle(t[t.length-1],Math.PI/2,h),o.push(SuperMap.Plot.PlottingUtil.linePnt(t[t.length-1],h,e))}return o},SuperMap.Plot.PlottingUtil.circlePoint=function(t,e,i,o){o*=Math.PI/180;var n=t.x+e*Math.cos(o),l=t.y+i*Math.sin(o);return new SuperMap.Geometry.Point(n,l)},SuperMap.Plot.PlottingUtil.getPolygonCenterPt=function(t){if(!t||0===t.length)return null;for(var e=0,i=0,o=0;oa.y?l.y:a.y;if(!(e.yr))(e.y-l.y)*(a.x-l.x)/(a.y-l.y)+l.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),l=SuperMap.Plot.PlottingUtil.distance(e,i),a=(o*o+n*n-l*l)/(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),l=n.length;if(l<2)return o;var a=new SuperMap.Geometry.Point(0,0);if(i){if(l<3)a=n[1].clone(),SuperMap.Plot.PlottingUtil.rotateAngle(n[0],Math.PI,a),o.push(SuperMap.Plot.PlottingUtil.linePnt(n[0],a,e));else{for(var s=SuperMap.Plot.PlottingUtil.radian(n[0],n[1]),r=SuperMap.Plot.PlottingUtil.radian(n[0],n[n.length-1])-s;r<0;)r+=2*Math.PI;var u=r/2,p=void 0;p=u>Math.PI/2?u-Math.PI/2:Math.PI/2-u;var h=e/Math.cos(p);a=n[1].clone(),a=SuperMap.Plot.PlottingUtil.rotateAngle(n[0],u,a),o.push(SuperMap.Plot.PlottingUtil.linePnt(n[0],a,h))}for(var c=1;cMath.PI/2?S-Math.PI/2:Math.PI/2-S;var P=e/Math.cos(g);a=n[c+1].clone(),a=SuperMap.Plot.PlottingUtil.rotateAngle(n[c],S,a),o.push(SuperMap.Plot.PlottingUtil.linePnt(n[c],a,P))}if(l<3)a=n[l-2].clone(),SuperMap.Plot.PlottingUtil.rotateAngle(n[l-1],0,a),o.push(SuperMap.Plot.PlottingUtil.linePnt(n[l-1],a,e));else{for(var d=SuperMap.Plot.PlottingUtil.radian(n[l-1],n[0]),m=SuperMap.Plot.PlottingUtil.radian(n[l-1],n[l-2])-d;m<0;)m+=2*Math.PI;var b=m/2,L=void 0;L=b>Math.PI/2?b-Math.PI/2:Math.PI/2-b;var M=e/Math.cos(L);a=n[0].clone(),a=SuperMap.Plot.PlottingUtil.rotateAngle(n[l-1],b,a),o.push(SuperMap.Plot.PlottingUtil.linePnt(n[l-1],a,M))}}else{if(l<3){var v=n[1].clone();SuperMap.Plot.PlottingUtil.rotateAngle(n[0],0,v),o.push(SuperMap.Plot.PlottingUtil.linePnt(n[0],v,e))}else{for(var T=SuperMap.Plot.PlottingUtil.radian(n[0],n[1]),A=SuperMap.Plot.PlottingUtil.radian(n[0],n[l-1])-T;A<0;)A+=2*Math.PI;var _=Math.PI-A/2,O=void 0;O=_>Math.PI/2?_-Math.PI/2:Math.PI/2-_;var x=e/Math.cos(O);a=n[l-1].clone(),a=SuperMap.Plot.PlottingUtil.rotateAngle(n[0],_,a),o.push(SuperMap.Plot.PlottingUtil.linePnt(n[0],a,x))}for(var w=1;wMath.PI/2?E-Math.PI/2:Math.PI/2-E;var R=e/Math.cos(C);a=n[w-1].clone(),a=SuperMap.Plot.PlottingUtil.rotateAngle(n[w],E,a),o.push(SuperMap.Plot.PlottingUtil.linePnt(n[w],a,R))}if(l<3)a=n[l-2].clone(),SuperMap.Plot.PlottingUtil.rotateAngle(n[l-1],Math.PI,a),o.push(SuperMap.Plot.PlottingUtil.linePnt(n[l-1],a,e));else{for(var N=SuperMap.Plot.PlottingUtil.radian(n[l-1],n[0]),U=SuperMap.Plot.PlottingUtil.radian(n[l-1],n[l-2])-N;U<0;)U+=2*Math.PI;var G=Math.PI-U/2,B=void 0;B=G>Math.PI/2?G-Math.PI/2:Math.PI/2-G;var k=e/Math.cos(B);a=n[l-2].clone(),a=SuperMap.Plot.PlottingUtil.rotateAngle(n[l-1],G,a),o.push(SuperMap.Plot.PlottingUtil.linePnt(n[l-1],a,k))}}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,l=1;lt[l].x&&(i=t[l].x),ot[l].y&&(n=t[l].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.Plot.PlottingUtil.isArray(t)||(t=[t]),t&&null!=t)for(var i=0;i