1;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,P=Math.ceil(a/(1.4*c)),S=0,g=[],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),P=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(y,t[0],f);o.push(P.pntLeft),o.push(p),o.push(P.pntRight),o.push(P.pntLeft)}break;case SuperMap.Plot.ArrowToolkit.ArrowHeadType.ARROWHEAD_COATTAIL:var S=t[0],g=2*Math.sqrt(e*e/3),d=SuperMap.Plot.PlottingUtil.distance(t[0],t[1]);if(SuperMap.Plot.PlottingUtil.equalFuzzy(g/2,d,1e-7)||d>g/2){var m=SuperMap.Plot.PlottingUtil.findPoint(t[0],t[1],g,20),b=SuperMap.Plot.PlottingUtil.findPoint(t[0],t[1],g,-20),L=SuperMap.Plot.PlottingUtil.findPoint(t[0],t[1],g/2,0);o.push(S),o.push(m),o.push(L),o.push(b),o.push(S)}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),E=new SuperMap.Geometry.Point((w.x+I.x)/2,(w.y+I.y)/2),D=.75*SuperMap.Plot.PlottingUtil.distance(w,I)/2,C=SuperMap.Plot.PlottingUtil.findPointInLine(E,w,D),R=SuperMap.Plot.PlottingUtil.findPointInLine(E,I,D);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&&S>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);g=Math.abs(d*t[0].x+m*t[0].y+b)/Math.sqrt(d*d+m*m)}else S<=1e-4?g=Math.abs(f-t[1].y):P<=1e-4&&(g=Math.abs(y-t[1].x));var L=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(g,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)),E=SuperMap.Plot.PlottingUtil.getSidePointsOfLine(T,t[e+1],t[e]),(M=SuperMap.Plot.PlottingUtil.pointIsRightToLine(t[e],t[e+1],E.pntLeft))?(a[e]=new SuperMap.Geometry.Point(E.pntLeft.x,E.pntLeft.y),l[e]=new SuperMap.Geometry.Point(E.pntRight.x,E.pntRight.y)):(a[e]=new SuperMap.Geometry.Point(E.pntRight.x,E.pntRight.y),l[e]=new SuperMap.Geometry.Point(E.pntLeft.x,E.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(),P=o.elements[a+2].GetY(),S=0;S<=1;S+=.03125){var g=S*S,d=g*S,m=1-3*S+3*g-d,b=3*(S-2*g+d),L=3*(g-d),M=d;n.push(new SuperMap.Geometry.Point(m*r+b*p+L*c+M*f,m*u+b*h+L*y+M*P))}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.LinearArrow=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(129),n=i(128),l=i(127),a=i(126),s=i(125),r=i(124),u=i(123),p=i(122),h=i(121),c=i(120),y=i(119),f=i(118),P=i(117),S=i(116),g=i(115),d=i(114),m=i(113),b=i(112),L=i(111),M=i(110),v=i(109),T=i(108),A=i(107),_=i(106),O=i(105),x=i(104),w=i(103),I=i(102),E=i(101),D=i(100),C=i(99),R=i(98),N=i(97),U=i(96),G=i(95),B=i(94),k=i(93),F=i(92),z=i(91),j=i(90),Y=i(89),V=i(88),W=i(87),H=i(86),X=i(85),J=i(84),q=i(83),Z=i(82);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=P.ConcentricCircle,e.CombinationalCircle=S.CombinationalCircle,e.FreeCurve=g.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.LinearArrow=_.LinearArrow,e.AlgoSymbol1001=O.AlgoSymbol1001,e.AlgoSymbol1002=x.AlgoSymbol1002,e.AlgoSymbol1003=w.AlgoSymbol1003,e.AlgoSymbol1004=I.AlgoSymbol1004,e.AlgoSymbol1005=E.AlgoSymbol1005,e.AlgoSymbol1006=D.AlgoSymbol1006,e.AlgoSymbol1007=C.AlgoSymbol1007,e.AlgoSymbol1008=R.AlgoSymbol1008,e.AlgoSymbol1009=N.AlgoSymbol1009,e.AlgoSymbol1010=U.AlgoSymbol1010,e.AlgoSymbol1011=G.AlgoSymbol1011,e.AlgoSymbol1012=B.AlgoSymbol1012,e.AlgoSymbol1013=k.AlgoSymbol1013,e.AlgoSymbol1014=F.AlgoSymbol1014,e.AlgoSymbol1015=z.AlgoSymbol1015,e.AlgoSymbol1016=j.AlgoSymbol1016,e.AlgoSymbol1017=Y.AlgoSymbol1017,e.AlgoSymbol1018=V.AlgoSymbol1018,e.AlgoSymbol1019=W.AlgoSymbol1019,e.AlgoSymbol1020=H.AlgoSymbol1020,e.AlgoSymbol1021=X.AlgoSymbol1021,e.AlgoSymbol1022=J.AlgoSymbol1022,e.AlgoSymbol315=q.AlgoSymbol315,e.AlgoSymbol15200=Z.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(81);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 P=SuperMap.Plot.PlottingUtil.findPoint(o,n,30,f);y.positionPoints.push(P)}y.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},i.push(y);var S=y.positionPoints[y.positionPoints.length-1],g=y.positionPoints[y.positionPoints.length-2],d=SuperMap.Plot.PlottingUtil.findPoint(S,g,9,22.5),m=SuperMap.Plot.PlottingUtil.findPoint(S,g,9,-22.5),b=new Object;b.type=SuperMap.Plot.SymbolType.POLYLINESYMBOL,b.positionPoints=[],b.positionPoints.push(d),b.positionPoints.push(S.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 P=0;Ps.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 P=y;y=f,f=P}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,P,S,g,d=y*y,m=d*y;f=1-3*y+3*d-m,P=3*(y-2*d+m),S=3*(d-m),g=m;var b=new SuperMap.Geometry.Point(f*l+P*s+S*u+g*h,f*a+P*r+S*p+g*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 P=(s*c-r*h)/y,S=(u*c-p*h)/y;return!(P<0&&(Math.abs(P*u)>1e-16||Math.abs(P*p)>1e-16))&&(!(P>1&&(Math.abs((P-1)*u)>1e-16||Math.abs((P-1)*p)>1e-16))&&(!(S<0&&(Math.abs(S*s)>1e-16||Math.abs(S*r)>1e-16))&&(!(S>1&&(Math.abs((S-1)*s)>1e-16||Math.abs((S-1)*r)>1e-16))&&(Math.abs(P)<1e-18?(n.x=i.x,n.y=i.y,!0):Math.abs(P-1)<1e-18?(n.x=o.x,n.y=o.y,!0):Math.abs(S)<1e-18?(n.x=t.x,n.y=t.y,!0):Math.abs(S-1)<1e-18?(n.x=e.x,n.y=e.y,!0):!(P<0&&(Math.abs(P*u)>1e-16||Math.abs(P*p)>1e-16))&&(!(P>1&&(Math.abs((P-1)*u)>1e-16||Math.abs((P-1)*p)>1e-16))&&(!(S<0&&(Math.abs(S*s)>1e-16||Math.abs(S*r)>1e-16))&&(!(S>1&&(Math.abs((S-1)*s)>1e-16||Math.abs((S-1)*r)>1e-16))&&(n.x=P*u+i.x,n.y=P*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,P,S,g,d=y*y,m=d*y;f=1-3*y+3*d-m,P=3*(y-2*d+m),S=3*(d-m),g=m;var b=new SuperMap.Geometry.Point(f*l+P*s+S*u+g*h,f*a+P*r+S*p+g*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)*P/f,h=i+(n-i)*P/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?P-Math.PI/2:Math.PI/2-P;var g=e/Math.cos(S);h=t[c-1].clone(),h=SuperMap.Plot.PlottingUtil.rotateAngle(t[c],P,h),o.push(SuperMap.Plot.PlottingUtil.linePnt(t[c],h,g))}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;c