/*! * * iclient-plot-leaflet.(https://iclient.supermap.io) * Copyright© 2000 - 2020 SuperMap Software Co.Ltd * version: v10.1.0 * */!function(t){var e={};function o(i){if(e[i])return e[i].exports;var l=e[i]={i,l:!1,exports:{}};return t[i].call(l.exports,l,l.exports,o),l.l=!0,l.exports}o.m=t,o.c=e,o.d=function(t,e,i){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(o.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var l in t)o.d(i,l,function(e){return t[e]}.bind(null,l));return i},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=0)}([function(t,e,o){"use strict";o.r(e);var i=window.SuperMap=window.SuperMap||{},l=i.Plot=i.Plot||{},s=(window.SuperMapAlgoPlot=i.Plot||{},SuperMap.Plot.ArrowTailType={ARROWTAIL_NONE:0,ARROWTAIL_LINE:1,ARROWTAIL_CURVE:2,ARROWTAIL_COATTAIL:3,ARROWTAIL_COATTAIL_POLYBODY:4},SuperMap.Plot.ArrowHeadType={ARROWHEAD_POLYLINE:0,ARROWHEAD_TRIANGLE:1,ARROWHEAD_COATTAIL:2,ARROWHEAD_TRIANGLE_SOLID:3,ARROWHEAD_WITH_EAR:4,ARROWHEAD_WITHOUT_EAR:5,ARROWHEAD_COATTAIL_HOLLOW:6},SuperMap.Plot.ArrowBodyType={ARROWBODY_POLYLINE:0,ARROWBODY_POLYBEZIER:1,ARROWBODY_PARALLEL:2,ARROWBODY_TRAPEZOID:3,ARROWBODY_MULTIPOLYBEZIER:4,ARROWBODY_COATTAIL:5},SuperMap.Plot.SymbolType={DOTSYMBOL:1,ALGOSYMBOL:2,TEXTSYMBOL:34,ELLIPSESYMBOL:31,CIRCLESYMBOL:29,RECTANGLESYMBOL:26,ARBITRARYPOLYGONSYMBOL:32,POLYLINESYMBOL:24,PARALLELOGRAM:28,ARCSYMBOL:44,NEWARCSYMBOL:4401,REGULARPOLYGON:410,CHORDSYMBOL:370,PIESYMBOL:380,NEWPIESYMBOL:3801,KIDNEY:390,POLYBEZIERSYMBOL:590,PARALLELLINE:48,BRACESYMBOL:400,ANNOFRAMESYMBOL:320,ANNOFRAMESYMBOLM:321,TRAPEZOIDSYMBOL:350,POLYBEZIERCLOSESYMBOL:360,GROUPOBJECT:1e3,LINERELATION:1001,INTERFERENCEBEAM:1002,POLYGONREGION:1003,ARCREGION:1004,AIRROUTE:1005,NAVYROUTE:1006,MISSILEROUTE:1007,NAVYDEPLOYMENT:1008,AIRDEPLOYMENT:1009,SATELLITE:1010,SATELLITETIMEWINDOWS:1011,SYMBOLTEXT:1012,RUNWAY:1013,CURVEEIGHT:1014,ROUTENODE:1015,ARROWLINE:1016,PATHTEXT:1017,LITERATESIGN:1018,CONCENTRICCIRCLE:1019,FLAGGROUP:1020,SYMBOLTEXT1:1021,COMBINATIONALCIRCLE:1022,FREECURVE:1023,SYMBOLTEXTBOX:1024,NODECHAIN:1025,LINEMARKING:1026,AVOIDREGION:1027,WIRE:1028,LINEARARROW:1029,PICTURE:3e3}),n=SuperMap.Plot.LineRelationType={SOLID:0,DASH:1,ARROW:2},a=SuperMap.Plot.AlgoSurroundLineType={NONE:0,INNER:1,OUT:2,ALL:3},r=SuperMap.Plot.RouteNodeType={RENDEZVOUS:"RENDEZVOUS",EXPANDING:"EXPANDING",VOLLEY:"VOLLEY",STANDBY:"STANDBY",SUPPLY:"SUPPLY",TAKEOFF:"TAKEOFF",INITIAL:"INITIAL",VISUALINITAL:"VISUALINITAL",LANCH:"LANCH",TURNING:"TURNING",AIMING:"AIMING",COMMONROUTE:"COMMONROUTE",WEAPONLAUNCH:"WEAPONLAUNCH",TARGET:"TARGET",ATTACK:"ATTACK",SUPPRESS:"SUPPRESS",EIGHTSPIRAL:"EIGHTSPIRAL",HAPPYVALLEY:"HAPPYVALLEY"},p=SuperMap.Plot.RelLineText={ONLINE:0,ONLEFTLINE:1,ONRIGHTLINE:2,ONBOTHLINE:3},u=SuperMap.Plot.RadiusLineType={NONE:0,SOLID:1,ARROW:2},h=(SuperMap.Plot.Position={TOP:4,BOTTOM:5,LEFT:6,RIGHT:7},SuperMap.Plot.AnnoPosition={LEFTTOP:0,LEFTBOTTOM:1,RIGHTTOP:2,RIGHTBOTTOM:3,TOP:4,BOTTOM:5,LEFT:6,RIGHT:7,MIDDLE:8,ANCHOR:9}),g=SuperMap.Plot.ArrowLineType={DOUBLELINE:0,TRIANGLESOLID:1,NONE:2},c=SuperMap.Plot.TextBoxType={WITHTIPBOX:0,RECTBOX:1,LINEBOX:2,NONEBOX:3},y=SuperMap.Plot.PositionOffsetType={LINE:0,GRADIENTLINE:1},P=SuperMap.Plot.AlignType={LEFT:0,RIGHT:1,UP:2,DOWN:3,VERTICALCENTER:4,HORIZONTALCENTER:5},d=SuperMap.Plot.EditMode={ADDCONTROLPOINT:0,EDITCONTROLPOINT:1,EDITCIRCUMRECTANGLE:2,REMOVECONTROLPOINT:3};SuperMap.Plot.EqualLargeType={WIDTH:0,HEIGHT:1,SAME:2},SuperMap.Plot.UniformDistributionType={LEVEL:0,VERTICAL:1};SuperMap.Plot.TransactionType={CREATE:0,EDIT:1,REMOVE:2};var S=SuperMap.Plot.Event=SuperMap.Plot.Event||{};SuperMap.Plot.Event.beforefeatureadded="beforefeatureadded",SuperMap.Plot.Event.featureadded="featureadded",SuperMap.Plot.Event.beforefeaturesselected="beforefeaturesselected",SuperMap.Plot.Event.featuresselected="featuresselected",SuperMap.Plot.Event.beforefeaturesunselected="beforefeaturesunselected",SuperMap.Plot.Event.featuresunselected="featuresunselected",SuperMap.Plot.Event.beforefeaturesmodified="beforefeaturesmodified",SuperMap.Plot.Event.featuresmodified="featuresmodified",SuperMap.Plot.Event.beforefeaturesremoved="beforefeaturesremoved",SuperMap.Plot.Event.featuresremoved="featuresremoved",SuperMap.Plot.Event.beforefeaturesadded="beforefeaturesadded",SuperMap.Plot.Event.featuresadded="featuresadded",SuperMap.Plot.Event.movingtargetsselected="featuresselected",SuperMap.Plot.Event.movingtargetsunselected="featuresunselected",SuperMap.Plot.Event.movingtargetcontextmenu="featurecontextmenu",SuperMap.Plot.Event.initializecompleted="initializecompleted",SuperMap.Plot.Event.cachecompleted="cachecompleted",SuperMap.Plot.Event.reseteditmarkersvalues="reseteditmarkersvalues",SuperMap.Plot.Event.reseteditmarkers="reseteditmarkers";var f=SuperMap.Plot.GOAnimationType={ANIMATION_UNKNOWN:-1,ANIMATION_WAY:0,ANIMATION_BLINK:1,ANIMATION_ATTRIBUTE:2,ANIMATION_SHOW:3,ANIMATION_ROTATE:4,ANIMATION_SCALE:5,ANIMATION_GROW:6};SuperMap.Plot.BlinkAnimationBlinkStyle={Blink_Frequency:0,Blink_Number:1},SuperMap.Plot.BlinkAnimationReplaceStyle={Replace_NoColor:0,Replace_Color:1},SuperMap.Plot.RotateDirection={ClockWise:0,AntiClockWise:1},SuperMap.Plot.WayPathType={POLYLINE:0,CURVE:1},SuperMap.Plot.GOAnimationState={UNKNOWN:0,PLAYING:1,PAUSE:2,STOP:3,RESET:4};SuperMap.PlotCommonServiceBase=class extends SuperMap.CommonServiceBase{constructor(t,e){super(t,e),this.CLASS_NAME="SuperMap.PlotCommonServiceBase"}destroy(){super.destroy()}_commit(t){"POST"!==t.method&&"PUT"!==t.method||(t.params&&(t.url=SuperMap.Util.urlAppend(t.url,SuperMap.Util.getParameterString(t.params||{}))),t.params=t.data),SuperMap.FetchRequest.commit(t.method,t.url,t.params,{headers:t.headers,withCredentials:t.withCredentials,crossOrigin:t.crossOrigin,timeout:t.async?0:null,proxy:t.proxy}).then(function(t){return t.text()}).then(function(e){var o=(new SuperMap.Format.JSON).read(e);o||(o={error:e}),o.error?(t.scope?SuperMap.Function.bind(t.failure,t.scope):t.failure)(o.error):(o.succeed=void 0==o.succeed||o.succeed,(t.scope?SuperMap.Function.bind(t.success,t.scope):t.success)(o))})}};class m{constructor(t){t=t||{},this.method=t.method?t.method:"POST",this.sitData=t.sitData?t.sitData:null,this.smlFileName=t.smlFileName?t.smlFileName:"",this.isCover=!!t.isCover&&t.isCover,this.CLASS_NAME="SuperMap.EditSmlFileParameters"}destroy(){this.method="POST",this.sitData=null,this.isCover=!1,this.smlFileName=""}static toJsonParameters(t){if(t)return SuperMap.Plot.PlottingUtil.toJSON(t.sitData)}}SuperMap.EditSmlFileParameters=m;class M extends SuperMap.PlotCommonServiceBase{constructor(t,e){super(t,e),(e=e||{})&&SuperMap.Util.extend(this,e);var o=this;o.events=new SuperMap.Events(o,null,o.EVENT_TYPES,!0),o.eventListeners instanceof Object&&o.events.on(o.eventListeners),this.CLASS_NAME="SuperMap.EditSmlFileService"}destroy(){super.destroy()}processAsync(t){if(t){var e=this,o=t.method,i=e.url.substr(e.url.length-1,1);e.url+="/"==i?"smlInfos/":"/smlInfos/",e.url+=t.smlFileName+".json",e.url+="?isCover="+t.isCover;var l=null;t.method&&"POST"===t.method&&(l=SuperMap.EditSmlFileParameters.toJsonParameters(t)),e.request({method:o,data:l,scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}}}SuperMap.EditSmlFileService=M;class b extends SuperMap.PlotCommonServiceBase{constructor(t,e){super(t,e),(e=e||{})&&SuperMap.Util.extend(this,e);var o;o=this.url.substr(this.url.length-1,1),this.url+="/"==o?"symbolLibs.json?":"/symbolLibs.json?",this.CLASS_NAME="SuperMap.GetLibIDsService"}destroy(){super.destroy()}processAsync(){this.request({method:"GET",data:null,scope:this,success:this.serviceProcessCompleted,failure:this.serviceProcessFailed})}}SuperMap.GetLibIDsService=b;class A{constructor(t){t=t||{},this.libID=t.libID,this.CLASS_NAME="SuperMap.GetLibInfoParameter"}destroy(){this.libID=null}}SuperMap.GetLibInfoParameter=A;class T extends SuperMap.PlotCommonServiceBase{constructor(t,e){super(t,e),(e=e||{})&&SuperMap.Util.extend(this,e);var o;o=this.url.substr(this.url.length-1,1),this.url+="/"==o?"symbolLibs/":"/symbolLibs/",this.CLASS_NAME="SuperMap.GetLibInfoService"}destroy(){super.destroy()}processAsync(t){var e=this;t&&null!==t.libID&&(e.libID=t.libID),e.url+=e.libID,e.url+=".json",e.request({method:"GET",data:null,scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}}SuperMap.GetLibInfoService=T;class v{constructor(t){t=t||{},this.start=t.start,this.count=t.count?t.count:null,this.CLASS_NAME="SuperMap.GetSMLInfosParameters"}destroy(){this.start=null,this.count=null}static toUrlParameters(t){if(t){var e="";return null!==t.start&&(e="?start="+encodeURIComponent(t.start)),!t.count||null===t.count&&0===t.count||(e+="&count="+encodeURIComponent(t.count)),e}}}SuperMap.GetSMLInfosParameters=v;class _ extends SuperMap.PlotCommonServiceBase{constructor(t,e){super(t,e),(e=e||{})&&SuperMap.Util.extend(this,e);var o,i=this;i.events=new SuperMap.Events(i,null,i.EVENT_TYPES,!0),i.eventListeners instanceof Object&&i.events.on(i.eventListeners),o=i.url.substr(i.url.length-1,1),i.url+="/"==o?"smlInfos":"/smlInfos",i.url+=".json",this.CLASS_NAME="SuperMap.GetSMLInfosService"}destroy(){super.destroy()}processAsync(t){if(t){var e=this;e.url+=SuperMap.GetSMLInfosParameters.toUrlParameters(t),e.request({method:"GET",data:null,scope:e,success:e.serviceProcessCompleted,failure:e.serviceProcessFailed})}}}SuperMap.GetSMLInfosService=_;class x{constructor(t){t=t||{},this.libID=t.libID,this.code=t.code,this.inputPoints=t.inputPoints?t.inputPoints:null,this.symbolRank=t.symbolRank?t.symbolRank:0,this.negativeImage=!!t.negativeImage&&t.negativeImage,this.surroundLineType=t.surroundLineType?t.surroundLineType:0,this.subSymbols=t.subSymbols?t.subSymbols:null,this.scaleValues=t.scaleValues?t.scaleValues:null,this.scalePoints=t.scalePoints?t.scalePoints:null,this.newScalePoint=t.newScalePoint?t.newScalePoint:null,this.newScalePointIndex=t.newScalePointIndex?t.newScalePointIndex:0,this.CLASS_NAME="SuperMap.GetSymbolInfoParameters"}destroy(){var t=this;t.libID=null,t.code=null,t.inputPoints=null,t.symbolRank=null,t.negativeImage=null,t.surroundLineType=null,t.subSymbols=null,t.scaleValues=null,t.scalePoints=null,t.newScalePoint=null,t.newScalePointIndex=null}static toUrlParameters(t){if(t&&null!==t.libID&&null!==t.code){var e="libID="+encodeURIComponent(t.libID)+"&code="+encodeURIComponent(t.code);if(t.inputPoints&&null!==t.inputPoints&&0!==t.inputPoints.length){let o="[";for(let e=0;e0&&SuperMap.Plot.PlottingUtil.equalFuzzy(t.lat,this.latlngs[this.latlngs.length-1].lat)&&SuperMap.Plot.PlottingUtil.equalFuzzy(t.lng,this.latlngs[this.latlngs.length-1].lng)||(!1===this.saveTrackingPoint&&-1!==this.trajectoryLength&&this.trajectoryLength>0?this.latlngs.length0&&this.latlngs.length>this.trajectoryLength&&(i+=this.latlngs.length-this.trajectoryLength);for(var l=i;li&&(s=l),l=s;lMath.abs(e.y-e.y)?Math.abs(t.x-e.x):Math.abs(t.y-e.y)}}}createGradient(){var t=null;if(this.getContext()instanceof CanvasRenderingContext2D){var e=this.calculateObjectByBounds();if("LINEAR"===this.feature.style.fillGradientMode){var o=this.getGradientDirection(this.feature.style.fillAngle);if(t=this.getContext().createLinearGradient(e.ptMinX+e.width*o.x1,e.ptMinY+e.height*o.y1,e.ptMinX+e.width*o.x2,e.ptMinY+e.height*o.y2),0===this.feature.style.fillCenterOffsetX&&0===this.feature.style.fillCenterOffsetY)t.addColorStop(0,SuperMap.Plot.PlottingUtil.colorRGBA(this.feature.style.fillColor,this.feature.style.fillOpacity)),t.addColorStop(1,SuperMap.Plot.PlottingUtil.colorRGBA(this.feature.style.fillBackColor,this.feature.style.fillOpacity));else{var i=this.feature.style.fillAngle;0===i||180===i||90===i||270===i?(t.addColorStop(0,SuperMap.Plot.PlottingUtil.colorRGBA(this.feature.style.fillBackColor,this.feature.style.fillOpacity)),0!==i&&180!==i||t.addColorStop(this.feature.style.fillCenterOffsetX,SuperMap.Plot.PlottingUtil.colorRGBA(this.feature.style.fillColor,this.feature.style.fillOpacity)),90!==i&&270!==i||t.addColorStop(this.feature.style.fillCenterOffsetY,SuperMap.Plot.PlottingUtil.colorRGBA(this.feature.style.fillColor,this.feature.style.fillOpacity)),t.addColorStop(1,SuperMap.Plot.PlottingUtil.colorRGBA(this.feature.style.fillBackColor,this.feature.style.fillOpacity))):(t.addColorStop(0,SuperMap.Plot.PlottingUtil.colorRGBA(this.feature.style.fillBackColor,this.feature.style.fillOpacity)),t.addColorStop(this.feature.style.fillCenterOffsetX>=this.feature.style.fillCenterOffsetY?this.feature.style.fillCenterOffsetX:this.feature.style.fillCenterOffsetY*Math.cos(this.feature.style.fillAngle*Math.PI/180),SuperMap.Plot.PlottingUtil.colorRGBA(this.feature.style.fillColor,this.feature.style.fillOpacity)),t.addColorStop(1,SuperMap.Plot.PlottingUtil.colorRGBA(this.feature.style.fillBackColor,this.feature.style.fillOpacity)))}}if("RADIAL"===this.feature.style.fillGradientMode){var l=this.feature.style.fillCenterOffsetX*e.r,s=this.feature.style.fillCenterOffsetY*e.r,n=e.r/Math.sqrt(2)+Math.abs(l)>e.r/Math.sqrt(2)+Math.abs(s)?e.r/Math.sqrt(2)+Math.abs(l):e.r/Math.sqrt(2)+Math.abs(s);(t=this.getContext().createRadialGradient(e.center.x+l,e.center.y-s,0,e.center.x+l,e.center.y-s,n)).addColorStop(0,SuperMap.Plot.PlottingUtil.colorRGBA(this.feature.style.fillColor,this.feature.style.fillOpacity)),this.feature.style.fillColor,this.feature.style.fillBackColor,t.addColorStop(1,SuperMap.Plot.PlottingUtil.colorRGBA(this.feature.style.fillBackColor,this.feature.style.fillOpacity))}return t}}createTextureFill(t){if(0!==t.length){var e=document.createElement("canvas");document.body.appendChild(e);var o=e.getContext("2d");e.width=8,e.height=8;var i=e.width,l=e.height,s=SuperMap.Plot.PlottingUtil.colorStringToRGB(t[0].color);o.strokeStyle=`rgba(${s.red},${s.green},${s.blue},${t[0].opacity})`,o.lineWidth=1;var n=SuperMap.Plot.PlottingUtil.colorStringToRGB(t[1].color);switch(o.fillStyle=`rgba(${n.red},${n.green},${n.blue},${t[1].opacity})`,o.fillRect(0,0,e.width,e.height),o.beginPath(),t[0].fillID){case 0:case 1:break;case 2:o.moveTo(0,l),o.lineTo(i,0);break;case 3:o.moveTo(0,0),o.lineTo(i,0),o.moveTo(0,0),o.lineTo(0,l);break;case 4:o.moveTo(0,l),o.lineTo(i,0),o.moveTo(0,0),o.lineTo(i,l);break;case 5:o.moveTo(0,0),o.lineTo(i,l);break;case 6:o.moveTo(0,0),o.lineTo(i,0);break;case 7:o.moveTo(0,0),o.lineTo(0,l)}o.closePath(),o.stroke(),o.fill();var a=o.createPattern(e,"repeat");return document.body.removeChild(e),a}}createFillMode(t){if(void 0!==this.feature.style.fillSymbolID)if(t.fill=this.feature.style.fill,t.fillSymbolID=this.feature.style.fillSymbolID,0===this.feature.style.fillSymbolID||1===this.feature.style.fillSymbolID||!0===this.feature.style.fill||!1===this.feature.style.fill)0===this.feature.style.fillSymbolID?t.fill=!0:1===this.feature.style.fillSymbolID&&(t.fill=!1),t.fillColor=this.feature.style.fillColor,t.fillOpacity=this.feature.style.fillOpacity;else if(this.feature.style.fillColor!==this.feature.style.fillBackColor||this.feature.style.fillBackOpacity>0&&this.feature.style.fillBackOpacity<1){var e=[];e.push({fillID:this.feature.style.fillSymbolID,color:this.feature.style.fillColor,opacity:this.feature.style.fillOpacity},{fillID:this.feature.style.fillSymbolID,color:this.feature.style.fillBackColor,opacity:this.feature.style.fillBackOpacity}),t.fill=!0,t.fillColor=this.createTextureFill(e),t.fillOpacity=this.feature.style.fillColor}else t.fill=!0,t.fillColor=this.feature.style.fillColor,t.fillOpacity=this.feature.style.fillOpacity;else t.fill=this.feature.style.fill,t.fillColor=this.feature.style.fillColor,t.fillOpacity=this.feature.style.fillOpacity}getGradientDirection(t){var e=function(t){return{x:Math.cos(t),y:Math.sin(t)}},o=function(t){return t*Math.PI/180},i=e(o(180-t%360)),l=e(o(360-t%360)),s=Math.pow(2,-52);return(i.x<=0||Math.abs(i.x)<=s)&&(i.x=0),(i.y<=0||Math.abs(i.y)<=s)&&(i.y=0),(l.x<=0||Math.abs(l.x)<=s)&&(l.x=0),(l.y<=0||Math.abs(l.y)<=s)&&(l.y=0),{x1:i.x,y1:i.y,x2:l.x,y2:l.y}}}SuperMap.Plot.CalculateCanvasGradient=z;class G{constructor(t){this.feature=t}destroy(){this.feature=null}createGradient(){var t=!1;this.feature.layer._renderer._container.defs||(this.feature.layer._renderer._container.defs=L.SVG.create("defs"),t=!0);var e=null;"LINEAR"===this.feature.style.fillGradientMode&&(e=document.getElementById("linearGradient_"+this.feature.uuid)),"RADIAL"===this.feature.style.fillGradientMode&&(e=document.getElementById("radialGradient_"+this.feature.uuid));var o=this.createGradientDirection();for("LINEAR"===this.feature.style.fillGradientMode?((e=null===e?L.SVG.create("linearGradient"):e).setAttributeNS(null,"x1",o.x1),e.setAttributeNS(null,"y1",o.y1),e.setAttributeNS(null,"x2",o.x2),e.setAttributeNS(null,"y2",o.y2)):"RADIAL"===this.feature.style.fillGradientMode&&((e=null===e?L.SVG.create("radialGradient"):e).setAttributeNS(null,"cx",o.cx),e.setAttributeNS(null,"cy",o.cy),e.setAttributeNS(null,"fx",o.fx),e.setAttributeNS(null,"fy",o.fy),e.setAttributeNS(null,"r",o.r));e.hasChildNodes();)e.removeChild(e.firstChild);for(var i=0,l=o.colors.length;i0&&this.feature.style.fillBackOpacity<1){var e=[];e.push({fillID:this.feature.style.fillSymbolID,color:this.feature.style.fillColor,opacity:this.feature.style.fillOpacity},{fillID:this.feature.style.fillSymbolID,color:this.feature.style.fillBackColor,opacity:this.feature.style.fillBackOpacity}),this.feature._map.getRenderer(this.feature.layer)instanceof L.SVG?(t.fillOpacity=1,t.fillColor="url(#"+this.createTextureFill(e)+")",t.fill=t.fillColor):new SuperMap.Plot.CalculateCanvasGradient(this.feature,this.feature.getBounds()).createTextureFill(e)}else t.fill=!0,t.fillColor=this.feature.style.fillColor,t.fillOpacity=this.feature.style.fillOpacity;else t.fill=this.feature.style.fill,t.fillColor=this.feature.style.fillColor,t.fillOpacity=this.feature.style.fillOpacity}createGradientDirection(){var t=[];if("LINEAR"===this.feature.style.fillGradientMode){if(null!==this.feature.style.fillCenterOffsetX&&void 0!==this.feature.style.fillCenterOffsetX&&(0===this.feature.style.fillAngle||180===this.feature.style.fillAngle?(t.push({offset:0,color:this.feature.style.fillBackColor,opacity:this.feature.style.fillOpacity}),t.push({offset:this.feature.style.fillCenterOffsetX,color:this.feature.style.fillColor,opacity:this.feature.style.fillOpacity}),t.push({offset:1,color:this.feature.style.fillBackColor,opacity:this.feature.style.fillOpacity})):90===this.feature.style.fillAngle||270===this.feature.style.fillAngle?(t.push({offset:0,color:this.feature.style.fillBackColor,opacity:this.feature.style.fillOpacity}),t.push({offset:this.feature.style.fillCenterOffsetY,color:this.feature.style.fillColor,opacity:this.feature.style.fillOpacity}),t.push({offset:1,color:this.feature.style.fillBackColor,opacity:this.feature.style.fillOpacity})):(t.push({offset:0,color:this.feature.style.fillBackColor,opacity:this.feature.style.fillOpacity}),t.push({offset:this.feature.style.fillCenterOffsetX/2*(Math.sqrt(2)/2)*Math.abs(Math.sin(this.feature.style.fillAngle*Math.PI/180)),color:this.feature.style.fillColor,opacity:this.feature.style.fillOpacity}),t.push({offset:1,color:this.feature.style.fillBackColor,opacity:this.feature.style.fillOpacity}))),this.feature.style.fillAngle>=360&&(this.feature.style.fillAngle=0),0===this.feature.style.fillAngle)return{x1:0,y1:0,x2:1,y2:0,colors:t};if(90===this.feature.style.fillAngle)return{x1:0,y1:1,x2:0,y2:0,colors:t};if(180===this.feature.style.fillAngle)return{x1:1,y1:0,x2:0,y2:0,colors:t};if(270===this.feature.style.fillAngle)return{x1:0,y1:0,x2:0,y2:1,colors:t};if(0=0||this.feature.style.fillCenterOffsetX<=0&&this.feature.style.fillCenterOffsetX>=-1){if(this.feature.style.fillCenterOffsetY>=0&&this.feature.style.fillCenterOffsetY<=.5||this.feature.style.fillCenterOffsetY>=-.5&&this.feature.style.fillCenterOffsetY<=0)return{cx:.5,cy:.5,fx:.5+this.feature.style.fillCenterOffsetX,fy:.5-this.feature.style.fillCenterOffsetY,r:.5*Math.sqrt(2),colors:t};if(this.feature.style.fillCenterOffsetY>=.5&&this.feature.style.fillCenterOffsetY<=.8||this.feature.style.fillCenterOffsetY>=-.8&&this.feature.style.fillCenterOffsetY<=-.5)return{cx:.5,cy:.5,fx:.5+this.feature.style.fillCenterOffsetX,fy:.5-this.feature.style.fillCenterOffsetY,r:.8*Math.sqrt(2),colors:t};if(this.feature.style.fillCenterOffsetY>=.8&&this.feature.style.fillCenterOffsetY<=1||this.feature.style.fillCenterOffsetY>=-1&&this.feature.style.fillCenterOffsetY<=-.8)return{cx:.5,cy:.5,fx:.5+this.feature.style.fillCenterOffsetX,fy:.5-this.feature.style.fillCenterOffsetY,r:Math.sqrt(2),colors:t}}else if(this.feature.style.fillCenterOffsetX<=.8&&this.feature.style.fillCenterOffsetX>.5||this.feature.style.fillCenterOffsetX<=-.5&&this.feature.style.fillCenterOffsetX>=-.8){if(this.feature.style.fillCenterOffsetY>=0&&this.feature.style.fillCenterOffsetY<=.5||this.feature.style.fillCenterOffsetY>=-.5&&this.feature.style.fillCenterOffsetY<=0)return{cx:.5,cy:.5,fx:.5+this.feature.style.fillCenterOffsetX,fy:.5-this.feature.style.fillCenterOffsetY,r:.8*Math.sqrt(2),colors:t};if(this.feature.style.fillCenterOffsetY>=.5&&this.feature.style.fillCenterOffsetY<=.8||this.feature.style.fillCenterOffsetY>=-.8&&this.feature.style.fillCenterOffsetY<=-.5)return{cx:.5,cy:.5,fx:.5+this.feature.style.fillCenterOffsetX,fy:.5-this.feature.style.fillCenterOffsetY,r:.8*Math.sqrt(2),colors:t};if(this.feature.style.fillCenterOffsetY>=.8&&this.feature.style.fillCenterOffsetY<=1||this.feature.style.fillCenterOffsetY>=-1&&this.feature.style.fillCenterOffsetY<=-.8)return{cx:.5,cy:.5,fx:.5+this.feature.style.fillCenterOffsetX,fy:.5-this.feature.style.fillCenterOffsetY,r:Math.sqrt(2),colors:t}}else if(this.feature.style.fillCenterOffsetX<=1&&this.feature.style.fillCenterOffsetX>.8||this.feature.style.fillCenterOffsetX<=-.8&&this.feature.style.fillCenterOffsetX>=-1){if(this.feature.style.fillCenterOffsetY>=0&&this.feature.style.fillCenterOffsetY<=.5||this.feature.style.fillCenterOffsetY>=-.5&&this.feature.style.fillCenterOffsetY<=0)return{cx:.5,cy:.5,fx:.5+this.feature.style.fillCenterOffsetX,fy:.5-this.feature.style.fillCenterOffsetY,r:Math.sqrt(2),colors:t};if(this.feature.style.fillCenterOffsetY>=.5&&this.feature.style.fillCenterOffsetY<=.8||this.feature.style.fillCenterOffsetY>=-.8&&this.feature.style.fillCenterOffsetY<=-.5)return{cx:.5,cy:.5,fx:.5+this.feature.style.fillCenterOffsetX,fy:.5-this.feature.style.fillCenterOffsetY,r:Math.sqrt(2),colors:t};if(this.feature.style.fillCenterOffsetY>=.8&&this.feature.style.fillCenterOffsetY<=1||this.feature.style.fillCenterOffsetY>=-1&&this.feature.style.fillCenterOffsetY<=-.8)return{cx:.5,cy:.5,fx:.5+this.feature.style.fillCenterOffsetX,fy:.5-this.feature.style.fillCenterOffsetY,r:Math.sqrt(2),colors:t}}}}SuperMap.Plot.CalculateSVGGradient=G; /* Copyright© 2000 - 2018 SuperMap Software Co.Ltd. All rights reserved. * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ class W{constructor(t,e,o,i){this.x=parseFloat(t),this.y=parseFloat(e),this.tag=i||0==i?parseFloat(i):null,this.type=o||"Point",this.CLASS_NAME="SuperMapAlgoPlot"}clone(t){return null==t&&(t=new W(this.x,this.y)),SuperMap.Util.applyDefaults(t,this),t}calculateBounds(){this.bounds=new Bounds(this.x,this.y,this.x,this.y)}equals(t){var e=!1;return null!=t&&(e=this.x===t.x&&this.y===t.y||isNaN(this.x)&&isNaN(this.y)&&isNaN(t.x)&&isNaN(t.y)),e}move(t,e){this.x=this.x+t,this.y=this.y+e,this.clearBounds()}toShortString(){return this.x+", "+this.y}destroy(){this.x=null,this.y=null,this.tag=null,super.destroy()}getVertices(t){return[this]}}SuperMapAlgoPlot.Point=W;var j=SuperMapAlgoPlot.AnalysisSymbol=SuperMapAlgoPlot.AnalysisSymbol||{};SuperMapAlgoPlot.AnalysisSymbol.analysisBasicInfo=function(t){let e=new Object;return e.libID=t.libID,e.code=t.code,e.symbolType=t.symbolType,e.symbolName=t.symbolName,e.textContent=t.textContent,e.minEditPts=t.algoMinEditPts,e.maxEditPts=t.algoMaxEditPts,e.surroundLineType=t.surroundLineType,e},SuperMapAlgoPlot.AnalysisSymbol.analysisDotBasicInfo=function(t){let e=SuperMapAlgoPlot.PlottingUtil.DPI,o=new Object;o.anchorPoint=new SuperMapAlgoPlot.Point(t.anchorPoint.x,t.anchorPoint.y);let i=0,l=0;return void 0!==t.symbolSizeInLib?(i=Math.round(t.symbolSizeInLib.x*e/25.4/10),l=Math.round(t.symbolSizeInLib.y*e/25.4/10)):(i=Math.round(t.symbolSize.x*e/25.4/10),l=Math.round(t.symbolSize.y*e/25.4/10)),o.symbolSizeInLib=new SuperMap.Size(i,l),o.symbolSizeInLib.w=i,o.symbolSizeInLib.h=l,o.middleMarkBounds=new SuperMap.Bounds(t.middleMarkBounds.leftBottom.x,t.middleMarkBounds.leftBottom.y,t.middleMarkBounds.rightTop.x,t.middleMarkBounds.rightTop.y),o},SuperMapAlgoPlot.AnalysisSymbol.analysisAlgoBasicInfo=function(t,e){let o=new Object;if(o.subSymbols=[],o.scalePoints=[],o.scaleValues=[],e&&t.subSymbols)for(let e=0;eo?e.scaleValues[o]=t.scaleValues[o]:e.scaleValues.push(t.scaleValues[o]);else e.scaleValues=[],e.scaleValues=t.scaleValues;e.visible=t.visible,e.orbitPoints=t.orbitPoints}else if(0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.SATELLITETIMEWINDOWS)e.timeWindows=t.timeWindows;else{let i;i=!0===o?L.Util.latLngsToSuperMapPoints(t.getLatLngs()):t.controlPoints,e.localePoints=[];let l=i.length;t.symbolType===SuperMapAlgoPlot.SymbolType.ELLIPSESYMBOL&&(l=3);for(let t=0;to?e.scaleValues[o]=t.scaleValues[o]:e.scaleValues.push(t.scaleValues[o]);else e.scaleValues=[],e.scaleValues=t.scaleValues;e.subSymbolScaleValue=t.subSymbolScaleValue,e.baseScale=t.baseScale,e.strokeWidth=t.strokeWidth,e.polylineConnectLocationPoint=t.polylineConnectLocationPoint,22===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.ALGOSYMBOL?(e.arrowHeadType=t.arrowHeadType,e.arrowBodyType=t.arrowBodyType,e.arrowTailType=t.arrowTailType):0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.ARROWLINE?e.arrowAngle=t.arrowAngle:0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.COMBINATIONALCIRCLE?e.defaultRadius=t.defaultRadius:0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.CONCENTRICCIRCLE||(0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.LINEMARKING?(e.islocationCircle=t.islocationCircle,e.textBoxType=t.textBoxType):0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.SYMBOLTEXTBOX?(e.roundBox=t.roundBox,e.textBoxType=t.textBoxType):0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.PATHTEXT?(e.isAvoid=t.isAvoid,e.isCurve=t.isCurve,e.relLineText=t.relLineText,e.showPathLine=t.showPathLine,e.textToLineDistance=t.textToLineDistance,e.showPathLineArrow=t.showPathLineArrow):0===t.libID&&t.symbolType===SuperMapAlgoPlot.SymbolType.ARCREGION&&(o?(e.centerPoint={x:t.centerPoint.lng,y:t.centerPoint.lat},e.circlePts=t.circlePts,e.spatialAnalystUrl=t.spatialAnalystUrl):e.centerPoint=t.centerPoint,e.endAngle=t.endAngle,e.radius=t.radius,e.radiusPosAngle=t.radiusPosAngle,e.startAngle=t.startAngle,e.textPosition=t.textPosition,e.radiusLineType=t.radiusLineType,e.radiusText=t.radiusText))}}t.symbolData=e},SuperMapAlgoPlot.AnalysisSymbol.parseSymbolData=function(t,e,o){if(null!=e){if(void 0!==e.isEdit&&(t.isEdit=e.isEdit),e.hasOwnProperty("version")&&(t.version=e.version),t.libID=parseInt(e.libID),t.code=parseInt(e.code),t.maxEditPts=parseInt(e.algoMaxEditPts),t.minEditPts=parseInt(e.algoMinEditPts),t.symbolType=e.symbolType,t.symbolName=e.symbolName,t.textContent=e.textContent,void 0!==e.dScale?t.dScale=e.dScale:void 0!==e.scale2D&&(t.dScale=e.scale2D.x),void 0!==e.dRotate?t.dRotate=e.dRotate:void 0!==e.rotate2D&&(t.dRotate=e.rotate2D.x),void 0!==e.resolution&&(t.resolution=e.resolution),void 0!==e.uuid&&(t.uuid=e.uuid),void 0!==e.associatedUuid&&(t.associatedUuid=e.associatedUuid),void 0!==e.textDisplay&&(t.textDisplay=e.textDisplay),void 0!==e.annotationPosition&&(o?t.annotationPosition=e.annotationPosition:t.textPosition=e.annotationPosition),void 0!==e.scaleByMap&&(t.scaleByMap=e.scaleByMap),void 0!==e.isLocked&&(t.isLocked=e.isLocked),void 0!==e.note&&(t.note=e.note),void 0!==e.custom&&(t.custom=e.custom),e.extendProperty)for(let o=0;o255?e++:o++;return e+o/2},SuperMapAlgoPlot.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:let t=[];for(let o=0,i=e.length;o0?"{"+t.join(",")+"}":"{}"}return e.toString()}},SuperMapAlgoPlot.PlottingUtil.copyFeature=function(t){var e=null;if(null!=t&&t.geometry){let o=t.geometry.clone();e=new SuperMap.Feature.Vector(o),t.style&&(e.style=SuperMapAlgoPlot.PlottingUtil.copyAttributes(e.style,t.style)),o.feature=e,o.calculateParts()}return e},SuperMapAlgoPlot.PlottingUtil.getSurroundLinePts=function(t,e){var o=[],i=[];for(let l=0;l2*o?i.push(n):(i[i.length-1]=e,i.push(n))}else i.push(n)}else i.push(s),i.push(n);(o=[]).push(i[i.length-2]),o.push(i[i.length-1])}if(t[0].x===t[t.length-1].x&&t[0].y===t[t.length-1].y&&1Math.PI&&(i-=2*Math.PI),i}if(t.length<3)return 1;let o=0,i={x:0,y:0},l={x:0,y:0};for(let s=2;s=0?-1:1},SuperMapAlgoPlot.PlottingUtil.isNear=function(t,e){return e||(e=SuperMapAlgoPlot.PlottingUtil.TORLERANCE_STATIC),t-e},SuperMapAlgoPlot.PlottingUtil.equalFuzzy=function(t,e,o){return o||(o=1e-18),Math.abs(t-e)<=o},SuperMapAlgoPlot.PlottingUtil.intersectLines=function(t,e,o,i){var l={isIntersectLines:!1};if(t.x===e.x&&t.y===e.y||o.x===i.x&&o.y===i.y)return l;let s=e.x-t.x,n=e.y-t.y,a=i.x-o.x,r=i.y-o.y,p=s*r-a*n;if(SuperMapAlgoPlot.PlottingUtil.isNear(p))return l;let u=(s*(t.y-o.y)-n*(t.x-o.x))/p,h=new SuperMapAlgoPlot.Point(0,0);return h.x=u*a+o.x,h.y=u*r+o.y,l.isIntersectLines=!0,l.intersectPoint=h,l},SuperMapAlgoPlot.PlottingUtil.getEnvelopePoints=function(t){function e(t,e){if(t.length!==e.length)return!1;for(let o=0;o=0;o--)e.push(t[i][o]);t.splice(i,1);let o=l(t,e);if(void 0!==o&&0!==o.length)return o}return e}if(SuperMapAlgoPlot.PlottingUtil.isArray(t)||(t=[t]),0===t.length)return[];if(1===t.length)return t[0];for(let o=0;o2&&a.push(t)}return a},SuperMapAlgoPlot.PlottingUtil.isRight=function(t,e,o){let i=e,l=o,s=e,n=t;return(l.x-i.x)*(n.y-s.y)-(n.x-s.x)*(l.y-i.y)<0},SuperMapAlgoPlot.PlottingUtil.radian=function(t,e){let o,i,l=0;return o=e.x-t.x,i=e.y-t.y,(l=Math.atan2(i,o))<0&&(l+=2*Math.PI),l},SuperMapAlgoPlot.PlottingUtil.findBisectorPoint=function(t,e,o,i){let l=SuperMapAlgoPlot.PlottingUtil.radian(e,t),s=(l+SuperMapAlgoPlot.PlottingUtil.radian(e,o))/2,n=Math.cos(s-l+Math.PI/2),a=i;SuperMapAlgoPlot.PlottingUtil.isNear(n,.15)||(a=i/n);let r=e.x+a*Math.cos(s),p=e.y+a*Math.sin(s);return new SuperMapAlgoPlot.Point(r,p)},SuperMapAlgoPlot.PlottingUtil.findPoint=function(t,e,o,i){if(t===e||Math.abs(o)<1e-18)return t;let l=SuperMapAlgoPlot.PlottingUtil.radian(t,e)+i*Math.PI/180;var s=t.x+o*Math.cos(l),n=t.y+o*Math.sin(l);return new SuperMapAlgoPlot.Point(s,n)},SuperMapAlgoPlot.PlottingUtil.isSameQuadrant=function(t,e,o,i){let l=(e.x-t.x)*(i.x-o.x),s=(e.y-t.y)*(i.y-o.y);return!(Math.abs(l)<1e-18&&Math.abs(s)<1e-18)&&((l>0||Math.abs(l)<1e-18)&&(s>0||Math.abs(s)<1e-18))},SuperMapAlgoPlot.PlottingUtil.isCross=function(t,e,o,i){let l=new SuperMapAlgoPlot.Point(0,0);return!(!SuperMapAlgoPlot.PlottingUtil.intersectLineSegs(t,e,o,i,l)||l==t||l===e||l===o||l==i)},SuperMapAlgoPlot.PlottingUtil.intersectLineSegs=function(t,e,o,i,l){if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t.x,e.x)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t.y,e.y))return l.x=t.x,l.y=t.y,!1;if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(o.x,i.x)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(o.y,i.y))return l.x=o.x,l.y=o.y,!1;let s=0,n=0;if(s=t.x>e.x?t.x:e.x,n=t.x1e-16&&i.x-s>1e-16||o.x-n<-1e-16&&i.x-n<-1e-16)return!1;if(s=t.y>e.y?t.y:e.y,n=t.y1e-16&&i.y-s>1e-16||o.y-n<-1e-16&&i.y-n<-1e-16)return!1;let a=e.x-t.x,r=e.y-t.y,p=i.x-o.x,u=i.y-o.y,h=t.x-o.x,g=t.y-o.y,c=a*u-p*r,y=c;if(Math.abs(a)>1e-18&&Math.abs(p)>1e-18&&(y/=a*p),Math.abs(y)<1e-18)return t===o?(l.x=t.x,l.y=t.y,!SuperMapAlgoPlot.PlottingUtil.isSameQuadrant(t,e,o,i)):e===i?(l.x=e.x,l.y=e.y,!SuperMapAlgoPlot.PlottingUtil.isSameQuadrant(t,e,o,i)):t===i?(l.x=t.x,l.y=t.y,SuperMapAlgoPlot.PlottingUtil.isSameQuadrant(t,e,o,i)):e===o&&(l.x=e.x,l.y=e.y,SuperMapAlgoPlot.PlottingUtil.isSameQuadrant(t,e,o,i));let P=(a*g-r*h)/c,d=(p*g-u*h)/c;return!(P<0&&(Math.abs(P*p)>1e-16||Math.abs(P*u)>1e-16))&&(!(P>1&&(Math.abs((P-1)*p)>1e-16||Math.abs((P-1)*u)>1e-16))&&(!(d<0&&(Math.abs(d*a)>1e-16||Math.abs(d*r)>1e-16))&&(!(d>1&&(Math.abs((d-1)*a)>1e-16||Math.abs((d-1)*r)>1e-16))&&(Math.abs(P)<1e-18?(l.x=o.x,l.y=o.y,!0):Math.abs(P-1)<1e-18?(l.x=i.x,l.y=i.y,!0):Math.abs(d)<1e-18?(l.x=t.x,l.y=t.y,!0):Math.abs(d-1)<1e-18?(l.x=e.x,l.y=e.y,!0):!(P<0&&(Math.abs(P*p)>1e-16||Math.abs(P*u)>1e-16))&&(!(P>1&&(Math.abs((P-1)*p)>1e-16||Math.abs((P-1)*u)>1e-16))&&(!(d<0&&(Math.abs(d*a)>1e-16||Math.abs(d*r)>1e-16))&&(!(d>1&&(Math.abs((d-1)*a)>1e-16||Math.abs((d-1)*r)>1e-16))&&(l.x=P*p+o.x,l.y=P*u+o.y,!0))))))))},SuperMapAlgoPlot.PlottingUtil.parallel=function(t,e){let o=[],i=t.length;if(!t||null==t||t.length<2)return o;let l=!1;t.length>3&&t[0].x===t[t.length-1].x&&t[0].y===t[t.length-1].y&&(l=!0),l?(o[0]=SuperMapAlgoPlot.PlottingUtil.findBisectorPoint(t[t.length-2],t[0],t[1],e),o[t.length-1]=o[0]):(o[0]=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],e,90),o[t.length-1]=SuperMapAlgoPlot.PlottingUtil.findPoint(t[t.length-1],t[t.length-2],-e,90));let s=t[0],n=t[1],a=t[1];for(let l=1;l1&&(n=1);let a=(o.x-e.x)*n+e.x,r=(o.y-e.y)*n+e.y,p=(a-t.x)*(a-t.x)+(r-t.y)*(r-t.y);return Math.sqrt(p)},SuperMapAlgoPlot.PlottingUtil.isCounterClockwise=function(t,e,o){return(o.x-e.x)*(t.y-e.y)-(t.x-e.x)*(o.y-e.y)>0},SuperMapAlgoPlot.PlottingUtil.clearSamePts=function(t){let e=t.length;for(let o=0;o=e)continue;let l=t[i].x,s=t[i].y,n=t[i+2].x,a=t[i+2].y,r=t[i+4].x,p=t[i+4].y,u=t[i+3].x,h=t[i+3].y;if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(l,n,1e-10)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(s,a,1e-10)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(r,u,1e-10)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(p,h,1e-10))o.push(new SuperMapAlgoPlot.Point(l,s)),o.push(new SuperMapAlgoPlot.Point(r,p));else for(let t=0;t<=1;t+=.03125){let e,i,g,c,y=t*t,P=y*t;e=1-3*t+3*y-P,i=3*(t-2*y+P),g=3*(y-P),c=P;let d=new SuperMapAlgoPlot.Point(e*l+i*n+g*r+c*u,e*s+i*a+g*p+c*h);o.push(d)}}return o},SuperMapAlgoPlot.PlottingUtil.computeBeizerPoints0=function(t,e,o){let i=SuperMapAlgoPlot.PlottingUtil.polylineDistance(e),l=[],s=[],n=[];if(t){s.push(e[0]);let t=o[0],a=o[1],r=e[0].x+i*t,p=e[0].y+i*a;s.push(new SuperMapAlgoPlot.Point(r,p)),l.push(new SuperMapAlgoPlot.Point(r,p));for(let t=1;t0?(u=e+(i-e)*c/g,h=o+(l-o)*c/g):(u=e,h=o),a.x=u+(r-u)*t,a.y=h+(p-h)*t,a},SuperMapAlgoPlot.PlottingUtil.pointIsOnPolyLine=function(t,e,o){if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t.x,e.x)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t.y,e.y)||SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t.x,o.x)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t.y,o.y))return!0;let i=t.x-e.x,l=t.y-e.y,s=t.x-o.x,n=t.y-o.y,a=(i*s+l*n)/(Math.sqrt(i*i+l*l)*Math.sqrt(s*s+n*n));return!!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(a,-1,.1)},SuperMapAlgoPlot.PlottingUtil.pointIsOnPolyLines=function(t,e){if(!e||0===e.length)return{isOnPolyLine:!1,index:-1};let o=!1,i=-1;for(let l=0;lr&&(o=r,i=l)}return i&&o<0&&(i=-1),{minDis:o,index:i}},SuperMapAlgoPlot.PlottingUtil.findPointInLine=function(t,e,o){if(t===e||Math.abs(o)<1e-18)return t;let i=e.x-t.x,l=e.y-t.y,s=o/Math.sqrt(i*i+l*l),n=t.x+i*s,a=t.y+l*s;return new SuperMapAlgoPlot.Point(n,a)},SuperMapAlgoPlot.PlottingUtil.operateControlPoints=function(t){let e=t,o=e.length;if(3==o){let o=new SuperMapAlgoPlot.Point(0,0);SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(1,t[0],t[1],t[2],o),e.push(o)}if(o>4&&(e.splice(4,o-4),o=e.length),SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(t[0],t[1],e[2])){let t=e[0];e[0]=e[1],e[1]=t}if(!SuperMapAlgoPlot.PlottingUtil.pointIsRightToVerticle(e[0],e[1],e[2])){let t=e[2];e[2]=e[3],e[3]=t}return e},SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine=function(t,e,o){return(e.x-t.x)*(o.y-t.y)-(o.x-t.x)*(e.y-t.y)<0},SuperMapAlgoPlot.PlottingUtil.pointIsRightToVerticle=function(t,e,o){let i=new SuperMapAlgoPlot.Point(.5*(e.x+t.x),.5*(e.y+t.y)),l=new SuperMapAlgoPlot.Point(e.x-t.x,e.y-t.y),s=new SuperMapAlgoPlot.Point(o.x-i.x,o.y-i.y);return l.x*s.x+l.y*s.y>0},SuperMapAlgoPlot.PlottingUtil.linePnt=function(t,e,o){let i=SuperMapAlgoPlot.PlottingUtil.distance(t,e);if(0==i)return t;{let l=o/i;return SuperMapAlgoPlot.PlottingUtil.findPointOnLineByRatio(l,t,e)}},SuperMapAlgoPlot.PlottingUtil.findPointOnLineByRatio=function(t,e,o){let i=new SuperMapAlgoPlot.Point(0,0);return i.x=e.x+(o.x-e.x)*t,i.y=e.y+(o.y-e.y)*t,i},SuperMapAlgoPlot.PlottingUtil.rotateAngle=function(t,e,o){let i=e,l=Math.cos(i),s=Math.sin(i),n=o.x-t.x,a=o.y-t.y;return o.x=n*l-a*s+t.x,o.y=n*s+a*l+t.y,o},SuperMapAlgoPlot.PlottingUtil.resize=function(t,e,o){return o.x=t.x+e*(o.x-t.x),o.y=t.y+e*(o.y-t.y),o},SuperMapAlgoPlot.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]};let o=0;for(let i=0;ie||SuperMapAlgoPlot.PlottingUtil.equalFuzzy(o,e)){let l=o-e,s=t[i+1],n=t[i],a=l/SuperMapAlgoPlot.PlottingUtil.distance(s,n),r=new SuperMapAlgoPlot.Point(0,0);return r.x=s.x+(n.x-s.x)*a,r.y=s.y+(n.y-s.y)*a,{index:i,pt:r}}return{index:-1,pt:null}},SuperMapAlgoPlot.PlottingUtil.polylineDistance=function(t){if(0===t.length)return 0;let e=0;for(let o=0;o=t.x&&e.y>=t.y?1:e.xt.y?2:e.x<=t.x&&e.y<=t.y?3:4)==(l=o.x>t.x&&o.y>t.y?1:o.xt.y?2:o.xs&&a>s)&&(r=0);else switch(i){case 1:(4==l&&ns)&&(r=0);break;case 2:(1==l&&ns)&&(r=0);break;case 3:(2==l&&ns)&&(r=0);break;case 4:(3==l&&ns)&&(r=0)}let p=new SuperMapAlgoPlot.Point(0,0);return SuperMapAlgoPlot.PlottingUtil.equalFuzzy(s-1.7976931348623157e308,0)?(p.x=t.x,p.y=e.y):SuperMapAlgoPlot.PlottingUtil.equalFuzzy(s,0)?(p.x=e.x,p.y=t.y):(p.x=(s*(e.y-t.y)+s*s*t.x+e.x)/(s*s+1),p.y=t.y+s*(p.x-t.x)),{isOnline:1===r,projectPoint:p}},SuperMapAlgoPlot.PlottingUtil.coordinateTrans=function(t,e,o){let i=SuperMapAlgoPlot.PlottingUtil.distance(new SuperMapAlgoPlot.Point(0,0),e),l=SuperMapAlgoPlot.PlottingUtil.radian(new SuperMapAlgoPlot.Point(0,0),e)+o*Math.PI/180,s=i*Math.cos(l)+t.x,n=i*Math.sin(l)+t.y;return new SuperMapAlgoPlot.Point(s,n)},SuperMapAlgoPlot.PlottingUtil.triangleHeightAndPartBottomLen=function(t,e,o){let i,l,s=(o.x-e.x)*(o.x-e.x)+(o.y-e.y)*(o.y-e.y),n=Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y)),a=Math.sqrt((t.x-o.x)*(t.x-o.x)+(t.y-o.y)*(t.y-o.y));if(0==a||0==n)i=0,l=0;else if(0==s)i=n,l=0;else{let t=(n*n+a*a-s)/2/n/a,e=0;t>=1?(t=1,e=0):e=Math.sqrt(1-t*t),i=a*t,l=a*e}return{dLen1:i,dLen2:l}},SuperMapAlgoPlot.PlottingUtil.paraLine=function(t,e,o){let i=[];if(2>t.length)return i;if(o){let o=t[1].clone();o=SuperMapAlgoPlot.PlottingUtil.rotateAngle(t[0],Math.PI/2,o),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(t[0],o,e));for(let l=1;lMath.PI/2?r-Math.PI/2:Math.PI/2-r;let p=e/Math.cos(a);o=t[l+1].clone(),o=SuperMapAlgoPlot.PlottingUtil.rotateAngle(t[l],r,o),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(t[l],o,p))}o=t[t.length-2].clone(),o=SuperMapAlgoPlot.PlottingUtil.rotateAngle(t[t.length-1],-1*Math.PI/2,o),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(t[t.length-1],o,e))}else{let o=t[1].clone();o=SuperMapAlgoPlot.PlottingUtil.rotateAngle(t[0],-Math.PI/2,o),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(t[0],o,e));for(let l=1;lMath.PI/2?r-Math.PI/2:Math.PI/2-r;let p=e/Math.cos(a);o=t[l-1].clone(),o=SuperMapAlgoPlot.PlottingUtil.rotateAngle(t[l],r,o),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(t[l],o,p))}o=t[t.length-2].clone(),o=SuperMapAlgoPlot.PlottingUtil.rotateAngle(t[t.length-1],Math.PI/2,o),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(t[t.length-1],o,e))}return i},SuperMapAlgoPlot.PlottingUtil.circlePoint=function(t,e,o,i){i*=Math.PI/180;let l=t.x+e*Math.cos(i),s=t.y+o*Math.sin(i);return new SuperMapAlgoPlot.Point(l,s)},SuperMapAlgoPlot.PlottingUtil.getPolygonCenterPt=function(t){if(!t||0===t.length)return null;let e=0,o=0;for(let i=0;in.y?s.y:n.y;e.yr||(e.y-s.y)*(n.x-s.x)/(n.y-s.y)+s.x>e.x&&o++}return o%2==1},SuperMapAlgoPlot.PlottingUtil.projectPtOnPolyLine=function(t,e){if(2>e.length)return{index:-1,pt:null};for(let o=0;o0?0:1},SuperMapAlgoPlot.PlottingUtil.isSamePt=function(t,e){return!(!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t.x,e.x)||!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t.y,e.y))},SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance=function(t,e){let o=SuperMapAlgoPlot.PlottingUtil.findPointInPolyLine(e,t);return{index:o.index,pts:o.pt,bfind:-1!==o.index}},SuperMapAlgoPlot.PlottingUtil.ptInBounds=function(t,e){return t.x>e.left&&t.xe.bottom},SuperMapAlgoPlot.PlottingUtil.InnerAngle=function(t,e,o){if(t==e||t==o)return 0;let i=SuperMapAlgoPlot.PlottingUtil.distance(t,e),l=SuperMapAlgoPlot.PlottingUtil.distance(t,o),s=SuperMapAlgoPlot.PlottingUtil.distance(e,o),n=(i*i+l*l-s*s)/(2*i*l);return n>1&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(n,1)?n=1:n<1&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(n,-1)&&(n=-1),Math.acos(n)},SuperMapAlgoPlot.PlottingUtil.plumbLineLen=function(t,e,o){return SuperMapAlgoPlot.PlottingUtil.distance(t,e)*Math.sin(SuperMapAlgoPlot.PlottingUtil.InnerAngle(e,t,o))},SuperMapAlgoPlot.PlottingUtil.paraPolygon=function(t,e,o){let i=[],l=SuperMapAlgoPlot.PlottingUtil.clonePoints(t),s=l.length;if(s<2)return i;let n=new SuperMapAlgoPlot.Point(0,0);if(o){if(s<3)n=l[1].clone(),SuperMapAlgoPlot.PlottingUtil.rotateAngle(l[0],Math.PI,n),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(l[0],n,e));else{let t=SuperMapAlgoPlot.PlottingUtil.radian(l[0],l[1]),o=SuperMapAlgoPlot.PlottingUtil.radian(l[0],l[l.length-1])-t;for(;o<0;)o+=2*Math.PI;let s,a=o/2;s=a>Math.PI/2?a-Math.PI/2:Math.PI/2-a;let r=e/Math.cos(s);n=l[1].clone(),n=SuperMapAlgoPlot.PlottingUtil.rotateAngle(l[0],a,n),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(l[0],n,r))}for(let t=1;tMath.PI/2?r-Math.PI/2:Math.PI/2-r;let p=e/Math.cos(a);n=l[t+1].clone(),n=SuperMapAlgoPlot.PlottingUtil.rotateAngle(l[t],r,n),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(l[t],n,p))}if(s<3)n=l[s-2].clone(),SuperMapAlgoPlot.PlottingUtil.rotateAngle(l[s-1],0,n),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(l[s-1],n,e));else{let t=SuperMapAlgoPlot.PlottingUtil.radian(l[s-1],l[0]),o=SuperMapAlgoPlot.PlottingUtil.radian(l[s-1],l[s-2])-t;for(;o<0;)o+=2*Math.PI;let a,r=o/2;a=r>Math.PI/2?r-Math.PI/2:Math.PI/2-r;let p=e/Math.cos(a);n=l[0].clone(),n=SuperMapAlgoPlot.PlottingUtil.rotateAngle(l[s-1],r,n),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(l[s-1],n,p))}}else{if(s<3){let t=l[1].clone();SuperMapAlgoPlot.PlottingUtil.rotateAngle(l[0],0,t),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(l[0],t,e))}else{let t=SuperMapAlgoPlot.PlottingUtil.radian(l[0],l[1]),o=SuperMapAlgoPlot.PlottingUtil.radian(l[0],l[s-1])-t;for(;o<0;)o+=2*Math.PI;let a,r=Math.PI-o/2;a=r>Math.PI/2?r-Math.PI/2:Math.PI/2-r;let p=e/Math.cos(a);n=l[s-1].clone(),n=SuperMapAlgoPlot.PlottingUtil.rotateAngle(l[0],r,n),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(l[0],n,p))}for(let t=1;tMath.PI/2?r-Math.PI/2:Math.PI/2-r;let p=e/Math.cos(a);n=l[t-1].clone(),n=SuperMapAlgoPlot.PlottingUtil.rotateAngle(l[t],r,n),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(l[t],n,p))}if(s<3)n=l[s-2].clone(),SuperMapAlgoPlot.PlottingUtil.rotateAngle(l[s-1],Math.PI,n),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(l[s-1],n,e));else{let t=SuperMapAlgoPlot.PlottingUtil.radian(l[s-1],l[0]),o=SuperMapAlgoPlot.PlottingUtil.radian(l[s-1],l[s-2])-t;for(;o<0;)o+=2*Math.PI;let a,r=Math.PI-o/2;a=r>Math.PI/2?r-Math.PI/2:Math.PI/2-r;let p=e/Math.cos(a);n=l[s-2].clone(),n=SuperMapAlgoPlot.PlottingUtil.rotateAngle(l[s-1],r,n),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(l[s-1],n,p))}}return i},SuperMapAlgoPlot.PlottingUtil.getOutRectangleDis=function(t){if(2>t.length)return 0;let e=t[0].x,o=t[0].x,i=t[0].y,l=t[0].y;for(let s=1;st[s].x&&(o=t[s].x),it[s].y&&(l=t[s].y);return SuperMapAlgoPlot.PlottingUtil.distance(new SuperMapAlgoPlot.Point(e,i),new SuperMapAlgoPlot.Point(o,l))},SuperMapAlgoPlot.PlottingUtil.clonePoints=function(t){let e=[];if(void 0===t||null===t)return e;if(SuperMapAlgoPlot.PlottingUtil.isArray(t)||(t=[t]),t&&null!=t)for(let o=0;o1e-12&&--P>0;){var d=Math.sin(c),S=Math.cos(c),f=Math.sqrt(g*d*(g*d)+(u*h-p*g*S)*(u*h-p*g*S));if(0==f)return 0;var m=p*h+u*g*S,M=Math.atan2(f,m),b=Math.asin(u*g*d/f),A=Math.cos(b)*Math.cos(b),T=m-2*p*h/A,v=r/16*A*(4+r*(4-3*A));y=c,c=o+(1-v)*r*Math.sin(b)*(M+v*f*(T+v*m*(2*T*T-1)))}if(0==P)return NaN;var _=A*(n*n-a*a)/(a*a),x=_/1024*(256+_*(_*(74-47*_)-128));return(a*(1+_/16384*(4096+_*(_*(320-175*_)-768)))*(M-x*f*(T+x/4*(m*(2*T*T-1)-x/6*T*(4*f*f-3)*(4*T*T-3))))).toFixed(3)/1e3},SuperMapAlgoPlot.PlottingUtil.destinationVincenty=function(t,e,o){var i,l,s=SuperMapAlgoPlot.PlottingUtil,n=s.VincentyConstants,a=n.a,r=n.b,p=n.f;"undefined"!=typeof L&&void 0!==L.LatLng&&t instanceof L.LatLng?(i=t.lng,l=t.lat):(i=t.lon,l=t.lat);for(var u=o,h=s.rad(e),g=Math.sin(h),c=Math.cos(h),y=(1-p)*Math.tan(s.rad(l)),P=1/Math.sqrt(1+y*y),d=y*P,S=Math.atan2(y,c),f=P*g,m=1-f*f,M=m*(a*a-r*r)/(r*r),b=1+M/16384*(4096+M*(M*(320-175*M)-768)),A=M/1024*(256+M*(M*(74-47*M)-128)),T=u/(r*b),v=2*Math.PI;Math.abs(T-v)>1e-12;){var _=Math.cos(2*S+T),x=Math.sin(T),O=Math.cos(T);v=T,T=u/(r*b)+A*x*(_+A/4*(O*(2*_*_-1)-A/6*_*(4*x*x-3)*(4*_*_-3)))}var w=d*x-P*O*c,I=Math.atan2(d*O+P*x*c,(1-p)*Math.sqrt(f*f+w*w)),C=p/16*m*(4+p*(4-3*m)),E=Math.atan2(x*g,P*O-d*x*c)-(1-C)*p*f*(T+C*x*(_+C*O*(2*_*_-1)));return"undefined"!=typeof L&&void 0!==L.LatLng&&t instanceof L.LatLng?L.latLng(s.deg(I),i+s.deg(E)):new SuperMap.LonLat(i+s.deg(E),s.deg(I))};var H=SuperMapAlgoPlot.Primitives=SuperMapAlgoPlot.Primitives||{};SuperMapAlgoPlot.Primitives={nSegmentCount:72,initialize:function(t){t&&t.nSegmentCount&&(this.nSegmentCount=t.nSegmentCount)},polyline:function(t){return t},parallelline:function(t){if(t&&t.length>=3){let e=SuperMapAlgoPlot.PlottingUtil.distance(t[0],t[1]);SuperMapAlgoPlot.PlottingUtil.isRight(t[0],t[1],t[2])&&(e=-e);let o=[];for(let e=1;e=3){let e=t[0].x+(t[2].x-t[1].x),o=t[0].y+(t[2].y-t[1].y),i=new SuperMapAlgoPlot.Point(e,o),l=[];return l.push.apply(l,t),l.push(i),l.push(l[0]),l}},polygon:function(t){if(t&&t.length>2)return t},circle:function(t){if(t&&2===t.length){let e=t[0],o=t[1],i=[],l=Math.sqrt((o.x-e.x)*(o.x-e.x)+(o.y-e.y)*(o.y-e.y)),s=360/this.nSegmentCount;for(let t=0;t=3){let e=this.getArcInfo(t[0],t[1],t[2]);e.dStartAngle*=Math.PI/180,e.dEndAngle*=Math.PI/180;let o=(e.dEndAngle-e.dStartAngle)/this.nSegmentCount,i=this.getArcSpatialData(e.pntCenter,e.dRadius,e.dRadius,0,e.dStartAngle,e.dEndAngle,o);if(i.push(e.pntCenter),0!==i.length)return i}},lune:function(t){if(t&&t.length>=3){let e=this.getArcInfo(t[0],t[1],t[2]);e.dStartAngle*=Math.PI/180,e.dEndAngle*=Math.PI/180;let o=(e.dEndAngle-e.dStartAngle)/this.nSegmentCount,i=this.getArcSpatialData(e.pntCenter,e.dRadius,e.dRadius,0,e.dStartAngle,e.dEndAngle,o);if(0!==i.length)return i}},arc:function(t){if(t&&t.length>=3){let e=this.getArcInfo(t[0],t[1],t[2]);e.dStartAngle*=Math.PI/180,e.dEndAngle*=Math.PI/180;let o=(e.dEndAngle-e.dStartAngle)/this.nSegmentCount,i=this.getArcSpatialData(e.pntCenter,e.dRadius,e.dRadius,0,e.dStartAngle,e.dEndAngle,o);if(0!==i.length)return i}},ellipse:function(t,e,o,i,l){if(!0===o){if((!i||null==i)&&t&&t.length>=3&&(i=SuperMapAlgoPlot.PlottingUtil.distance(t[0],t[1])),(!l||null==l)&&t&&t.length>=3){let e=SuperMapAlgoPlot.PlottingUtil.projectPoint(t[2],t[0],t[1]);l=SuperMapAlgoPlot.PlottingUtil.distance(e,t[2])}}else l=SuperMapAlgoPlot.PlottingUtil.distance(t[0],t[2]),i=SuperMapAlgoPlot.PlottingUtil.distance(t[0],t[1]);if(e&&null!=e?e*=Math.PI/180:e=SuperMapAlgoPlot.PlottingUtil.radian(t[0],t[1]),t&&t.length>0){let s=0,n=2*Math.PI,a=n/this.nSegmentCount,r=this.getArcSpatialData(t[0],i,l,e,s,n,a);if(!0===o){let o=Math.sin(e),i=Math.cos(e);t[2].x>t[1].x?(t[2].x=t[0].x-l*o,t[2].y=t[0].y+l*i):(t[2].x=t[0].x+l*o,t[2].y=t[0].y-l*i)}return r}},getArcSpatialData:function(t,e,o,i,l,s,n){let a=[];if(Math.abs(n)<1e-9)return a;for(;sl+2*Math.PI;)l+=2*Math.PI;let r=Math.cos(i)*e,p=Math.sin(i)*e,u=Math.cos(i)*o,h=Math.sin(i)*o,g=this.calcEllipseRadian(l,e,o),c=this.calcEllipseRadian(s,e,o);c-g<1e-5&&(c+=2*Math.PI);let y=Math.round(Math.abs((c-g)/n)+1);if(y<2)return a;for(var P=0;Pa.length&&(a[a.length-1].x=t.x+r*Math.cos(c)-h*Math.sin(c),a[a.length-1].y=t.y+p*Math.cos(c)+u*Math.sin(c)),a},getArcInfo:function(t,e,o){let i={};i.pntCenter=new SuperMapAlgoPlot.Point(0,0),i.dRadius=0,i.dStartAngle=0,i.dEndAngle=0;let l=e.x-t.x,s=e.y-t.y;if(Math.abs(l)<1e-9){let l={},s={};l.x=(e.x+t.x)/2,l.y=(e.y+t.y)/2,s.x=(e.x+o.x)/2,s.y=(e.y+o.y)/2;let n=0;Math.abs(o.x-e.x)>=1e-9&&(n=(o.y-e.y)/(o.x-e.x)),i.pntCenter.y=l.y,Math.abs(n)<1e-9?i.pntCenter.x=s.x:i.pntCenter.x=s.x-n*(l.y-s.y)}else{let n={},a={};n.x=(e.x+t.x)/2,n.y=(e.y+t.y)/2,a.x=(e.x+o.x)/2,a.y=(e.y+o.y)/2;let r=s/l,p=1;Math.abs(r)<1e-9?(i.pntCenter.x=n.x,Math.abs(o.x-e.x<1e-9)?i.pntCenter.y=a.y:i.pntCenter.y=-(o.x-e.x)/(o.y-e.y)*(i.pntCenter.x-a.x)+a.y):Math.abs(o.x-e.x)<1e-9?(i.pntCenter.y=a.y,i.pntCenter.x=-r*(i.pntCenter.y-n.y)+n.x):(p=(o.y-e.y)/(o.x-e.x),i.pntCenter.x=(r*p*(n.y-a.y)+p*n.x-r*a.x)/(p-r),i.pntCenter.y=(a.x-n.x+p*a.y-r*n.y)/(p-r))}let n=Math.atan2(t.y-i.pntCenter.y,t.x-i.pntCenter.x),a=Math.atan2(o.y-i.pntCenter.y,o.x-i.pntCenter.x);if(SuperMapAlgoPlot.PlottingUtil.isCounterClockwise(t,e,o)){for(;n>=2*Math.PI;)n-=2*Math.PI;for(;n<0;)n+=2*Math.PI;for(;a>2*Math.PI;)a-=2*Math.PI;for(;a=2*Math.PI;)a-=2*Math.PI;for(;a<0;)a+=2*Math.PI;for(;n>2*Math.PI;)n-=2*Math.PI;for(;a>n;)n+=2*Math.PI;let t=n;n=a,a=t}return i.dRadius=Math.sqrt((i.pntCenter.x-t.x)*(i.pntCenter.x-t.x)+(i.pntCenter.y-t.y)*(i.pntCenter.y-t.y)),i.dEndAngle=180*a/Math.PI,i.dStartAngle=180*n/Math.PI,i},calcEllipseRadian:function(t,e,o){let i=t,l=e*Math.sin(t),s=o*Math.cos(t),n=Math.atan2(l,s);if(t>Math.PI)for(;i>Math.PI;)i-=2*Math.PI,n+=2*Math.PI;else if(t<-Math.PI)for(;i<-Math.PI;)i+=2*Math.PI,n-=2*Math.PI;return n},getKendyShapePts:function(t){let e=[];if(2>(t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length)return e;let o=this.calcShapePoints(t);if(12!=o.length)return e;o.push(o[0]),o.push(o[1]),o.splice(0,1);for(let t=0;t=s&&n>=a){let t=o.clone();o=l.clone(),l=t.clone()}else if(a>=s&&a>=n){let t=l.clone();l=i.clone(),i=t.clone()}if(!SuperMapAlgoPlot.PlottingUtil.isRight(l,o,i)){let t=o.clone();o=i.clone(),i=t.clone()}e[0]=o,e[1]=i,e[2]=l}return e},GetPtsByTriangle:function(t,e,o,i,l){let s=new SuperMapAlgoPlot.Point(0,0),n=0,a=0;return n=SuperMapAlgoPlot.PlottingUtil.distance(l,o),a=SuperMapAlgoPlot.PlottingUtil.distance(i,l),1==e&&(n*=2),2==e&&(a*=2),s.x=(n*i.x+a*o.x)/(n+a),s.y=(n*i.y+a*o.y)/(n+a),{pl:this.GetWhichPtOfNormal(t,o,s,l),pr:this.GetWhichPtOfNormal(t,i,s,l)}},GetWhichPtOfNormal:function(t,e,o,i){let l,s=0,n=0;n=SuperMapAlgoPlot.PlottingUtil.distance(i,e)/t;let a=this.GetPointsOfNormal(n,o,i);return l=(s=SuperMapAlgoPlot.PlottingUtil.distance(e,a.pt4))>=(n=SuperMapAlgoPlot.PlottingUtil.distance(e,a.pt3))?a.pt3:a.pt4},getBezierPtsWithScalePts:function(t,e,o,i){let l=[],s=t.x,n=t.y,a=e.x,r=e.y,p=o.x,u=o.y,h=i.x,g=i.y;if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(s,a,1e-10)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(n,r,1e-10)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(p,h,1e-10)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(u,g,1e-10))l.push(new SuperMapAlgoPlot.Point(s,n)),l.push(new SuperMapAlgoPlot.Point(p,u));else for(let t=0;t<=1;t+=.03125){let e,o,i,c,y=t*t,P=y*t;e=1-3*t+3*y-P,o=3*(t-2*y+P),i=3*(y-P),c=P;let d=new SuperMapAlgoPlot.Point(e*s+o*a+i*p+c*h,e*n+o*r+i*u+c*g);l.push(d)}return l},getSpatialData:function(t,e,o,i){switch(null==i&&(i=!0),t){case 24:return this.polyline(e);case 390:return this.kidney(e,i);case 590:return this.bezier(e,i);case 360:return this.loopbezier(e,i);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,o,i);case 48:return this.parallelline(e);default:return e}}};var Z=SuperMapAlgoPlot.RouteNodePrimitives=SuperMapAlgoPlot.RouteNodePrimitives||{};SuperMapAlgoPlot.RouteNodePrimitives={initialize:function(){},rendezvousPoint:function(){let t=[],e=new Object;e.type=SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMapAlgoPlot.Point(0,0)),e.positionPoints.push(new SuperMapAlgoPlot.Point(0,30)),e.style={surroundLineFlag:!1,fillLimit:!0,fill:!1};let o=new Object;return o.type=SuperMapAlgoPlot.SymbolType.TEXTSYMBOL,o.positionPoints=[],o.positionPoints.push(new SuperMapAlgoPlot.Point(0,0)),o.textContent="会",o.style={surroundLineFlag:!1,fontSize:14,fontSizeLimit:!0},o.style.labelAlign="cm",t.push(o),t.push(e),t},expandingPoint:function(){let t=[],e=new Object;e.type=SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMapAlgoPlot.Point(0,0)),e.positionPoints.push(new SuperMapAlgoPlot.Point(0,30)),e.style={surroundLineFlag:!1,fillLimit:!0,fill:!1};let o=new Object;return o.type=SuperMapAlgoPlot.SymbolType.TEXTSYMBOL,o.positionPoints=[],o.positionPoints.push(new SuperMapAlgoPlot.Point(0,0)),o.textContent="展",o.style={surroundLineFlag:!1,fontSize:14,fontSizeLimit:!0},o.style.labelAlign="cm",t.push(o),t.push(e),t},volleyPoint:function(){let t=[],e=new Object;e.type=SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL,e.positionPoints=[],e.positionPoints.push(new SuperMapAlgoPlot.Point(0,0)),e.positionPoints.push(new SuperMapAlgoPlot.Point(0,30)),e.style={surroundLineFlag:!1,fillLimit:!0,fill:!1};let o=new Object;return o.type=SuperMapAlgoPlot.SymbolType.TEXTSYMBOL,o.positionPoints=[],o.positionPoints.push(new SuperMapAlgoPlot.Point(0,0)),o.textContent="齐",o.style={surroundLineFlag:!1,fontSize:14,fontSizeLimit:!0},o.style.labelAlign="cm",t.push(o),t.push(e),t},standbyPoint_Outer:function(t,e){let o=[],i=new SuperMapAlgoPlot.Point(0,0),l=new SuperMapAlgoPlot.Point(0,30);t||(t=90);let s=new Object;s.type=SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,s.positionPoints=[];for(let e=t+10;e<170+t;e+=10){let t=SuperMapAlgoPlot.PlottingUtil.findPoint(i,l,30,e);s.positionPoints.push(t)}s.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},o.push(s);let n=s.positionPoints[s.positionPoints.length-1],a=s.positionPoints[s.positionPoints.length-2],r=SuperMapAlgoPlot.PlottingUtil.findPoint(n,a,9,22.5),p=SuperMapAlgoPlot.PlottingUtil.findPoint(n,a,9,-22.5),u=new Object;u.type=SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,u.positionPoints=[],u.positionPoints.push(r),u.positionPoints.push(n.clone()),u.positionPoints.push(p),u.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},o.push(u);let h=new Object;h.type=SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,h.positionPoints=[];for(let e=190+t;e<350+t;e+=10){let t=SuperMapAlgoPlot.PlottingUtil.findPoint(i,l,30,e);h.positionPoints.push(t)}h.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},o.push(h);let g=h.positionPoints[h.positionPoints.length-1],c=h.positionPoints[h.positionPoints.length-2],y=SuperMapAlgoPlot.PlottingUtil.findPoint(g,c,9,22.5),P=SuperMapAlgoPlot.PlottingUtil.findPoint(g,c,9,-22.5),d=new Object;d.type=SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,d.positionPoints=[],d.positionPoints.push(y),d.positionPoints.push(g.clone()),d.positionPoints.push(P),d.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},o.push(d);for(let t=0;t1&&t.push(l),l=[],e=n.GetX(),o=n.GetY(),l.push(new SuperMapAlgoPlot.Point(e,o));break;case 1:e=n.GetX(),o=n.GetY(),l.push(new SuperMapAlgoPlot.Point(e,o));break;case 2:if(3!=i.elements[M+1].GetType()||3!=i.elements[M+1].GetType())break;var a=i.elements[M-1].GetX(),r=i.elements[M-1].GetY(),p=n.GetX(),u=n.GetY(),h=i.elements[M+1].GetX(),g=i.elements[M+1].GetY(),c=i.elements[M+2].GetX(),y=i.elements[M+2].GetY();for(let t=0;t<=1;t+=.03125){var P=t*t,d=P*t,S=1-3*t+3*P-d,f=3*(t-2*P+d),m=3*(P-d),L=d;l.push(new SuperMapAlgoPlot.Point(S*a+f*p+m*h+L*c,S*r+f*u+m*g+L*y))}M+=2}}return l.length>1&&t.push(l),!0}ensureData(){null==this.m_pData&&this.ensureData_helper()}ensureData_helper(){var t=new SuperMapAlgoPlot.Path2DData,e=new SuperMapAlgoPlot.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}detach(){1!=this.m_pData.ref&&this.detach_helper(),this.setBoundsDirty(!0)}detach_helper(){var t=new SuperMapAlgoPlot.Path2DData;null==this.m_pData||this.mtDeRef(this.m_pData.ref)||(this.m_pData=null),this.m_pData=t}setBoundsDirty(t){this.getDataPtr().isBoundsDirty=t}getDataPtr(){return this.m_pData}IsEmpty(){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()}GetElementCount(){return null!=this.m_pData?this.m_pData.elements.length:0}static mtRef(t){return 0!=++t}static mtDeRef(t){return 0!=--t}};SuperMapAlgoPlot.Element=class{constructor(t,e,o){this.m_x=t,this.m_y=e,this.m_type=o,this.CLASS_NAME="SuperMapAlgoPlot.Element"}GetX(){return this.m_x}GetY(){return this.m_y}GetType(){return this.m_type}GetPosition(){return SuperMapAlgoPlot.Point(this.m_x,this.m_y)}SetPosition(t,e){this.m_x=t,this.m_y=e}SetType(t){this.m_type=t}IsCurveTo(){return 2==this.m_type}IsLineTo(){return 1==this.m_type}IsMoveTo(){return 0==this.m_type}Equal(t){return SuperMapAlgoPlot.PlottingUtil.equalFuzzy(this.m_x,t.m_x,1e-10)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(this.m_y,t.m_y,1e-10)&&this.m_type==t.m_type}clone(){return new SuperMapAlgoPlot.Path2D.Element(this.m_x,this.m_y,this.m_type)}};SuperMapAlgoPlot.Path2DData=class{constructor(t){if(t){this.cStart=t.cStart,this.fillRule=t.fillRule,this.require_StartNewFigure=t.require_StartNewFigure,this.isBoundsDirty=t.isBoundsDirty,this.bounds=new SuperMap.Bounds(t.bounds.left,t.bounds.bottom,t.bounds.right,t.bounds.top),this.ref=1,this.elements=[];for(let e=0;e2){var r=t.length;t.splice(2,r-2)}var p=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t);i.arrowTouLen=p*l;var u=SuperMapAlgoPlot.PlottingUtil.findPointInPolyLine(t,p-i.arrowTouLen).pt,h=[],g=i.arrowTouLen*n,c=i.arrowTouLen*s,y=t.length-1;for(let e=0;et.length)return l;var s,n=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t),a=SuperMapAlgoPlot.PlottingUtil.equalFuzzy(e,0);switch(o){case SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_POLYLINE:l=l.concat(t),i&&!a&&SuperMapAlgoPlot.PlottingUtil.distance(t[t.length-1],t[t.length-2])>e&&(s=SuperMapAlgoPlot.PlottingUtil.findPointInPolyLine(t,n-e),l.splice(l.length-1,1),l.push(s.pt));break;case SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_POLYBEZIER:if(2==t.length)l=l.concat(t),i&&!a&&SuperMapAlgoPlot.PlottingUtil.distance(t[t.length-1],t[t.length-2])>e&&(s=SuperMapAlgoPlot.PlottingUtil.findPointInPolyLine(t,n-e),l.splice(l.length-1,1),l.push(s.pt));else{var r=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(t);if(a)l=l.concat(r);else{var p=r[r.length-1];if(!a&&(e1;u--){if(!(e>SuperMapAlgoPlot.PlottingUtil.distance(p,r[u]))){var h=SuperMapAlgoPlot.PlottingUtil.findPoint(p,r[u],e,0);r.push(h),l=r;break}r.splice(u,1)}i||l.push(p)}else l=l.concat(r)}}break;case SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_COATTAIL:var g=e;if(g>n)return l;var c,y,P=Math.ceil(n/(1.4*g)),d=0,S=[];for(let e=0;et.length)return i;switch(o){case SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_POLYLINE:{let o=t[0],l=t[1],s=SuperMapAlgoPlot.PlottingUtil.distance(o,l);if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(s,e,1e-7)||s>e){let s=SuperMapAlgoPlot.PlottingUtil.findPoint(o,l,e,0),n=e*Math.tan(.125*Math.PI),a=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(n,t[0],s);i.push(a.pntLeft),i.push(t[0]),i.push(a.pntRight)}break}case SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_TRIANGLE:break;case SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_TRIANGLE_SOLID:{let o=t[0],l=t[1],s=SuperMapAlgoPlot.PlottingUtil.distance(o,l);if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(s,e,1e-7)||s>e){let s=e*Math.tan(.125*Math.PI),n=SuperMapAlgoPlot.PlottingUtil.findPoint(o,l,e,0),a=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(s,t[0],n);i.push(a.pntLeft),i.push(o),i.push(a.pntRight),i.push(a.pntLeft)}break}case SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_COATTAIL:{let o=t[0],l=2*Math.sqrt(e*e/3),s=SuperMapAlgoPlot.PlottingUtil.distance(t[0],t[1]);if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(l/2,s,1e-7)||s>l/2){let e=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],l,20),s=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],l,-20),n=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],l/2,0);i.push(o),i.push(e),i.push(n),i.push(s),i.push(o)}break}case SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_COATTAIL_HOLLOW:{var l=[];let o=t[0],h=2*Math.sqrt(e*e/3),g=SuperMapAlgoPlot.PlottingUtil.distance(t[0],t[1]);if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(h/1.4,g,1e-7)||g>h/1.4){let e=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],h,20),g=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],h,-20),c=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],h/1.4,0);l.push(o),l.push(e),l.push(c),l.push(g),l.push(o);var s=new SuperMapAlgoPlot.Point((l[0].x+l[1].x)/2,(l[0].y+l[1].y)/2),n=new SuperMapAlgoPlot.Point((l[3].x+l[4].x)/2,(l[3].y+l[4].y)/2),a=new SuperMapAlgoPlot.Point((s.x+n.x)/2,(s.y+n.y)/2),r=.75*SuperMapAlgoPlot.PlottingUtil.distance(s,n)/2,p=SuperMapAlgoPlot.PlottingUtil.findPointInLine(a,s,r),u=SuperMapAlgoPlot.PlottingUtil.findPointInLine(a,n,r);i.push(l[0]),i.push(p),i.push(l[1]),i.push(l[2]),i.push(l[3]),i.push(u),i.push(l[4])}break}}return i},SuperMapAlgoPlot.ArrowToolkit.generateArrowTailShapePts=function(t,e,o,i){var l=e.length,s=[],n=0;for(let e=0;e0&&d>0){var f=1/(c-t[2].x),m=-1/(y-t[2].y),L=1*t[2].y/(y-t[2].y)-1*t[2].x/(c-t[2].x);S=Math.abs(f*t[0].x+m*t[0].y+L)/Math.sqrt(f*f+m*m)}else d<=1e-4?S=Math.abs(y-t[1].y):P<=1e-4&&(S=Math.abs(c-t[1].x));var M=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(S,t[2],new SuperMapAlgoPlot.Point(c,y)),b=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(t[1],t[2],t[0]);b?(s[1]=t[1],n[1]=t[0]):(s[1]=t[0],n[1]=t[1]),t[1]=new SuperMapAlgoPlot.Point((t[0].x+t[1].x)/2,(t[0].y+t[1].y)/2);var A=Math.sqrt((M.pntLeft.x-M.pntRight.x)*(M.pntLeft.x-M.pntRight.x)+(M.pntLeft.y-M.pntRight.y)*(M.pntLeft.y-M.pntRight.y))*SuperMapAlgoPlot.ArrowToolkit.ConstValue.sv_AtWidthDivAwWidth,T=(l=A*SuperMapAlgoPlot.ArrowToolkit.ConstValue.sv_AtLenDivAtWidth)*g;SuperMapAlgoPlot.PlottingUtil.equalFuzzy(h,0)||(T=(l=i*h)*g);var v,_,x=SuperMapAlgoPlot.PlottingUtil.distance(t[e],t[e-1]),O=2*l;x0&&(t[e]=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(l,t[e],D)),C=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(T,t[e+1],t[e]),(b=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(t[e],t[e+1],C.pntLeft))?(n[e]=new SuperMapAlgoPlot.Point(C.pntLeft.x,C.pntLeft.y),s[e]=new SuperMapAlgoPlot.Point(C.pntRight.x,C.pntRight.y)):(n[e]=new SuperMapAlgoPlot.Point(C.pntRight.x,C.pntRight.y),s[e]=new SuperMapAlgoPlot.Point(C.pntLeft.x,C.pntLeft.y)),w=2;w=2&&this.controlPoints.length=this.minEditPts){var e={textContent:this.textContent,type:this.symbolType,surroundLineFlag:!1,positionPoints:t,style:{}};if(e.type===SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL&&e.positionPoints.push(e.positionPoints[0]),this.symbolType===SuperMapAlgoPlot.SymbolType.PARALLELLINE){if(this.controlPoints&&this.controlPoints.length>=3){var o=!1;void 0!==this.controlPoints[0].z&&(o=!0);var i=SuperMapAlgoPlot.PlottingUtil.distance(this.controlPoints[0],this.controlPoints[1]);SuperMapAlgoPlot.PlottingUtil.isRight(this.controlPoints[0],this.controlPoints[1],this.controlPoints[2])&&(i=-i);var l=[];for(let t=1;ty)break;if(u>=c){var d=p.split("");p="";var S="",f=d.length;for(let t=0;t=c){var m=d[t];if(d[t]="\n",n++,a.weight?P=parseFloat(a.fontSize)*n+n+2*a.weight+.2*parseFloat(a.fontSize):this.style.strokeWidth&&(P=parseFloat(a.fontSize)*n+n+2*a.strokeWidth+.2*parseFloat(a.fontSize)),!(P.5)return i.startIndex=0,i.startPt=t[0],i.endIndex=t.length-1,i.endPt=t[t.length-1],i;null==o&&(o=.5);var l=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t),s=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(l*(o-e),t),n=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(l*(o+e),t);return i.startIndex=s.index,i.startPt=s.pts,i.endIndex=n.index,i.endPt=n.pts,i}computeDashLine(t,e,o){var i=[],l=SuperMapAlgoPlot.PlottingUtil.polylineDistance(o);if(l<=0)return[];for(var s,n=o[0],a=1,r=0,p=!0,u=!0;r2){var r=-1;for(let e=t.length-2;e>=0;e--)if(o1){SuperMapAlgoPlot.PlottingUtil.distance(t[t.length-1],t[t.length-2])>a&&(s=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(a,[t[t.length-1],t[t.length-2]])).bfind&&(t.splice(t.length-1,1),t.push(s.pts)),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,t);var p=t[t.length-1],u=n,h=o;if(void 0===p)return t;var g=SuperMapAlgoPlot.PlottingUtil.radian(p,u)*SuperMapAlgoPlot.PlottingUtil.RTOD,c=SuperMapAlgoPlot.PlottingUtil.circlePoint(u,h,h,g+157.5),y=SuperMapAlgoPlot.PlottingUtil.circlePoint(u,h,h,g+202.5),P={surroundLineFlag:!1,fillLimit:!0,fillColorLimit:!1,fill:!0,lineTypeLimit:!0,surroundLineLimit:!0,surroundLineType:SuperMapAlgoPlot.AlgoSurroundLineType.NONE};this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,[c,n,y],P)}else this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,l)}addDovetailArrow(t,e){if(t.length<2)return t;var o,i=SuperMapAlgoPlot.PlottingUtil.polylineDistance(this.controlPoints);void 0===e&&(this.isEdit,e=.5*this.getSubSymbolScaleValue()),o=i*e;var l=t[t.length-1];if(t.length>2){var s=-1;for(let e=t.length-2;e>=0;e--)if(oe||i<=0)&&(i=e),i}computeSubSymbol(t,e,o,i,l,s){if(null==t.symbolData||null==t.symbolData.innerCells)return null;void 0===l&&(l=0),void 0===s&&(s=0);var n=SuperMapAlgoPlot.AnalysisSymbol.analysisSymbolCells(t.symbolData,!0),a=0,r=0,p=0,u=0;for(let t=0;th[t].x&&(p=h[t].x),u>h[t].y&&(u=h[t].y)}var g=new SuperMapAlgoPlot.Point(a,r),c=new SuperMapAlgoPlot.Point(p,u),y=(g.y-c.y)/o,P=(g.x-c.x)/o,d=P>y?P:y,S=new SuperMapAlgoPlot.Point(.5*(g.x+c.x),.5*(g.y+c.y));S.x+=l*(g.x-c.x),S.y+=s*(g.y-c.y);for(let t=0,o=n.length;t=s)return o.z;if(a>=s)return e.z}return l.x!=e.x&&e.x!=o.x?e.z+(l.x-e.x)/(e.x-o.x)*(e.z-o.z):l.y!=e.y&&e.y!=o.y?e.z+(l.y-e.y)/(e.y-o.y)*(e.z-o.z):0==(n=SuperMapAlgoPlot.PlottingUtil.distance(e,l))?e.z:e.z-(e.z-o.z)*(n/s)}ComputeBeizerZValueByDis(t,e,o){if(t.length<2)return!1;var i=[];for(let e=0;e2?SuperMapAlgoPlot.PlottingUtil.radian(e[e.length-1],e[e.length-2]):SuperMapAlgoPlot.PlottingUtil.radian(e[1],e[0]))-s,a=e[e.length-1].x+l*Math.cos(n),r=e[e.length-1].y+l*Math.sin(n),p=new SuperMapAlgoPlot.Point(a,r),u=i+s,h=e[e.length-1].x+l*Math.cos(u),g=e[e.length-1].y+l*Math.sin(u),c=new SuperMapAlgoPlot.Point(h,g),y=[];y.push(p),y.push(e[e.length-1].clone()),y.push(c);var P={surroundLineFlag:!1,fillLimit:!0,lineTypeLimit:!0},d=SuperMapAlgoPlot.PlottingUtil.radian(e[0],e[1]);n=d-s,a=e[0].x+l*Math.cos(n),r=e[0].y+l*Math.sin(n),p=new SuperMapAlgoPlot.Point(a,r),u=d+s,h=e[0].x+l*Math.cos(u),g=e[0].y+l*Math.sin(u),c=new SuperMapAlgoPlot.Point(h,g);var S=[];S.push(p),S.push(e[0].clone()),S.push(c);var f=this.scaleValues[1]===SuperMapAlgoPlot.ArrowLineType.DOUBLELINE?SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL:SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,m=this.scaleValues[2]===SuperMapAlgoPlot.ArrowLineType.DOUBLELINE?SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL:SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL;this.scaleValues[1]===SuperMapAlgoPlot.ArrowLineType.DOUBLELINE?this.addCell(f,S,P):this.scaleValues[1]===SuperMapAlgoPlot.ArrowLineType.TRIANGLESOLID&&this.addCell(f,S,P),this.scaleValues[2]===SuperMapAlgoPlot.ArrowLineType.DOUBLELINE?this.addCell(m,y,P):this.scaleValues[2]===SuperMapAlgoPlot.ArrowLineType.TRIANGLESOLID&&this.addCell(m,y,P),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,e),this.finish()}}};SuperMapAlgoPlot.RegularPolygon=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&this.scaleValues.push(1),this.CLASS_NAME="SuperMapAlgoPlot.RegularPolygon"}calculateParts(){if(this.init(),!(this.controlPoints.length0&&t<.4&&(this.scaleValues[0]=t)}else if(1==t){var l=new SuperMapAlgoPlot.Point((o[0].x+o[1].x)/2,(o[0].y+o[1].y)/2);let t=SuperMapAlgoPlot.PlottingUtil.distance(e,l)/i;0t&&(this.scaleValues[1]=t)}}this.calculateParts()}};SuperMapAlgoPlot.Trapezoid=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),this.CLASS_NAME="SuperMapAlgoPlot.Trapezoid"}calculateParts(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length>=2&&t.lengtho.x&&a.xo.y&&a.yi.x||a.yi.y)&&(e[0]=s,e[3]=o),4==e.length&&this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,e)}}GetPointsByTrapezoid(t,e,o,i,l){var s=e.x,n=e.y,a=o.x,r=o.y,p=i.x,u=i.y,h=0,g=0,c=0,y=0;if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(Math.abs(n-r),0))h=s+a-p,g=u;else if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(Math.abs(s-a),0))h=p,g=n+r-u;else{var P=1*(n-r)/(s-a),d=u-P*p;g=P*(h=((r+n)/2+(s+a)/(2*P)-d)/(P+1/P))+d,h=2*h-p,g=2*g-u}var S=Math.sqrt(1*(s-a)*(s-a)+1*(n-r)*(n-r)),f=Math.sqrt(1*(s-h)*(s-h)+1*(n-g)*(n-g));S>0?(c=s+(a-s)*f/S,y=n+(r-n)*f/S):(c=s,y=n);var m=c+(h-c)*t,L=y+(g-y)*t;l.x=m,l.y=L}};SuperMapAlgoPlot.GeoTooltipBox=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&this.scaleValues.push(.126),this.CLASS_NAME="SuperMapAlgoPlot.GeoTooltipBox"}destroy(){super.destroy()}calculateParts(){this.init();var t=this.scaleValues[0];if(!(t<0||t>1)){if(t=(1-t)/2,this.controlPoints.length>=this.minEditPts){var e,o,i,l,s,n;this.controlPoints[2]&&(this.controlPoints[2].isFixedPos=!0),this.controlPoints[0].xo?Math.abs((n-o)/(s-e))>r?2:1:nr?4:1:s>i?n>o?Math.abs((n-o)/(s-i))>r?2:3:nr?4:3:n>o?2:ni?Math.abs((a-i)/(n-o))>p?2:1:ap?4:1:n>l?a>i?Math.abs((a-i)/(n-l))>p?2:3:ap?4:3:a>i?2:ai&&(h=i),h<(i+s)/2&&(h=(i+s)/2),u=1-2*(i-h)/(i-s);break;case 2:case 4:var g=r.x+(e.x-r.x);g>l&&(g=l),g<(o+l)/2&&(g=(o+l)/2),u=1-2*(l-g)/(l-o)}u<0&&(u=0),u>1&&(u=1),this.scaleValues[0]=u}this.calculateParts()}};SuperMapAlgoPlot.GeoTooltipBoxM=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&(this.scaleValues.push(0),this.scaleValues.push(0),this.scaleValues.push(0),this.scaleValues.push(0)),this.CLASS_NAME="SuperMapAlgoPlot.GeoTooltipBoxM"}destroy(){super.destory()}calculateParts(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length>=this.minEditPts){var e,o,i,l;t[0].xi?Math.abs((e-i)/(t-o))>n?2:1:en?4:1:t>l?e>i?Math.abs((e-i)/(t-l))>n?2:3:en?4:3:e>i?2:e1)){if(t=(1-t)/2,this.controlPoints.length>=this.minEditPts){var e,o,i,l;this.scalePoints=[];var s=[];this.controlPoints[0].x=2&&this.controlPoints.lengthi?Math.abs((a-i)/(n-o))>p?2:1:ap?4:1:n>l?a>i?Math.abs((a-i)/(n-l))>p?2:3:ap?4:3:a>i?2:ai&&(h=i),h<(i+s)/2&&(h=(i+s)/2),u=1-2*(i-h)/(i-s);break;case 2:case 4:var g=r.x+(e.x-r.x);g>l&&(g=l),g<(o+l)/2&&(g=(o+l)/2),u=1-2*(l-g)/(l-o)}u<0&&(u=0),u>1&&(u=1),this.scaleValues[0]=u}this.calculateParts()}calculateArc(t,e,o,i,l,s){(!l||1!=l&&-1!=l)&&(l=-1),s||(s=360);var n=Math.PI/s/2,a=n*l,r=Math.abs(i-o),p=[];for(let i=o,l=0;l2*Math.PI?i-2*Math.PI:i}return p}getAction(t,e,o,i,l,s){var n=(i-s)/(l-o);return ti?Math.abs((e-i)/(t-o))>n?2:1:en?4:1:t>l?e>i?Math.abs((e-i)/(t-l))>n?2:3:en?4:3:e>i?2:e360;)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;SuperMapAlgoPlot.PlottingUtil.equalFuzzy(this.scaleValues[1],this.scaleValues[0])&&(this.scaleValues[1]+=360);var e=SuperMapAlgoPlot.PlottingUtil.distance(t[0],t[1]),o=SuperMapAlgoPlot.PlottingUtil.distance(t[0],t[2]),i=[],l=[],s=Math.PI/180,n=(this.scaleValues[1]-this.scaleValues[0])/72;for(let h=this.scaleValues[0];h=0;t--)h.push(l[t]);this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,h,{surroundLineFlag:!1,lineWidthLimit:!0,weight:0,strokeWidth:0}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,i),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,l);var g=t[0].x+e/2*Math.cos(this.scaleValues[0]*s),c=t[0].y+e/2*Math.sin(this.scaleValues[0]*s),y=t[0].x+o/2*Math.cos(this.scaleValues[1]*s),P=t[0].y+o/2*Math.sin(this.scaleValues[1]*s),d=new SuperMapAlgoPlot.Point(g,c);d.isScalePoint=!0,d.tag=0,this.addScalePoint(d);var S=new SuperMapAlgoPlot.Point(y,P);S.isScalePoint=!0,S.tag=1,this.addScalePoint(S)}}modifyPoint(t,e){if(!0===e.isScalePoint){for(var o=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints),i=180*SuperMapAlgoPlot.PlottingUtil.radian(o[0],e)/Math.PI;i>360;)i-=360;for(;i<0;)i+=360;0==t?this.scaleValues[0]=i:1==t&&(this.scaleValues[1]=i)}this.calculateParts()}};SuperMapAlgoPlot.CombinationalCircle=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),this.angleRange=[],this.defaultRadius=t.defaultRadius?t.defaultRadius:60,this.CLASS_NAME="SuperMapAlgoPlot.CombinationalCircle"}calculateParts(){if(this.init(),this.controlPoints=SuperMapAlgoPlot.PlottingUtil.clearSamePts(this.controlPoints),!(null==this.controlPoints||this.controlPoints.length<1)){var t=this.getCircleLonLat(this.controlPoints[0],this.defaultRadius);this.angleRange=[];for(let e=0;eMath.abs(this.scaleValues[t]-this.scaleValues[p]))for(let u=0;u<2;u++){var i,l,s;0==u?(s=t,i=SuperMapAlgoPlot.PlottingUtil.radian(e[t],e[p])*SuperMapAlgoPlot.PlottingUtil.RTOD,l=Math.acos((o*o+this.scaleValues[t]*this.scaleValues[t]-this.scaleValues[p]*this.scaleValues[p])/(2*o*this.scaleValues[t]))*SuperMapAlgoPlot.PlottingUtil.RTOD):(s=p,i=SuperMapAlgoPlot.PlottingUtil.radian(e[p],e[t])*SuperMapAlgoPlot.PlottingUtil.RTOD,l=Math.acos((o*o+this.scaleValues[p]*this.scaleValues[p]-this.scaleValues[t]*this.scaleValues[t])/(2*o*this.scaleValues[p]))*SuperMapAlgoPlot.PlottingUtil.RTOD);var n=i-l,a=i+l,r=n<0&&a>0||n>360||a>360;n=this.adjustAngle(n),a=this.adjustAngle(a);for(let t=this.angleRange[s].length-1;t>=0;t--)if(r){if(a>this.angleRange[s][t].End||SuperMapAlgoPlot.PlottingUtil.equalFuzzy(a,this.angleRange[s][t].End)){this.angleRange[s].splice(t,1);continue}if(a>this.angleRange[s][t].Start&&(this.angleRange[s][t].Start=a),nthis.angleRange[s][t].End)this.angleRange[s].splice(t,1);else if(n>this.angleRange[s][t].Start&&athis.angleRange[s][t].End)continue;if(n>this.angleRange[s][t].Start&&(this.angleRange[s][t].End=n),a=0;o--){for(var u=this.adjustAngle(this.angleRange[t][o].Start),h=this.adjustAngle(this.angleRange[t][o].End);h=0;t--)for(let e=0;e=0;o--)e.push(t[l][o]);if(t.splice(l,1),void 0!==(o=this.generatePolygon(t,e))&&0!==o.length)return o}}modifyPoint(t,e){if(!0===e.isScalePoint){if(t<0||t>=this.controlPoints.length)return;var o=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints),i=SuperMapAlgoPlot.PlottingUtil.distance(o[t],e);this.scaleValues[t]=i}this.calculateParts()}adjustAngle(t){for(;t>360;)t-=360;for(;t<0;)t+=360;return t}getCircleLonLat(t,e){return null===this.map?2*this.getDefaultSubSymbolSize():this.map&&"undefined"!=typeof L&&void 0!==L.Map&&this.map instanceof L.Map?((o=this.map.latLngToLayerPoint(L.latLng(t.y,t.x))).x+=e,this.map.layerPointToLatLng(L.point(o.x,o.y)).lng-t.x):this.map&&"undefined"!=typeof SuperMap&&void 0!==SuperMap.Map&&this.map instanceof SuperMap.Map?((o=this.map.getPixelFromLonLat(new SuperMap.LonLat(t.x,t.y))).x+=e,this.map.getLonLatFromPixel(new SuperMap.Pixel(o.x,o.y)).lon-t.x):void 0;var o}};SuperMapAlgoPlot.FreeCurve=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),this.CLASS_NAME="SuperMapAlgoPlot.FreeCurve"}calculateParts(){if(this.init(),!(null==this.controlPoints||this.controlPoints.length2*this.controlPoints.length-1)return;var o=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(2>o.length)return;var i=SuperMapAlgoPlot.PlottingUtil.polylineDistance(o),l=-1;l=t%2==0?Math.floor(t/2):Math.floor((t+1)/2);var s=(e.x-o[l].x)/i,n=(e.y-o[l].y)/i;this.scaleValues[2*t]=s,this.scaleValues[2*t+1]=n}this.calculateParts()}reSample(t,e){var o=[];if(null==t||e<0)return o;var i=t.length;if(i>2){var l=new SuperMapAlgoPlot.Point(0,0),s=0,n=0,a=0,r=2*Math.PI;l=t[0],o.push(l);var p=!1,u=!1,h=!1;for(let P=1;P0||SuperMapAlgoPlot.PlottingUtil.equalFuzzy(0,c)?Math.acos(g):2*Math.PI-Math.acos(g),r>2*Math.PI&&s+2*Math.PIa&&(s-=2*Math.PI,r>2*Math.PI&&(r-=2*Math.PI)),s>a&&ss+y&&(r=s+y):(h=!0,r=s+y),p=!0}else l=t[P-1],P--,o.push(l),a=0,r=2*Math.PI,p=!1,u=!1,h=!1}return o.push(t[i-1]),o}return o}reSampleByAngle(t,e){var o=[],i=t.length;if(null==t||i<=0||e<=0)return o;for(var l=t,s=i,n=!1;SuperMapAlgoPlot.PlottingUtil.equalFuzzy(l[0].x,l[s-1].x)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(l[0].y,l[s-1].y);){if((s-=1)<=0)return o;n=!0}var a,r,p=[];for(a=0;a1e-10&&SuperMapAlgoPlot.PlottingUtil.distance(l[r],l[a+1])>1e-10){var u=180*SuperMapAlgoPlot.PlottingUtil.InnerAngle(l[a],l[r],l[a+1])/Math.PI;u>e&&u<180-e&&(p[a]=1,r++)}var h=0;for(a=0;a0){for(n&&h++,o=[],r=0,a=0;a0)for(let e=0;e=this.minEditPts){var t=this.controlPoints[0],e=this.controlPoints[1],o=SuperMapAlgoPlot.PlottingUtil.distance(t,e),i=this.scaleValues[0]*o,l=SuperMapAlgoPlot.PlottingUtil.parallel(this.controlPoints,i/2),s=SuperMapAlgoPlot.PlottingUtil.parallel(this.controlPoints,-i/2),n=180*SuperMapAlgoPlot.PlottingUtil.radian(t,e)/Math.PI,a=[];for(let e=n+90;e<=n+270;e+=10){var r=SuperMapAlgoPlot.PlottingUtil.circlePoint(t,i/2,i/2,e);a.push(r)}var p=[];for(let t=n-90;t<=n+90;t+=10){var u=SuperMapAlgoPlot.PlottingUtil.circlePoint(e,i/2,i/2,t);p.push(u)}var h=[];(h=(h=(h=(h=h.concat(a)).concat(s)).concat(p)).concat(l)).push(h[0]),this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,h);var g=new SuperMapAlgoPlot.Point(a[0].x,a[0].y);this.addScalePoint(g)}}modifyPoint(t,e){if(!0===e.isScalePoint&&0==t){var o=SuperMapAlgoPlot.PlottingUtil.distance(e,this.controlPoints[0]),i=SuperMapAlgoPlot.PlottingUtil.distance(this.controlPoints[0],this.controlPoints[1]);this.scaleValues[0]=2*o/i}this.calculateParts()}};SuperMapAlgoPlot.CurveEight=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),this.CLASS_NAME="SuperMapAlgoPlot.CurveEight"}destroy(){super.destroy()}calculateParts(){if(this.init(),this.controlPoints&&null!==this.controlPoints&&!(this.minEditPts>this.controlPoints.length))if(2===this.controlPoints.length){let t=this.controlPoints[0].clone(),e=this.controlPoints[1].clone(),o=SuperMapAlgoPlot.PlottingUtil.distance(t,e)/2,i=180*SuperMapAlgoPlot.PlottingUtil.radian(t,e)/Math.PI,l=new SuperMapAlgoPlot.Point((t.x+e.x)/2,(t.y+e.y)/2),s=SuperMapAlgoPlot.PlottingUtil.circlePoint(l,o,o,i+90),n=SuperMapAlgoPlot.PlottingUtil.circlePoint(l,3*o,3*o,i+90);this.addCell(SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL,[s,new SuperMapAlgoPlot.Point(s.x+o,s.y)]),this.addCell(SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL,[n,new SuperMapAlgoPlot.Point(n.x+o,n.y)])}else{let n=this.controlPoints[0].clone(),a=this.controlPoints[1].clone(),r=this.controlPoints[2].clone(),p=0;p=SuperMapAlgoPlot.PlottingUtil.isRight(r,n,a)?180*SuperMapAlgoPlot.PlottingUtil.radian(a,n)/Math.PI+90:180*SuperMapAlgoPlot.PlottingUtil.radian(n,a)/Math.PI+90;let u=SuperMapAlgoPlot.PlottingUtil.distance(n,a)/2,h=new SuperMapAlgoPlot.Point((n.x+a.x)/2,(n.y+a.y)/2),g=SuperMapAlgoPlot.PlottingUtil.circlePoint(h,u,u,p),c=SuperMapAlgoPlot.PlottingUtil.plumbLineLen(r,n,a);if(c<=4*u){var t=SuperMapAlgoPlot.PlottingUtil.circlePoint(h,3*u,3*u,p);this.addCell(SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL,[g,new SuperMapAlgoPlot.Point(g.x+u,g.y)]),this.addCell(SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL,[t,new SuperMapAlgoPlot.Point(t.x+u,t.y)])}else{let t=SuperMapAlgoPlot.PlottingUtil.circlePoint(h,c-u,c-u,p),n=180*Math.acos(u/(c-2*u))/Math.PI,a=p-n,r=p-180+n,y=p-180-n+360;var e=[];for(let t=p+n-360;t<=a;t+=4){let o=SuperMapAlgoPlot.PlottingUtil.circlePoint(g,u,u,t);e.push(o)}var o=SuperMapAlgoPlot.PlottingUtil.circlePoint(g,u,u,a);e.push(o);var i=[];for(let e=r;e=0;t--)s.push(i[t]);this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,s)}}}};SuperMapAlgoPlot.PathText=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),this.relLineText=t.relLineText?t.relLineText:0,this.showPathLine=!t.showPathLine||t.showPathLine,this.showPathLineArrow=!!t.showPathLineArrow&&t.showPathLineArrow,this.isCurve=!!t.isCurve&&t.isCurve,this.isAvoid=!!t.isAvoid&&t.isAvoid,this.textToLineDistance=t.textToLineDistance?t.textToLineDistance:0,this.CLASS_NAME="SuperMapAlgoPlot.PathText"}calculateParts(){if(this.init(),null!==this.controlPoints&&0!==this.controlPoints.length&&!(this.controlPoints.length1?this.computeText(i,this.textContent[1],t):this.computeText(i,this.textContent[0],t),this.relLineText=SuperMapAlgoPlot.RelLineText.ONBOTHLINE,this.showPathLine=o}else{var l=[];l=this.relLineText===SuperMapAlgoPlot.RelLineText.ONRIGHTLINE?this.getTextPathPts(t,!1):this.relLineText===SuperMapAlgoPlot.RelLineText.ONLEFTLINE?this.getTextPathPts(t,!0):t,this.computeText(l,this.textContent[0],t)}this.finish()}}getTextPathPts(t,e){t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t);var o=this.getLonLatDistanceFromPixel(this.textToLineDistance);if(0>=o)return SuperMapAlgoPlot.PlottingUtil.clonePoints(t);var i=SuperMapAlgoPlot.PlottingUtil.paraLine(t,o,e);return SuperMapAlgoPlot.PlottingUtil.clearSamePts(i)}computeText(t,e,o){if(!(t.length<2)){var i=e.length,l=t,s=l.length,n=0;for(let t=0;t180&&(A-=360),A<-180&&(A+=360),A>90&&A<=180?(m=-180,S=!0,f=!0):A>-180&&A<-90&&(m=180,S=!0,f=!0),0!=m?this.relLineText===SuperMapAlgoPlot.RelLineText.ONLINE||(c=this.relLineText===SuperMapAlgoPlot.RelLineText.ONLEFTLINE?"lt":"lb"):this.relLineText===SuperMapAlgoPlot.RelLineText.ONLINE||(c=this.relLineText===SuperMapAlgoPlot.RelLineText.ONLEFTLINE?"lb":"lt");for(let t=0;tn);t++){var T=t;for(f&&(T=i-t-1),L=(d=y[T]).getWidth(),S&&(r+=L);p<=r&&u=0){var w=[];for(let t=0;t<=b.index;t++)w.push(o[t]);w.push(b.pt),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,w)}if(O.index>=0){var I=[];I.push(O.pt);for(let t=O.index+1;t2){var i=-1;for(let l=t.length-2;l>=0;l--)if(e1)){if(t=(1-t)/2,this.controlPoints.length>=this.minEditPts){var e,o,i,l;this.scalePoints=[];var s=[];this.controlPoints[0].x=2&&this.controlPoints.lengthi?Math.abs((e-i)/(t-o))>n?2:1:en?4:1:t>l?e>i?Math.abs((e-i)/(t-l))>n?2:3:en?4:3:e>i?2:e=this.minEditPts&&this.computeLine(t)}computeLine(t){this.components.length=0;var e=t[0],o=t[t.length-1];this.subSectionCount<=1&&(this.subSectionCount=10);var i=SuperMapAlgoPlot.PlottingUtil.distance(e,o)/(2*this.subSectionCount-1);if(this.lineRelationType===SuperMapAlgoPlot.LineRelationType.SOLID)this.addCell(24,t,{surroundLineFlag:!1});else if(this.lineRelationType===SuperMapAlgoPlot.LineRelationType.DASH)for(let t=0;t=this.minEditPts){if(this.addCell(32,t,{surroundLineFlag:!1}),this.textContent&&null!=this.textContent&&this.textContent.length>0){var e=[];this.scaleValues[1]>t.length&&(this.scaleValues[1]=0);var o={labelRotation:0,surroundLineFlag:!1,labelAlign:"lt"};if(0===this.scaleValues[1])e=[SuperMapAlgoPlot.PlottingUtil.getPolygonCenterPt(t)];else{var i=null,l=null;this.scaleValues[1]===t.length?(i=t[t.length-1],l=t[0]):(i=t[this.scaleValues[1]-1],l=t[this.scaleValues[1]]),o.labelRotation=-SuperMapAlgoPlot.PlottingUtil.radian(i,l)/Math.PI*180;var s=this.scaleValues[0]*SuperMapAlgoPlot.PlottingUtil.distance(i,l);e=[SuperMapAlgoPlot.PlottingUtil.findPoint(i,l,s,0)]}this.addCell(34,e,o,this.textContent);var n=new SuperMapAlgoPlot.Point(e[0].x,e[0].y);n.isScalePoint=!0,n.tag=0,this.scalePoints=[],this.addScalePoint(n)}}else this.controlPoints.length>=2&&this.controlPoints.lengtho);t++){var a=SuperMapAlgoPlot.PlottingUtil.findPointInPolyLine(s,l+i*t);if(-1!==a.index){var r=new SuperMapAlgoPlot.Point(a.pt.x,a.pt.y),p=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(i/2,e[a.index],r);this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,[p.pntLeft,p.pntRight])}}this.finish()}}};SuperMapAlgoPlot.LinearArrow=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&(this.scaleValues.push(15),this.scaleValues.push(7.5),this.scaleValues.push(0),this.scaleValues.push(15),this.scaleValues.push(7.5),this.scaleValues.push(0)),this.CLASS_NAME="SuperMapAlgoPlot.LinearArrow"}calculateParts(){if(this.init(),!(null==this.controlPoints||this.controlPoints.length1&&(this.scaleValues[2]=1)}}else if(2===t){let t=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,o[0],o[1]);if(t.isOnline){let i=this.scaleValues[3]*(this.style.weight||this.style.strokeWidth),l=this.getLonLatDistanceFromPixel(i),s=l*this.scaleValues[5],n=SuperMapAlgoPlot.PlottingUtil.findPointInLine(o[1],o[0],l),a=SuperMapAlgoPlot.PlottingUtil.findPointInLine(n,o[1],s);l=SuperMapAlgoPlot.PlottingUtil.distance(o[1],t.projectPoint),i=this.getPixelDistanceFromLonLat(l),this.scaleValues[3]=i/(this.style.weight||this.style.strokeWidth);let r=SuperMapAlgoPlot.PlottingUtil.distance(e,t.projectPoint),p=this.getPixelDistanceFromLonLat(r);this.scaleValues[4]=p/(this.style.weight||this.style.strokeWidth),s=SuperMapAlgoPlot.PlottingUtil.distance(a,t.projectPoint),this.scaleValues[5]=s/l}}else if(3===t){let t=this.scaleValues[3]*(this.style.weight||this.style.strokeWidth),i=this.getLonLatDistanceFromPixel(t),l=SuperMapAlgoPlot.PlottingUtil.findPointInLine(o[1],o[0],i),s=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,l,o[1]);if(s.isOnline){let t=SuperMapAlgoPlot.PlottingUtil.distance(l,s.projectPoint);this.scaleValues[5]=t/i,this.scaleValues[5]<0?this.scaleValues[5]=0:this.scaleValues[5]>1&&(this.scaleValues[5]=1)}}}this.calculateParts()}};SuperMapAlgoPlot.Polybezier=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t)}calculateParts(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length2*this.controlPoints.length-1)return;var o=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(o=SuperMapAlgoPlot.PlottingUtil.clearSamePts(o),this.minEditPts>o.length)return;var i=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(o);i=SuperMapAlgoPlot.PlottingUtil.clearSamePts(i);var l=SuperMapAlgoPlot.PlottingUtil.polylineDistance(o),s=SuperMapAlgoPlot.PlottingUtil.polylineDistance(i);if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(l,0)||SuperMapAlgoPlot.PlottingUtil.equalFuzzy(s,0))return;var n=-1;n=t%2==0?Math.floor(t/2):Math.floor((t+1)/2);var a=(e.x-o[n].x)/l,r=(e.y-o[n].y)/l;this.scaleValues[2*t]=a,this.scaleValues[2*t+1]=r}}};SuperMapAlgoPlot.NewPie=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),this.CLASS_NAME="SuperMapAlgoPlot.NewPie"}destroy(){super.destroy()}calculateParts(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length>=this.minEditPts){var e=SuperMapAlgoPlot.PlottingUtil.distance(t[0],t[1]),o=SuperMapAlgoPlot.PlottingUtil.radian(t[0],t[1]),i=SuperMapAlgoPlot.PlottingUtil.radian(t[0],t[2]),l=Math.abs(i-o)/72,s=[];s.push(t[0]),(s=s.concat(SuperMapAlgoPlot.Primitives.getArcSpatialData(t[0],e,e,0,o,i,l))).push(t[0]),0!==s.length&&this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,s)}}};SuperMapAlgoPlot.NewArc=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),this.CLASS_NAME="SuperMapAlgoPlot.NewArc"}destroy(){super.destroy()}calculateParts(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length>=this.minEditPts){var e=SuperMapAlgoPlot.PlottingUtil.distance(t[0],t[1]),o=SuperMapAlgoPlot.PlottingUtil.radian(t[0],t[1]),i=SuperMapAlgoPlot.PlottingUtil.radian(t[0],t[2]),l=Math.abs(i-o)/72,s=SuperMapAlgoPlot.Primitives.getArcSpatialData(t[0],e,e,0,o,i,l);0!==s.length&&this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,s)}}};SuperMapAlgoPlot.AlgoSymbol1001=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&(this.scaleValues.push(.1),this.scaleValues.push(.2),this.scaleValues.push(0),this.scaleValues.push(.3),this.scaleValues.push(.08)),this.CLASS_NAME="SuperMapAlgoPlot.AlgoSymbol1001"}calculateParts(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints),e=(t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length;if(e>=this.minEditPts){this.scalePoints=[];var o=SuperMapAlgoPlot.PlottingUtil.clonePoints(t),i=!1;void 0!==o[0].z&&(i=!0);var l=SuperMapAlgoPlot.ArrowToolkit.generateArrowBodyShapePts(t,this.scaleValues,SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_PARALLEL),s=l.arrowTouLen,n=l.leftBodyPts,a=l.rightBodyPts,r=[];r.push(n[n.length-1]),r.push(a[a.length-1]);var p=[];p.push(this.scaleValues[3]),p.push(this.scaleValues[4]),p.push(this.scaleValues[0]),p.push(this.scaleValues[1]);var u=SuperMapAlgoPlot.ArrowToolkit.generateArrowHeadShapePts(t,r,p,s,SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_WITHOUT_EAR),h=[];if(i){var g=[],c=[],y=[];for(let t=0;t=0;t--)h.push(y[t]);let t=new SuperMapAlgoPlot.Point((r[0].x+r[1].x)/2,(r[0].y+r[1].y)/2),i=new SuperMapAlgoPlot.Point(t.x,t.y);i.isScalePoint=!0,i.tag=0,this.addScalePoint(i);let l=new SuperMapAlgoPlot.Point(n[n.length-1].x,n[n.length-1].y);l.isScalePoint=!0,l.tag=1,this.addScalePoint(l);let s=new SuperMapAlgoPlot.Point(u[0].x,u[0].y);s.isScalePoint=!0,s.tag=2,this.addScalePoint(s);for(let t=0;t=0;t--)h.push(a[t]);let t=new SuperMapAlgoPlot.Point((r[0].x+r[1].x)/2,(r[0].y+r[1].y)/2),e=new SuperMapAlgoPlot.Point(t.x,t.y);e.isScalePoint=!0,e.tag=0,this.addScalePoint(e);let o=new SuperMapAlgoPlot.Point(n[n.length-1].x,n[n.length-1].y);o.isScalePoint=!0,o.tag=1,this.addScalePoint(o);let i=new SuperMapAlgoPlot.Point(u[0].x,u[0].y);i.isScalePoint=!0,i.tag=2,this.addScalePoint(i)}this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,h,{surroundLineFlag:!1,lineWidthLimit:!0,strokeWidth:0,weight:0}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,h)}}modifyPoint(t,e){if(!0===e.isScalePoint){var o=new SuperMapAlgoPlot.Point(this.scalePoints[0].x,this.scalePoints[0].y),i=new SuperMapAlgoPlot.Point(this.scalePoints[1].x,this.scalePoints[1].y),l=new SuperMapAlgoPlot.Point(this.scalePoints[2].x,this.scalePoints[2].y),s=this.scaleValues[0],n=SuperMapAlgoPlot.PlottingUtil.polylineDistance(this.controlPoints),a=n*s;if(0==t){let t=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,this.controlPoints[this.controlPoints.length-2],this.controlPoints[this.controlPoints.length-1]),o=t.projectPoint;if(t.isOnline){let t=SuperMapAlgoPlot.PlottingUtil.distance(o,this.controlPoints[this.controlPoints.length-1]);this.scaleValues[0]=t/n}}else if(1==t){let t=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,i,l).projectPoint,s=SuperMapAlgoPlot.PlottingUtil.distance(t,o);this.scaleValues[1]=s/a}else if(2==t){let t=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,this.controlPoints[1],l).projectPoint,i=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(t,o,this.controlPoints[1]),s=i.projectPoint,n=SuperMapAlgoPlot.PlottingUtil.distance(s,o);!0===i.inOnline?this.scaleValues[4]=-n/a:this.scaleValues[4]=n/a}}this.calculateParts()}};SuperMapAlgoPlot.AlgoSymbol1002=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),this.MIN_GEOPT_COUNT=2,this.MAX_GEOPT_COUNT=1024,this.SV1_defaultATLenDivABLen=0,this.SV2_defaultAYPosScale=.65,this.SV_AJCtrl=.6,this.SV_ArrowWoCtrl=.6,this.SV2_DefaultAJWidDiviedByATLen=.148,this.SV3_DefaultAEWidDividedByATLen=.4,this.SV4_DefaultAELenDividedByATLen=.3,this.SV_ATScaleParameter=1.25,this.SV_ATLenDividedByATWid=1.35,this.SV_ATWidDividedByArrowWeiWid=.5,this.AB_VERTEX_COUNT=4,this.MIN_PTCOUNT_PERARROW=3,this.ATL_DIV_AWW=.7,this.ATL_DIV_ABL=.12,this.ATL_DIV_ABL_1=.18,this.DEFAULT_ARROW_TAIL_POS=.12,this.DUOJIANTOU_TAIL_RATE_1=8,this.DUOJIANTOU_TAIL_RATE_2=3,this.DUOJIANTOU_TAIL_RATE_3=.6,this.AB_CTRLPT_RATE1=0,this.AB_CTRLPT_RATE2=3,this.AB_CTRLPT_RATE3=.5,this.MIN_SCALEVALUE=.1,this.MAX_SCALEVALUE=1,this.m_scalePoints=null,this.CLASS_NAME="SuperMapAlgoPlot.AlgoSymbol1002"}calculateParts(){this.init(),this.m_scalePoints=[];var t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(this.controlPoints);if((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length>=2&&t.length2*i-1){for(let t=0;tg[t].length)){var S=p[t][p[t].length-1],f=u[t][0],m=new SuperMapAlgoPlot.Point(.5*(S.x+f.x),.5*(S.y+f.y)),L=g[t][g[t].length-1],M=g[t][g[t].length-2],b=this.ComputeZValue(m,L,M),A={x:m.x,y:m.y,z:b},T=[],v=[];for(let e=0;e=0;e--)if(t==i-1)_.push(g[t][e]);else{let o={x:g[t][e].x,y:g[t][e].y,z:.5*(g[t][e].z+g[t+1][e].z)};_.push(o)}this.ComputeBeizerZValueByDis(_,u[t],T),P.push(T),T=[];var x=h[t];for(let t=0;t0&&this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,O,{surroundLineFlag:!1}),this.scalePoints=this.scalePoints.concat(this.m_scalePoints),!0}n.shapePts.length>0&&(this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,n.shapePts,{surroundLineFlag:!1,lineWidthLimit:!0,strokeWidth:0,weight:0}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,n.shapePts,{surroundLineFlag:!1})),this.scalePoints=[];for(let t=0;tthis.MAX_SCALEVALUE?s=this.MAX_SCALEVALUE:s3){var n=i-1;for(let t=0,o=n;t3){var s=i-1;for(let t=0,o=s;t0)if(1==t)o.push(0);else{var i=SuperMapAlgoPlot.PlottingUtil.distance(e[0],e[this.MIN_PTCOUNT_PERARROW]);o.push(i);for(var l=1,s=this.MIN_PTCOUNT_PERARROW;lL&&(m=.5*L);var M=m*g;P.push(P[u].clone());var b,A=0;b=d-m;var T=[],v=0;for(v=2;v<=u;v++)A+=SuperMapAlgoPlot.PlottingUtil.distance(P[v-1],P[v-2]),SuperMapAlgoPlot.PlottingUtil.equalFuzzy(b,0,1e-14)?T[v]=0:SuperMapAlgoPlot.PlottingUtil.equalFuzzy(b-A,0,1e-14)?T[v]=M:T[v]=M+(S-M)*Math.pow((b-A)/b,this.SV_ATScaleParameter);T[u+1]=M;var _=new SuperMapAlgoPlot.Point(0,0),x=new SuperMapAlgoPlot.Point(0,0),O=new SuperMapAlgoPlot.Point(0,0);for(v=2;v<=u;v++){SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(this.AB_CTRLPT_RATE1,this.AB_CTRLPT_RATE2,P[v-2],P[v-1],P[v],x,O),u==v&&SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(this.AB_CTRLPT_RATE3,P[u],P[u-1],O,_);let t=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(T[v],x,P[v-1]);s[v]=t.pntLeft,l[v]=t.pntRight}var w,I,C=_.clone();if(SuperMapAlgoPlot.PlottingUtil.distance(P[u],C)>0){var E=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(m,P[u],_);P[u]=E.clone()}for(f=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(M,P[u+1],P[u]),l[u+1]=f.pntLeft,s[u+1]=f.pntRight,v=2;v<=u;v++)SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(this.AB_CTRLPT_RATE2,this.AB_CTRLPT_RATE2,l[v-1],l[v],l[v+1],x,O),n[v]=x.clone(),a[v]=O.clone(),SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(this.AB_CTRLPT_RATE2,this.AB_CTRLPT_RATE2,s[v-1],s[v],s[v+1],x,O),r[v]=x.clone(),p[v]=O.clone();SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(this.AB_CTRLPT_RATE3,l[1],l[2],n[2],_),a[1]=_.clone(),SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(this.AB_CTRLPT_RATE3,s[1],s[2],r[2],_),p[1]=_.clone(),I=SuperMapAlgoPlot.PlottingUtil.distance(l[u+1],l[u])*(1/3),(w=SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale(I,P[u],P[u+1])).x+=l[u+1].x-P[u].x,w.y+=l[u+1].y-P[u].y,I=(S-M)*Math.pow(I/b,this.SV_ATScaleParameter+.3),f=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(I,l[u+1],w),n[u+1]=f.pntLeft.clone(),I=SuperMapAlgoPlot.PlottingUtil.distance(s[u+1],s[u])*(1/3),(w=SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale(I,P[u],P[u+1])).x+=s[u+1].x-P[u].x,w.y+=s[u+1].y-P[u].y,I=(S-M)*Math.pow(I/b,this.SV_ATScaleParameter+.3),f=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(I,s[u+1],w),r[u+1]=f.pntRight.clone();var D=[],U=m*y,N=SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale(U,P[u],P[u+1]);this.m_scalePoints.push(N.clone()),U=m*c,f=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(U,P[u+1],N),D.push(f.pntRight),D.push(P[u+1]),D.push(f.pntLeft);var R=[];for(R.push(l[u+1]),v=u;v>=1;v--)R.push(n[v+1]),R.push(a[v]),R.push(l[v]);var B=[];for(v=1;v<=u;v++)B.push(s[v]),B.push(p[v]),B.push(r[v+1]);B.push(s[u+1]),i.push.apply(i,B),i.push.apply(i,D),i.push.apply(i,R),o=m/d;var F=[];for(v=R.length-1;v>=0;v--)F.push(R[v]);return{dATLenDivABLen:o,arrowBodyPts:i}}generateAYPts(t,e,o,i,l){var s=new SuperMapAlgoPlot.Point(.5*(t[2].x+o[2].x),.5*(t[2].y+o[2].y)),n=new SuperMapAlgoPlot.Point(.5*(t[1].x+o[1].x),.5*(t[1].y+o[1].y)),a=new SuperMapAlgoPlot.Point(.5*(t[0].x+o[0].x),.5*(t[0].y+o[0].y)),r=SuperMapAlgoPlot.PlottingUtil.distance(s,n),p=SuperMapAlgoPlot.PlottingUtil.distance(a,n),u=l*(r+p),h=new SuperMapAlgoPlot.Point(0,0),g=new SuperMapAlgoPlot.Point(0,0),c=new SuperMapAlgoPlot.Point(0,0);if(u>r){u=r+p-u,h=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(u,a,n);var y=SuperMapAlgoPlot.PlottingUtil.distance(t[1],t[0]),P=SuperMapAlgoPlot.PlottingUtil.distance(o[1],o[0]);y=y*u/p,g=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(y,t[0],t[1]),P=P*u/p,c=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(P,o[0],o[1])}else{h=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(u,s,n);var d=SuperMapAlgoPlot.PlottingUtil.distance(t[1],t[2]),S=SuperMapAlgoPlot.PlottingUtil.distance(o[1],o[2]);d=d*u/r,g=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(d,t[2],t[1]),S=S*u/r,c=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(S,o[2],o[1])}this.m_scalePoints.push(h.clone());var f=this.SV_ArrowWoCtrl*SuperMapAlgoPlot.PlottingUtil.distance(h,g),m=this.SV_ArrowWoCtrl*SuperMapAlgoPlot.PlottingUtil.distance(h,c),L=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(f,h,g),M=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(m,h,c),b=e[11].clone(),A=e[10].clone(),T=i[5].clone(),v=i[6].clone(),_=SuperMapAlgoPlot.PlottingUtil.intersectLines(A,b,h,g),x=SuperMapAlgoPlot.PlottingUtil.distance(_.intersectPoint,A),O=SuperMapAlgoPlot.PlottingUtil.distance(A,h);x=x>O?this.SV_AJCtrl*O:this.SV_AJCtrl*x;var w=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(x,A,b);b=w.clone(),e[11]=w.clone(),_=SuperMapAlgoPlot.PlottingUtil.intersectLines(v,T,h,c),x=(x=SuperMapAlgoPlot.PlottingUtil.distance(_.intersectPoint,v))>(O=SuperMapAlgoPlot.PlottingUtil.distance(v,h))?this.SV_AJCtrl*O:this.SV_AJCtrl*x,T=(w=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(x,v,T)).clone(),i[5]=w.clone();var I=[];I.push(A),I.push(b),I.push(L),I.push(h);var C=[];return C.push(h),C.push(M),C.push(T),C.push(v),{arrowLeftYaoPts:I,arrowRightYaoPts:C}}};SuperMapAlgoPlot.AlgoSymbol1003=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&(this.scaleValues.push(.3),this.scaleValues.push(.28),this.scaleValues.push(.433333),this.scaleValues.push(.53),this.scaleValues.push(0)),this.CLASS_NAME="SuperMapAlgoPlot.AlgoSymbol1003"}calculateParts(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints),e=(t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length;if(e>=this.minEditPts){if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(this.controlPoints[0].x,this.controlPoints[1].x)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(this.controlPoints[0].y,this.controlPoints[1].y))return;var o=SuperMapAlgoPlot.PlottingUtil.clonePoints(t),i=!1;void 0!==o[0].z&&(i=!0);var l=SuperMapAlgoPlot.ArrowToolkit.generateArrowBodyShapePts(t,this.scaleValues,SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_TRAPEZOID),s=l.arrowTouLen,n=l.leftBodyPts,a=l.rightBodyPts,r=[];r.push(n[n.length-1]),r.push(a[a.length-1]);var p=[];p.push(this.scaleValues[3]),p.push(this.scaleValues[4]),p.push(0),p.push(0);var u=SuperMapAlgoPlot.ArrowToolkit.generateArrowHeadShapePts(t,r,p,s,SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_WITHOUT_EAR),h=[];h=(h=h.concat(n)).concat(u);for(let t=a.length-1;t>=0;t--)h.push(a[t]);if(h.push(n[0]),i){var g=[],c={x:o[1].x,y:o[1].y,z:o[1].z},y={x:o[0].x,y:o[0].y,z:o[0].z};for(let t=0;t=2&&t.length=2;t--)h.push(o[t]);h.push({x:g.x,y:g.y,z:d});var f=[];this.ComputeBeizerZValueByDis(h,n,f);var m=[];for(let t=0;t0&&f.length>0&&m.length>0){p=(p=(p=(p=[]).concat(S)).concat(m)).concat(f),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,p,{surroundLineFlag:!1});var M=[];for(let t=0;t=0;t--)e.push(p[t]),i.push(p[t])}return{shapePts:e,leftBodyPts:o,rightBodyPts:i,arrowHeadPts:l}}updateScalePoints(t){var e=t.length,o=[];if(!(e<3)){var i=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t);if(!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(i,0)){var l=this.operateCtrlPts(t);e=l.length,e--;var s=[];for(let t=0;t0&&f>0){var L=1/(P-y[2].x),M=-1/(d-y[2].y),b=1*y[2].y/(d-y[2].y)-1*y[2].x/(P-y[2].x);m=Math.abs(L*y[0].x+M*y[0].y+b)/Math.sqrt(L*L+M*M)}else f<=1e-4?m=Math.abs(d-y[1].y):S<=1e-4&&(m=Math.abs(P-y[1].x));var A=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(m,y[2],new SuperMapAlgoPlot.Point(P,d)),T=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(y[1],y[2],y[0]);T?(n[1]=y[1],a[1]=y[0]):(n[1]=y[0],a[1]=y[1]),y[1]=new SuperMapAlgoPlot.Point((y[0].x+y[1].x)/2,(y[0].y+y[1].y)/2);var v=Math.sqrt((A.pntLeft.x-A.pntRight.x)*(A.pntLeft.x-A.pntRight.x)+(A.pntLeft.y-A.pntRight.y)*(A.pntLeft.y-A.pntRight.y))*this.sv_AtWidthDivAwWidth,_=(i=v*this.sv_AtLenDivAtWidth)*s;SuperMapAlgoPlot.PlottingUtil.equalFuzzy(l,0)||(_=(i=t*l)*s);var x,O,w=SuperMapAlgoPlot.PlottingUtil.distance(y[g],y[g-1]),I=2*i;w0&&(y[g]=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(i,y[g],N)),D=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(_,y[g+1],y[g]),(T=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(y[g],y[g+1],D.pntLeft))?(a[g]=new SuperMapAlgoPlot.Point(D.pntLeft.x,D.pntLeft.y),n[g]=new SuperMapAlgoPlot.Point(D.pntRight.x,D.pntRight.y)):(a[g]=new SuperMapAlgoPlot.Point(D.pntRight.x,D.pntRight.y),n[g]=new SuperMapAlgoPlot.Point(D.pntLeft.x,D.pntLeft.y)),C=2;C0&&this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,l)}}};SuperMapAlgoPlot.AlgoSymbol1006=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),this.QIANJI_RATE1=9,this.QIANJI_RATE2=20,this.QIANJI_RATE4=5,this.QIANJI_RATE3=1/3,this.QIANJI_TAIL_RATE1=8,this.QIANJI_TAIL_RATE2=3,this.QIANJI_TAIL_RATE3=.6,this.SV1_Default=.25,this.SV1_MinValue=0,this.SV1_MaxValue=.5,this.DEFAULT_ARROW_TAIL_POS=.4,this.SCALE_VALUE_COUNT=1,this.MIN_LEN_LeftToRightCenter=1e-7,this.SCALE_AT=1/3,this.SCALE_ATAJ=1/7,this.SCALE_ATAE=1/3,this.SCALE_AW=2/3,this.SCALE_ATAJctrlDefSide=.8,this.SCALE_ATAJctrlSameSide=2/3,this.SCALE_MM_LEFT=.25,this.SCALE_MM_RIGHT=.75,this.BEZIER_K1=1/3,this.QIANJI_OPERATE_RATE1=1,0===this.scaleValues.length&&this.scaleValues.push(this.SV1_Default),this.m_dMaxDis=0,this.m_bIsAnimation=!1,this.CLASS_NAME="SuperMapAlgoPlot.AlgoSymbol1006"}calculateParts(){this.init(),this.m_scalePoints=[];var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length>=2&&t.length0&&this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,g,{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(let t=0;t0&&(this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,x,{surroundLineFlag:!1,lineWidthLimit:!0,strokeWidth:0,weight:0}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,x,{surroundLineFlag:!1})),this.scalePoints=[];for(let t=0;tthis.SV1_MaxValue&&(o=this.SV1_MaxValue)}else o=SuperMapAlgoPlot.PlottingUtil.distance(n.projectPoint,l)0&&this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,r,e)}else{this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,i);let t={surroundLineFlag:!1,fillLimit:!0,fillColorLimit:!1,fill:!0,lineTypeLimit:!0};s.length>0&&this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,s,t)}}}};SuperMapAlgoPlot.AlgoSymbol1008=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&this.scaleValues.push(.1),this.CLASS_NAME="SuperMapAlgoPlot.AlgoSymbol1008"}calculateParts(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length0&&this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,s,{surroundLineFlag:!1,fillLimit:!0,fill:!0,lineTypeLimit:!0})}}};SuperMapAlgoPlot.AlgoSymbol1009=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&this.scaleValues.push(.1),this.CLASS_NAME="SuperMapAlgoPlot.AlgoSymbol1009"}calculateParts(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length=2&&t.length=0;t--)e.push(h[t]),i.push(h[t]);for(let t=1;t=0;t--)e.push(p[t]),i.push(p[t])}return{shapePts:e,leftBodyPts:o,rightBodyPts:i,arrowHeadPts:l}}updateScalePoints(t){var e=t.length,o=[];if(!(e<3)){var i=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t);if(!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(i,0)){var l=this.operateCtrlPts(t);e=l.length,e--;var s=[];for(let t=0;t0&&f>0){var L=1/(P-y[2].x),M=-1/(d-y[2].y),b=1*y[2].y/(d-y[2].y)-1*y[2].x/(P-y[2].x);m=Math.abs(L*y[0].x+M*y[0].y+b)/Math.sqrt(L*L+M*M)}else f<=1e-4?m=Math.abs(d-y[1].y):S<=1e-4&&(m=Math.abs(P-y[1].x));var A=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(m,y[2],new SuperMapAlgoPlot.Point(P,d)),T=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(y[1],y[2],y[0]);T?(n[1]=y[1],a[1]=y[0]):(n[1]=y[0],a[1]=y[1]),y[1]=new SuperMapAlgoPlot.Point((y[0].x+y[1].x)/2,(y[0].y+y[1].y)/2);var v=Math.sqrt((A.pntLeft.x-A.pntRight.x)*(A.pntLeft.x-A.pntRight.x)+(A.pntLeft.y-A.pntRight.y)*(A.pntLeft.y-A.pntRight.y))*this.sv_AtWidthDivAwWidth,_=(i=v*this.sv_AtLenDivAtWidth)*s;SuperMapAlgoPlot.PlottingUtil.equalFuzzy(l,0)||(_=(i=t*l)*s);var x,O,w=SuperMapAlgoPlot.PlottingUtil.distance(y[g],y[g-1]),I=2*i;w0&&(y[g]=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(i,y[g],N)),D=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(_,y[g+1],y[g]),(T=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(y[g],y[g+1],D.pntLeft))?(a[g]=new SuperMapAlgoPlot.Point(D.pntLeft.x,D.pntLeft.y),n[g]=new SuperMapAlgoPlot.Point(D.pntRight.x,D.pntRight.y)):(a[g]=new SuperMapAlgoPlot.Point(D.pntRight.x,D.pntRight.y),n[g]=new SuperMapAlgoPlot.Point(D.pntLeft.x,D.pntLeft.y)),C=2;C1)if(this.arrowBodyType!==SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_COATTAIL)this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,o);else for(var u=0,h=o.length-1;u1&&this.addCell(m,p,e),r.length>1&&this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,r)}}};SuperMapAlgoPlot.AlgoSymbol1017=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&(this.scaleValues.push(.1),this.scaleValues.push(.2),this.scaleValues.push(0),this.scaleValues.push(.3),this.scaleValues.push(.3)),this.CLASS_NAME="SuperMap.Geometry.AlgoSymbol1017"}calculateParts(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length>=this.minEditPts){this.scalePoints=[];var e=SuperMapAlgoPlot.PlottingUtil.clonePoints(t);this.isEdit||(this.scaleValues[0]=1.5*this.getSubSymbolScaleValue());var o=SuperMapAlgoPlot.ArrowToolkit.generateArrowBodyShapePts(e,this.scaleValues,SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_PARALLEL),i=o.arrowTouLen,l=o.leftBodyPts,s=o.rightBodyPts,n=[];n.push(l[l.length-1]),n.push(s[s.length-1]);var a=[];a.push(this.scaleValues[3]),a.push(this.scaleValues[4]),a.push(this.scaleValues[0]),a.push(this.scaleValues[1]);var r=SuperMapAlgoPlot.ArrowToolkit.generateArrowHeadShapePts(e,n,a,i,SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_WITHOUT_EAR),p=[];p=(p=p.concat(l)).concat(r);for(let t=s.length-1;t>=0;t--)p.push(s[t]);p.push(p[0]),this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,p,{lineWidthLimit:!0,strokeWidth:0,weight:0,surroundLineFlag:!1});var u=SuperMapAlgoPlot.PlottingUtil.clonePoints(l),h=[];for(let t=s.length-1;t>=0;t--)h.push(s[t]);h=h.concat(u),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,h);var g=SuperMapAlgoPlot.PlottingUtil.clonePoints(r);g.push(s[s.length-1]),g.splice(0,0,l[l.length-1]),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,g,{lineTypeLimit:!0});var c=new SuperMapAlgoPlot.Point((n[0].x+n[1].x)/2,(n[0].y+n[1].y)/2),y=new SuperMapAlgoPlot.Point(c.x,c.y);y.isScalePoint=!0,y.tag=0,this.scalePoints.push(y);var P=new SuperMapAlgoPlot.Point(l[l.length-1].x,l[l.length-1].y);P.isScalePoint=!0,P.tag=1,this.scalePoints.push(P);var d=new SuperMapAlgoPlot.Point(r[0].x,r[0].y);d.isScalePoint=!0,d.tag=2,this.scalePoints.push(d),this.finish()}}modifyPoint(t,e){if(!0===e.isScalePoint){var o=new SuperMapAlgoPlot.Point(this.scalePoints[0].x,this.scalePoints[0].y),i=new SuperMapAlgoPlot.Point(this.scalePoints[1].x,this.scalePoints[1].y),l=new SuperMapAlgoPlot.Point(this.scalePoints[2].x,this.scalePoints[2].y),s=this.scaleValues[0],n=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);n=SuperMapAlgoPlot.PlottingUtil.clearSamePts(n);var a=SuperMapAlgoPlot.PlottingUtil.polylineDistance(n),r=a*s;if(0==t){let t=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,n[n.length-2],n[n.length-1]),o=t.projectPoint;if(t.isOnline){let t=SuperMapAlgoPlot.PlottingUtil.distance(o,n[n.length-1]);this.scaleValues[0]=t/a}}else if(1==t){let t=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,i,l).projectPoint,s=SuperMapAlgoPlot.PlottingUtil.distance(t,o);this.scaleValues[1]=s/r}else if(2==t){let t=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,n[1],l).projectPoint,i=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(t,o,n[1]),s=i.projectPoint,a=SuperMapAlgoPlot.PlottingUtil.distance(s,o);!1===i.isOnline&&(this.scaleValues[4]=a/r)}}this.calculateParts()}};SuperMapAlgoPlot.AlgoSymbol1018=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),this.MAX_ARRAY_SIZE=128,this.sv1_DefaultAtLenDivAbLen=0,this.sv2_DefaultAjWidthDivAtLen=.148,this.sv3_DefaultAeWidthDivAtLen=.4,this.sv4_DefaultAeLenDivAtLen=.312,this.sv_AtScaleParameter=1.5,this.sv_AtLenDivAtWidth=1.35,this.sv_AtWidthDivAwWidth=.5,this.sv_defaultAwLenDivAbLen=.15,0===this.scaleValues.length&&(this.scaleValues.push(this.sv1_DefaultAtLenDivAbLen),this.scaleValues.push(this.sv2_DefaultAjWidthDivAtLen),this.scaleValues.push(this.sv3_DefaultAeWidthDivAtLen),this.scaleValues.push(this.sv4_DefaultAeLenDivAtLen)),this.CLASS_NAME="SuperMap.Geometry.AlgoSymbol1018"}calculateParts(){this.init(),this.applyUse()}applyUse(){var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length>=2&&t.length=0;t--)e.push(p[t]),i.push(p[t])}return{shapePts:e,leftBodyPts:o,rightBodyPts:i,arrowHeadPts:l}}updateScalePoints(t){var e=t.length,o=[];if(!(e<3)){var i=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t);if(!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(i,0)){var l=this.operateCtrlPts(t);e=l.length,e--;var s=[];for(let t=0;t0&&f>0){var L=1/(P-y[2].x),M=-1/(d-y[2].y),b=1*y[2].y/(d-y[2].y)-1*y[2].x/(P-y[2].x);m=Math.abs(L*y[0].x+M*y[0].y+b)/Math.sqrt(L*L+M*M)}else f<=1e-4?m=Math.abs(d-y[1].y):S<=1e-4&&(m=Math.abs(P-y[1].x));var A=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(m,y[2],new SuperMapAlgoPlot.Point(P,d)),T=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(y[1],y[2],y[0]);T?(n[1]=y[1],a[1]=y[0]):(n[1]=y[0],a[1]=y[1]),y[1]=new SuperMapAlgoPlot.Point((y[0].x+y[1].x)/2,(y[0].y+y[1].y)/2);var v=Math.sqrt((A.pntLeft.x-A.pntRight.x)*(A.pntLeft.x-A.pntRight.x)+(A.pntLeft.y-A.pntRight.y)*(A.pntLeft.y-A.pntRight.y))*this.sv_AtWidthDivAwWidth,_=(i=v*this.sv_AtLenDivAtWidth)*s;SuperMapAlgoPlot.PlottingUtil.equalFuzzy(l,0)||(_=(i=t*l)*s);var x,O,w=SuperMapAlgoPlot.PlottingUtil.distance(y[g],y[g-1]),I=2*i;w0&&(y[g]=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(i,y[g],N)),D=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(_,y[g+1],y[g]),(T=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(y[g],y[g+1],D.pntLeft))?(a[g]=new SuperMapAlgoPlot.Point(D.pntLeft.x,D.pntLeft.y),n[g]=new SuperMapAlgoPlot.Point(D.pntRight.x,D.pntRight.y)):(a[g]=new SuperMapAlgoPlot.Point(D.pntRight.x,D.pntRight.y),n[g]=new SuperMapAlgoPlot.Point(D.pntLeft.x,D.pntLeft.y)),C=2;C=0;--t)L.push(f[t]);this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,L,{lineWidthLimit:!0,strokeWidth:0,weight:0,surroundLineFlag:!1}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,[L[2],L[1],L[7],L[6]],{surroundLineFlag:!1}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,[L[6],L[5],L[4],L[3],L[2]],{lineTypeLimit:!0,surroundLineFlag:!1}),this.scalePoints=[];var M=f[0].clone();M.isScalePoint=!0,M.tag=0,this.scalePoints.push(M);var b=f[1].clone();b.isScalePoint=!0,b.tag=1,this.scalePoints.push(b);var A=f[2].clone();A.isScalePoint=!0,A.tag=2,this.scalePoints.push(A),this.finish()}}modifyPoint(t,e){if(e.isScalePoint&&(t>=0||t<3)){var o=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);o=SuperMapAlgoPlot.PlottingUtil.clearSamePts(o);var i=SuperMapAlgoPlot.PlottingUtil.distance(o[0],o[1]),l=o[0].clone(),s=o[1].clone(),n=e.clone();if(0==t){var a=SuperMapAlgoPlot.PlottingUtil.distance(n,l)/i;this.scaleValues[0]=a}else if(1==t){let t=SuperMapAlgoPlot.PlottingUtil.projectPoint(n,l,s),e=SuperMapAlgoPlot.PlottingUtil.distance(t,n)/i;this.scaleValues[1]=e;let o=SuperMapAlgoPlot.PlottingUtil.distance(t,s)/i;this.scaleValues[3]=o}else if(2==t){let t=SuperMapAlgoPlot.PlottingUtil.projectPoint(n,l,s),e=SuperMapAlgoPlot.PlottingUtil.distance(t,n)/i;this.scaleValues[2]=e;let o=SuperMapAlgoPlot.PlottingUtil.distance(t,s)/i;this.scaleValues[4]=o}}this.calculateParts()}};SuperMapAlgoPlot.AlgoSymbol1020=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&(this.scaleValues.push(.5),this.scaleValues.push(.222222),this.scaleValues.push(.5),this.scaleValues.push(.5),this.scaleValues.push(.5)),this.CLASS_NAME="SuperMap.Geometry.AlgoSymbol1020"}calculateParts(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length=0;--t)_.push(T[t]);var x=SuperMapAlgoPlot.PlottingUtil.clonePoints(_);x.push(x[0]),this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,x,{lineWidthLimit:!0,strokeWidth:0,weight:0,surroundLineFlag:!1}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,[_[0],_[1]]),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,[_[2],_[3]]),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,[_[3],_[4],_[5],_[6],_[7]],{lineTypeLimit:!0}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,[_[7],_[8]]),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,[_[9],_[10]]),this.scalePoints=[];var O=T[0].clone();O.isScalePoint=!0,O.tag=0,this.scalePoints.push(O);var w=T[3].clone();w.isScalePoint=!0,w.tag=1,this.scalePoints.push(w);var I=T[4].clone();I.isScalePoint=!0,I.tag=2,this.scalePoints.push(I),this.finish()}}modifyPoint(t,e){if(e.isScalePoint&&(t>=0||t<3)){var o=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);o=SuperMapAlgoPlot.PlottingUtil.clearSamePts(o);var i=SuperMapAlgoPlot.PlottingUtil.distance(o[0],o[1]),l=o[0].clone(),s=o[1].clone(),n=e.clone();if(0==t){let t=SuperMapAlgoPlot.PlottingUtil.distance(n,l)/i;this.scaleValues[0]=t}else if(1==t){let t=SuperMapAlgoPlot.PlottingUtil.projectPoint(n,l,s),e=SuperMapAlgoPlot.PlottingUtil.distance(t,n)/i;this.scaleValues[1]=e;let o=SuperMapAlgoPlot.PlottingUtil.distance(t,s)/i;this.scaleValues[3]=o}else if(2==t){let t=SuperMapAlgoPlot.PlottingUtil.projectPoint(n,l,s),e=SuperMapAlgoPlot.PlottingUtil.distance(t,n)/i;this.scaleValues[2]=e;let o=SuperMapAlgoPlot.PlottingUtil.distance(t,s)/i;this.scaleValues[4]=o}}this.calculateParts()}};SuperMapAlgoPlot.AlgoSymbol1021=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&this.scaleValues.push(.25),this.CLASS_NAME="SuperMap.Geometry.AlgoSymbol1021",this.QIANJI_RATE1=9,this.QIANJI_RATE2=20,this.QIANJI_RATE4=5,this.QIANJI_RATE3=1/3,this.QIANJI_TAIL_RATE1=8,this.QIANJI_TAIL_RATE2=3,this.QIANJI_TAIL_RATE3=.6,this.SV1_Default=.25,this.SV1_MinValue=0,this.SV1_MaxValue=.5,this.DEFAULT_ARROW_TAIL_POS=.4,this.SCALE_VALUE_COUNT=1,this.MIN_LEN_LeftToRightCenter=1e-7,this.SCALE_AT=1/3,this.SCALE_ATAJ=1/7,this.SCALE_ATAE=1/3,this.SCALE_AW=2/3,this.SCALE_ATAJctrlDefSide=.8,this.SCALE_ATAJctrlSameSide=2/3,this.SCALE_MM_LEFT=.25,this.SCALE_MM_RIGHT=.75,this.BEZIER_K1=1/3,this.QIANJI_OPERATE_RATE1=1,this.m_dMaxDis=0,this.m_bIsAnimation=!1}calculateParts(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t),this.components.length=0,this.m_scalePoints=[],t.length>=2&&t.length0&&(this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,o.shapePts,{strokeWidth:0,weight:0,lineWidthLimit:!0}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,s),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,n),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,o.LeftArowHead,{lineTypeLimit:!0}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,o.LeftArowRightBody),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,u),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,h),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,o.RightArowHead,{lineTypeLimit:!0}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,P),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,d)),this.scalePoints=[];for(let t=0;tthis.SV1_MaxValue&&(i=this.SV1_MaxValue)}else i=SuperMapAlgoPlot.PlottingUtil.distance(a.projectPoint,s)=2&&t.length.7&&(P=.7),this.scaleValues[2]=P}}}};SuperMapAlgoPlot.AlgoSymbol320=class extends SuperMapAlgoPlot.AlgoSymbol{constructor(t){super(t),0===this.scaleValues.length&&(this.scaleValues.push(.1),this.scaleValues.push(.1))}calculateParts(){this.init();var t=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(!((t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length.3&&(c=.3),this.scaleValues[1]=c}}}};var q=SuperMapAlgoPlot.BasicAlgoSymbolFactory=SuperMapAlgoPlot.BasicAlgoSymbolFactory||{};SuperMapAlgoPlot.BasicAlgoSymbolFactory.getAlgoSymbol=function(t,e,o){if(0===t)switch(e){case SuperMapAlgoPlot.SymbolType.ANNOFRAMESYMBOL:return new SuperMapAlgoPlot.GeoTooltipBox(o);case SuperMapAlgoPlot.SymbolType.ANNOFRAMESYMBOLM:return new SuperMapAlgoPlot.GeoTooltipBoxM(o);case SuperMapAlgoPlot.SymbolType.PATHTEXT:return new SuperMapAlgoPlot.PathText(o);case SuperMapAlgoPlot.SymbolType.ARROWLINE:return new SuperMapAlgoPlot.ArrowLine(o);case SuperMapAlgoPlot.SymbolType.CURVEEIGHT:return new SuperMapAlgoPlot.CurveEight(o);case SuperMapAlgoPlot.SymbolType.RUNWAY:return new SuperMapAlgoPlot.Runway(o);case SuperMapAlgoPlot.SymbolType.CONCENTRICCIRCLE:return new SuperMapAlgoPlot.ConcentricCircle(o);case SuperMapAlgoPlot.SymbolType.COMBINATIONALCIRCLE:return new SuperMapAlgoPlot.CombinationalCircle(o);case SuperMapAlgoPlot.SymbolType.FREECURVE:return new SuperMapAlgoPlot.FreeCurve(o);case SuperMapAlgoPlot.SymbolType.REGULARPOLYGON:return new SuperMapAlgoPlot.RegularPolygon(o);case SuperMapAlgoPlot.SymbolType.BRACESYMBOL:return new SuperMapAlgoPlot.Brace(o);case SuperMapAlgoPlot.SymbolType.TRAPEZOIDSYMBOL:return new SuperMapAlgoPlot.Trapezoid(o);case SuperMapAlgoPlot.SymbolType.SYMBOLTEXTBOX:return new SuperMapAlgoPlot.SymbolTextBox(o);case SuperMapAlgoPlot.SymbolType.NODECHAIN:return new SuperMapAlgoPlot.NodeChain(o);case SuperMapAlgoPlot.SymbolType.LINERELATION:return new SuperMapAlgoPlot.LineRelation(o);case SuperMapAlgoPlot.SymbolType.LINEMARKING:return new SuperMapAlgoPlot.LineMarking(o);case SuperMapAlgoPlot.SymbolType.POLYGONREGION:return new SuperMapAlgoPlot.PolygonRegion(o);case SuperMapAlgoPlot.SymbolType.WIRE:return new SuperMapAlgoPlot.Wire(o);case SuperMapAlgoPlot.SymbolType.LINEARARROW:return new SuperMapAlgoPlot.LinearArrow(o);case SuperMapAlgoPlot.SymbolType.POLYBEZIERSYMBOL:return new SuperMapAlgoPlot.Polybezier(o);case SuperMapAlgoPlot.SymbolType.NEWPIESYMBOL:return new SuperMapAlgoPlot.NewPie(o);case SuperMapAlgoPlot.SymbolType.NEWARCSYMBOL:return new SuperMapAlgoPlot.NewArc(o);default:return new SuperMapAlgoPlot.AlgoSymbol(o)}else if(22===t)switch(e){case 1001:return new SuperMapAlgoPlot.AlgoSymbol1001(o);case 1002:return new SuperMapAlgoPlot.AlgoSymbol1002(o);case 1003:return new SuperMapAlgoPlot.AlgoSymbol1003(o);case 1004:return new SuperMapAlgoPlot.AlgoSymbol1004(o);case 1005:return new SuperMapAlgoPlot.AlgoSymbol1005(o);case 1006:return new SuperMapAlgoPlot.AlgoSymbol1006(o);case 1007:return new SuperMapAlgoPlot.AlgoSymbol1007(o);case 1008:return new SuperMapAlgoPlot.AlgoSymbol1008(o);case 1009:return new SuperMapAlgoPlot.AlgoSymbol1009(o);case 1010:return new SuperMapAlgoPlot.AlgoSymbol1010(o);case 1011:return new SuperMapAlgoPlot.AlgoSymbol1011(o);case 1012:return new SuperMapAlgoPlot.AlgoSymbol1012(o);case 1013:return new SuperMapAlgoPlot.AlgoSymbol1013(o);case 1014:return new SuperMapAlgoPlot.AlgoSymbol1014(o);case 1015:return new SuperMapAlgoPlot.AlgoSymbol1015(o);case 1016:return new SuperMapAlgoPlot.AlgoSymbol1016(o);case 1017:return new SuperMapAlgoPlot.AlgoSymbol1017(o);case 1018:return new SuperMapAlgoPlot.AlgoSymbol1018(o);case 1019:return new SuperMapAlgoPlot.AlgoSymbol1019(o);case 1020:return new SuperMapAlgoPlot.AlgoSymbol1020(o);case 1021:return new SuperMapAlgoPlot.AlgoSymbol1021(o);case 1022:return new SuperMapAlgoPlot.AlgoSymbol1022(o);default:return null}else{if(421!==t)return null;switch(e){case 311:return new SuperMapAlgoPlot.AlgoSymbol1004(o);case 315:return new SuperMapAlgoPlot.AlgoSymbol315(o);case 317:return new SuperMapAlgoPlot.AlgoSymbol1006(o);case 318:return new SuperMapAlgoPlot.AlgoSymbol1002(o);case 319:return new SuperMapAlgoPlot.AlgoSymbol15200(o);case 320:return new SuperMapAlgoPlot.AlgoSymbol320(o);case 321:return new SuperMapAlgoPlot.AlgoSymbol321(o);case 322:return new SuperMapAlgoPlot.AlgoSymbol322(o);default:return null}}},SuperMapAlgoPlot.BasicAlgoSymbolFactory.getSymbolWayType=function(t,e){if(0===t)switch(e){case SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL:case SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL:return SuperMapAlgoPlot.AddPoint_WayType.POLYLINE;case SuperMapAlgoPlot.SymbolType.POLYBEZIERSYMBOL:case SuperMapAlgoPlot.SymbolType.POLYBEZIERCLOSESYMBOL:return SuperMapAlgoPlot.AddPoint_WayType.CURVE;default:return SuperMapAlgoPlot.AddPoint_WayType.UNKNOWN}else if(22===t)switch(e){case 1005:case 1008:case 1012:case 1014:return SuperMapAlgoPlot.AddPoint_WayType.CURVE;case 1007:case 1009:case 1013:case 1015:case 1017:return SuperMapAlgoPlot.AddPoint_WayType.POLYLINE;default:return SuperMapAlgoPlot.AddPoint_WayType.UNKNOWN}},SuperMapAlgoPlot.BasicAlgoSymbolFactory.isAccessServer=function(t,e){if(0===t||22===t)return!1;if(421!==t)return!0;switch(e){case 311:case 317:case 318:case 315:case 319:case 320:case 321:case 322:return!1;default:return!0}},SuperMapAlgoPlot.BasicAlgoSymbolFactory.getDefaultSubSymbols=function(){return[]},SuperMapAlgoPlot.BasicAlgoSymbolFactory.getMinEditPts=function(t,e){if(0===t)switch(e){case SuperMapAlgoPlot.SymbolType.TEXTSYMBOL:case SuperMapAlgoPlot.SymbolType.COMBINATIONALCIRCLE:return 1;case SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL:case SuperMapAlgoPlot.SymbolType.RECTANGLESYMBOL:case SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL:case SuperMapAlgoPlot.SymbolType.POLYBEZIERSYMBOL:case SuperMapAlgoPlot.SymbolType.KIDNEY:case SuperMapAlgoPlot.SymbolType.ARROWLINE:case SuperMapAlgoPlot.SymbolType.BRACESYMBOL:case SuperMapAlgoPlot.SymbolType.CURVEEIGHT:case SuperMapAlgoPlot.SymbolType.FREECURVE:case SuperMapAlgoPlot.SymbolType.LINEMARKING:case SuperMapAlgoPlot.SymbolType.LINERELATION:case SuperMapAlgoPlot.SymbolType.NODECHAIN:case SuperMapAlgoPlot.SymbolType.PATHTEXT:case SuperMapAlgoPlot.SymbolType.REGULARPOLYGON:case SuperMapAlgoPlot.SymbolType.RUNWAY:case SuperMapAlgoPlot.SymbolType.SYMBOLTEXTBOX:case SuperMapAlgoPlot.SymbolType.ANNOFRAMESYMBOLM:case SuperMapAlgoPlot.SymbolType.CONCENTRICCIRCLE:case SuperMapAlgoPlot.SymbolType.WIRE:case SuperMapAlgoPlot.SymbolType.LINEARARROW:return 2;case SuperMapAlgoPlot.SymbolType.ARCSYMBOL:case SuperMapAlgoPlot.SymbolType.CHORDSYMBOL:case SuperMapAlgoPlot.SymbolType.PIESYMBOL:case SuperMapAlgoPlot.SymbolType.ELLIPSESYMBOL:case SuperMapAlgoPlot.SymbolType.PARALLELOGRAM:case SuperMapAlgoPlot.SymbolType.PARALLELLINE:case SuperMapAlgoPlot.SymbolType.POLYBEZIERCLOSESYMBOL:case SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL:case SuperMapAlgoPlot.SymbolType.POLYGONREGION:case SuperMapAlgoPlot.SymbolType.TRAPEZOIDSYMBOL:case SuperMapAlgoPlot.SymbolType.ANNOFRAMESYMBOL:case SuperMapAlgoPlot.SymbolType.NEWARCSYMBOL:case SuperMapAlgoPlot.SymbolType.NEWPIESYMBOL:return 3}else if(22===t)switch(e){case 1001:case 1003:case 1005:case 1007:case 1008:case 1009:case 1011:case 1012:case 1013:case 1014:case 1015:case 1016:case 1017:case 1019:case 1020:case 1022:return 2;case 1002:case 1004:case 1006:case 1010:case 1018:case 1021:return 3}else if(421===t)switch(e){case 319:case 320:case 321:return 2;case 311:case 315:case 317:case 318:case 322:return 3}},SuperMapAlgoPlot.BasicAlgoSymbolFactory.getMaxEditPts=function(t,e){if(0===t)switch(e){case SuperMapAlgoPlot.SymbolType.TEXTSYMBOL:return 1;case SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL:case SuperMapAlgoPlot.SymbolType.RECTANGLESYMBOL:case SuperMapAlgoPlot.SymbolType.BRACESYMBOL:case SuperMapAlgoPlot.SymbolType.LINEMARKING:case SuperMapAlgoPlot.SymbolType.LINERELATION:case SuperMapAlgoPlot.SymbolType.RUNWAY:case SuperMapAlgoPlot.SymbolType.SYMBOLTEXTBOX:case SuperMapAlgoPlot.SymbolType.ANNOFRAMESYMBOLM:case SuperMapAlgoPlot.SymbolType.LINEARARROW:return 2;case SuperMapAlgoPlot.SymbolType.ARCSYMBOL:case SuperMapAlgoPlot.SymbolType.CHORDSYMBOL:case SuperMapAlgoPlot.SymbolType.PIESYMBOL:case SuperMapAlgoPlot.SymbolType.ELLIPSESYMBOL:case SuperMapAlgoPlot.SymbolType.PARALLELOGRAM:case SuperMapAlgoPlot.SymbolType.KIDNEY:case SuperMapAlgoPlot.SymbolType.CONCENTRICCIRCLE:case SuperMapAlgoPlot.SymbolType.CURVEEIGHT:case SuperMapAlgoPlot.SymbolType.ANNOFRAMESYMBOL:case SuperMapAlgoPlot.SymbolType.TRAPEZOIDSYMBOL:case SuperMapAlgoPlot.SymbolType.NEWARCSYMBOL:case SuperMapAlgoPlot.SymbolType.NEWPIESYMBOL:return 3;case SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL:case SuperMapAlgoPlot.SymbolType.POLYBEZIERSYMBOL:case SuperMapAlgoPlot.SymbolType.PARALLELLINE:case SuperMapAlgoPlot.SymbolType.POLYBEZIERCLOSESYMBOL:case SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL:case SuperMapAlgoPlot.SymbolType.ARROWLINE:case SuperMapAlgoPlot.SymbolType.COMBINATIONALCIRCLE:case SuperMapAlgoPlot.SymbolType.FREECURVE:case SuperMapAlgoPlot.SymbolType.NODECHAIN:case SuperMapAlgoPlot.SymbolType.PATHTEXT:case SuperMapAlgoPlot.SymbolType.POLYGONREGION:case SuperMapAlgoPlot.SymbolType.REGULARPOLYGON:case SuperMapAlgoPlot.SymbolType.WIRE:return 9999}else if(22===t)switch(e){case 1003:case 1019:case 1020:case 1022:return 2;case 1006:case 1021:return 4;case 1001:case 1002:case 1004:case 1005:case 1007:case 1008:case 1009:case 1010:case 1011:case 1012:case 1013:case 1014:case 1015:case 1016:case 1017:case 1018:return 99999}else if(421===t)switch(e){case 320:return 2;case 317:return 4;case 311:case 315:case 318:case 319:case 321:case 322:return 99999}},SuperMapAlgoPlot.BasicAlgoSymbolFactory.getDefaultStyle=function(t,e){var o={};if(421===t)switch(e){case 320:case 321:o.color=o.strokeColor="#000000";break;case 322:o.color=o.strokeColor="#bc744d"}return o},SuperMapAlgoPlot.BasicAlgoSymbolFactory.zoomInCalSymbol=function(){if(22!==libID)return!1;switch(code){case 1012:case 1013:case 1014:case 1015:return!0;default:return!1}},SuperMapAlgoPlot.BasicAlgoSymbolFactory.zoomCalSymbol=function(){return!1},SuperMapAlgoPlot.BasicAlgoSymbolFactory.getSymbolName=function(t,e){var o="";if(0===t)switch(e){case SuperMapAlgoPlot.SymbolType.TEXTSYMBOL:o="文本";break;case SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL:o="圆";break;case SuperMapAlgoPlot.SymbolType.RECTANGLESYMBOL:o="矩形";break;case SuperMapAlgoPlot.SymbolType.ARCSYMBOL:o="弧线";break;case SuperMapAlgoPlot.SymbolType.CHORDSYMBOL:o="弓形";break;case SuperMapAlgoPlot.SymbolType.PIESYMBOL:o="扇形";break;case SuperMapAlgoPlot.SymbolType.ELLIPSESYMBOL:o="椭圆";break;case SuperMapAlgoPlot.SymbolType.PARALLELOGRAM:o="平行四边形";break;case SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL:o="多边形";break;case SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL:o="折线";break;case SuperMapAlgoPlot.SymbolType.POLYBEZIERSYMBOL:o="贝赛尔曲线";break;case SuperMapAlgoPlot.SymbolType.POLYBEZIERCLOSESYMBOL:o="闭合贝塞尔曲线";break;case SuperMapAlgoPlot.SymbolType.PARALLELLINE:o="平行线";break;case SuperMapAlgoPlot.SymbolType.KIDNEY:o="集结地";break;case SuperMapAlgoPlot.SymbolType.ANNOFRAMESYMBOL:o="注记指示框";break;case SuperMapAlgoPlot.SymbolType.ARROWLINE:o="箭头线";break;case SuperMapAlgoPlot.SymbolType.COMBINATIONALCIRCLE:o="组合圆";break;case SuperMapAlgoPlot.SymbolType.CONCENTRICCIRCLE:o="同心圆";break;case SuperMapAlgoPlot.SymbolType.CURVEEIGHT:o="八字形";break;case SuperMapAlgoPlot.SymbolType.FREECURVE:o="自由线";break;case SuperMapAlgoPlot.SymbolType.ANNOFRAMESYMBOLM:o="多角标注框";break;case SuperMapAlgoPlot.SymbolType.LINEMARKING:o="线型标注";break;case SuperMapAlgoPlot.SymbolType.LINERELATION:o="对象间连线";break;case SuperMapAlgoPlot.SymbolType.NODECHAIN:o="节点链";break;case SuperMapAlgoPlot.SymbolType.PATHTEXT:o="沿线注记";break;case SuperMapAlgoPlot.SymbolType.POLYGONREGION:o="多边形区域管理";break;case SuperMapAlgoPlot.SymbolType.RUNWAY:o="跑道线";break;case SuperMapAlgoPlot.SymbolType.SYMBOLTEXTBOX:o="标注框";break;case SuperMapAlgoPlot.SymbolType.REGULARPOLYGON:o="正多边形";break;case SuperMapAlgoPlot.SymbolType.BRACESYMBOL:o="大括号";break;case SuperMapAlgoPlot.SymbolType.TRAPEZOIDSYMBOL:o="梯形";break;case SuperMapAlgoPlot.SymbolType.WIRE:o="铁丝网";break;case SuperMapAlgoPlot.SymbolType.LINEARARROW:o="直线箭头";case SuperMapAlgoPlot.SymbolType.NEWPIESYMBOL:o="扇形";case SuperMapAlgoPlot.SymbolType.NEWARCSYMBOL:o="弧线"}return o};var K=SuperMapAlgoPlot.AlgoSymbolFactory=SuperMapAlgoPlot.AlgoSymbolFactory||{};SuperMapAlgoPlot.AlgoSymbolFactory.getAlgoSymbol=function(t){var e=t.libID,o=t.code;return 0!==e&&22!==e&&421!==e||void 0===SuperMapAlgoPlot.BasicAlgoSymbolFactory?100===e&&void 0!==SuperMapAlgoPlot.JBAlgoSymbolFactory?SuperMapAlgoPlot.JBAlgoSymbolFactory.getAlgoSymbol(e,o,t):123===e&&void 0!==SuperMapAlgoPlot.WJAlgoSymbolFactory?SuperMapAlgoPlot.WJAlgoSymbolFactory.getAlgoSymbol(e,o,t):999===e&&void 0!==SuperMapAlgoPlot.YJAlgoSymbolFactory?SuperMapAlgoPlot.YJAlgoSymbolFactory.getAlgoSymbol(e,o,t):null:SuperMapAlgoPlot.BasicAlgoSymbolFactory.getAlgoSymbol(e,o,t)},SuperMapAlgoPlot.AlgoSymbolFactory.getSymbolWayType=function(t,e){if(0===t)switch(e){case SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL:case SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL:return SuperMapAlgoPlot.AddPoint_WayType.POLYLINE;case SuperMapAlgoPlot.SymbolType.POLYBEZIERSYMBOL:case SuperMapAlgoPlot.SymbolType.POLYBEZIERCLOSESYMBOL:return SuperMapAlgoPlot.AddPoint_WayType.CURVE;default:return SuperMapAlgoPlot.AddPoint_WayType.UNKNOWN}if(22===t)switch(e){case 1005:case 1008:case 1012:case 1014:return SuperMapAlgoPlot.AddPoint_WayType.CURVE;case 1007:case 1009:case 1013:case 1015:return SuperMapAlgoPlot.AddPoint_WayType.POLYLINE;default:return SuperMapAlgoPlot.AddPoint_WayType.UNKNOWN}if(100===t)switch(e){case 15200:case 15201:case 16203:case 17703:case 17704:case 21400:case 21401:case 21500:case 21501:case 21502:case 21503:case 21504:case 21600:case 21900:case 22e3:case 22103:case 23800:case 24700:case 25201:case 25400:case 25601:case 25801:case 25901:case 26500:case 26501:case 26502:case 26503:case 26600:case 28900:case 29e3:case 29003:case 29903:case 3e4:case 30001:case 30002:case 30100:case 30102:case 30200:case 30201:case 30800:case 31803:case 33400:case 34900:case 34901:case 34902:case 35e3:case 36400:case 44200:case 3010102:case 3010103:case 3010104:case 3010105:case 3010106:case 3010107:case 3010108:case 3010301:case 3010302:case 3010303:case 3010304:case 16500:case 17400:case 17401:case 17500:case 17501:case 23400:case 23500:case 23600:case 23700:case 27300:case 28200:case 28300:case 28400:case 37600:case 37601:case 37700:case 39e3:case 40100:case 40101:case 42400:case 2350001:case 3032e3:case 4010800:case 4010801:case 4011100:case 4011101:case 4022100:case 4022101:case 4022102:case 39101:case 44300:case 22200:case 27701:return SuperMapAlgoPlot.AddPoint_WayType.CURVE;case 12500:case 12502:case 16100:case 20300:case 25501:case 25502:case 25503:case 32900:case 34700:case 35200:case 36401:case 41200:case 41201:case 41202:case 42700:case 44400:return SuperMapAlgoPlot.AddPoint_WayType.POLYLINE;default:return SuperMapAlgoPlot.AddPoint_WayType.UNKNOWN}if(123===t)switch(e){case 21003:case 21207:case 2120701:case 2121503:case 21218:case 30008:case 3000801:case 3000802:case 3000803:case 3000804:case 3000805:case 3000806:case 3000807:case 3000808:case 3000809:case 30009:case 5021803:case 5022001:case 5022002:case 40301:case 4030101:case 4030102:case 4030103:case 4030104:case 40303:case 4030301:case 4030302:case 4030303:case 50101:case 5010101:case 50102:case 5010201:case 5010202:case 5010203:case 5010204:case 50103:case 5010301:case 5010302:case 5010303:case 5010304:case 50107:case 5010701:case 50210:case 50220:case 50221:case 50225:case 5030102:case 50303:case 5030301:case 50309:case 50320:case 5032001:case 5032002:case 5032003:case 50321:case 5032101:case 5032102:case 50322:case 5032201:case 50330:case 5033001:case 5034203:case 5035201:case 5035204:case 60205:case 90105:return SuperMapAlgoPlot.AddPoint_WayType.CURVE;case 20915:case 2091502:case 2092101:case 2120702:case 21216:case 2121601:case 2121602:case 21605:case 30010:case 30011:case 3001101:case 3001102:case 3001103:case 3001104:case 3001105:case 30012:case 30020:case 3002001:case 3002002:case 3002005:case 30025:case 3002501:case 30026:case 40104:case 40302:case 4030201:case 4030202:case 4030203:case 4030204:case 50227:case 5035205:case 60301:case 6030101:case 6030102:case 6030103:case 6030104:case 6030105:case 6030106:case 6030107:case 70202:case 7020201:case 7020202:case 90107:return SuperMapAlgoPlot.AddPoint_WayType.POLYLINE;default:return SuperMapAlgoPlot.AddPoint_WayType.UNKNOWN}},SuperMapAlgoPlot.AlgoSymbolFactory.isAccessServer=function(t,e){return 0!==t&&22!==t&&421!==t||void 0===SuperMapAlgoPlot.BasicAlgoSymbolFactory?100===t&&void 0!==SuperMapAlgoPlot.JBAlgoSymbolFactory?SuperMapAlgoPlot.JBAlgoSymbolFactory.isAccessServer(t,e):123===t&&void 0!==SuperMapAlgoPlot.WJAlgoSymbolFactory?SuperMapAlgoPlot.WJAlgoSymbolFactory.isAccessServer(t,e):999!==t||void 0===SuperMapAlgoPlot.YJAlgoSymbolFactory||SuperMapAlgoPlot.YJAlgoSymbolFactory.isAccessServer(t,e):SuperMapAlgoPlot.BasicAlgoSymbolFactory.isAccessServer(t,e)},SuperMapAlgoPlot.AlgoSymbolFactory.getDefaultSubSymbols=function(t,e){return 100===t&&void 0!==SuperMapAlgoPlot.JBAlgoSymbolFactory?SuperMapAlgoPlot.JBAlgoSymbolFactory.getDefaultSubSymbols(t,e):123===t&&void 0!==SuperMapAlgoPlot.WJAlgoSymbolFactory?SuperMapAlgoPlot.WJAlgoSymbolFactory.getDefaultSubSymbols(t,e):999===t&&void 0!==SuperMapAlgoPlot.YJAlgoSymbolFactory?SuperMapAlgoPlot.YJAlgoSymbolFactory.getDefaultSubSymbols(t,e):[]},SuperMapAlgoPlot.AlgoSymbolFactory.getMinEditPts=function(t,e){return 0!==t&&22!==t&&421!==t||void 0===SuperMapAlgoPlot.BasicAlgoSymbolFactory?100===t&&void 0!==SuperMapAlgoPlot.JBAlgoSymbolFactory?SuperMapAlgoPlot.JBAlgoSymbolFactory.getMinEditPts(t,e):123===t&&void 0!==SuperMapAlgoPlot.WJAlgoSymbolFactory?SuperMapAlgoPlot.WJAlgoSymbolFactory.getMinEditPts(t,e):999===t&&void 0!==SuperMapAlgoPlot.YJAlgoSymbolFactory?SuperMapAlgoPlot.YJAlgoSymbolFactory.getMinEditPts(t,e):0:SuperMapAlgoPlot.BasicAlgoSymbolFactory.getMinEditPts(t,e)},SuperMapAlgoPlot.AlgoSymbolFactory.getMaxEditPts=function(t,e){return 0!==t&&22!==t&&421!==t||void 0===SuperMapAlgoPlot.BasicAlgoSymbolFactory?100===t&&void 0!==SuperMapAlgoPlot.JBAlgoSymbolFactory?SuperMapAlgoPlot.JBAlgoSymbolFactory.getMaxEditPts(t,e):123===t&&void 0!==SuperMapAlgoPlot.WJAlgoSymbolFactory?SuperMapAlgoPlot.WJAlgoSymbolFactory.getMaxEditPts(t,e):999===t&&void 0!==SuperMapAlgoPlot.YJAlgoSymbolFactory?SuperMapAlgoPlot.YJAlgoSymbolFactory.getMaxEditPts(t,e):0:SuperMapAlgoPlot.BasicAlgoSymbolFactory.getMaxEditPts(t,e)},SuperMapAlgoPlot.AlgoSymbolFactory.getDefaultStyle=function(t,e){return 0!==t&&22!==t&&421!==t||void 0===SuperMapAlgoPlot.BasicAlgoSymbolFactory?100===t&&void 0!==SuperMapAlgoPlot.JBAlgoSymbolFactory?SuperMapAlgoPlot.JBAlgoSymbolFactory.getDefaultStyle(t,e):123===t&&void 0!==SuperMapAlgoPlot.WJAlgoSymbolFactory?SuperMapAlgoPlot.WJAlgoSymbolFactory.getDefaultStyle(t,e):999===t&&void 0!==SuperMapAlgoPlot.YJAlgoSymbolFactory?SuperMapAlgoPlot.YJAlgoSymbolFactory.getDefaultStyle(t,e):{}:SuperMapAlgoPlot.BasicAlgoSymbolFactory.getDefaultStyle(t,e)},SuperMapAlgoPlot.AlgoSymbolFactory.getSymbolName=function(t,e){return 0!==t&&22!==t&&421!==t||void 0===SuperMapAlgoPlot.BasicAlgoSymbolFactory?"":SuperMapAlgoPlot.BasicAlgoSymbolFactory.getSymbolName(t,e)},SuperMapAlgoPlot.AlgoSymbolFactory.canPolylineConnect=function(t,e){if(100!==t)return!1;switch(e){case 16500:case 17400:case 17401:case 17500:case 17501:case 23400:case 23500:case 23600:case 23700:case 27300:case 28200:case 28300:case 28400:case 37600:case 37601:case 37700:case 39e3:case 40100:case 40101:case 42200:case 42400:case 2350001:case 3032e3:case 4010800:case 4010801:case 4011100:case 4011101:case 4022100:case 4022101:case 4022102:return!0;default:return!1}},SuperMapAlgoPlot.AlgoSymbolFactory.zoomInCalSymbol=function(t,e){return 0!==t&&22!==t&&421!==t||void 0===SuperMapAlgoPlot.BasicAlgoSymbolFactory?100===t&&void 0!==SuperMapAlgoPlot.JBAlgoSymbolFactory?SuperMapAlgoPlot.JBAlgoSymbolFactory.zoomInCalSymbol(t,e):123===t&&void 0!==SuperMapAlgoPlot.WJAlgoSymbolFactory?SuperMapAlgoPlot.WJAlgoSymbolFactory.zoomInCalSymbol(t,e):999===t&&void 0!==SuperMapAlgoPlot.YJAlgoSymbolFactory?SuperMapAlgoPlot.YJAlgoSymbolFactory.zoomInCalSymbol(t,e):0:SuperMapAlgoPlot.BasicAlgoSymbolFactory.zoomInCalSymbol(t,e)},SuperMapAlgoPlot.AlgoSymbolFactory.zoomCalSymbol=function(t,e){if((0===t||22===t||421===t)&&void 0!==SuperMapAlgoPlot.BasicAlgoSymbolFactory)return SuperMapAlgoPlot.BasicAlgoSymbolFactory.zoomCalSymbol(t,e);if(100===t)switch(e){case 28e3:case 28100:case 28200:case 28201:case 32300:return!0;default:return!1}else{if(123!==t||void 0===SuperMapAlgoPlot.WJAlgoSymbolFactory)return!1;switch(e){case 50312:case 50313:case 50314:case 50348:return!0;default:return!1}}};SuperMap.MD5=SuperMap.MD5||{};var Q=function(t){function e(t,e){return t<>>32-e}function o(t,e){var o,i,l,s,n;return l=2147483648&t,s=2147483648&e,n=(1073741823&t)+(1073741823&e),(o=1073741824&t)&(i=1073741824&e)?2147483648^n^l^s:o|i?1073741824&n?3221225472^n^l^s:1073741824^n^l^s:n^l^s}function i(t,i,l,s,n,a,r){return o(e(t=o(t,o(o(function(t,e,o){return t&e|~t&o}(i,l,s),n),r)),a),i)}function l(t,i,l,s,n,a,r){return o(e(t=o(t,o(o(function(t,e,o){return t&o|e&~o}(i,l,s),n),r)),a),i)}function s(t,i,l,s,n,a,r){return o(e(t=o(t,o(o(function(t,e,o){return t^e^o}(i,l,s),n),r)),a),i)}function n(t,i,l,s,n,a,r){return o(e(t=o(t,o(o(function(t,e,o){return e^(t|~o)}(i,l,s),n),r)),a),i)}function a(t){var e,o="",i="";for(e=0;e<=3;e++)o+=(i="0"+(t>>>8*e&255).toString(16)).substr(i.length-2,2);return o}var r,p,u,h,g,c,y,P,d,S=Array();for(S=function(t){for(var e,o=t.length,i=o+8,l=16*((i-i%64)/64+1),s=Array(l-1),n=0,a=0;a>>29,s}(t=function(t){t=t.replace("/\r\n/g","\n");for(var e="",o=0;o127&&i<2048?(e+=String.fromCharCode(i>>6|192),e+=String.fromCharCode(63&i|128)):(e+=String.fromCharCode(i>>12|224),e+=String.fromCharCode(i>>6&63|128),e+=String.fromCharCode(63&i|128))}return e}(t)),c=1732584193,y=4023233417,P=2562383102,d=271733878,r=0;r0?p+=this.options.fontShadowOffsetX:a+=this.options.fontShadowOffsetX,this.options.fontShadowOffsetY>0?u+=this.options.fontShadowOffsetY:r+=this.options.fontShadowOffsetY),this._eventParents)if(this._eventParents[g].symbolType===SuperMap.Plot.SymbolType.TEXTSYMBOL&&0===this.options.fontPercent&&0===this.options.fontPercent){var c=p-a,y=(c+this.options.fontSpace*(this.options.text.length-1))*this.options.fontPercent/100-c;switch(h){case"lt":case"lm":case"lb":p+=y;break;case"rt":case"rm":case"rb":a-=y;break;case"ct":case"cm":case"cb":a-=y/2,p+=y/2}}var P=new L.Bounds;if(this.options.labelRotation&&0!==this.options.labelRotation){var d=[];d.push(L.point(a,r)),d.push(L.point(a,u)),d.push(L.point(p,r)),d.push(L.point(p,u));var S=this.options.labelRotation*(Math.PI/180);for(let t=0;t9?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 o=0;othis.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 o=t.dotSymbolSize/e;this.symbolSize.w=o*this.symbolSizeInLib.w,this.symbolSize.h=o*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.layer.removeFeatures(this)},toGeoJsonStr:function(){return this.getSymbolData(),SuperMap.Plot.PlottingUtil.toJSON(this.symbolData)}});L.supermap.plotting.PlottingObject=gt,gt.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},L.supermap.plotting.PlottingObject.createSymbol=function(t,e,o,i,l,s){i||(i={}),i.custom=s;var n=null;if(i&&i.symbolData&&i.symbolData.textStyle2D&&void 0===i.symbolData.textStyle2D.sizeFixed&&(i.symbolData.textStyle2D.sizeFixed=!0),null==o||SuperMap.Util.isArray(o)||(o=[o]),0===t)switch(e){case SuperMap.Plot.SymbolType.ARCREGION:n=L.supermap.plotting.arcRegion(t,e,o,i);break;case SuperMap.Plot.SymbolType.MISSILEROUTE:n=L.supermap.plotting.missileRoute(t,e,o,i);break;case SuperMap.Plot.SymbolType.NAVYROUTE:n=L.supermap.plotting.navyRoute(t,e,o,i);break;case SuperMap.Plot.SymbolType.AIRROUTE:n=L.supermap.plotting.airRoute(t,e,o,i);break;case SuperMap.Plot.SymbolType.LITERATESIGN:n=L.supermap.plotting.literateSign(t,e,o,i);break;case SuperMap.Plot.SymbolType.ROUTENODE:n=L.supermap.plotting.routeNode(t,e,o,i);break;case SuperMap.Plot.SymbolType.PATHTEXT:n=L.supermap.plotting.pathText(t,e,o,i);break;case SuperMap.Plot.SymbolType.LINERELATION:n=L.supermap.plotting.lineRelation(t,e,o,i);break;case SuperMap.Plot.SymbolType.GROUPOBJECT:n=L.supermap.plotting.groupObject(t,e,o,i);break;case SuperMap.Plot.SymbolType.INTERFERENCEBEAM:n=L.supermap.plotting.interferenceBeam(t,e,o,i);break;case SuperMap.Plot.SymbolType.SATELLITE:n=L.supermap.plotting.satellite(t,e,o,i);break;case SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS:n=L.supermap.plotting.satelliteTimeWindows(t,e,o,i);break;case SuperMap.Plot.SymbolType.SYMBOLTEXT:n=L.supermap.plotting.symbolText(t,e,o,i);break;case SuperMap.Plot.SymbolType.SYMBOLTEXT1:n=L.supermap.plotting.symbolText1(t,e,o,i);break;case SuperMap.Plot.SymbolType.FLAGGROUP:n=L.supermap.plotting.flagGroup(t,e,o,i);break;case SuperMap.Plot.SymbolType.NAVYDEPLOYMENT:n=L.supermap.plotting.navyDeployment(t,e,o,i);break;case SuperMap.Plot.SymbolType.AIRDEPLOYMENT:n=L.supermap.plotting.airDeployment(t,e,o,i);break;case SuperMap.Plot.SymbolType.AVOIDREGION:return L.supermap.plotting.avoidRegion(t,e,o,i);case SuperMap.Plot.SymbolType.PICTURE:n=L.supermap.plotting.picture(t,e,o,i);break;default:n=L.supermap.plotting.algoSymbol(t,e,o,i)}else n=i.symbolData&&i.symbolData.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL?L.supermap.plotting.dotSymbol(t,e,o,i):L.supermap.plotting.algoSymbol(t,e,o,i);var a=L.supermap.plotting.getControl().getDefaultStyle();return SuperMap.Plot.AnalysisSymbol.mergeDefaultStyleToFeature(n,a,!0),l&&SuperMap.Util.extend(n.style,l),null!=o&&o.length>0&&(o.length>n.maxEditPts&&(o=o.slice(0,n.maxEditPts)),n.latLngs=L.Util.cloneLatLngs(o)),n};var ct=gt.extend({subObjects:[],initialize:function(t,e,o,i){this.subObjects=[],this.symbolName="组合对象",this.libID=0,this.code=SuperMap.Plot.SymbolType.GROUPOBJECT,this.symbolType=SuperMap.Plot.SymbolType.GROUPOBJECT,gt.prototype.initialize.call(this,t,e,o,i)},_addComponents:function(t){gt.prototype._addComponents.call(this,t),t.layer=this.layer,t.isEdit=!0,ft&&(t.dragging||(t.dragging=new ft(t))),null===t.fromZoom&&(t.fromZoom=this._map.getZoom()),this._map&&this._map.getPlotEditControl()&&t.enableEdit&&this._map.getPlotEditControl().enableEditFeatures(t)},_clearComponents:function(){this._map&&this._map.getPlotEditControl()&&this._map.getPlotEditControl().disableEditFeatures(this.components),gt.prototype._clearComponents.call(this)},_reView:function(){for(var t in this.components)this.components[t]._reView();this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)},move:function(t,e){for(var o in this.subObjects)this.subObjects[o].move(t,e);this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)},redraw:function(){if("none"===this.style.display||null!=this.layer&&"function"==typeof this.layer.getVisibility&&!1===this.layer.getVisibility())this._clearComponents();else if(0!==this.subObjects.length&&0===this.components.length)for(var t=0,e=this.subObjects.length;t=1?t.touches[0]:t,o=this._plottingObject._map.mouseEventToLatLng(e);if("touchmove"===t.type&&!this._plottingObject._dragMoved){var i=this._plottingObject._map.latLngToLayerPoint(this._dragStartPoint),l=this._plottingObject._map.mouseEventToContainerPoint(e);if(i.distanceTo(l)<=this._plottingObject._map.options.tapTolerance)return}var s=o.lat,n=o.lng,a=s-this._startPoint.lat,r=n-this._startPoint.lng;(a||r)&&(this._plottingObject._dragMoved||(this._plottingObject._dragMoved=!0,this._plottingObject.fire("dragstart",t)),this._startPoint.lat=s,this._startPoint.lng=n,this._plottingObject.fire("predrag",t),t.dLat=a,t.dLng=r,this._plottingObject.fire("drag",t))},_onDragEnd:function(t){var e=this._plottingObject._map.mouseEventToLatLng(t),o=this.moved();if(o&&L.DomEvent.stop(t),L.DomEvent.off(document,"mousemove touchmove",this._onDrag,this),L.DomEvent.off(document,"mouseup touchend",this._onDragEnd,this),o){this._plottingObject.fire("dragend",{distance:St(this._dragStartPoint,e)});var i=this._plottingObject._containsPoint;this._plottingObject._containsPoint=L.Util.falseFn,L.Util.requestAnimFrame(function(){L.DomEvent.skipped({type:"click"}),this._plottingObject._containsPoint=i},this)}this._startPoint=null,this._dragStartPoint=null,this._plottingObject._dragMoved=!1,this._mapDraggingWasEnabled&&(o&&L.DomEvent.fakeStop({type:"click"}),this._plottingObject._map.dragging.enable()),o&&(this._plottingObject.moveend=!0)},_dragStart:function(t){this._startPoint=t.target._latlng.clone(),this._dragStartPoint=t.target._latlng.clone(),this._plottingObject._dragMoved=!1},_drag:function(t){var e=t.target._latlng,o=e.lat,i=e.lng,l=o-this._startPoint.lat,s=i-this._startPoint.lng;(l||s)&&(this._plottingObject._dragMoved||(this._plottingObject._dragMoved=!0,this._plottingObject.fire("dragstart",t)),this._startPoint.lat=o,this._startPoint.lng=i,this._plottingObject.fire("predrag",t),t.dLat=l,t.dLng=s,this._plottingObject.fire("drag",t))},_dragEnd:function(t){var e=t.target._latlng,o=this.moved();if(o){this._plottingObject.fire("dragend",{distance:St(this._dragStartPoint,e)});var i=this._plottingObject._containsPoint;this._plottingObject._containsPoint=L.Util.falseFn,L.Util.requestAnimFrame(function(){L.DomEvent.skipped({type:"click"}),this._plottingObject._containsPoint=i},this)}this._startPoint=null,this._dragStartPoint=null,this._plottingObject._dragMoved=!1,o&&(this._plottingObject.moveend=!0)},_addToMapAndBindMarker:function(t){t.addTo(this._plottingObject._map),t.on("dragstart",this._dragStart,this),t.on("drag",this._drag,this),t.on("dragend",this._dragEnd,this),t.dragging.enable()},_unbindMarkerEvents:function(t){t.off("dragstart",this._dragStart,this),t.off("drag",this._drag,this),t.off("dragend",this._dragEnd,this),t.dragging.disable()},_onResetEditMarkersValues:function(){let t=this._plottingObject.getBounds();this.moveMarker._latlng=t.getCenter(),this.moveMarker.update()}}),mt=gt.extend({surroundLineType:null,scaleByMap:null,latLngs:[],initialize:function(t,e,o,i){this.geoSymbolTexts=[],this.subAssociatedUuids=[],this.latLngs=o||[],gt.prototype.initialize.call(this,t,e,o,i),null===this.surroundLineType&&(this.surroundLineType=SuperMap.Plot.AlgoSurroundLineType.NONE)},destroy:function(){gt.prototype.destroy.call(this),this.surroundLineType=null,this.scaleByMap=null,this.latLngs=[]},setLatLngs:function(t){return this.latLngs=t,this.redraw()},getLatLngs:function(){return this.latLngs},addLatLng:function(t){if(this.latLngs[this.latLngs.length-1].lat!==t.lat||this.latLngs[this.latLngs.length-1].lng!==t.lng)return this.latLngs.push(t),this.redraw()},setScaleByMap:function(t){this.scaleByMap=t},getScaleByMap:function(){return this.scaleByMap},getSurroundLineType:function(){return this.surroundLineType},setSurroundLineType:function(){},_resizeLatLngs:function(t,e,o,i){if(this.symbolType!==SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS){var l=this._resizeBounds(t,e,o);if(!(SuperMap.Plot.PlottingUtil.equalFuzzy(l.getWest(),l.getEast())&&SuperMap.Plot.PlottingUtil.equalFuzzy(l.getNorth(),l.getSouth())||SuperMap.Plot.PlottingUtil.equalFuzzy(o.getWest(),o.getEast())&&SuperMap.Plot.PlottingUtil.equalFuzzy(o.getNorth(),o.getSouth()))){var s=SuperMap.Plot.PlottingUtil.equalFuzzy(o.getWest(),o.getEast())?0:(l.getEast()-l.getWest())/(o.getEast()-o.getWest()),n=SuperMap.Plot.PlottingUtil.equalFuzzy(o.getNorth(),o.getSouth())?0:(l.getNorth()-l.getSouth())/(o.getNorth()-o.getSouth()),a=L.latLng((o.getNorth()+o.getSouth())/2,(o.getWest()+o.getEast())/2),r=L.latLng((l.getNorth()+l.getSouth())/2,(l.getWest()+l.getEast())/2);if(this.symbolType===SuperMap.Plot.SymbolType.ANNOFRAMESYMBOL||this.symbolType===SuperMap.Plot.SymbolType.ANNOFRAMESYMBOLM||this.symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXTBOX||this.symbolType===SuperMap.Plot.SymbolType.LINEMARKING)this.latLngs[0].lng=r.lng+(i[0].lng-a.lng)*s,this.latLngs[0].lat=r.lat+(i[0].lat-a.lat)*n,this.latLngs[1].lng=r.lng+(i[1].lng-a.lng)*s,this.latLngs[1].lat=r.lat+(i[1].lat-a.lat)*n;else if(this.symbolType===SuperMap.Plot.SymbolType.CONCENTRICCIRCLE)if(2===e||4===e||5===e||7===e){1===s&&(s=0),1===n&&(n=0);let t=Math.sqrt(s*s+n*n),e=L.Util.latLngsToSuperMapPoints(i);for(let o=1;oo?(this.symbolData.localePoints[o].x=this.getLatLngs()[o].lng,this.symbolData.localePoints[o].y=this.getLatLngs()[o].lat):this.symbolData.localePoints.push({x:this.getLatLngs()[o].lng,y:this.getLatLngs()[o].lat,z:0})}},_parseSymbolData:function(){if(gt.prototype._parseSymbolData.call(this),null!==this.symbolData&&(this.style=SuperMap.Plot.AnalysisSymbol.getStyle(this.symbolData,!0),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;t=2&&new SuperMap.Plot.CalculateCanvasGradient(this,this.components[t].getBounds()).createFillMode(this.components[t].options):this._computeGradientInCanvas(this.components[t],this.components[t].options,this.style))},_rotate:function(t,e){for(var o in this.components)this.components[o]instanceof mt?this.components[o]._rotate(t,e):(this.components[o]instanceof et&&(this.components[o].options.rotation+=-t),this.components[o]instanceof tt&&(this.components[o].options.labelRotation?(this.components[o].options.labelRotation+=-t,this.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL&&0===this.components[o].options.labelRotation&&(this.components[o].options.labelRotation=360)):this.components[o].options.labelRotation=-t),L.Util.rotateLatLngs(this.components[o].getLatLngs(),e,t),this.components[o].setLatLngs(this.components[o].getLatLngs()));L.Util.rotateLatLngs(this.getLatLngs(),e,t)},_move:function(t,e){if(null!=this.graphic&&null!=this.graphic.layer&&!0===this.graphic.layer.getVisibility())L.Util.moveLatLngs(this.getLatLngs(),t,e),this.graphic.update();else if(null!=this.layer&&(null==this.layer.getVisibility||!0===this.layer.getVisibility())){for(var o=0,i=this.components.length;o0){for(let t in this.radius)this.scaleValues[t]=this.radius[t];delete this.radius}}else 0===this.libID&&this.symbolType===SuperMap.Plot.SymbolType.CONCENTRICCIRCLE?(null!==this.startAngle&&void 0!==this.startAngle&&(this.scaleValues[0]=this.startAngle,delete this.startAngle),null!==this.endAngle&&void 0!==this.endAngle&&(this.scaleValues[1]=this.endAngle,delete this.endAngle)):0===this.libID&&this.symbolType===SuperMap.Plot.SymbolType.POLYGONREGION&&(this.annotationPosition>this.getLatLngs()?this.scaleValues[1]=0:null==this.scaleValues[1]&&(this.scaleValues[1]=this.annotationPosition));SuperMap.Plot.AlgoSymbolFactory.isAccessServer(this.libID,this.code)||(this.minEditPts=SuperMap.Plot.AlgoSymbolFactory.getMinEditPts(this.libID,this.code),this.maxEditPts=SuperMap.Plot.AlgoSymbolFactory.getMaxEditPts(this.libID,this.code),0===this.subSymbols.length&&(this.subSymbols=SuperMap.Plot.AlgoSymbolFactory.getDefaultSubSymbols(this.libID,this.code)),null!==this.style&&!1===this.isEdit&&(this.style=SuperMap.Plot.PlottingUtil.copyAttributes(this.style,SuperMap.Plot.AlgoSymbolFactory.getDefaultStyle(this.libID,this.code))),this.controlPoints=L.Util.latLngsToSuperMapPoints(this.latLngs),this.superMapAlgoSymbol=SuperMap.Plot.AlgoSymbolFactory.getAlgoSymbol(this),this.scaleValues=this.superMapAlgoSymbol.scaleValues,0!==this.libID||this.symbolType!==SuperMap.Plot.SymbolType.SYMBOLTEXTBOX&&this.symbolType!==SuperMap.Plot.SymbolType.LINEMARKING||(this.textBoxType=this.superMapAlgoSymbol.textBoxType),delete this.controlPoints),this._setBasicSymbolName(),!0===this._isSupportAddAnnotation()&&(this.style.sizeFixed=!1)},onAdd:function(t){this.superMapAlgoSymbol&&(this.superMapAlgoSymbol.map=t._map),mt.prototype.onAdd.call(this,t)},getTextContent:function(){return this.textContent},getArrowHeadType:function(){return this.arrowHeadType},setArrowHeadType:function(t){1016===this.code&&this.arrowHeadType!==t&&(this.arrowHeadType=t,this.redraw())},getArrowTailType:function(){return this.arrowTailType},setArrowTailType:function(t){1016===this.code&&this.arrowTailType!==t&&(this.arrowTailType=t,this.redraw())},getArrowBodyType:function(){return this.arrowBodyType},setArrowBodyType:function(t){1016===this.code&&this.arrowBodyType!==t&&(this.arrowBodyType=t,this.redraw())},setRotate:function(t){this.dRotate+=t,0!==this.textContent.length&&(void 0===this.style.labelRotation?this.style.labelRotation=-t:this.style.labelRotation+=-t),null===this.anchorPoint&&this.symbolType!==SuperMap.Plot.SymbolType.TEXTSYMBOL&&this.symbolType!==SuperMap.Plot.SymbolType.CONCENTRICCIRCLE?this.anchorPoint=this.getBounds().getCenter():null===this.anchorPoint&&(this.anchorPoint=L.latLng(this.latLngs[0].lat,this.latLngs[0].lng)),this._rotate(t,this.anchorPoint);for(var e=0,o=this.avoidRegions.length;ee?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(){"none"===this.style.display||null!=this.layer&&"function"==typeof this.layer.getVisibility&&!1===this.layer.getVisibility()||(this.textContent&&""!==this.textContent&&"???"!==this.textContent||this.symbolType!==SuperMap.Plot.SymbolType.TEXTSYMBOL||(this.textContent="请输入文本"),0!==this.textContent.length&&this.dRotate!==this.style.labelRotation&&(this.style.labelRotation=-this.dRotate),this.superMapAlgoSymbol&&0!==this.getLatLngs().length?(this.superMapCalculateParts(),this._setBasicSymbolText()):!this.superMapAlgoSymbol&&this.getLatLngs().length>=this.minEditPts&&(this._calAccessServerSymbol(),this._setBasicSymbolText()))},_calAccessServerSymbol:function(){for(var t=SuperMap.Plot.AnalysisSymbol.analysisSymbolCells(this.symbolData,!0),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;if(this.prevStrokeWidth=this.style.weight,(34===this.symbolType||!0===this._isSupportAddAnnotation())&&!1===this.style.sizeFixed||34!==this.symbolType&&!1===this._isSupportAddAnnotation())for(var r in this.textContent.length>0&&(this.style.fontSize*=e),this.components)this.components[r]instanceof tt&&(this.components[r].options.fontSize*=e);22!==this.libID||1012!==this.code&&1013!==this.code&&1014!==this.code&&1015!==this.code||this.dScale>=1&&this.redraw(),this.layer._map.getRenderer(this.layer)instanceof L.Canvas&&this._updateCanvasFills(),this._updateSymbolTexts(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)}this.fromZoom=this._map.getZoom(),(1===this.surroundLineType||2===this.surroundLineType||SuperMap.Plot.AlgoSymbolFactory.zoomCalSymbol(this.libID,this.code))&&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 o in this.components)this.components[o].options.labelRotation=this.style.labelRotation,this.components[o].redraw();if(L.Util.rotateLatLngs(this.getLatLngs(),e,t),L.Util.rotateLatLngs(this.scalePoints,e,t),this.symbolType!==SuperMap.Plot.SymbolType.CONCENTRICCIRCLE||SuperMap.Plot.PlottingUtil.equalFuzzy(Math.abs(this.scaleValues[0]-this.scaleValues[1]),360)||(this.scaleValues[0]+=t,this.scaleValues[1]+=t),SuperMap.Plot.AlgoSymbolFactory.isAccessServer(this.libID,this.code)){var i=new SuperMap.GetSymbolInfoParameters;i.libID=this.libID,i.code=this.code,i.inputPoints=L.Util.latLngsToSuperMapPoints(this.getLatLngs()),i.scaleValues=this.scaleValues,i.subSymbols=this.subSymbols,L.supermap.symbolInfoService(this.serverUrl).getSymbolInfo(i,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 this.superMapAlgoSymbol;this.redraw(),this._updateSymbolTexts()},_resize:function(t,e){mt.prototype._resize.call(this,t,e);var o=new SuperMapAlgoPlot.Point(e.lng,e.lat);if(this.superMapAlgoSymbol){for(let e=0;ethis.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(o/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 i;!0===this.limitWidthHeight?i=this.middleMarkBounds.scale(this.dScale*this.initialScale.x,this.anchorPoint):this._widthHeightLimitScale();var l=96*i.getWidth()/25.4/10,s=96*i.getHeight()/25.4/10;this.components[this._annotationId].options.graphicWidth=l,this.components[this._annotationId].options.graphicHeight=s}for(var n in this.components)n===this._annotationId&&this.components[n]instanceof tt?this.components[n].options.fontSize=this.style.fontSize:n!==this._annotationId&&this.components[n]instanceof tt?this.components[n].options.fontSize=t*(this.components[n].options.fontSize/this.prevScale/this.initialScale.x):n!==this._annotationId&&!0!==this.components[n].isLeadLine&&(this.components[n].options.weight=this.style.weight);for(var a=0;a45&&l<135||l>225&&l<315){let o=L.point(n.x-this.style.weight/2,n.y),i=L.point(n.x+this.style.weight/2,n.y);t=this._map.layerPointToLatLng(o),e=this._map.layerPointToLatLng(i)}else{let o=L.point(n.x,n.y-this.style.weight/2),i=L.point(n.x,n.y+this.style.weight/2);t=this._map.layerPointToLatLng(o),e=this._map.layerPointToLatLng(i)}let r=[this.getLatLngs()[0],t,e];this._createAndDrawLayer(32,r,{surroundLineFlag:!1,lineWidthLimit:!0,weight:0,fillLimit:!0,fill:!0}).isLeadLine=!0}},_handleAnnotation:function(t){if(null!=this._annotationId&&-1!==this._annotationId&&(null!=this.components[this._annotationId]._renderer&&(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),!1!==this.textDisplay&&(this.textContent=SuperMap.Plot.PlottingUtil.trim(this.textContent),null==t&&(t=this.getBounds()),t.isValid()&&this.textContent&&null!==this.textContent&&0!==this.textContent.length&&null!==t&&t.isValid())){var e={};SuperMap.Plot.PlottingUtil.cloneObject(this.style);var o=this.space*this.dScale,i=null;if(0===this.annotationPosition){e.labelAlign="rb";let l=L.latLng(t.getNorth(),t.getWest()),s=this._map.latLngToLayerPoint(l);s.x-=o,i=this._map.layerPointToLatLng(s)}else if(1===this.annotationPosition){e.labelAlign="rt";let l=L.latLng(t.getSouth(),t.getWest()),s=this._map.latLngToLayerPoint(l);s.x-=o,i=this._map.layerPointToLatLng(s)}else if(2===this.annotationPosition){e.labelAlign="lb";let l=L.latLng(t.getNorth(),t.getEast()),s=this._map.latLngToLayerPoint(l);s.x+=o,i=this._map.layerPointToLatLng(s)}else if(3===this.annotationPosition){e.labelAlign="lt";let l=L.latLng(t.getSouth(),t.getEast()),s=this._map.latLngToLayerPoint(l);s.x+=o,i=this._map.layerPointToLatLng(s)}else if(4===this.annotationPosition){e.labelAlign="cb";let l=L.latLng(t.getNorth(),(t.getWest()+t.getEast())/2),s=this._map.latLngToLayerPoint(l);s.y-=o,i=this._map.layerPointToLatLng(s)}else if(5===this.annotationPosition){e.labelAlign="ct";let l=L.latLng(t.getSouth(),(t.getWest()+t.getEast())/2),s=this._map.latLngToLayerPoint(l);s.y+=o,i=this._map.layerPointToLatLng(s)}else if(6===this.annotationPosition){e.labelAlign="rm";let l=L.latLng((t.getSouth()+t.getNorth())/2,t.getWest()),s=this._map.latLngToLayerPoint(l);s.x-=o,i=this._map.layerPointToLatLng(s)}else if(7===this.annotationPosition){e.labelAlign="lm";let l=L.latLng((t.getSouth()+t.getNorth())/2,t.getEast()),s=this._map.latLngToLayerPoint(l);s.x+=o,i=this._map.layerPointToLatLng(s)}else if(8===this.annotationPosition&&this.symbolData.middleMarkExist){var l;l=!0===this.limitWidthHeight?this.middleMarkBounds.scale(this.dScale*this.initialScale.x,this.anchorPoint):this._widthHeightLimitScale();var s=new SuperMap.Geometry.Point((l.left+l.right)/2,(l.top+l.bottom)/2);if(this.negativeImage){var n=SuperMap.Plot.PlottingUtil.projectPoint(s,new SuperMap.Geometry.Point(this.anchorPoint.x,100),new SuperMap.Geometry.Point(this.anchorPoint.x,this.anchorPoint.y));SuperMap.Plot.PlottingUtil.rotateAngle(n,Math.PI,s)}s.x-=this.anchorPoint.x,s.y-=this.anchorPoint.y;var a=this.dRotate*(Math.PI/180);SuperMap.Plot.PlottingUtil.rotateAngle(new SuperMap.Geometry.Point(0,0),a,s);var r=this._map.latLngToLayerPoint(this.getLatLngs()[0]);!0===this.positionOffset&&(r.x+=this.positionOffsetX*this.dScale,r.y+=this.positionOffsetY*this.dScale);var p=96*l.getWidth()/25.4/10,u=96*l.getHeight()/25.4/10;e.graphicWidth=p,e.graphicHeight=u,i=this._transitionPoint(s,r)}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 h={externalGraphic:e.externalGraphic,graphicWidth:e.graphicWidth,graphicHeight:e.graphicHeight,rotation:-this.dRotate};let t=L.supermap.plotting.pointImage([i],h);this._annotationId=this.components.length,t.fromZoom=this._map.getZoom(),this._addComponents(t)}else if(8!==this.annotationPosition){if(!1===this.limitWidthHeight)var g=this.initialScale.xr&&(r=h)}p=parseInt(s.style.fontSize*a)+2*s.paddingY}let d,S,f=L.point(0,0),m=L.point(0,0);switch(s.textPosition){case SuperMap.Plot.AnnoPosition.LEFTTOP:s.style.labelAlign="rb",d=L.latLng(t.getNorth(),t.getWest()),(S=this._map.latLngToLayerPoint(d)).x+=s.offsetX,S.y+=s.offsetY,!0===s.border&&(f.x=S.x,f.y=S.y,m.x=S.x-r,m.y=S.y-p);break;case SuperMap.Plot.AnnoPosition.LEFTBOTTOM:s.style.labelAlign="rt",d=L.latLng(t.getSouth(),t.getWest()),(S=this._map.latLngToLayerPoint(d)).x+=s.offsetX,S.y+=s.offsetY,!0===s.border&&(f.x=S.x,f.y=S.y,m.x=S.x-r,m.y=S.y+p);break;case SuperMap.Plot.AnnoPosition.RIGHTTOP:s.style.labelAlign="lb",d=L.latLng(t.getNorth(),t.getEast()),(S=this._map.latLngToLayerPoint(d)).x+=s.offsetX,S.y+=s.offsetY,!0===s.border&&(f.x=S.x,f.y=S.y,m.x=S.x+r,m.y=S.y-p);break;case SuperMap.Plot.AnnoPosition.RIGHTBOTTOM:s.style.labelAlign="lt",d=L.latLng(t.getSouth(),t.getEast()),(S=this._map.latLngToLayerPoint(d)).x+=s.offsetX,S.y+=s.offsetY,!0===s.border&&(f.x=S.x,f.y=S.y,m.x=S.x+r,m.y=S.y+p);break;case SuperMap.Plot.AnnoPosition.TOP:s.style.labelAlign="cb",d=L.latLng(t.getNorth(),(t.getWest()+t.getEast())/2),(S=this._map.latLngToLayerPoint(d)).x+=s.offsetX,S.y+=s.offsetY,!0===s.border&&(f.x=S.x-r/2,f.y=S.y,m.x=S.x+r/2,m.y=S.y-p);break;case SuperMap.Plot.AnnoPosition.BOTTOM:s.style.labelAlign="ct",d=L.latLng(t.getSouth(),(t.getWest()+t.getEast())/2),(S=this._map.latLngToLayerPoint(d)).x+=s.offsetX,S.y+=s.offsetY,!0===s.border&&(f.x=S.x-r/2,f.y=S.y,m.x=S.x+r/2,m.y=S.y+p);break;case SuperMap.Plot.AnnoPosition.LEFT:s.style.labelAlign="rm",d=L.latLng((t.getSouth()+t.getNorth())/2,t.getWest()),(S=this._map.latLngToLayerPoint(d)).x+=s.offsetX,S.y+=s.offsetY,!0===s.border&&(f.x=S.x,f.y=S.y+p/2,m.x=S.x-r,m.y=S.y-p/2);break;case SuperMap.Plot.AnnoPosition.RIGHT:s.style.labelAlign="lm",d=L.latLng((t.getSouth()+t.getNorth())/2,t.getEast()),(S=this._map.latLngToLayerPoint(d)).x+=s.offsetX,S.y+=s.offsetY,!0===s.border&&(f.x=S.x,f.y=S.y+p/2,m.x=S.x+r,m.y=S.y-p/2);break;case SuperMap.Plot.AnnoPosition.ANCHOR:s.style.labelAlign="lm",d=L.latLng(e.lat,e.lng),(S=this._map.latLngToLayerPoint(d)).x+=s.offsetX,S.y+=s.offsetY,s.offsetX>0?(s.style.labelAlign="lm",!0===s.border&&(f.x=S.x,f.y=S.y+p/2,m.x=S.x+r,m.y=S.y-p/2)):(s.style.labelAlign="rm",!0===s.border&&(f.x=S.x,f.y=S.y+p/2,m.x=S.x-r,m.y=S.y-p/2))}var g=this._map.layerPointToLatLng(S);if(!0===s.showRelationLine&&(0!==s.offsetX||0!==s.offsetY)){let t=s.lineStyle;null==s.lineStyle&&(t=SuperMap.Util.copyAttributes(t,this.style)),t.lineColorLimit=!0,t.lineTypeLimit=!0,t.lineWidthLimit=!0;let e=this._createAndDrawLayer(SuperMap.Plot.SymbolType.POLYLINESYMBOL,[g,d],t);e.isSymbolText=!0,e.fromZoom=this._map.getZoom(),l.push(e)}var c=SuperMap.Util.copyAttributes(o,s.style);if(s.border){var y=this._map.layerPointToLatLng(f),P=this._map.layerPointToLatLng(m);let t=this._createAndDrawLayer(SuperMap.Plot.SymbolType.RECTANGLESYMBOL,[y,P],SuperMap.Util.cloneObject(c));t.isSymbolText=!0,t.fromZoom=this._map.getZoom(),l.push(t);let e=f.xthis.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 o=t.dotSymbolSize/e;this.symbolSize.w=o*this.symbolSizeInLib.w,this.symbolSize.h=o*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 i=this.symbolSize.w/this.dScale/this.symbolSizeInLib.w,l=this.symbolSize.h/this.dScale/this.symbolSizeInLib.h;this.initialScale!==i?this.initialScale=i:this.initialScale!==l&&(this.initialScale=l),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,n=this.symbolSize.w;this.symbolSizeInLib.wr&&(r=h)}p=parseInt(s.style.fontSize*a)+2*s.paddingY}let d,S,f=L.point(0,0),m=L.point(0,0);switch(s.textPosition){case SuperMap.Plot.AnnoPosition.LEFTTOP:s.style.labelAlign="rb",d=L.latLng(t.getNorth(),t.getWest()),(S=this._map.latLngToLayerPoint(d)).x+=s.offsetX,S.y+=s.offsetY,!0===s.border&&(f.x=S.x,f.y=S.y,m.x=S.x-r,m.y=S.y-p);break;case SuperMap.Plot.AnnoPosition.LEFTBOTTOM:s.style.labelAlign="rt",d=L.latLng(t.getSouth(),t.getWest()),(S=this._map.latLngToLayerPoint(d)).x+=s.offsetX,S.y+=s.offsetY,!0===s.border&&(f.x=S.x,f.y=S.y,m.x=S.x-r,m.y=S.y+p);break;case SuperMap.Plot.AnnoPosition.RIGHTTOP:s.style.labelAlign="lb",d=L.latLng(t.getNorth(),t.getEast()),(S=this._map.latLngToLayerPoint(d)).x+=s.offsetX,S.y+=s.offsetY,!0===s.border&&(f.x=S.x,f.y=S.y,m.x=S.x+r,m.y=S.y-p);break;case SuperMap.Plot.AnnoPosition.RIGHTBOTTOM:s.style.labelAlign="lt",d=L.latLng(t.getSouth(),t.getEast()),(S=this._map.latLngToLayerPoint(d)).x+=s.offsetX,S.y+=s.offsetY,!0===s.border&&(f.x=S.x,f.y=S.y,m.x=S.x+r,m.y=S.y+p);break;case SuperMap.Plot.AnnoPosition.TOP:s.style.labelAlign="cb",d=L.latLng(t.getNorth(),(t.getWest()+t.getEast())/2),(S=this._map.latLngToLayerPoint(d)).x+=s.offsetX,S.y+=s.offsetY,!0===s.border&&(f.x=S.x-r/2,f.y=S.y,m.x=S.x+r/2,m.y=S.y-p);break;case SuperMap.Plot.AnnoPosition.BOTTOM:s.style.labelAlign="ct",d=L.latLng(t.getSouth(),(t.getWest()+t.getEast())/2),(S=this._map.latLngToLayerPoint(d)).x+=s.offsetX,S.y+=s.offsetY,!0===s.border&&(f.x=S.x-r/2,f.y=S.y,m.x=S.x+r/2,m.y=S.y+p);break;case SuperMap.Plot.AnnoPosition.LEFT:s.style.labelAlign="rm",d=L.latLng((t.getSouth()+t.getNorth())/2,t.getWest()),(S=this._map.latLngToLayerPoint(d)).x+=s.offsetX,S.y+=s.offsetY,!0===s.border&&(f.x=S.x,f.y=S.y+p/2,m.x=S.x-r,m.y=S.y-p/2);break;case SuperMap.Plot.AnnoPosition.RIGHT:s.style.labelAlign="lm",d=L.latLng((t.getSouth()+t.getNorth())/2,t.getEast()),(S=this._map.latLngToLayerPoint(d)).x+=s.offsetX,S.y+=s.offsetY,!0===s.border&&(f.x=S.x,f.y=S.y+p/2,m.x=S.x+r,m.y=S.y-p/2);break;case SuperMap.Plot.AnnoPosition.ANCHOR:s.style.labelAlign="lm",d=L.latLng(e.lat,e.lng),(S=this._map.latLngToLayerPoint(d)).x+=s.offsetX,S.y+=s.offsetY,s.offsetX>0?(s.style.labelAlign="lm",!0===s.border&&(f.x=S.x,f.y=S.y+p/2,m.x=S.x+r,m.y=S.y-p/2)):(s.style.labelAlign="rm",!0===s.border&&(f.x=S.x,f.y=S.y+p/2,m.x=S.x-r,m.y=S.y-p/2))}var g=this._map.layerPointToLatLng(S);if(!0===s.showRelationLine&&(0!==s.offsetX||0!==s.offsetY)){let t=s.lineStyle;null==s.lineStyle&&(t=SuperMap.Util.copyAttributes(t,this.style)),t.lineColorLimit=!0,t.lineTypeLimit=!0,t.lineWidthLimit=!0;let e=this._createAndDrawLayer(SuperMap.Plot.SymbolType.POLYLINESYMBOL,[g,d],t);e.isSymbolText=!0,e.fromZoom=this._map.getZoom(),l.push(e)}var c=SuperMap.Util.copyAttributes(o,s.style);if(s.border){var y=this._map.layerPointToLatLng(f),P=this._map.layerPointToLatLng(m);let t=this._createAndDrawLayer(SuperMap.Plot.SymbolType.RECTANGLESYMBOL,[y,P],SuperMap.Util.cloneObject(c));t.isSymbolText=!0,t.fromZoom=this._map.getZoom(),l.push(t);let e=f.x1&&(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,o,i){this.scalePoints=[],this.scaleValues=[],mt.prototype.initialize.call(this,t,e,o,i),this.libID=0,this.code=SuperMap.Plot.SymbolType.ARCREGION,this.symbolType=SuperMap.Plot.SymbolType.ARCREGION,this.symbolName="扇形区域",this.minEditPts=2,this.maxEditPts=3,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.NONE),void 0!==i.constantSize&&null!==i.constantSize||!1!==this.isEdit||(this.constantSize=!0),this.subSymbolDefaultPixelSize=15,0===this.scaleValues.length&&this.scaleValues.push(.1)},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,Lt.prototype.destroy.call(this)},_calculateParts:function(){if(this.scalePoints=[],this.isEdit?1===this.latLngs.length&&this.centerPoint!==this.latLngs[0]&&(this.centerPoint=this.latLngs[0]):(2===this.latLngs.length&&(this.centerPoint=this.latLngs[0],this.radius=SuperMap.Plot.PlottingUtil.distVincenty(this.latLngs[0],this.latLngs[1])),3===this.latLngs.length&&(this.startAngle=180*SuperMap.Plot.PlottingUtil.radian(new SuperMap.Geometry.Point(this.latLngs[0].lng,this.latLngs[0].lat),new SuperMap.Geometry.Point(this.latLngs[1].lng,this.latLngs[1].lat))/Math.PI,this.endAngle=180*SuperMap.Plot.PlottingUtil.radian(new SuperMap.Geometry.Point(this.latLngs[0].lng,this.latLngs[0].lat),new SuperMap.Geometry.Point(this.latLngs[2].lng,this.latLngs[2].lat))/Math.PI)),this.centerPoint&&null!==this.centerPoint&&this.radius&&null!==this.radius){this.startAngle%=360,this.endAngle%=360,this.startAngle>this.endAngle&&(this.endAngle+=360);var t=SuperMap.Plot.PlottingUtil.equalFuzzy(this.startAngle,this.endAngle);t&&(this.startAngle=0,this.endAngle=360);var e=this.getArcPts(this.startAngle,this.endAngle);if(!t){var o=(e=this.getArcPts(this.startAngle,this.endAngle))[0].clone();o.isScalePoint=!0,o.tag=0;var i=e[e.length-1].clone();i.isScalePoint=!0,i.tag=1,this.scalePoints.push(o),this.scalePoints.push(i),e.push(this.centerPoint.clone()),this.latLngs.length>2&&this.latLngs.splice(1,this.latLngs.length-1)}this._createAndDrawLayer(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,e,{surroundLineFlag:!1}),0===this.latLngs.length&&this.latLngs.push(this.centerPoint.clone()),1===this.latLngs.length&&t&&this.latLngs.push(e[Math.ceil(e.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;u--)p.push(r[u]);this._addComponents(L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.PATHTEXT,p,{textContent:this.textContent,showPathLine:!1,isCurve:!1,relLineText:a},this.style)),o=n[Math.ceil(n.length/2)].clone()}o.isScalePoint=!0,o.tag=2,this.scalePoints.push(o)}},_radiusGeometry:function(){if(0!==this.radiusText.length){this.radiusPosAngle%=360;var t=SuperMap.Plot.PlottingUtil.destinationVincenty(this.centerPoint,360-this.radiusPosAngle+90,1e3*this.radius),e=new SuperMap.Geometry.Point(t.lng,t.lat),o=new SuperMap.Geometry.Point(this.centerPoint.lng,this.centerPoint.lat),i=SuperMap.Plot.PlottingUtil.distance(o,e),l=[];if(l.push(this.centerPoint),l.push(L.latLng(e.y,e.x)),SuperMap.Plot.RadiusLineType.NONE!==this.radiusLineType&&this._createAndDrawLayer(SuperMap.Plot.SymbolType.POLYLINESYMBOL,l,{surroundLineFlag:!1}),this.radiusLineType===SuperMap.Plot.RadiusLineType.ARROW){var s;if(null===this.map)s=0;else{var n=this._map.layerPointToLatLng(L.point(0,0)),a=this._map.layerPointToLatLng(L.point(this.subSymbolDefaultPixelSize,0));s=SuperMap.Plot.PlottingUtil.distance(new SuperMap.Geometry.Point(n.lng,n.lat),new SuperMap.Geometry.Point(a.lng,a.lat))}var r=SuperMap.Plot.PlottingUtil.findPoint(e,o,s,12.5),p=SuperMap.Plot.PlottingUtil.findPoint(e,o,s,-12.5),u=[];u.push(L.latLng(e.y,e.x)),u.push(L.latLng(r.y,r.x)),u.push(L.latLng(p.y,p.x)),this._createAndDrawLayer(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,u,{surroundLineFlag:!1,fill:!0,fillLimit:!0,lineTypeLimit:!0})}if(SuperMap.Util.isArray(this.radiusText)||(this.radiusText=[this.radiusText]),this.radiusText.length>=1){var h=SuperMap.Plot.PlottingUtil.findPoint(o,e,.2*i,0),g=SuperMap.Plot.PlottingUtil.findPoint(o,e,.8*i,0),c=SuperMap.Plot.PlottingUtil.findPoint(h,e,.02*i,90),y=SuperMap.Plot.PlottingUtil.findPoint(g,e,.02*i,90),P=L.latLng(c.y,c.x),d=L.latLng(y.y,y.x);let t=SuperMap.Plot.RelLineText.ONLEFTLINE;var S=[];c.xthis.startAngle&&othis.startAngle&&o+360this.startAngle&&ithis.startAngle&&i+3600&&(this.centerPoint=this.latLngs[0].clone()),2===this.latLngs.length&&(this.radius=SuperMap.Plot.PlottingUtil.distVincenty(this.latLngs[0],this.latLngs[1]));this.redraw()},_resizeLatLngs:function(t,e,o,i){var l=!1;1===this.latLngs.length&&(l=!0,this.latLngs.push(this.scalePoints[0])),Lt.prototype._resizeLatLngs.call(this,t,e,o,i),this.centerPoint.lng=this.latLngs[0].lng,this.centerPoint.lat=this.latLngs[0].lat,this.radius=SuperMap.Plot.PlottingUtil.distVincenty(this.latLngs[0],this.latLngs[1]),l&&this.latLngs.splice(1,1)},setRotate:function(t){if(this.dRotate=t,this._rotate(t,this.centerPoint),this.radiusPosAngle+=t,this.startAngle+=t,this.endAngle+=t,this.textPosition+=t,this.latLngs=[],0!==this.avoidRegions.length)for(var e=0,o=this.avoidRegions.length;e0&&i-e<5){let t=SuperMap.Plot.PlottingUtil.destinationVincenty(this.centerPoint,360-e+90,1e3*this.radius);o.push(t)}return o}}),Ot=function(t,e,o,i){return new xt(t,e,o,i)};L.supermap.plotting.arcRegion=Ot;var wt=ct.extend({ratio:null,scalePoints:null,scaleValues:null,initialize:function(t,e,o,i){ct.prototype.initialize.call(this,t,e,o,i),this.libID=0,this.code=SuperMap.Plot.SymbolType.FLAGGROUP,this.symbolType=SuperMap.Plot.SymbolType.FLAGGROUP,this.symbolName="多旗",i.subObjects&&(this.subObjects=i.subObjects),null===this.ratio&&(this.ratio=.8)},destroy:function(){ct.prototype.destroy.call(this),this.ratio=[]},setRotate:function(t){isNaN(t)||(this.dRotate+=t,this.redraw())},redraw:function(){if("none"===this.style.display||null!=this.layer&&"function"==typeof this.layer.getVisibility&&!1===this.layer.getVisibility())this._clearComponents();else{if(L.Util.isArray(this.ratio)||(this.ratio=[this.ratio]),0===this.components.length&&0!==this.subObjects.length)for(let t=0,e=this.subObjects.length;t=0?t.negativeImage?new L.latLng(o.getNorth(),o.getEast()):new L.latLng(o.getNorth(),o.getWest()):t.negativeImage?new L.latLng(o.getSouth(),o.getWest()):new L.latLng(o.getSouth(),o.getEast())},_projectPoint:function(t,e,o){if(e===o)return e;var i=new L.latLng(0,0),l=o.lng-e.lng,s=e.lat-o.lat,n=l*l,a=s*s,r=l*s,p=l*l+s*s;return i.lng=(r*(e.lat-t.lat)+e.lng*a+t.lng*n)/p,i.lat=(r*(e.lng-t.lng)+e.lat*n+t.lat*a)/p,i},_modifyPoint:function(t,e){if(0===t)this.subObjects[0].setLatLngs([e]);else{var o=this.subObjects[t-1].latLngs[0],i=this._calculateFlagTop(this.subObjects[t-1]);i=this._pointRotate(this.dRotate,this.subObjects[0].latLngs[0],i);var l=Math.sqrt(Math.pow(o.lng-i.lng,2)+Math.pow(o.lat-i.lat,2)),s=this._projectPoint(e,o,i),n=Math.sqrt(Math.pow(o.lng-s.lng,2)+Math.pow(o.lat-s.lat,2));this.ratio[t-1]=n/l}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(){ct.prototype._parseSymbolData.call(this),this.symbolData&&(this.ratio=this.symbolData.ratio)},_setSymbolData:function(){ct.prototype._setSymbolData.call(this),this.symbolData&&(this.symbolData.ratio=this.ratio)}}),It=function(t,e,o,i){return new wt(t,e,o,i)};L.supermap.plotting.flagGroup=It,L.supermap.plotting.FlagGroup=wt;var Ct=ct.extend({colNum:null,space:null,initialize:function(t,e,o,i){ct.prototype.initialize.call(this,t,e,o,i),this.libID=0,this.code=SuperMap.Plot.SymbolType.NAVYDEPLOYMENT,this.symbolType=SuperMap.Plot.SymbolType.NAVYDEPLOYMENT,this.symbolName="海军兵力部署",null===this.colNum&&(this.colNum=1),null===this.space&&(this.space=10),null===this.scaleByMap&&(this.scaleByMap=!0)},destroy:function(){this.space=null,this.colNum=null,ct.prototype.destroy.call(this)},redraw:function(){"none"===this.style.display||null!=this.layer&&"function"==typeof this.layer.getVisibility&&!1===this.layer.getVisibility()?this._clearComponents():this._redrawComponents()},_calculateParts:function(){var t=this._map.getFeatureByUuid(this.associatedUuid);if(null!==t&&t.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL&&0!==t.latLngs.length){var e=!1;for(let o=0;o=this.subSymbols[t].symbolData.innerCells[_].positionPoints[x].x&&(A=this.subSymbols[t].symbolData.innerCells[_].positionPoints[x].x),T<=this.subSymbols[t].symbolData.innerCells[_].positionPoints[x].y&&(T=this.subSymbols[t].symbolData.innerCells[_].positionPoints[x].y),v>=this.subSymbols[t].symbolData.innerCells[_].positionPoints[x].y&&(v=this.subSymbols[t].symbolData.innerCells[_].positionPoints[x].y);var O=L.latLng(M,m),w=this._map.latLngToLayerPoint(L.latLng(M,m)),I=new SuperMap.Geometry.Point(b,(T+v)/2),C=new SuperMap.Geometry.Point(I.x,I.y),E=new SuperMap.Geometry.Point(this.subSymbols[t].symbolData.anchorPoint.x,this.subSymbols[t].symbolData.anchorPoint.y),D=this._transitionPoint(C,w),U=this._transitionPoint(E,w);O.lat+=U.lat-D.lat,O.lng+=U.lng-D.lng;var N=this.subSymbols[t].symbolData.libID,R=this.subSymbols[t].symbolData.code;this.subSymbols[t].symbolData.annotationPosition=6;var B=SuperMap.Util.cloneObject(this.subSymbols[t].symbolData),F=L.supermap.plotting.PlottingObject.createSymbol(N,R,O,{serverUrl:this.serverUrl,symbolData:B,scaleByMap:!0,minScale:0,maxScale:2048,space:0});F.enableEdit=!0,F.ownerGroup=this,this._addComponents(F),this.bounds=this._calculateBounds(),this.subObjects.push(F)}if(this.bounds=new L.LatLngBounds,this.bounds=this._calculateBounds(),null!==this.textContent&&0!==this.textContent.length){var k=L.latLng(o[0].lat+g/2+s,o[0].lng-5*s),V=L.supermap.plotting.PlottingObject.createSymbol(0,34,[k],{textContent:this.textContent,serverUrl:this.serverUrl});V.style.labelAlign="rb",V.style.scaleByMap=!0,V.enableEdit=!0,V.ownerGroup=this,this._addComponents(V),this.bounds.extend(V.getBounds()),this.subObjects.push(V)}var Y=new L.LatLngBounds(L.latLng(this.bounds.getSouth()-s,this.bounds.getWest()-s),L.latLng(this.bounds.getNorth()+s,this.bounds.getEast()+s)),z=[];z.push(L.latLng(Y.getNorth(),Y.getWest())),z.push(L.latLng(Y.getSouth(),Y.getEast()));var G=L.latLng(o[0].lat,o[0].lng);G.isFixedPos=!0,z.push(G);var W=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.ANNOFRAMESYMBOL,z,{serverUrl:this.serverUrl});for(var j in W.enableEdit=!0,W.ownerGroup=this,this.subObjects.splice(0,0,W),this._addComponents(W),this._clearComponents(),this.subObjects)this.subObjects[j].ownerGroup=this,this.subObjects[j].enableEdit=!0,this._addComponents(this.subObjects[j])}}},_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 o in this.subObjects)this.subObjects[o].move(t,e);this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)},_resize:function(t,e){for(var o in this.subObjects)this.subObjects[o]._resize(t,e)},_transitionPoint:function(t,e){var o=e.x+t.x*(96/254),i=e.y-t.y*(96/254);return this._map.layerPointToLatLng(L.point(o,i))},_getSubSymbolCount:function(t){var e=0;if(t<0)return e;t>this.subSymbols.length-1&&(t=this.subSymbols.length-1);for(var o=0;o<=t;o++)e+=this.subSymbols[t].totalNum;return e},_calculateBounds:function(){for(var t in this.bounds=new L.LatLngBounds,this.components)this.components[t].symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL&&this.bounds.extend(this.components[t].getBoundsWithText());return this.bounds},setTextContent:function(t){if(this.textContent!==t){this.textContent=t;for(var e=0;e=y.length);P++){var S=y[d];if(void 0!==S.symbolData&&null!==S.symbolData){for(var f=S.symbolData.libID,m=S.symbolData.code,M=c.lng+P*(s+Math.abs(u.getEast()-u.getWest())),b=c.lat-(2*s+Math.abs(u.getNorth()-u.getSouth())/2),A=0,T=0,v=0,_=0,x=0;x=S.symbolData.innerCells[x].positionPoints[O].x&&(T=S.symbolData.innerCells[x].positionPoints[O].x),v<=S.symbolData.innerCells[x].positionPoints[O].y&&(v=S.symbolData.innerCells[x].positionPoints[O].y),_>=S.symbolData.innerCells[x].positionPoints[O].y&&(_=S.symbolData.innerCells[x].positionPoints[O].y);var w=L.latLng(b,M),I=this._map.latLngToLayerPoint(L.latLng(b,M)),C=new SuperMap.Geometry.Point((A+T)/2,v),E=new SuperMap.Geometry.Point(C.x,C.y),D=new SuperMap.Geometry.Point(y[d].symbolData.anchorPoint.x,y[d].symbolData.anchorPoint.y),U=this._transitionPoint(E,I),N=this._transitionPoint(D,I);w.lat+=N.lat-U.lat,w.lng+=N.lng-U.lng,S.symbolData.annotationPosition=5;var R=SuperMap.Util.cloneObject(S.symbolData),B=L.supermap.plotting.PlottingObject.createSymbol(f,m,w,{symbolData:R,scaleByMap:!0,minScale:0,maxScale:2048,space:0});B.enableEdit=!0,B.ownerGroup=this,this._addComponents(B),this.subObjects.push(B),d++}}this.bounds=this._calculateBounds(),c.lat=this.bounds.getSouth()}if(this.isShowTooltip){var F=new L.LatLngBounds(L.latLng(this.bounds.getSouth()-s,this.bounds.getWest()-s),L.latLng(this.bounds.getNorth()+s+1.2,this.bounds.getEast()+s)),k=[];k.push(L.latLng(F.getNorth(),F.getWest())),k.push(L.latLng(F.getSouth(),F.getEast()));var V=L.latLng(o[0].lat,o[0].lng);V.isFixedPos=!0,k.push(V);var Y=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.ANNOFRAMESYMBOL,k,{serverUrl:this.serverUrl});for(var z in Y.enableEdit=!0,Y.ownerGroup=this,this.subObjects.splice(0,0,Y),this._addComponents(Y),this._clearComponents(),this.subObjects)this.subObjects[z].enableEdit=!0,this.subObjects[z].ownerGroup=this,this._addComponents(this.subObjects[z])}}}},_setSubSymbolText:function(){for(var t=0;t0&&(this.latLngs=L.Util.isArray(o)?o:[o]),SuperMap.Util.extend(this,i),void 0!==this.uuid&&null!==this.uuid||(this.uuid=SuperMap.Plot.PlottingUtil.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=null},onAdd:function(t){this.layer=t,this._renderer=t._renderer,this._map=t._map,this.redraw(),ft&&(this.dragging||(this.dragging=new ft(this)))},_clearComponents:function(){for(var t=0;t=this.minEditPts){let t=new L.Polygon(this.getLatLngs(),{smoothFactor:.05});this._addComponents(t),t.setStyle(this.style)}else if(this.getLatLngs().length>=2&&this.getLatLngs().length=p&&l<=h||p>h&&l<=p&&l>=h)){y=-1;break}g<=i||r!==u&&(gMath.max(r,u))||(p=p&&lh&&l=h)&&++y}else if(l===p&&(r<=u&&i>=r&&i<=u||r>=u&&i<=r&&i>=u)){y=-1;break}return-1===y?1:!!(1&y)},_relationToLayer:function(t){var e=2,o=[];if(t instanceof L.Polygon)(o=L.Util.latLngsToSuperMapPoints(t.getLatLngs()[0])).push(o[0].clone());else if(t instanceof L.Polyline)o=L.Util.latLngsToSuperMapPoints(t.getLatLngs());else if(t instanceof tt){var i=t.getBounds();o.push(new SuperMap.Geometry.Point(i.left,i.top)),o.push(new SuperMap.Geometry.Point(i.left,i.bottom)),o.push(new SuperMap.Geometry.Point(i.right,i.bottom)),o.push(new SuperMap.Geometry.Point(i.top,i.right))}if(0===o.length)e=2;else{var l=this._containsPoint(o[0]);l&&(e=1);for(let t=1;t1&&(i.push(l),l=[]);0!==l.length&&i.push(l);var r=i.length;if(!0===e&&r>1&&SuperMap.Plot.PlottingUtil.equalFuzzy(i[0][0].x,i[r-1][i[r-1].length-1].x)&&SuperMap.Plot.PlottingUtil.equalFuzzy(i[0][0].y,i[r-1][i[r-1].length-1].y)){for(var p=0;p0;)if(1===i.length)n.push(i[0]),i.splice(0,1);else{for(var a=0,r=SuperMap.Plot.PlottingUtil.distance(t,i[0]),p=1;p5?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),o=this._map.latLngToLayerPoint(e),i=this._map.latLngToLayerPoint(this.latLngs[0]);this.towardNode.offsetX=i.x-o.x,this.towardNode.offsetY=i.y-o.y},_getTextContentsCells:function(t){var e=this.towardNode.textContent,o=this.dScale*this.style.fontSize+1,i=this._map.layerPointToLatLng(L.point(0,0)),l=this._map.layerPointToLatLng(L.point(o,0)),s=SuperMap.Plot.PlottingUtil.distance({x:i.lng,y:i.lat},{x:l.lng,y:l.lat}),n=s,a=s*t,r=e.length+2,p=[],u=r*n*.5,h=new Object;h.type=SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,h.positionPoints=[],h.positionPoints.push(new SuperMap.Geometry.Point(u,0)),h.positionPoints.push(new SuperMap.Geometry.Point(-2*n+u,.5*a)),h.positionPoints.push(new SuperMap.Geometry.Point(-r*n+u,.5*a)),h.positionPoints.push(new SuperMap.Geometry.Point(-r*n+u,-.5*a)),h.positionPoints.push(new SuperMap.Geometry.Point(-2*n+u,-.5*a)),h.style={surroundLineFlag:!1,fontSize:12},p.push(h);for(var g=1;g<=e.length;g++){var c=new Object;c.type=SuperMap.Plot.SymbolType.POLYLINESYMBOL,c.positionPoints=[],c.positionPoints.push(new SuperMap.Geometry.Point(-(g+1)*n+u,.5*a)),c.positionPoints.push(new SuperMap.Geometry.Point(-(g+1)*n+u,-.5*a)),c.style={surroundLineFlag:!1,fontSize:12},p.push(c);var y=new Object;y.type=SuperMap.Plot.SymbolType.TEXTSYMBOL,y.positionPoints=[],y.positionPoints.push(new SuperMap.Geometry.Point(-(.5+g+1)*n+u,0)),y.textContent=e[g-1],y.style={surroundLineFlag:!1,fontSize:12,fontFamily:"Microsoft YaHei"},y.style.labelAlign="cm",p.push(y)}var P=new SuperMap.Geometry.Point(-1.4*n+u,0),d=new Object;d.type=SuperMap.Plot.SymbolType.TEXTSYMBOL,d.positionPoints=[],d.positionPoints.push(P),d.textContent=this.towardNode.index.toString(),d.style={surroundLineFlag:!1,fontSize:12,fontSizeLimit:!0,fontFamily:"Microsoft YaHei"},d.style.labelAlign="cm",p.push(d);var S=new Object;return S.type=SuperMap.Plot.SymbolType.CIRCLESYMBOL,S.positionPoints=[],S.positionPoints.push(P),S.positionPoints.push(new SuperMap.Geometry.Point(P.x,.4*n)),S.style={surroundLineFlag:!1,fontSize:12},p.push(S),p}});L.supermap.plotting.literateSign=function(t,e,o,i){return new Bt(t,e,o,i)},L.supermap.plotting.LiterateSign=Bt;var Ft=Lt.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,o,i){this.code=SuperMap.Plot.SymbolType.PATHTEXT,this.libID=0,this.symbolType=SuperMap.Plot.SymbolType.PATHTEXT,this.symbolName="沿线注记",this.minEditPts=2,this.maxEditPts=9999,Lt.prototype.initialize.call(this,t,e,o,i)},_reView:function(){this.fromZoom!==this._map.getZoom()&&(this.redraw(),this.fromZoom=this._map.getZoom())},toSuperMapAlgorithms:function(){Lt.prototype.toSuperMapAlgorithms.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}});L.supermap.plotting.pathText=function(t,e,o,i){return new Ft(t,e,o,i)},L.supermap.plotting.PathText=Ft;var kt=mt.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 o=SuperMap.Plot.RouteNodePrimitives.getRouteNodeCells(this.routeNode.type);this._transformSymbolCellsToGeometrys(o)}if(this.routeNode.style=this.style,null!==this.routeNode.name&&""!==this.routeNode.name){var i=this.getBounds(),l=L.latLng(i.getNorth(),i.getEast()),s=this.routeNode.style;s.labelAlign="lb",this._createAndDrawLayer(SuperMap.Plot.SymbolType.TEXTSYMBOL,[l],s,this.routeNode.name).isNameLayer=!0}}},_transformSymbolCellsToGeometrys:function(t){for(var e=this._map.latLngToLayerPoint(this.latLngs[0]),o=0;o5?this.dScale=5:this.dScale<1&&(this.dScale=1),this.redraw()):this.redraw(),this.fromZoom=this._map.getZoom(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues))}});L.supermap.plotting.routeNode=function(t,e,o,i){return new kt(t,e,o,i)},L.supermap.plotting.RouteNode=kt;var Vt=gt.extend({routeNodes:[],nextRouteNodeType:SuperMap.Plot.RouteNodeType.TURNING,arrRoutePts:[],initialize:function(t,e,o,i){this.scaleByMap=!0,this.minEditPts=1,this.maxEditPts=9999,this.routeNodes=[],this.arrRoutePts=[],this.prevRouteNode=[],this.prevLiterateSign=[],gt.prototype.initialize.call(this,t,e,o,i)},destroy:function(){this.routeNodes=null,this.arrRoutePts=null,gt.prototype.destroy.apply(this,arguments)},highlight:function(t){for(var e in this.highlightFlag=!0,this.highlightStyle=t,this.components)if(this.components[e]instanceof Lt){var o=SuperMap.Util.copyAttributes(this.components[e].style,t);this.components[e].setStyle(o)}},unhighlight:function(){for(var t in this.components)if(this.components[t]instanceof Lt){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,o,i){void 0===o&&(o=2),void 0===t&&(t={color:"#ff0000"}),void 0===e&&(e={color:"#0000ff"}),void 0===i&&(i=300);for(var l=[],s=0;s=this.minEditPts&&this._createAndDrawLayer(32,this.latLngs,this.style,"")},move:function(t,e){L.Util.moveLatLngs(this.getLatLngs(),t,e);for(var o=0,i=this.avoidRegions.length;oSuperMap.Plot.PlottingUtil.distance(s[t],i[0])&&(r=SuperMap.Plot.PlottingUtil.distance(s[t],i[0]),n=t);var p=0;0===n&&(n=1);for(let t=0;t1&&(this._createAndDrawLayer(24,s,{surroundLineFlag:!1,lineWidthLimit:!0,weight:4*t.style.weight+this.style.weight}),s[0].isScalePoint=!0,s[0].tag=2*e,this.scalePoints.push(s[0]),s[s.length-1].isScalePoint=!0,s[s.length-1].tag=2*e+1,this.scalePoints.push(s[s.length-1]))}}},calculateBounds:function(){this.bounds=null;var t=new L.Bounds,e=this.components;if(e)for(var o=0;o=SuperMap.Plot.PlottingUtil.distance(s[0],n[t])&&(r=SuperMap.Plot.PlottingUtil.distance(s[0],n[t]),p=t);for(let e=0;e=SuperMap.Plot.PlottingUtil.distance(s[0],n[t])&&(u=SuperMap.Plot.PlottingUtil.distance(s[0],n[t]),p=t);for(let e=0;ee&&(this.symbolTexts[e]=t,this.redraw())},removeSymbolTextsFromDotSymbol:function(t){if(t&&"string"==typeof t){var e=this._map.getFeatureByUuid(t);if(e)for(var o=0,i=e.geoSymbolTexts.length;o0?(o[i].style.labelAlign="lm",!0===p&&(P.x=h.x,P.y=h.y+y/2,d.x=h.x+c,d.y=h.y-y/2)):(o[i].style.labelAlign="rm",!0===p&&(P.x=h.x,P.y=h.y+y/2,d.x=h.x-c,d.y=h.y-y/2))}var S=this._map.layerPointToLatLng(h);if(0!==o[i].offsetX||0!==o[i].offsetY){var f={};f.positionPoints=[S,u],f.style={},f.type=SuperMap.Plot.SymbolType.POLYLINESYMBOL,e.push(f)}var m=SuperMap.Util.copyAttributes(s,this.symbolTexts[i].style);if(p){var M=this._map.layerPointToLatLng(P),b=this._map.layerPointToLatLng(d),A={};A.positionPoints=[M,b],A.style=SuperMap.Util.cloneObject(m),A.type=SuperMap.Plot.SymbolType.RECTANGLESYMBOL,e.push(A),g=L.latLng((b.lat-M.lat)/2+M.lat,(M.lng-b.lng)/2+b.lng)}else g=S;var T={};T.positionPoints=g,T.type=SuperMap.Plot.SymbolType.TEXTSYMBOL,T.style=SuperMap.Util.cloneObject(m),T.textContent=o[i].textContent,p&&(T.style.labelAlign="cm"),e.push(T),this.latLngs.push(S)}}for(var v,_=0;_0){var e=this._map.getFeatureByUuid(this.associatedUuid);if(null===e||void 0===e)return;var o=e.getBounds();if((null==o||!o.isValid())&&null!=e.graphic&&null!=e.graphic.layer&&null!=e.graphic.getImage()){e.graphic._project();var i=e.graphic._pxBounds;null!=i&&i.isValid()&&(o.extend(this._map.layerPointToLatLng(i.min)),o.extend(this._map.layerPointToLatLng(i.max)))}if(!o||!o.isValid())return;for(let i=0,a=t.length;i0&&this.removeFeatures(e.geoSymbolTexts));var o=SuperMap.Util.indexOf(this.features,e);-1!==o&&this.features.splice(o,1),e.layer=null}}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 o=this._map.getPlottingLayers();for(var i in o)if(o[i]._renderer instanceof L.Canvas)o[i]._renderer._container.style.cursor=t;else if(o[i]._renderer instanceof L.SVG)for(let e=0;e1&&this._markers[o-1].on("click",this._finishShape,this),o>2&&this._markers[o-2].off("click",this._finishShape,this)},_finishShape:function(){this._markers.length>1&&this._markers[this._markers.length-1].off("click",this._finishShape,this),L.Browser.touch&&L.supermap.plotting.getControl().getTouchMode()&&this._latlngs.length+11){var l=new ct(0,SuperMap.Plot.SymbolType.GROUPOBJECT,[],{subObjects:o,uuid:e});return this.addFeatures(l),l}return null},unGroupObject:function(t){var e=[];return t.symbolType===SuperMap.Plot.SymbolType.GROUPOBJECT||t.symbolType===SuperMap.Plot.SymbolType.FLAGGROUP?(e=t._unGroupObject(),t.destroy()):e.push(t),e},createLineRelation:function(t,e,o,i,l,s,n){s||(s={}),s.startAssociatedUuid=t,s.endAssociatedUuid=e,s.lineRelationType=o,s.uuid=i,s.custom=n;var a=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.LINERELATION,null,s,l,n);return this.addFeatures(a),a},createInterferenceBeam:function(t,e,o,i,l,s){l||(l={}),l.associatedUuid=t,l.uuid=o,l.custom=s;var n=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.INTERFERENCEBEAM,e,l,i,s);return this.addFeatures(n),n},createSatellite:function(t,e,o,i,l,s,n,a,r){var p=this._getSymbolDataFromCache(t,e);if(null===p){var u=new SuperMap.GetSymbolInfoParameters({libID:t,code:e});L.supermap.symbolInfoService(this.serverUrl,this.options.serviceParams).getSymbolInfo(u,function(p){this._cacheSymbolData(p.result),n||(n={}),n.serverUrl=this.serverUrl,n.serviceParams=this.options.serviceParams,n.orbitPoints=o,n.textContent=i,n.uuid=l,n.custom=r,n.subSymbols=[{libID:t,code:e,symbolData:SuperMap.Plot.PlottingUtil.cloneObject(p.result),textContent:i}];var u=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.SATELLITE,[],n,s,r);this.addFeatures(u),"function"==typeof a&&a({feature:u})},this)}else{n||(n={}),n.serverUrl=this.serverUrl,n.serviceParams=this.options.serviceParams,n.orbitPoints=o,n.textContent=i,n.uuid=l,n.custom=r,n.subSymbols=[{libID:t,code:e,symbolData:p,textContent:i}];var h=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.SATELLITE,[],n,s,r);this.addFeatures(h),"function"==typeof a&&a({feature:h})}},createSatelliteTimeWindows:function(t,e,o,i,l,s){l||(l={}),l.associatedUuid=t,l.timeWindows=e,l.custom=s,l.uuid=o;var n=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS,[],l,i,s);return this.addFeatures(n),n},createSatelliteTimeWindows1:function(t,e,o,i,l,s){l||(l={}),l.associatedUuid=t;for(var n=0;n=2800&&t[l].code<=2900&&i.push(t[l]);var s=null;return i.length>1&&(s=new wt(0,SuperMap.Plot.SymbolType.FLAGGROUP,[],{subObjects:i,ratio:e,uuid:o}),this.addFeatures(s)),s},createArcRegion:function(t,e,o,i,l,s,n,a,r,p,u){r||(r={}),r.centerPoint=t,r.radius=e,r.startAngle=o,r.endAngle=i,r.textContent=l,r.textPosition=s,r.uuid=n,r.custom=u;var h=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.ARCREGION,[],r,a,u);return this.addFeatures(h),h},geoJsonToFeature:function(t,e){var o=JSON.parse(t),i=parseInt(o.libID),l=parseInt(o.code);if(o.isEdit=!0,SuperMap.Plot.AlgoSymbolFactory.isAccessServer(i,l)){let t={};t.negativeImage=o.negativeImage,t.symbolRank=parseInt(o.symbolRank),t.surroundLineType=parseInt(o.surroundLineType);var s=!1;(t.negativeImage||0!==t.surroundLineType||0!==t.symbolRank)&&(s=!0);var n=this._getSymbolDataFromCache(i,l);if(s||null===n){let a=new SuperMap.GetSymbolInfoParameters({libID:i,code:l,negativeImage:t.negativeImage,symbolRank:t.symbolRank,surroundLineType:t.surroundLineType,inputPoints:o.localePoints,subSymbols:o.subSymbols});L.supermap.symbolInfoService(this.serverUrl,this.options.serviceParams).getSymbolInfo(a,function(t){if(!t.result.libID||!t.result.code)return;t.result.symbolType!==SuperMap.Plot.SymbolType.DOTSYMBOL||s||this._cacheSymbolData(t.result),n=SuperMap.Util.cloneObject(t.result),SuperMap.Plot.AnalysisSymbol.mergeSymbolDataAndServerData(o,n);let a={symbolData:o,serverUrl:this.serverUrl,serviceParams:this.options.serviceParams,isGeoJSONData:!0},r=L.supermap.plotting.PlottingObject.createSymbol(i,l,null,a);this.addFeatures(r),"function"==typeof e&&e({feature:r})},this)}else{SuperMap.Plot.AnalysisSymbol.mergeSymbolDataAndServerData(o,n);let t={symbolData:o,serverUrl:this.serverUrl,isGeoJSONData:!0},s=L.supermap.plotting.PlottingObject.createSymbol(i,l,null,t);this.addFeatures(s),"function"==typeof e&&e({feature:s})}}else if(o.subSymbols&&0!==o.subSymbols.length){for(var a=[],r=0,p=o.subSymbols.length;r0&&(o.subSymbols[r].symbolData=this._getSymbolDataFromCache(o.subSymbols[r].libID,o.subSymbols[r].code),null===o.subSymbols[r].symbolData&&-1===SuperMap.Util.indexOf(a,o.subSymbols[r])&&a.push(o.subSymbols[r]))}for(var h=a.slice(),g=0;g=0&&null===(e=this._selectFeature(this.features[a],t.latlng,n));a--);return e},_getSymbolDataFromCache:function(t,e){var o=L.supermap.plotting.getControl(this._map,this.serverUrl,{serviceParams:this.options.serviceParams}).getSymbolLibManager().getSymbolLibByLibId(t);return null!==o?o.getSymbolData(e):null},_cacheSymbolData:function(t){var e=L.supermap.plotting.getControl(this._map,this.serverUrl,{serviceParams:this.options.serviceParams}).getSymbolLibManager().getSymbolLibByLibId(t.libID);null!==e&&e.cacheSymbolData(t)},_isAvoidRegion:function(...t){if(0!==t.length){let i=null,l=!1;if(0===t[0].avoidRegions.length)return t[0];if(i=new ne(t[0]),this._map.addControl(i),l=!0){for(var e=0,o=t[0].avoidRegions.length;e=l.getWest()&&e.lng<=l.getEast()&&e.lat>=l.getSouth()&&e.lat<=l.getNorth())return t}else{var s=this._map.latLngToLayerPoint(e);for(let e=0,o=t.components.length;e0&&(this._map&&this._map.getPlotEditControl()&&!0===this.isEditable&&!1===this.isLocked&&(this._editLayer.removeFeatures(this.selectedFeatures),this.addFeatures(this.selectedFeatures)),this.fire(SuperMap.Plot.Event.movingtargetsunselected,{features:this.selectedFeatures}),this.selectedFeatures.length=0))},getEditable:function(){return this.isEditable},setEditable:function(t){this.isEditable!==t&&(this.isEditable=t,!1===this.isEditable&&!1===this.isLocked&&this.selectedFeatures.length>0&&this._map&&this._map.getPlotEditControl()&&(this._editLayer.removeFeatures(this.selectedFeatures),this.addFeatures(this.selectedFeatures)))},getLocked:function(){return this.isLocked},setLocked:function(t){this.isLocked!==t&&(this.isLocked=t,!0===this.isEditable&&!0===this.isLocked&&this.selectedFeatures.length>0&&this._map&&this._map.getPlotEditControl()&&(this._editLayer.removeFeatures(this.selectedFeatures),this.addFeatures(this.selectedFeatures)))},getVisibility:function(){return this.visibility},setVisibility:function(t){this.visibility!==t&&(this.visibility=t,this.visibility?(this._renderer._container.style.visibility="visible",this._vectorRenderer._container.style.visibility="visible"):(this._renderer._container.style.visibility="hidden",this._vectorRenderer._container.style.visibility="hidden"),this._editLayer.setVisibility(this.visibility))},setGraphicZIndex:function(t){this.options.zIndex=t,this._renderer._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._renderer._container.style.zIndex=this.options.zIndex)},setVectorZIndex:function(t){this.options.vectorZIndex=t,this._vectorRenderer._container&&void 0!==this.options.vectorZIndex&&null!==this.options.vectorZIndex&&(this._vectorRenderer._container.style.zIndex=this.options.vectorZIndex)},initialize:function(t,e,o){this._editLayer=new pe(t+"_temportary",e,{layer:this}),o=o||{},L.Util.setOptions(this,o),this.cacheImages={},this.selectedFeatures=[],this.name=t,this.serverUrl=e,this.features=[],this._graphics=[],this._vectors=[]},getEvents:function(){var t={click:this._handleClick,mousemove:this._onMapMouseMove,contextmenu:this._handleContextmenu};return this._map._zoomAnimated&&(t.zoomanim=this._zoomAnim),t},_zoomAnim:function(t){},_onMapMouseMove:function(t){var e=this._getGraphicsInBounds();if(0!==e.length)for(let o=0,i=e.length;o0&&t.push(e.feature),e}),this._vectors.map(function(i){return i.getBounds().isValid()&&e._intersects(o,i.getLatLngs())&&t.push(i),i}),t},_redraw:function(t){var e=[];null!=t&&SuperMap.Util.isArray(t)?e=e.concat(t):null!=t&&t instanceof he&&e.push(t);var o=this;o._renderer._redrawBounds&&(o._renderer._redrawBounds.min._floor(),o._renderer._redrawBounds.max._ceil(),o._renderer._clear(),o._graphics.map(function(t){return null!=t._pxBounds&&t._pxBounds.intersects(o._renderer._redrawBounds)&&-1===SuperMap.Util.indexOf(e,t)&&e.push(t),t}),o._renderer._drawPlottingGraphics(e))},_update:function(){this._map&&this.getVisibility()&&this._updatePath()},_containsPoint:function(){return!1},_updatePath:function(){this._clearLayersOutBounds(),this._redrawLayersInBounds(),this._renderer._ctx.clearRect(this._renderer._bounds.min.x,this._renderer._bounds.min.y,this._renderer._ctx.canvas.width,this._renderer._ctx.canvas.height),this._renderer._drawPlottingGraphics(this._getGraphicsInBounds())},_project:function(){var t=this;t._pxBounds=L.bounds(L.point(0,0),L.point(0,0)),t._getGraphicsInBounds().map(function(e){return e._project(),t._pxBounds.extend(e._pxBounds.min),t._pxBounds.extend(e._pxBounds.max),e}),t._getLayersInBounds().map(function(e){return e._project(),t._pxBounds.extend(e._pxBounds.min),t._pxBounds.extend(e._pxBounds.max),e})},_getGraphicsInBounds:function(){var t=[],e=this._map.getBounds();return this._graphics.map(function(o){return"none"!==o.feature.style.display&&e.contains(o.getLatLng())&&(null!=o.getImage()&&o.getUuid()===o.getImage().generateUuidFromFeature()||o.update(),t.push(o)),o}),t},_getLayersInBounds:function(){var t=this,e=[],o=t._map.getBounds();return this._vectors.map(function(i){return i.getBounds().isValid()&&t._intersects(o,i.getLatLngs())&&e.push(i),i}),e},_clearLayersOutBounds:function(){var t=this,e=t._map.getBounds();this._vectors.map(function(o){return o.getBounds().isValid()&&!t._intersects(e,o.getLatLngs())&&o._clearComponents(),o})},_redrawLayersInBounds:function(){var t=this,e=t._map.getBounds();this._vectors.map(function(o){return!o.getBounds().isValid()&&t._intersects(e,o.getLatLngs())&&o.redraw(),o})},_intersects:function(t,e){for(let o=0;o0&&(!0===this.isEditable&&!1===this.isLocked&&e._map&&e._map.getPlotEditControl()&&(e._editLayer.removeFeatures(this.selectedFeatures),this.addFeatures(this.selectedFeatures)),this.selectedFeatures.length=0);var i=e.getFeaturesInBounds();for(let s=0,n=i.length;s0)for(var l in i[s].components)if(i[s].components[l]._containsPoint(this._map.latLngToLayerPoint(t.latlng))){n=!0;break}if(n){if(!0===t.originalEvent.altKey&&!0!==t.originalEvent.ctrlKey&&-1!==SuperMap.Util.indexOf(o,i[s]))continue;if(!0===this.isEditable&&!1===this.isLocked&&e._map&&e._map.getPlotEditControl()&&(e._map.getPlotEditControl().unselectFeatures(),this.removeFeatures(i[s]),e._editLayer.addFeatures(i[s]),i[s].enableEdit||e._map.getPlotEditControl().enableEditFeatures(i[s]),e._map.getPlotEditControl().selectFeatures(i[s])),this.selectedFeatures.push(i[s]),e._map&&e._map.getPlotEditControl()&&(e._map.getPlotEditControl()._onTriggerMapClick=!1),!0!==t.originalEvent.ctrlKey)break}}o.length>0&&(this.fire(SuperMap.Plot.Event.movingtargetsunselected,{features:o}),o.length=0),this.selectedFeatures.length>0&&this.fire(SuperMap.Plot.Event.movingtargetsselected,{features:this.selectedFeatures}),L.DomEvent.stopPropagation(t)}},_handleContextmenu:function(t){if(!1!==this.isSelected&&!1!==this.visibility){var e=this.getFeaturesInBounds();for(let i=0,l=e.length;i0)for(var o in e[i].components)if(e[i].components[o]._containsPoint(this._map.latLngToLayerPoint(t.latlng))){l=!0;break}if(l){this.fire(SuperMap.Plot.Event.movingtargetcontextmenu,{features:[e[i]]});break}}L.DomEvent.stopPropagation(t)}},_getSymbolDataFromCache:function(t,e){var o=L.supermap.plotting.getControl(this._map,this.serverUrl,{serviceParams:this.options.serviceParams}).getSymbolLibManager().getSymbolLibByLibId(t);return null!==o?o.getSymbolData(e):null},_cacheSymbolData:function(t){var e=L.supermap.plotting.getControl(this._map,this.serverUrl,{serviceParams:this.options.serviceParams}).getSymbolLibManager().getSymbolLibByLibId(t.libID);null!==e&&e.cacheSymbolData(t)},_generateFromFeature:function(t){var e="";if(t.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL){if(e=t.libID.toString()+"_"+t.code.toString()+"_"+Math.round(t.symbolSize.w).toString()+"_"+Math.round(t.symbolSize.h).toString()+"_"+t.textContent+"_"+t.annotationPosition.toString()+"_"+t.dRotate.toString()+this._styleToString(t.style)+"_"+t.textDisplay.toString()+"_"+t.surroundLineType.toString(),null!=t.symbolTexts&&t.symbolTexts.length>0)for(let o=0;o0)for(let o=0;o0)for(let o=0;o=2){let t=new SuperMap.Geometry.Point(this.feature.trajectory.latlngs[this.feature.trajectory.latlngs.length-2].lng,this.feature.trajectory.latlngs[this.feature.trajectory.latlngs.length-2].lat),e=new SuperMap.Geometry.Point(this.feature.trajectory.latlngs[this.feature.trajectory.latlngs.length-1].lng,this.feature.trajectory.latlngs[this.feature.trajectory.latlngs.length-1].lat),o=SuperMap.Plot.PlottingUtil.radian(t,e)*SuperMap.Plot.PlottingUtil.RTOD;this._rotation=o-90}let i=this.feature.trajectory.getDisplayLatLngs(this._map.getBounds());if(!0===this.feature.trajectory.showTrackingLine?i.length<=1&&null!=this._trajectoryLine?(this.layer._removeTrajectory(this._trajectoryLine),delete this._trajectoryLine,this._trajectoryLine=null):i.length>1&&null===this._trajectoryLine?(this._trajectoryLine=L.polyline(i,{color:this.feature.trajectory.style.color,weight:this.feature.trajectory.style.weight,opacity:this.feature.trajectory.style.opacity}),this.layer._addTrajectory(this._trajectoryLine)):i.length>1&&null!==this._trajectoryLine&&(this._trajectoryLine.options.color===this.feature.trajectory.style.color&&this._trajectoryLine.options.weight===this.feature.trajectory.style.weight&&this._trajectoryLine.options.opacity===this.feature.trajectory.style.opacity||this._trajectoryLine.setStyle({color:this.feature.trajectory.style.color,weight:this.feature.trajectory.style.weight,opacity:this.feature.trajectory.style.opacity}),this._trajectoryLine.setLatLngs(i)):null!=this._trajectoryLine&&(this.layer._removeTrajectory(this._trajectoryLine),this._trajectoryLine=null),!0===this.feature.trajectory.showTrackingPoint){if(0===i.length&&this._trajectoryPoints.length>0){for(let t=0;t0){var e=this.feature.trajectory.generateUuidKey();let t=[];if(this._trajectoryPointGraphic.hasOwnProperty(e))for(let e=0;e0&&(this._image.componentLatLngs.length=0),this._image.componentLatLngs=[];for(var e=0;e0&&(this._image.images.length=0),this._image.images=[];for(let e=0;e0&&(this._image.pictureFrames.length=0),this._image.pictureFrames=[];for(let e=0;et)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(let t=0;te.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=[],o=SuperMap.Plot.PlottingUtil.clonePoints(this.controlPoints),i=this._findPos(this.lineLength*t,o),l=0;l<=i.pos;l++)e.push(o[l]);return e.push(i.pts),SuperMap.Plot.AlgoSymbolFactory.isAccessServer(this.animationGOFeature.libID,this.animationGOFeature.code)&&this.goFeature.symbolData.algoMinEditPts>e.length?(this._executeAndRatioIsZero(),!0):(this.animationGOFeature.latLngs=L.Util.superMapPointsToLatLngs(e),this.animationGOFeature.redraw(),!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),o=Math.abs(this.controlPoints[0].x-this.controlPoints[1].x)/2*t,i=Math.abs(this.controlPoints[0].y-this.controlPoints[1].y)/2*t,l=new SuperMap.Geometry.Point(e.x-o,e.y+i),s=new SuperMap.Geometry.Point(e.x+o,e.y-i);return this.animationGOFeature.setLatLngs(L.Util.superMapPointsToLatLngs([l,s])),!0},_execute_Circle:function(t){0===this.controlPoints.length&&(this.controlPoints=L.Util.latLngsToSuperMapPoints(this.goFeature.getLatLngs()));var e=this.controlPoints[0].clone(),o=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+o,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=[],o=this.controlPoints.length,i=SuperMap.Plot.PlottingUtil.getPolygonCenterPt(this.controlPoints);if(null===i)return this._executeAndRatioIsZero(),!0;for(var l=0;ls)return!1;var a=SuperMap.Plot.PlottingUtil.linePnt(i,this.controlPoints[l],n);e.push(a)}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,o=SuperMap.Plot.PlottingUtil.distance(this.controlPoints[0],this.controlPoints[this.controlPoints.length-1])*t,i=new SuperMap.Geometry.Point(this.controlPoints[0].x+o,this.controlPoints[0].y),l=2*Math.PI/(e+1),s=Math.PI/2+this.animationGOFeature.dRotate,n=i;SuperMap.Plot.PlottingUtil.rotateAngle(this.controlPoints[0],s,n);var a=[];a.push(this.controlPoints[0].clone()),a.push(n);for(var r=n.clone(),p=1;p1&&(this.startScale=1),this.endScale<0&&(this.endScale=0),this.endScale>1&&(this.endScale=1)},execute:function(){if(!(this.goFeature instanceof Lt))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);o++)i+=l;var s,n=new Object;return s=o1?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=ce.prototype.getJSONData.call(this);return t.showEffect=this.showEffect,t.finalDisplay=this.finalDisplay,t},fromJSONData:function(t){ce.prototype.fromJSONData.call(this,t),this.showEffect=t.showEffect,this.finalDisplay=t.finalDisplay}});L.supermap.plotting.GOAnimationShow=me;var Le=ce.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);ce.prototype.destroy.call(this)},getGOAnimationType:function(){return SuperMap.Plot.GOAnimationType.ANIMATION_WAY},setShowPath:function(t){this.showPath=t},resetAnimationFeature:function(t){ce.prototype.resetAnimationFeature.call(this,t);var e=this.goFeature.dRotate,o=this.animationGOFeature.dRotate;this.animationGOFeature._rotate(e-o,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,o=new Object,i=this._findPos(e,this.shapePoints,o);this.currentPt=i.clone();var l=this.animationGOFeature.getLatLngs()[0],s=i.y-l.lat,n=i.x-l.lng;if(this.animationGOFeature.move(s,n),this.tangentDirection){var a=o.angle;1===t&&(a=0);var r=this.animationGOFeature.dRotate;this.animationGOFeature._rotate(a-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.Plot.PlottingUtil.cloneObject(this.animationGOFeature.style)),L.supermap.plotting.getControl().getGOAnimationManager().map.addLayer(this.pathFeature));this.pathLength=0;for(var t=1;t=t);i++)l+=s;var n=SuperMap.Plot.PlottingUtil.findPoint(e[i-1],e[i],t-l,0);return this.tangentDirection&&(o.angle=SuperMap.Plot.PlottingUtil.radian(n,e[i])/Math.PI*180),n},getJSONData:function(){var t=ce.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;e0&&t.screenY>0&&this._map.getContainer().focus()}});L.Map.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",o=this._controlContainer=L.DomUtil.create("div",e+"control-container",this._container);function i(i,l){var s=e+i+" "+e+l;t[i+l]=L.DomUtil.create("div",s,o)}i("top","left"),i("top","right"),i("bottom","left"),i("bottom","right")},_clearControlPos:function(){L.DomUtil.remove(this._controlContainer)}});var be=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,o){L.Browser.touch&&L.supermap.plotting.getControl().getTouchMode()&&(this.options.icon=this.options.touchIcon),this._map=t,this._drawingLayer=e,this._tempDrawingLayer=new se("drawControl-temportary"),this._container=t._container,this._overlayPane=t._panes.overlayPane,L.setOptions(this,o)},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("zoomend",this._onZoomEnd,this),this._map.getPlotEditControl()&&this._map.getPlotEditControl()._avoidEditing&&this._map.getPlotEditControl().avoidEdit(!1),null!=this._map.doubleClickZoom&&this._map.doubleClickZoom.enabled()&&(this.doubleClickZoomEnabled=!0,this._map.doubleClickZoom.disable()))},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("click",this._onTouch,this),null!=this._map.doubleClickZoom&&!0===this.doubleClickZoomEnabled&&this._map.doubleClickZoom.enable()},deleteLastVertex:function(){if(!(this._markers.length<=1)){this._latlngs.pop();var t=this._markers.pop(),e=this.plotting.getLatLngs(),o=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(o,!1)}},addVertex:function(t){if(this._markers.push(this._createMarker(t)),this._latlngs.push(t),this.plotting&&0===this.libID&&1023===this.code&&!0===this.isFreeCure)this.plotting.addLatLng(t);else if(this.plotting&&SuperMap.Plot.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,this._drawingLayer.options.serviceParams).getSymbolInfo(e,function(t){this.plotting.symbolData=t.result,this.plotting.setLatLngs(this._latlngs)},this)}else if(this.plotting&&this.plotting instanceof Vt){var o=this._map.layerPointToLatLng(L.point(0,0)),i=this._map.layerPointToLatLng(L.point(this.options.tolerancePixel,0)),l=SuperMap.Plot.PlottingUtil.distance({x:o.lng,y:o.lat},{x:i.lng,y:i.lat});this.plotting._addRouteNodeByPos(t,l)}else this.plotting&&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),L.Browser.touch&&L.supermap.plotting.getControl().getTouchMode()&&this._latlngs.length+1=this.plotting.minEditPts){let t=new SuperMap.GetSymbolInfoParameters({libID:this.libID,code:this.code});t.inputPoints=L.Util.latLngsToSuperMapPoints(i),L.supermap.symbolInfoService(this._drawingLayer.serverUrl,this._drawingLayer.options.serviceParams).getSymbolInfo(t,function(t){this.plotting.symbolData=t.result,this.plotting.setLatLngs(i)},this)}else this.plotting.setLatLngs(i)}this._mouseMarker.setLatLng(o),L.DomEvent.preventDefault(t.originalEvent)},_createFeature:function(t){if(SuperMap.Plot.AlgoSymbolFactory.isAccessServer(this.libID,this.code))if(this.symbolData=this._drawingLayer._getSymbolDataFromCache(this.libID,this.code),null===this.symbolData){var e=Math.floor(1e3*Math.random());let o=new SuperMap.GetSymbolInfoParameters({libID:this.libID,code:this.code});o.dynamicToken=e,L.supermap.symbolInfoService(this._drawingLayer.serverUrl,this._drawingLayer.options.serviceParams).getSymbolInfo(o,function(o){o.result.dynamicToken&&o.result.dynamicToken===SuperMap.MD5.md5(e.toString())?this.libID!==o.result.libID||this.code!==o.result.code?this.symbolData=null:(this._drawingLayer._cacheSymbolData(o.result),this.symbolData=o.result,this.plotting=L.supermap.plotting.PlottingObject.createSymbol(this.libID,this.code,[],{symbolData:this.symbolData,serverUrl:this._drawingLayer.serverUrl,serviceParams:this._drawingLayer.serviceParams,map:this._map}),this._control.fire(SuperMap.Plot.Event.beforefeatureadded,{feature:this.plotting}),this._tempDrawingLayer.addFeatures(this.plotting),this.plotting.isEdit=!1,"function"==typeof t&&t()):this.symbolData=null},this)}else this.plotting=L.supermap.plotting.PlottingObject.createSymbol(this.libID,this.code,[],{symbolData:this.symbolData,serverUrl:this._drawingLayer.serverUrl,serviceParams:this._drawingLayer.serviceParams,map:this._map}),this._control.fire(SuperMap.Plot.Event.beforefeatureadded,{feature:this.plotting}),this._tempDrawingLayer.addFeatures(this.plotting),this.plotting.isEdit=!1,"function"==typeof t&&t();else if(this.plotting=L.supermap.plotting.PlottingObject.createSymbol(this.libID,this.code,[],{serverUrl:this._drawingLayer.serverUrl,spatialAnalystUrl:this._drawingLayer.spatialAnalystUrl,serviceParams:this._drawingLayer.serviceParams,map:this._map}),this.plotting.subSymbols&&0!==this.plotting.subSymbols.length){for(var o=[],i=0,l=this.plotting.subSymbols.length;i1&&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,o=e.clientX,i=e.clientY;this._startPoint.call(this,o,i)}},_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,o=e.clientX,i=e.clientY;this._endPoint.call(this,o,i,t),this._clickHandled=null,L.DomEvent.stopPropagation(t)},_endPoint:function(t,e,o){if(this._mouseDownOrigin){var i=L.point(t,e).distanceTo(this._mouseDownOrigin),l=this._calculateFinishDistance(o.latlng);if(L.Browser.touch&&L.supermap.plotting.getControl().getTouchMode()&&null==this.plotting){let t=this;this._createFeature(function(){t._latlngs.push(o.latlng),t.plotting.setLatLngs(t._latlngs),(t.plotting instanceof mt||t.plotting instanceof L.supermap.plotting.Route)&&(t._latlngs.length+1>=t.plotting.maxEditPts||l<20&&L.Browser.touch)?t._finishShape():Math.abs(i)<9*(window.devicePixelRatio||1)&&t.addVertex(o.latlng),t._enableNewMarkers()})}else(this.plotting instanceof mt||this.plotting instanceof L.supermap.plotting.Route)&&(this._latlngs.length+1>=this.plotting.maxEditPts||l<20&&L.Browser.touch)?this._finishShape():Math.abs(i)<9*(window.devicePixelRatio||1)&&this.addVertex(o.latlng),this._enableNewMarkers()}this._mouseDownOrigin=null},_onTouch:function(t){var e,o,i=t.originalEvent;!i.touches||!i.touches[0]||this._clickHandled||this._touchHandled||this._disableMarkers||(e=i.touches[0].clientX,o=i.touches[0].clientY,this._disableNewMarkers(),this._touchHandled=!0,this._startPoint.call(this,e,o),this._endPoint.call(this,e,o,t),this._touchHandled=null),this._clickHandled=null},_calculateFinishDistance:function(t){var e;if(this._markers.length>0){var o=this._markers[this._markers.length-1],i=this._map.latLngToContainerPoint(o.getLatLng()),l=new L.Marker(t,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset}),s=this._map.latLngToContainerPoint(l.getLatLng());e=i.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)}}),Ae=Me.extend({drawingLayer:null,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/");this.drawingLayer=t,L.Control.prototype.initialize.call(this,e)},onAdd:function(t){var e=L.DomUtil.create("div","supermap-iclient");return this._map=t,this.handler=new be(this._map,this.drawingLayer),this.handler._control=this,e},onRemove:function(){this._map=null,this.handler=null},setDrawingLayer:function(t){this.drawingLayer=t,this.handler._drawingLayer=t,this.handler._tempDrawingLayer.serverUrl=t.serverUrl,this.handler._drawingLayer.serviceParams=t.serviceParams}}),Te=function(t,e){return new Ae(t,e)};L.supermap.plotting.drawControl=Te;var ve=Me.extend({_dragStartScale:null,_dragStartRotate:null,_dragStartBounds:null,_dragStartLatLngs:null,_dragStartScaleValues:null,_dragStartPositionOffset:null,_dragStartScalePoints:null,_editMarkers:null,_disEditBox:null,_editFeatures:null,_mouseTolerance:10,touchTolerance:20,_editMode:SuperMap.Plot.EditMode.EDITCIRCUMRECTANGLE,_avoidEditing:!1,selectedFeatures:[],options:{highlightFlag:!0,highlightStyle:{color:"#ffffff",opacity:1,weight:1},draggable:!0,editIcon:L.divIcon({className:"leaflet-supermap-plot-control-icon-path",iconSize:[10,10]}),scaleIcon:L.divIcon({className:"leaflet-supermap-plot-scale-icon-path",iconSize:[10,10]}),rotateIcon:L.divIcon({className:"leaflet-supermap-plot-rotate-icon-path",iconSize:[15,15]}),lockedIcon:L.divIcon({className:"leaflet-supermap-plot-locked-icon-path",iconSize:[10,10]}),avoidIcon:L.divIcon({className:"leaflet-supermap-plot-avoid-icon-path",iconSize:[8,8]})},initialize:function(t,e){if(L.Browser.touch&&L.supermap.plotting.getControl().getTouchMode()&&(this.options.editIcon=L.divIcon({className:"leaflet-supermap-plot-control-icon-path",iconSize:[20,20]}),this.options.scaleIcon=L.divIcon({className:"leaflet-supermap-plot-scale-icon-path",iconSize:[20,20]}),this.options.rotateIcon=L.divIcon({className:"leaflet-supermap-plot-rotate-icon-path",iconSize:[25,25]}),this.options.lockedIcon=L.divIcon({className:"leaflet-supermap-plot-locked-icon-path",iconSize:[20,20]}),this.options.avoidIcon=L.divIcon({className:"leaflet-supermap-plot-avoid-icon-path",iconSize:[15,15]})),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._editMarkers={},this._disEditBox={},this._dragStartScale={},this._dragStartRotate={},this._dragStartBounds={},this._dragStartLatLngs={},this._dragStartPositionOffset={},this._dragStartScaleValues={},this._dragStartScalePoints={},this._editFeatures={}},onAdd:function(t){this.controlDiv=L.DomUtil.create("div","supermap-iclient"),this._map=t,this._map.on("click",this._onMapClick,this),this._map._plotEditControl=this;for(var e=0;e0},canCut:function(){return this.getSelectedFeatures().length>0},canPaste:function(){return!!(this.pasteGeoAry&&this.pasteGeoAry.length>0)},copy:function(){this.pasteGeoAry=[],this.pasteGeoSel=[];for(var t=0,e=this._map.getPlottingLayers().length;t0){var l=i.layer._getFeatureFromEvent(t);l.symbolType===SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS&&(i=l)}if(this.transaction||(this.transaction=new SuperMap.Plot.Transaction,this.transaction.transType=SuperMap.Plot.TransactionType.EDIT,this.isAddTransInfo=!0),i instanceof gt)if(i instanceof ct&&i.moveend)i.moveend=!1;else if(null!==i.ownerGroup&&i.ownerGroup.moveend)i.ownerGroup.moveend=!1;else if(this._editMode!==SuperMap.Plot.EditMode.ADDCONTROLPOINT)i instanceof ct&&!i.isSelected?(!1===t.originalEvent.ctrlKey&&this.unselectFeatures(),this.selectFeatures(i)):i instanceof Vt||i.isSelected||null!==i.ownerGroup&&!0!==i.ownerGroup.isSelected||(!1===t.originalEvent.ctrlKey&&this.unselectFeatures(),this.selectFeatures(i));else if(i instanceof Vt||i.isSelected){if(!1===i.isLocked&&i.isSelected)if(i instanceof Vt){var s=this._getAddPointTolerance();if(null===(a=i._selectNodeLayer(t.latlng,s))){let e=this._getAddPointTolerance(),o=i._addRouteNodeByPosWithoutLast(t.latlng,e);null!==o&&(this.unselectFeatures(),this.selectFeatures(o))}}else if(i instanceof kt&&i.route.isSelected){let t=i._isFirstNode(),e=i._isLastNode();if(!0===t||!0===e){let o=i.route._addRouteNodeByNode(i.routeNode,t,e);if(null!==o){this.unselectFeatures(),this.selectFeatures(o);var n=new SuperMap.Plot.TransactionInfo;n.layerId=o.layer._leaflet_id,n.uuid=o.uuid,n.functionName="setLatLngs",n.undoParams=[L.Util.cloneLatLngs(o.getLatLngs())],n.redoParams=[L.Util.cloneLatLngs(o.getLatLngs())],this.transaction.transInfos.push(n),this.transaction&&(L.supermap.plotting.getControl().getTransManager().add(this.transaction),this.transaction=new SuperMap.Plot.Transaction,this.isAddTransInfo=!0)}}else this.unselectFeatures(),this.selectFeatures(i)}else this._addPoint(i,t.latlng)}else if(!1===t.originalEvent.ctrlKey&&this.unselectFeatures(),this.selectFeatures(i),i instanceof kt&&((e=i._isFirstNode())||(o=i._isLastNode()))){var a=i.route._addRouteNodeByNode(i.routeNode,e,o);null!==a&&(this.unselectFeatures(),this.selectFeatures(a))}},_addPoint:function(t,e){if(null!==t&&void 0!==t){var o=t.scaleValues.slice(),i=L.Util.cloneLatLngs(t.getLatLngs()),l=L.Util.latLngsToSuperMapPoints(t.getLatLngs());if(t.symbolType===SuperMap.Plot.SymbolType.ANNOFRAMESYMBOLM){var s=L.supermap.plotting.editMarker(e,{icon:this.options.scaleIcon,nHandle:-2,tag:t.scalePoints.length});s.owner=t,this._addToMapAndBindMarker(s),this._editMarkers[t.uuid].push(s),t.scalePoints.push(e),t._modifyPoint(t.scalePoints.length-1,e);let i=new SuperMap.Plot.TransactionInfo;i.layerId=t.layer._leaflet_id,i.uuid=t.uuid,i.functionName="setScaleValues",i.undoParams=[o],i.redoParams=[t.scaleValues],this.transaction.transInfos.push(i),this.transaction&&(L.supermap.plotting.getControl().getTransManager().add(this.transaction),this.transaction=new SuperMap.Plot.Transaction,this.isAddTransInfo=!0)}else{if(t.getLatLngs().length>=t.maxEditPts)return;var n=t._getSymbolWayType();if(void 0!==SuperMap.Plot.AlgoSymbolFactory&&SuperMap.Plot.AlgoSymbolFactory.canPolylineConnect(t.libID,t.code)&&!0===t.polylineConnectLocationPoint&&(n=SuperMap.Plot.AddPoint_WayType.POLYLINE),SuperMap.Plot.AddPoint_WayType.UNKNOWN===n)return;var a=new SuperMap.Geometry.Point(e.lng,e.lat),r=-1;SuperMap.Plot.AddPoint_WayType.CURVE===n&&(r=this._addPointByCurve(t,a));var p=new SuperMap.Plot.Transaction;if(L.supermap.plotting.getControl().getTransManager().add(p),SuperMap.Plot.AddPoint_WayType.POLYLINE===n&&(r=this._addPointByPolyLine(t,a)),l=L.Util.latLngsToSuperMapPoints(t.getLatLngs()),r>0&&ri.length)return-1;var l=[],s=0;for(let t=1,e=o.length;tp&&(r=p,a=t+1))}var u=o.slice();u.push(u[0]);var h=SuperMap.Plot.PlottingUtil.generateBeizerPointsNoCtrlPt(u),g=[];for(let t=1,e=u.length;td&&(P=d,y=t+1))}return y>a&&(a=-1),a},_addPointByPolyLine:function(t,e){var o=-1,i=L.Util.latLngsToSuperMapPoints(t.getLatLngs());return(o=this._computePointToLineMinDis(e,i).index)>=0&&o++,o},_computePointToLineMinDis:function(t,e){var o=this._getAddPointTolerance(),i=SuperMap.Plot.PlottingUtil.computePointToLineMinDis(t,e);return i.minDis>o&&(i.index=-1),i},_getAddPointTolerance:function(){var t=this._mouseTolerance;L.Browser.touch&&L.supermap.plotting.getControl().getTouchMode()&&(t=this.touchTolerance);var e=this._map.layerPointToLatLng(L.point(0,0)),o=this._map.layerPointToLatLng(L.point(t,0));return SuperMap.Plot.PlottingUtil.distance(new SuperMap.Geometry.Point(e.lng,e.lat),new SuperMap.Geometry.Point(o.lng,o.lat))},_collectEditMarkers:function(t){void 0!==this._editMarkers[t.uuid]&&this._removeMarkers(t);var e,o=[];if(t.layer instanceof ae&&(t.layer.getLocked()||!t.layer.getEditable())){var i=t.getBounds();if(null!==i&&i.isValid()){var l=L.latLng(i.getNorth(),i.getEast()),s=L.latLng(i.getNorth(),i.getWest()),n=L.latLng(i.getSouth(),i.getEast()),a=L.latLng(i.getSouth(),i.getWest()),r=new L.Polygon([l,s,a,n],{smoothFactor:.5});L.setOptions(r,{weight:1,opacity:.5,color:"#0000ff",fillOpacity:.3,fillColor:"#0000ff"}),this._map.addLayer(r),e=r}}else if(t.getLocked()){var p=t._getHandlePointsByBounds();for(var u in p){let e=new L.LatLng(p[u].lat,p[u].lng),i=L.supermap.plotting.editMarker(e,{icon:this.options.lockedIcon,nHandle:-3});this._addToMapAndBindMarker(i),i.owner=t,o.push(i)}}else if(t instanceof ct||t instanceof kt)if(t instanceof wt&&this._editMode!==SuperMap.Plot.EditMode.EDITCIRCUMRECTANGLE)for(var h=0;h9&&(l=-1):l=-3;let s=new L.LatLng(e.handlePoints[i].lat,e.handlePoints[i].lng),n=L.supermap.plotting.editMarker(s,{icon:this.options.editIcon,nHandle:l,tag:i});this._addToMapAndBindMarker(n),n.owner=t,o.push(n)}for(let i=0,l=e.rotatePoints.length;i1)for(let e in t.scalePoints){let i=new L.LatLng(t.scalePoints[e].lat,t.scalePoints[e].lng),l=t.scalePoints[e].tag?t.scalePoints[e].tag:e,s=L.supermap.plotting.editMarker(i,{icon:this.options.scaleIcon,nHandle:t.enableEdit?-2:-3,tag:l});this._addToMapAndBindMarker(s),o.push(s),s.owner=t}this._editMarkers[t.uuid]=o,this._disEditBox[t.uuid]=e},_resetEditMarkersValue:function(t){if(this._editMarkers.hasOwnProperty(t.uuid)){var e=this._editMarkers[t.uuid],o=this._disEditBox[t.uuid];if(null==o||!t.layer.getLocked()&&t.layer.getEditable())if(t instanceof ct||t instanceof kt)if(t instanceof wt&&this._editMode!==SuperMap.Plot.EditMode.EDITCIRCUMRECTANGLE)for(var i in t.scalePoints)e[i]._latlng=t.scalePoints[i],e[i].update();else{let o=t._getHandleAndRotatePoints();for(let t in o.handlePoints)e[t]._latlng=o.handlePoints[t],e[t].update();if(this._editMode===SuperMap.Plot.EditMode.EDITCIRCUMRECTANGLE){let t=o.handlePoints.length;for(let i in o.rotatePoints)e[t+parseInt(i)]._latlng=o.rotatePoints[i],e[t+parseInt(i)].update()}}else if(this._editMode===SuperMap.Plot.EditMode.EDITCIRCUMRECTANGLE){let o=t._getHandleAndRotatePoints();for(let t in o.handlePoints)e[t]._latlng=o.handlePoints[t],e[t].update();let i=o.handlePoints.length;for(let t in o.rotatePoints)e[i+parseInt(t)]._latlng=o.rotatePoints[t],e[i+parseInt(t)].update()}else if(void 0!==t.scalePoints&&null!==t.scalePoints||(t.scalePoints=[]),t.symbolType===SuperMap.Plot.SymbolType.REGULARPOLYGON){let o=[t.getLatLngs()[0],t.components[0].getLatLngs()[0][0]];for(let t in o)e[t]._latlng=o[t],e[t].update()}else if(t.symbolType===SuperMap.Plot.SymbolType.PARALLELLINE){var l=L.Util.superMapPointsToLatLngs(t.superMapAlgoSymbol.controlPoints[0]);t.getLatLngs()[0]=L.latLng(l[0].lat,l[0].lng);for(let o in t.getLatLngs())e[o]._latlng=t.getLatLngs()[o],e[o].update()}else if(t.symbolType===SuperMap.Plot.SymbolType.SATELLITE||t.timeWindows&&t.timeWindows.length>1)for(let o in t.scalePoints){let i=parseInt(o);e[i]._latlng=t.scalePoints[o],e[i].update()}else if(t.getLatLngs().length+t.scalePoints.length===e.length){for(let o in t.getLatLngs())e[o]._latlng=t.getLatLngs()[o],e[o].update();let o=t.getLatLngs().length;for(let i in t.scalePoints){var s=o+parseInt(i);e[s]._latlng=t.scalePoints[i],e[s].update()}}else this._collectEditMarkers(t);else{var n=t.getBounds();if(null!==n&&n.isValid()){var a=L.latLng(n.getNorth(),n.getEast()),r=L.latLng(n.getNorth(),n.getWest()),p=L.latLng(n.getSouth(),n.getEast()),u=L.latLng(n.getSouth(),n.getWest());o.setLatLngs([a,r,u,p])}}}},_removeMarkers:function(t){var e=this._editMarkers[t.uuid];for(let t in e)this._unbindMarkerEvents(e[t]),this._map.removeLayer(e[t]);delete this._editMarkers[t.uuid];var o=this._disEditBox[t.uuid];o&&this._map.removeLayer(o),delete this._disEditBox[t.uuid]},_unbindMarkerEvents:function(t){t.off("mousemove",this._moveMove,this),t.off("mouseout",this._moveOut,this),-3!==t.options.nHandle&&(t.off("click",this._removePoint,this),t.off("dragstart",this._dragStart,this),t.off("drag",this.redraw,this),t.off("dragend",this._dragEnd,this),t.dragging.disable())},_addToMapAndBindMarker:function(t){t.addTo(this._map),t.on("mousemove",this._moveMove,this),t.on("mouseout",this._moveOut,this),-3!==t.options.nHandle&&(t.on("click",this._removePoint,this),t.on("dragstart",this._dragStart,this),t.on("drag",this._dragPoint,this),t.on("dragend",this._dragEnd,this),t.dragging.enable()),-3===t.options.nHandle&&(t.on("dragstart",this._dragStart,this),t.on("dragend",this._dragEnd,this),t.dragging.enable())},_moveMove:function(t){switch(t.target.options.nHandle){case 1:case 8:t.target._icon.style.cursor="se-resize";break;case 3:case 6:t.target._icon.style.cursor="ne-resize";break;case 4:case 5:t.target._icon.style.cursor="e-resize";break;case 2:case 7:t.target._icon.style.cursor="n-resize";break;case-1:case-2:t.target._icon.style.cursor="pointer";break;case 0:t.target._icon.style.cursor="default"}},_moveOut:function(t){t.target._icon.style.cursor=""},_removePoint:function(t){if(this._editMode===SuperMap.Plot.EditMode.ADDCONTROLPOINT&&t.target.owner.isSelected){let o=L.Util.cloneLatLngs(t.target.owner.getLatLngs()),i=this._editMarkers[t.target.owner.uuid],l=i.indexOf(t.target);this._map.removeLayer(i[l]),i.splice(l,1),t.target.owner.latLngs.splice(l,1),t.target.owner.redraw();let s=new SuperMap.Plot.Transaction;L.supermap.plotting.getControl().getTransManager().add(s);var e=new SuperMap.Plot.TransactionInfo;e.layerId=t.target.owner.layer._leaflet_id,e.uuid=t.target.owner.layer.uuid,e.functionName="setLatLngs",e.undoParams=[o],e.redoParams=[t.target.owner.getLatLngs()],s.transInfos.push(e)}else if(this._editMode===SuperMap.Plot.EditMode.REMOVECONTROLPOINT&&t.target.owner.isSelected){let e=this._editMarkers[t.target.owner.uuid],o=e.indexOf(t.target),i=L.Util.cloneLatLngs(t.target.owner.getLatLngs());if(t.target.owner.getLatLngs().length<=t.target.owner.minEditPts)return this._editMode=SuperMap.Plot.EditMode.EDITCIRCUMRECTANGLE,void this._collectEditMarkers(t.target.owner);this._map.removeLayer(e[o]),e.splice(o,1),t.target.owner.latLngs.splice(o,1),t.target.owner.redraw();let l=new SuperMap.Plot.Transaction;L.supermap.plotting.getControl().getTransManager().add(l);let s=new SuperMap.Plot.TransactionInfo;s.layerId=t.target.owner.layer._leaflet_id,s.uuid=t.target.owner.uuid,s.functionName="setLatLngs",s.undoParams=[i],s.redoParams=[t.target.owner.getLatLngs()],l.transInfos.push(s)}},_dragStart:function(t){for(var e in this.transaction||(this.transaction=new SuperMap.Plot.Transaction,this.transaction.transType=SuperMap.Plot.TransactionType.EDIT,this.isAddTransInfo=!0),this.selectedFeatures){var o=this.selectedFeatures[e];if(o._isDot()&&(this._dragStartScale[o.uuid]=o.getScale()),o.scaleValues&&o.scaleValues.length&&0!==o.scaleValues.length){this._dragStartScaleValues[o.uuid]=[];for(var i=0;i0?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;var o=t.target.owner,i=null;i=o.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL||o.symbolType===SuperMap.Plot.SymbolType.CONCENTRICCIRCLE?o.getLatLngs()[0]:o.anchorPoint;var l=this._map.latLngToLayerPoint(i);o.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL&&!0===o.positionOffset&&(l.x+=o.positionOffsetX*o.dScale,l.y+=o.positionOffsetY*o.dScale);var s=this._map.latLngToLayerPoint(t.latlng),n=this._map.latLngToLayerPoint(t.oldLatLng),a=s.x-l.x-(n.x-l.x),r=s.y-l.y-(n.y-l.y);if(0!==a&&0!==r){var p=180*(Math.atan2(n.y-l.y,n.x-l.x)-Math.atan2(s.y-l.y,s.x-l.x))/Math.PI,u=p;if(void 0!==this._lastPixel)u=180*(Math.atan2(this._lastPixel.y-l.y,this._lastPixel.x-l.x)-Math.atan2(s.y-l.y,s.x-l.x))/Math.PI;!function(t,o){for(var i=0;i0&&o.selectedFeatures[a].setScale(p)}if(o.isAddTransInfo){let t=new SuperMap.Plot.TransactionInfo;t.layerId=o.selectedFeatures[a].layer._leaflet_id,t.uuid=o.selectedFeatures[a].uuid,t.functionName="setScale",o.transaction.transInfos.push(t)}}else{if(9===o.selectedFeatures[a]._getHandleCount()&&e&&e>0){var u=o._dragStartBounds[o.selectedFeatures[a].uuid],h=o._dragStartLatLngs[o.selectedFeatures[a].uuid],g=o.selectedFeatures[a]._getLatLng(e,u,s);o.selectedFeatures[a]._resizeLatLngs(g,e,u,h)}if(SuperMap.Plot.AlgoSymbolFactory.isAccessServer(o.selectedFeatures[a].libID,o.selectedFeatures[a].code)){var c=new SuperMap.GetSymbolInfoParameters;c.libID=o.selectedFeatures[a].libID,c.code=o.selectedFeatures[a].code,c.inputPoints=L.Util.latLngsToSuperMapPoints(o.selectedFeatures[a].getLatLngs()),c.scaleValues=o.selectedFeatures[a].scaleValues,c.subSymbols=o.selectedFeatures[a].subSymbols,n.push(o.selectedFeatures[a]),L.supermap.symbolInfoService(l.serverUrl,l.serviceParams).getSymbolInfo(c,function(t){for(var e=0;e0||r.lng>0&&r.lat<0?r.lng=r.lat*n/a*-1:r.lng=r.lat*n/a:r.lat<0&&r.lng>0||r.lat>0&&r.lng<0?r.lat=r.lng*a/n*-1:r.lat=r.lng*a/n);var p=1,u=l._resizeBounds(t.latlng,e,s),h=!0===Boolean(n)?(u.getEast()-u.getWest())/n:.5,g=!0===Boolean(a)?(u.getNorth()-u.getSouth())/a:.5;p=2===e||7===e?g:4===e||5===e?h:h3||Math.abs(n.y-this._lastDragPixel.y)>3)&&s-this.lastDownTime>100))return;var a=new SuperMap.GetSymbolInfoParameters;a.libID=e.libID,a.code=e.code,l?(a.inputPoints=L.Util.latLngsToSuperMapPoints(e.getLatLngs()),a.scalePoints=L.Util.latLngsToSuperMapPoints(e.scalePoints),a.scaleValues=e.scaleValues,a.newScalePoint=new SuperMap.Geometry.Point(t.latlng.lng,t.latlng.lat),a.newScalePointIndex=parseInt(t.target.options.tag)):(e.getLatLngs()[i]=t.target.getLatLng(),a.inputPoints=L.Util.latLngsToSuperMapPoints(e.getLatLngs()),a.scaleValues=e.scaleValues),a.subSymbols=e.subSymbols,L.supermap.symbolInfoService(e.serverUrl,e.serviceParams).getSymbolInfo(a,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=n,this.lastDownTime=(new Date).getTime()}else if(-1===t.target.options.nHandle){if(e.symbolType===SuperMap.Plot.SymbolType.REGULARPOLYGON)1===i?e.getLatLngs()[e.getLatLngs().length-1]=t.latlng:e.getLatLngs()[0]=t.latlng;else if(e.symbolType===SuperMap.Plot.SymbolType.ELLIPSESYMBOL)e.getLatLngs()[i]=t.latlng;else if(e.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL){if(!0===e.positionOffset?e.setLatLngs(t.latlng):e.setLatLngs(e.latLngs[0]),this.isAddTransInfo){let t=new SuperMap.Plot.TransactionInfo;t.layerId=e.layer._leaflet_id,t.uuid=e.uuid,t.functionName="setLatLngs",this.transaction.transInfos.push(t)}}else e.getLatLngs()[i]=t.latlng;if(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);else if(e.redraw(),e.symbolType===SuperMap.Plot.SymbolType.ANNOFRAMESYMBOL&&e.ownerGroup&&(e.ownerGroup.symbolType===SuperMap.Plot.SymbolType.NAVYDEPLOYMENT||e.ownerGroup.symbolType===SuperMap.Plot.SymbolType.AIRDEPLOYMENT))for(let t in e.ownerGroup.subObjects)e.ownerGroup.subObjects[t].redraw();e._updateSymbolTexts(),this._resetEditMarkersValue(e)}else if(-2===t.target.options.nHandle){var r=t.target.getLatLng();if(r.isScalePoint=!0,e._modifyPoint(parseInt(t.target.options.tag),r),e.symbolType===SuperMap.Plot.SymbolType.FLAGGROUP)for(var p=0,u=e.components.length;pn&&!0===this.pasteGeoSel[n])if(a instanceof Vt){var u=p._getNodeFeature(p._getNodeByUuid(a.routeNode.id));this.selectedFeatures(u)}else this.selectFeatures(p);if(s[n]&&s[n].geoSymbolTexts)for(let t=0;ti[e+1].x){let t=i[e+1];i[e+1]=i[e],i[e]=t;let o=s[e+1];s[e+1]=s[e],s[e]=o}for(var n=Math.abs(i[i.length-1].x-i[0].x)/(i.length-1),a=1;ai[u+1].y){var h=i[u+1];i[u+1]=i[u],i[u]=h;var g=s[u+1];s[u+1]=s[u],s[u]=g}var c=Math.abs(i[i.length-1].y-i[0].y)/(i.length-1);for(let t=1;t=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;ethis.maxCount-1&&this.undoTransactions.splice(0,this.undoTransactions.length-this.maxCount+1),this.undoTransactions.push(t)},undo:function(){var t=this.undoTransactions.length;if(t>0){var e=this.undoTransactions[t-1];this.doTransaction(e,!0),this.redoTransactions.push(e),this.undoTransactions.splice(t-1,1)}},redo:function(){var t=this.redoTransactions.length;if(t>0){var e=this.redoTransactions[t-1];this.doTransaction(e),this.undoTransactions.push(e),this.redoTransactions.splice(t-1,1)}},doTransaction:function(t,e){var o=t.transInfos;if(t.transType===SuperMap.Plot.TransactionType.CREATE)for(var i=0,l=o.length;i0&&n.setFontAlign(a[0]);else if("setLatLngs"===o[s].functionName)a.length>0&&n.setLatLngs(a[0]);else if("modifyPoint"===o[s].functionName)a.length>0&&n._modifyPoint(a[0],a[1]);else if("setTextContent"===o[s].functionName)a.length>0&&n.setTextContent(a[0]);else if("setRadiusText"===o[s].functionName)2===a.length&&n.setRadiusText(a[0],a[1]);else if("setType"===o[s].functionName&&n instanceof L.supermap.plotting.RouteNode)a.length>0&&n.setType(a[0]);else if("setStrokeColor"===o[s].functionName&&n.geometry instanceof SuperMap.Geometry.GroupObject)a.length>0&&n.setStyle(a[0]);else if("addAvoidRegion"===o[s].functionName)a.length>0&&(a[0]&&a[0].layer&&a[0].layer.removeFeatures(a[0]),e?n.removeAvoidRegions(a[0]):n.addAvoidRegion(a[0]));else if("removeAvoidRegions"===o[s].functionName){if(a.length>0){for(let t=0;t0&&(r=t.unGroupObject(o[s].undoParams[0])):"createGroupObject"===o[s].functionName?r=t.createGroupObject(o[s].redoParams[0]):"createFlags"===o[s].functionName&&(r=t.createFlags(o[s].redoParams[0])),null!==r&&t._map.getPlotEditControl().selectFeatures(r)}else"updateSymbolText"===o[s].functionName?a.length>0&&n.updateSymbolText(a[0],a[1]):o[s].functionName&&null!==a&&n[o[s].functionName](a[0],a[1]);if(o[s].propertyName){var p=o[s].undoValue;e||(p=o[s].redoValue),n.hasOwnProperty(o[s].propertyName)?n[o[s].propertyName]=p:null!==n&&(n.style[o[s].propertyName]=p)}n&&n.layer&&(n.symbolType!==SuperMap.Plot.SymbolType.DOTSYMBOL||8!==n.textPosition||"fontColor"!==o[s].propertyName&&"fontFamily"!==o[s].propertyName||n._calculateParts(),n.redraw(),n.fire(SuperMap.Plot.Event.reseteditmarkersvalues))}}else if(t.transType===SuperMap.Plot.TransactionType.REMOVE)for(var u=0;un.lat?s.lat:n.lat;if(!(e.latr))(e.lat-s.lat)*(n.lng-s.lng)/(n.lat-s.lat)+s.lng>e.lng&&o++}}return o%2==1},getGObjectsInCircle:function(t,e){if(t&&e){for(var o=[],i=this.map.getPlottingLayers(),l=0;lMath.sqrt(Math.pow(t.lng-r.lng,2)+Math.pow(t.lat-r.lat,2))&&o.push(a)}}}return o}},getGObjectsInRect:function(t,e){if(t&&e){for(var o=[],i=this.map.getPlottingLayers(),l=0;le.lat?r.lng>t.lng&&r.lnge.lat&&o.push(a):r.lnge.lng&&r.late.lat&&o.push(a)}}}return o}}}),ke=function(t){return new Fe(t)};L.supermap.plotting.query=ke;var Ve=L.supermap.ServiceBase.extend({initialize:function(t,e){L.supermap.ServiceBase.prototype.initialize.call(this,t,e)},getSMLInfos:function(t,e,o){var i=this;return o||(o=i),new _(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{scope:o,processCompleted:e,processFailed:e}}).processAsync(t),i},editSMLFile:function(t,e,o){var i=this;return o||(o=i),new M(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{scope:o,processCompleted:e,processFailed:e}}).processAsync(t),i}}),Ye=function(t,e){return new Ve(t,e)};L.supermap.smlFileService=Ye;var ze=L.supermap.ServiceBase.extend({initialize:function(t,e){L.supermap.ServiceBase.prototype.initialize.call(this,t,e)},getSymbolInfo:function(t,e,o){var i=this;return o||(o=i),new O(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{scope:o,processCompleted:e,processFailed:e}}).processAsync(t),i}}),Ge=function(t,e){return new ze(t,e)};L.supermap.symbolInfoService=Ge;var We=L.supermap.ServiceBase.extend({initialize:function(t,e){L.supermap.ServiceBase.prototype.initialize.call(this,t,e)},getLibIDs:function(t,e){var o=this;return e||(e=o),new b(o.url,{proxy:o.options.proxy,withCredentials:o.options.withCredentials,crossOrigin:o.options.crossOrigin,headers:o.options.headers,serverType:o.options.serverType,eventListeners:{scope:e,processCompleted:t,processFailed:t}}).processAsync(),o},getLibInfo:function(t,e,o){var i=this;return o||(o=i),new T(i.url,{proxy:i.options.proxy,withCredentials:i.options.withCredentials,crossOrigin:i.options.crossOrigin,headers:i.options.headers,serverType:i.options.serverType,eventListeners:{scope:o,processCompleted:e,processFailed:e}}).processAsync(t),i}}),je=function(t,e){return new We(t,e)};L.supermap.symbolLibService=je,o.d(e,"Plot",function(){return l}),o.d(e,"SymbolType",function(){return s}),o.d(e,"LineRelationType",function(){return n}),o.d(e,"AlgoSurroundLineType",function(){return a}),o.d(e,"RouteNodeType",function(){return r}),o.d(e,"RelLineText",function(){return p}),o.d(e,"RadiusLineType",function(){return u}),o.d(e,"AnnoPosition",function(){return h}),o.d(e,"ArrowLineType",function(){return g}),o.d(e,"TextBoxType",function(){return c}),o.d(e,"PositionOffsetType",function(){return y}),o.d(e,"AlignType",function(){return P}),o.d(e,"EditMode",function(){return d}),o.d(e,"GOAnimationType",function(){return f}),o.d(e,"EditSmlFileParameters",function(){return m}),o.d(e,"GetLibInfoParameter",function(){return A}),o.d(e,"GetSMLInfosParameters",function(){return v}),o.d(e,"GetSymbolInfoParameters",function(){return x}),o.d(e,"DefaultStyle",function(){return w}),o.d(e,"ExtendProperty",function(){return I}),o.d(e,"LayerDataStruct",function(){return C}),o.d(e,"MapInfoStruct",function(){return E}),o.d(e,"OrbitPoint",function(){return D}),o.d(e,"Property",function(){return U}),o.d(e,"RouteNode",function(){return N}),o.d(e,"SitDataStruct",function(){return R}),o.d(e,"SMLInfoStruct",function(){return B}),o.d(e,"SubSymbol",function(){return F}),o.d(e,"SymbolText",function(){return k}),o.d(e,"TimeWindowParameter",function(){return V}),o.d(e,"TowardNode",function(){return Y}),o.d(e,"Event",function(){return S}),o.d(e,"CalculateCanvasGradient",function(){return z}),o.d(e,"CalculateSVGGradient",function(){return G}),o.d(e,"AnalysisSymbol",function(){return j}),o.d(e,"RouteNodePrimitives",function(){return Z}),o.d(e,"PlottingUtil",function(){return X}),o.d(e,"Primitives",function(){return H}),o.d(e,"AddPoint_WayType",function(){return J}),o.d(e,"BasicAlgoSymbolFactory",function(){return q}),o.d(e,"AlgoSymbolFactory",function(){return K}),o.d(e,"md5",function(){return Q}),o.d(e,"PlottingLayer",function(){return ae}),o.d(e,"plottingLayer",function(){return re}),o.d(e,"PlottingGraphicLayer",function(){return ie}),o.d(e,"plottingGraphicLayer",function(){return le}),o.d(e,"GOAnimation",function(){return ce}),o.d(e,"GOAnimationAttribute",function(){return ye}),o.d(e,"GOAnimationBlink",function(){return Pe}),o.d(e,"GOAnimationGrow",function(){return de}),o.d(e,"GOAnimationRotate",function(){return Se}),o.d(e,"GOAnimationScale",function(){return fe}),o.d(e,"GOAnimationShow",function(){return me}),o.d(e,"GOAnimationWay",function(){return Le}),o.d(e,"PlotControl",function(){return Me}),o.d(e,"AvoidRegionControl",function(){return ne}),o.d(e,"DrawGraphicObject",function(){return be}),o.d(e,"PlotDrawControl",function(){return Ae}),o.d(e,"drawControl",function(){return Te}),o.d(e,"PlotEditControl",function(){return ve}),o.d(e,"editControl",function(){return _e}),o.d(e,"PlottingObject",function(){return gt}),o.d(e,"GraphicObject",function(){return mt}),o.d(e,"AlgoSymbol",function(){return Lt}),o.d(e,"algoSymbol",function(){return Mt}),o.d(e,"DotSymbol",function(){return Tt}),o.d(e,"dotSymbol",function(){return vt}),o.d(e,"ArcRegion",function(){return xt}),o.d(e,"arcRegion",function(){return Ot}),o.d(e,"GroupObject",function(){return ct}),o.d(e,"groupObject",function(){return yt}),o.d(e,"FlagGroup",function(){return wt}),o.d(e,"flagGroup",function(){return It}),o.d(e,"NavyDeployment",function(){return Ct}),o.d(e,"navyDeployment",function(){return Et}),o.d(e,"AirDeployment",function(){return Dt}),o.d(e,"airDeployment",function(){return Ut}),o.d(e,"AvoidRegion",function(){return Nt}),o.d(e,"avoidRegion",function(){return Rt}),o.d(e,"AirRoute",function(){return Yt}),o.d(e,"airRoute",function(){return zt}),o.d(e,"MissileRoute",function(){return Gt}),o.d(e,"missileRoute",function(){return Wt}),o.d(e,"NavyRoute",function(){return jt}),o.d(e,"navyRoute",function(){return Xt}),o.d(e,"InterferenceBeam",function(){return Ht}),o.d(e,"interferenceBeam",function(){return Zt}),o.d(e,"LineRelation",function(){return bt}),o.d(e,"lineRelation",function(){return At}),o.d(e,"Satellite",function(){return Jt}),o.d(e,"satellite",function(){return qt}),o.d(e,"SatelliteTimeWindows",function(){return Kt}),o.d(e,"satelliteTimeWindows",function(){return Qt}),o.d(e,"GeoSymbolText",function(){return $t}),o.d(e,"geoSymbolText",function(){return te}),o.d(e,"GeoSymbolText1",function(){return ee}),o.d(e,"geoSymbolText1",function(){return oe}),o.d(e,"Plotting",function(){return Be}),o.d(e,"GOAnimationManager",function(){return xe}),o.d(e,"goAnimationManager",function(){return Oe}),o.d(e,"Query",function(){return Fe}),o.d(e,"query",function(){return ke}),o.d(e,"SitDataManager",function(){return we}),o.d(e,"sitDataManager",function(){return Ie}),o.d(e,"SymbolLib",function(){return Ce}),o.d(e,"symbolLib",function(){return Ee}),o.d(e,"SymbolLibManager",function(){return De}),o.d(e,"symbolLibManager",function(){return Ue}),o.d(e,"SMLFileService",function(){return Ve}),o.d(e,"smlFileService",function(){return Ye}),o.d(e,"SymbolInfoService",function(){return ze}),o.d(e,"symbolInfoService",function(){return Ge}),o.d(e,"SymbolLibService",function(){return We}),o.d(e,"symbolLibService",function(){return je}),o.d(e,"latLngsToSuperMapPoints",function(){return lt}),o.d(e,"superMapPointsToLatLngs",function(){return st}),o.d(e,"cloneLatLngs",function(){return nt}),o.d(e,"moveLatLngs",function(){return at}),o.d(e,"rotateLatLngs",function(){return rt}),o.d(e,"resizeLatLngs",function(){return pt})},function(t,e){L.Canvas.include({_drawPlottingGraphics:function(t){var e=this;let o=[];t.map(function(t){if("none"===t.feature.style.display)return t;if(t.feature.symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT||t.feature.symbolType===SuperMap.Plot.SymbolType.SYMBOLTEXT1){let o=e._map.getFeatureByUuid(t.feature.associatedUuid);if(null==o||"none"===o.style.display)return t}return t.getImage().complete()?e._drawPlottingGraphic(t):o.push(t),t}),o.length>0&&setTimeout(function(){for(let t=0;t400&&(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 e=t._latlng,o=this._map.latLngToLayerPoint(e);if(void 0!=o){if(t.options.labelXOffset||t.options.labelYOffset){var i=isNaN(t.options.labelXOffset)?0:t.options.labelXOffset,l=isNaN(t.options.labelYOffset)?0:t.options.labelYOffset;o.x+=i,o.y-=l}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 s=t.options.labelRotation;t.options.labelRotation=0;var n=t.getPxBounds();t.options.labelRotation=s;var a=n.min.x,r=n.min.y,p=n.max.x-n.min.x,u=n.max.y-n.min.y;this._ctx.fillStyle=t.options.fontBackgroundColor,this._ctx.globalAlpha=1,this._ctx.save(),this._ctx.translate(a,r),0!=t.options.labelRotation&&this._ctx.rotate(t.options.labelRotation*Math.PI/180),this._ctx.fillRect(0,0,p,u),this._ctx.restore()}if(!0===t.options.fontShadow){var h=L.point(o.x,o.y);if(t.options.fontShadowOffsetX&&(h.x+=t.options.fontShadowOffsetX),t.options.fontShadowOffsetY&&(h.y+=t.options.fontShadowOffsetY),0!==t.options.labelRotation){var g=o.x,c=o.y,y=t.options.labelRotation*Math.PI/180,P=Math.sqrt(Math.pow(h.x-g,2)+Math.pow(h.y-c,2)),d=y+Math.atan2(h.y-c,h.x-g);h.x=g+P*Math.cos(d),h.y=c+P*Math.sin(d)}var S=t.options.fontStroke;t.options.fontStroke=!1;var f=t.options.fontColor;t.options.fontColor=t.options.fontShadowColor,this._updateTextPt(h,t),t.options.fontColor=f,t.options.fontStroke=S}if(t.hasOwnProperty("_eventParents"))for(var m in t._eventParents)t._eventParents[m].hasOwnProperty("ownerGroup")&&null!==t._eventParents[m].ownerGroup&&(t._eventParents[m].ownerGroup.symbolType!==SuperMap.Plot.SymbolType.NAVYDEPLOYMENT&&t._eventParents[m].ownerGroup.symbolType!==SuperMap.Plot.SymbolType.AIRDEPLOYMENT||t._updateBounds());this._updateTextPt(o,t)}}},_updateImage:function(t){var e=this,o=function(){var t=this.style,o=t.graphicWidth||t.graphicHeight,i=t.graphicHeight||t.graphicWidth;o=o||2*t.pointRadius,i=i||2*t.pointRadius;var l=void 0!==t.graphicXOffset?t.graphicXOffset:-.5*o,s=void 0!==t.graphicYOffset?t.graphicYOffset:-.5*i,n=t.graphicOpacity||t.fillOpacity,a=this.point,r=a.x,p=a.y;if(!isNaN(r)&&!isNaN(p)){var u;e._ctx.save(),t.rotation&&(u=t.rotation/180*Math.PI),e._ctx.translate(r,p),u&&e._ctx.rotate(u),e._ctx.translate(l,s),e._ctx.globalAlpha=n;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,o*h,i*h),e._ctx.restore()}},i=new Image;"firefox"==SuperMap.Browser.name?(i.onload=function(){o.call({point:t._point,style:t.options,img:i}),i.onload=null},t.options.graphicTitle&&(i.title=t.options.graphicTitle),i.src=t.options.externalGraphic):(t.options.graphicTitle&&(i.title=t.options.graphicTitle),i.src=t.options.externalGraphic,i.onload=function(){o.call({point:t._point,style:t.options,img:i}),i.onload=null}),window.ActiveXObject||"ActiveXObject"in window?i.onload():i.complete&&i.onload()},_updateArc:function(t){if(this._drawing&&!t._empty()){var e=t._point,o=this._ctx,i=t._radius,l=(t._radiusY||i)/i,s=(360-t.options.endAngle)*(Math.PI/180),n=(360-t.options.startAngle)*(Math.PI/180);this._drawnLayers[t._leaflet_id]=t,1!==l&&(o.save(),o.scale(1,l)),o.beginPath(),o.arc(e.x,e.y/l,i,s,n,!1),1!==l&&o.restore(),this._fillStroke(o,t)}},_handleMouseHover:function(t,e){var o,i=null;for(var l in this._map._layers)if((o=this._map._layers[l])._drawFirst)for(var s=o._drawFirst;s;s=s.next)s.layer.options.interactive&&s.layer._containsPoint(e)&&!this._map._draggableMoved(s.layer)&&(i=s.layer);i!==this._hoveredLayer&&(this._handleMouseOut(t),i&&(L.DomUtil.addClass(this._container,"leaflet-interactive"),this._fireEvent([i],t,"mouseover"),this._hoveredLayer=i)),this._hoveredLayer&&this._fireEvent([this._hoveredLayer],t)},_onClick:function(t){var e,o=this._map.mouseEventToLayerPoint(t),i=[],l=[],s=0;for(let t in this._map._layers)if(this._map._layers[t]._drawFirst)for(var n=this._map._layers[t]._drawFirst;n;n=n.next)if(n.layer.options.interactive&&n.layer._containsPoint(o)&&!this._map._draggableMoved(n.layer)&&(e=n.layer).hasOwnProperty("_eventParents")&&null!==e._eventParents)for(var a in e._eventParents)l.push(e),i.push(e._eventParents[a]);if(e&&l.length>1){if(i.length>0){var r=!1,p=[],u=[];for(let t=0,e=i.length;t1){this._fireEvent([u[e]],t);break}if(!r){this._fireEvent([u[u.length-1]],t);break}}}}else e&&(L.DomEvent.fakeStop(t),this._fireEvent([e],t))}}),L.Polyline.prototype._containsPoint=function(t,e){var o,i,l,s,n,a,r=this._clickTolerance()+10;if(this._pxBounds&&!this._pxBounds.contains(t))return!1;for(o=0,s=this._parts.length;o1){if(i.length>0){var r=!1,p=[],u=[];for(let t=0,e=i.length;t1){this._fireEvent([u[e]],t);break}if(!r){this._fireEvent([u[u.length-1]],t);break}}}}else e&&(L.DomEvent.fakeStop(t),e._eventParents[0]&&e._eventParents[0].fire(t.type,t))},_onMouseMove:function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(L.DomUtil.removeClass(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null)},_handleMouseHover:function(t,e){var o,i;for(var l in this._layers)(o=this._layers[l]).options.interactive&&"function"==typeof o._containsPoint&&o._containsPoint(e)&&(i=o);i!==this._hoveredLayer&&(this._handleMouseOut(t),i&&(L.DomUtil.addClass(this._container,"leaflet-interactive"),this._fireEvent([i],t,"mouseover"),this._hoveredLayer=i)),this._hoveredLayer&&this._fireEvent([this._hoveredLayer],t)},_fireEvent:function(t,e,o){this._map._fireDOMEvent(e,o||e.type,t)},_updateTextPt:function(t,e,o,i){var l;if(t.setAttributeNS(null,"x",e.x),t.setAttributeNS(null,"y",e.y),o.options.display&&t.setAttributeNS(null,"display",o.options.display),!0===o.options.fontStroke&&(o.options.fontStrokeColor&&t.setAttributeNS(null,"stroke",o.options.fontStrokeColor),o.options.fontStrokeWidth&&t.setAttributeNS(null,"stroke-width",o.options.fontStrokeWidth)),o.options.labelRotation&&t.setAttributeNS(null,"transform","rotate("+o.options.labelRotation+" "+e.x+","+e.y+")"),o.options.fontColor&&t.setAttributeNS(null,"fill",o.options.fontColor),o.options.fontOpacity&&t.setAttributeNS(null,"opacity",o.options.fontOpacity),o.options.fontFamily&&t.setAttributeNS(null,"font-family",o.options.fontFamily),o.options.fontSize&&t.setAttributeNS(null,"font-size",o.options.fontSize),o.options.fontWeight&&t.setAttributeNS(null,"font-weight",o.options.fontWeight),o.options.fontStyle&&t.setAttributeNS(null,"font-layer.options",o.options.fontStyle),L.Browser.gecko){if(100!==o.options.fontPercent&&0!==o.options.fontSpace&&(l=o.options.fontSpace+o.options.fontPercent/100*parseFloat(o.options.fontSize)*o.options.text.length),100!==o.options.fontPercent&&0===o.options.fontSpace){var s=document.createElement("span");document.body.appendChild(s),s.style.width="auto",s.style.height="auto",o.options.fontSize&&(s.style.fontSize=new String(o.options.fontSize)+"px"),o.options.fontFamily&&(s.style.fontFamily=o.options.fontFamily),o.options.fontWeight&&(s.style.fontWeight=o.options.fontWeight),s.style.position="absolute",s.style.visibility="hidden",s.innerHTML=o.options.text;var n=s.clientWidth;l=o.options.fontPercent/100*n+o.options.text.length}t.setAttributeNS(null,"textLength",l),t.setAttributeNS(null,"lengthAdjust","spacingAndGlyphs")}t.setAttributeNS(null,"pointer-events","visible");var a=o.options.labelAlign||"cm";t.setAttributeNS(null,"text-anchor",L.SVG.LABEL_ALIGN[a[0]]||"middle"),!0===L.Browser.gecko&&t.setAttributeNS(null,"dominant-baseline",L.SVG.LABEL_ALIGN[a[1]]||"central");for(var r=function(){let t=L.SVG.LABEL_VFACTOR[a[1]];null==t&&(t=-.5);let e=t*(u-1);return L.Browser.ie&&(null===(t=L.SVG.LABEL_IE_VOFFSET[a[1]])&&(t=.35),e+=t),e},p=o.options.text.split("\n"),u=p.length;t.childNodes.length>u;)t.removeChild(t.lastChild);for(var h=0;h>>1)),0!==d?l.setAttribute("dy","0em"):0===h?l.setAttribute("dy",r()+"em"):l.setAttribute("dy","1em");let s=""===y[d]?" ":y[d];o.options.isUnicode?L.Browser.ie||L.Browser.ielt9?(this.element.innerHTML=s,l.textContent=this.element.innerHTML):l.innerHTML=s:l.textContent=s,l.parentNode||t.appendChild(l),P+=y[d],c=SuperMap.Plot.PlottingUtil.getTextWidth(o.options,P)+parseFloat(o.options.fontSpace)*(o.options.fontPercent/100)}}else{let l=i+"tspan"+h;o._tspanNodeObj&&o._tspanNodeObj[l]||(o._tspanNodeObj[l]=L.SVG.create("tspan"));let s=o._tspanNodeObj[l];if(!1===L.Browser.gecko&&s.setAttributeNS(null,"baseline-shift",L.SVG.LABEL_VSHIFT[a[1]]||"-35%"),100!==o.options.fontPercent){let t=SuperMap.Plot.PlottingUtil.getTextWidth(o.options,p[h]);s.setAttributeNS(null,"textLength",t),s.setAttributeNS(null,"lengthAdjust","spacingAndGlyphs")}s.setAttribute("x",e.x),0==h?s.setAttribute("dy",r()+"em"):s.setAttribute("dy","1em");let n=""===p[h]?" ":p[h];o.options.isUnicode?L.Browser.ie||L.Browser.ielt9?(this.element.innerHTML=n,s.textContent=this.element.innerHTML):s.innerHTML=n:s.textContent=n,s.parentNode||t.appendChild(s)}}t.parentNode||this._rootGroup.appendChild(t)},_updateText:function(t){if(t.options.text&&0!==t.options.text.length)if(t.options.fontSize<6||t.options.fontPercent<=0)t._removeNode();else{for(var e in t._eventParents)if(t._eventParents[e].symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL&&!1===t._eventParents[e].textDisplay)return void t._removeNode();void 0===t.options.fontPercent&&(t.options.fontPercent=100),t.options.fontPercent<0&&(t.options.fontPercent=0),t.options.fontPercent>400&&(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 o=t._latlng,i=this._map.latLngToLayerPoint(o);if(void 0!=i){if(t.options.labelXOffset||t.options.labelYOffset){var l=isNaN(t.options.labelXOffset)?0:t.options.labelXOffset,s=isNaN(t.options.labelYOffset)?0:t.options.labelYOffset;i.x+=l,i.y-=s}if(!0===t.options.fontShadow){t._shadowTextNode&&t._shadowTextNode.parentNode||(t._shadowTextNode=L.SVG.create("text"),this._rootGroup.appendChild(t._shadowTextNode));var n=L.point(i.x,i.y);if(t.options.fontShadowOffsetX&&(n.x+=t.options.fontShadowOffsetX),t.options.fontShadowOffsetY&&(n.y+=t.options.fontShadowOffsetY),0!==t.options.labelRotation){var a=i.x,r=i.y,p=t.options.labelRotation*Math.PI/180,u=Math.sqrt(Math.pow(n.x-a,2)+Math.pow(n.y-r,2)),h=p+Math.atan2(n.y-r,n.x-a);n.x=a+u*Math.cos(h),n.y=r+u*Math.sin(h)}var g=t.options.fontStroke;t.options.fontStroke=!1;var c=t.options.fontColor;t.options.fontColor=t.options.fontShadowColor,this._updateTextPt(t._shadowTextNode,n,t,"shadow"),t.options.fontColor=c,t.options.fontStroke=g}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,i,t,"label"),!0===t.options.fontBackground){var y=t._shadowTextNode;if(y&&y.parentNode||(y=t._textNode),!y||!y.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 P=t._textNode.getBBox();t._backgroundTextNode.x.baseVal.value=P.x,t._backgroundTextNode.y.baseVal.value=P.y,t._backgroundTextNode.width.baseVal.value=P.width,t._backgroundTextNode.height.baseVal.value=P.height,t._backgroundTextNode.style.fill=t.options.fontBackgroundColor,t.options.labelRotation&&t._backgroundTextNode.setAttributeNS(null,"transform","rotate("+t.options.labelRotation+" "+i.x+","+i.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 o=t.options.graphicWidth||t.options.graphicHeight,i=t.options.graphicHeight||t.options.graphicWidth;o=o||2*t.options.pointRadius,i=i||2*t.options.pointRadius;var l=void 0!=t.options.graphicXOffset?t.options.graphicXOffset:-.5*o,s=void 0!=t.options.graphicYOffset?t.options.graphicYOffset:-.5*i,n=t.options.graphicOpacity||t.options.fillOpacity;t._imageNode.setAttributeNS(null,"x",(t._point.x+l).toFixed()),t._imageNode.setAttributeNS(null,"y",(t._point.y+s).toFixed()),t._imageNode.setAttributeNS(null,"width",o),t._imageNode.setAttributeNS(null,"height",i),t._imageNode.setAttributeNS("http://www.w3.org/1999/xlink","href",t.options.externalGraphic),t._imageNode.setAttributeNS(null,"style","opacity: "+n),t._imageNode.onclick=L.SVG.preventDefault;var a=t.options.rotation;void 0===a&&void 0===t._imageNode._rotation||!t._point||(t._imageNode._rotation=a,a|=0,t._imageNode.setAttributeNS(null,"transform","rotate("+a+" "+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,o=t._radius,i="a"+o+","+(t._radiusY||o)+" 0 1,0 ";sRadian=(360-t.options.endAngle)*(Math.PI/180),eRadian=(360-t.options.startAngle)*(Math.PI/180);var l=t._empty()?"M0 0":"M"+(e.x-o)+","+e.y+i+2*o+",0 "+i+2*-o+",0 ";this._setPath(t,l)}}}),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.LABEL_IE_VOFFSET={t:.86,b:0},L.SVG.preventDefault=function(t){t.preventDefault&&t.preventDefault()}}]);