/*! * * 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: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=183)}([function(t,e,o){"use strict";o(0),L.supermap.plotting=L.supermap.plotting||{}},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GraphicObject=void 0,o(0);var i=o(5),l=o(2),n=o(11),a=e.GraphicObject=i.PlottingObject.extend({surroundLineType:null,scaleByMap:null,latLngs:[],initialize:function(t,e,o,l){this.geoSymbolTexts=[],this.subAssociatedUuids=[],this.latLngs=o||[],i.PlottingObject.prototype.initialize.call(this,t,e,o,l),null===this.surroundLineType&&(this.surroundLineType=SuperMap.Plot.AlgoSurroundLineType.NONE)},destroy:function(){i.PlottingObject.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 n=SuperMap.Plot.PlottingUtil.equalFuzzy(o.getWest(),o.getEast())?0:(l.getEast()-l.getWest())/(o.getEast()-o.getWest()),a=SuperMap.Plot.PlottingUtil.equalFuzzy(o.getNorth(),o.getSouth())?0:(l.getNorth()-l.getSouth())/(o.getNorth()-o.getSouth()),s=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-s.lng)*n,this.latLngs[0].lat=r.lat+(i[0].lat-s.lat)*a,this.latLngs[1].lng=r.lng+(i[1].lng-s.lng)*n,this.latLngs[1].lat=r.lat+(i[1].lat-s.lat)*a;else if(this.symbolType===SuperMap.Plot.SymbolType.CONCENTRICCIRCLE)if(2===e||4===e||5===e||7===e){1===n&&(n=0),1===a&&(a=0);for(var u=Math.sqrt(n*n+a*a),p=L.Util.latLngsToSuperMapPoints(i),h=1;ho?(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(i.PlottingObject.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 a?this.components[o]._rotate(t,e):(this.components[o]instanceof n.PointImage&&(this.components[o].options.rotation+=-t),this.components[o]instanceof l.Text&&(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?v+=this.options.fontShadowOffsetX:m+=this.options.fontShadowOffsetX,this.options.fontShadowOffsetY>0?M+=this.options.fontShadowOffsetY:b+=this.options.fontShadowOffsetY),this._eventParents)if(this._eventParents[T].symbolType===SuperMap.Plot.SymbolType.TEXTSYMBOL&&0===this.options.fontPercent&&0===this.options.fontPercent){var _=v-m,O=(_+this.options.fontSpace*(this.options.text.length-1))*this.options.fontPercent/100-_;switch(A){case"lt":case"lm":case"lb":v+=O;break;case"rt":case"rm":case"rb":m-=O;break;case"ct":case"cm":case"cb":m-=O/2,v+=O/2}}var x=new L.Bounds;if(this.options.labelRotation&&0!==this.options.labelRotation){var w=[];w.push(L.point(m,b)),w.push(L.point(m,M)),w.push(L.point(v,b)),w.push(L.point(v,M));for(var E=this.options.labelRotation*(Math.PI/180),I=0;It)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(var e=0;e9?this.symbolType===SuperMap.Plot.SymbolType.REGULARPOLYGON?(t.handlePoints.push(this.getLatLngs()[0].clone()),t.handlePoints.push(this.getLatLngs()[this.getLatLngs().length-1].clone())):t.handlePoints=L.Util.cloneLatLngs(this.getLatLngs()):t.handlePoints=this._getHandlePointsByBounds(e);for(var 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=a,a.prototype._containsPoint=function(t){if(this.symbolType!==SuperMap.Plot.SymbolType.TEXTSYMBOL)return!1;for(var e in this.components)if(this.components[e]._containsPoint(t))return!0;return!1},L.supermap.plotting.PlottingObject.createSymbol=function(t,e,o,i,l,n){i||(i={}),i.custom=n;var a=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:a=L.supermap.plotting.arcRegion(t,e,o,i);break;case SuperMap.Plot.SymbolType.MISSILEROUTE:a=L.supermap.plotting.missileRoute(t,e,o,i);break;case SuperMap.Plot.SymbolType.NAVYROUTE:a=L.supermap.plotting.navyRoute(t,e,o,i);break;case SuperMap.Plot.SymbolType.AIRROUTE:a=L.supermap.plotting.airRoute(t,e,o,i);break;case SuperMap.Plot.SymbolType.LITERATESIGN:a=L.supermap.plotting.literateSign(t,e,o,i);break;case SuperMap.Plot.SymbolType.ROUTENODE:a=L.supermap.plotting.routeNode(t,e,o,i);break;case SuperMap.Plot.SymbolType.PATHTEXT:a=L.supermap.plotting.pathText(t,e,o,i);break;case SuperMap.Plot.SymbolType.LINERELATION:a=L.supermap.plotting.lineRelation(t,e,o,i);break;case SuperMap.Plot.SymbolType.GROUPOBJECT:a=L.supermap.plotting.groupObject(t,e,o,i);break;case SuperMap.Plot.SymbolType.INTERFERENCEBEAM:a=L.supermap.plotting.interferenceBeam(t,e,o,i);break;case SuperMap.Plot.SymbolType.SATELLITE:a=L.supermap.plotting.satellite(t,e,o,i);break;case SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS:a=L.supermap.plotting.satelliteTimeWindows(t,e,o,i);break;case SuperMap.Plot.SymbolType.SYMBOLTEXT:a=L.supermap.plotting.symbolText(t,e,o,i);break;case SuperMap.Plot.SymbolType.SYMBOLTEXT1:a=L.supermap.plotting.symbolText1(t,e,o,i);break;case SuperMap.Plot.SymbolType.FLAGGROUP:a=L.supermap.plotting.flagGroup(t,e,o,i);break;case SuperMap.Plot.SymbolType.NAVYDEPLOYMENT:a=L.supermap.plotting.navyDeployment(t,e,o,i);break;case SuperMap.Plot.SymbolType.AIRDEPLOYMENT:a=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:a=L.supermap.plotting.picture(t,e,o,i);break;default:a=L.supermap.plotting.algoSymbol(t,e,o,i)}else a=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 s=L.supermap.plotting.getControl().getDefaultStyle();return SuperMap.Plot.AnalysisSymbol.mergeDefaultStyleToFeature(a,s,!0),l&&SuperMap.Util.extend(a.style,l),null!=o&&o.length>0&&(o.length>a.maxEditPts&&(o=o.slice(0,a.maxEditPts)),a.latLngs=L.Util.cloneLatLngs(o)),a}},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.groupObject=e.GroupObject=void 0,o(0);var i=o(5),l=o(10),n=e.GroupObject=i.PlottingObject.extend({subObjects:[],initialize:function(t,e,o,l){this.subObjects=[],this.symbolName="组合对象",this.libID=0,this.code=SuperMap.Plot.SymbolType.GROUPOBJECT,this.symbolType=SuperMap.Plot.SymbolType.GROUPOBJECT,i.PlottingObject.prototype.initialize.call(this,t,e,o,l)},_addComponents:function(t){i.PlottingObject.prototype._addComponents.call(this,t),t.layer=this.layer,t.isEdit=!0,l.PlottingObjectDrag&&(t.dragging||(t.dragging=new l.PlottingObjectDrag(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),i.PlottingObject.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;t0){for(var n in this.radius)this.scaleValues[n]=this.radius[n];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),i.GraphicObject.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 h in this.textContent.length>0&&(this.style.fontSize*=e),this.components)this.components[h]instanceof l.Text&&(this.components[h].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){i.GraphicObject.prototype._resize.call(this,t,e);var o=new SuperMapAlgoPlot.Point(e.lng,e.lat);if(this.superMapAlgoSymbol){for(var l=0;l0&&this.removeFeatures(s.geoSymbolTexts));var r=SuperMap.Util.indexOf(this.features,s);-1!==r&&this.features.splice(r,1),s.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(var l=0;l1){var a=new i.GroupObject(0,SuperMap.Plot.SymbolType.GROUPOBJECT,[],{subObjects:o,uuid:e});return this.addFeatures(a),a}return null},unGroupObject:function(t){var e=[];return t.symbolType===SuperMap.Plot.SymbolType.GROUPOBJECT||t.symbolType===SuperMap.Plot.SymbolType.FLAGGROUP?(e=t._unGroupObject(),t.destroy()):e.push(t),e},createLineRelation:function(t,e,o,i,l,n,a){n||(n={}),n.startAssociatedUuid=t,n.endAssociatedUuid=e,n.lineRelationType=o,n.uuid=i,n.custom=a;var s=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.LINERELATION,null,n,l,a);return this.addFeatures(s),s},createInterferenceBeam:function(t,e,o,i,l,n){l||(l={}),l.associatedUuid=t,l.uuid=o,l.custom=n;var a=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.INTERFERENCEBEAM,e,l,i,n);return this.addFeatures(a),a},createSatellite:function(t,e,o,i,l,n,a,s,r){var u=this._getSymbolDataFromCache(t,e);if(null===u){var p=new SuperMap.GetSymbolInfoParameters({libID:t,code:e});L.supermap.symbolInfoService(this.serverUrl,this.options.serviceParams).getSymbolInfo(p,function(u){this._cacheSymbolData(u.result),a||(a={}),a.serverUrl=this.serverUrl,a.serviceParams=this.options.serviceParams,a.orbitPoints=o,a.textContent=i,a.uuid=l,a.custom=r,a.subSymbols=[{libID:t,code:e,symbolData:SuperMap.Plot.PlottingUtil.cloneObject(u.result),textContent:i}];var p=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.SATELLITE,[],a,n,r);this.addFeatures(p),"function"==typeof s&&s({feature:p})},this)}else{a||(a={}),a.serverUrl=this.serverUrl,a.serviceParams=this.options.serviceParams,a.orbitPoints=o,a.textContent=i,a.uuid=l,a.custom=r,a.subSymbols=[{libID:t,code:e,symbolData:u,textContent:i}];var h=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.SATELLITE,[],a,n,r);this.addFeatures(h),"function"==typeof s&&s({feature:h})}},createSatelliteTimeWindows:function(t,e,o,i,l,n){l||(l={}),l.associatedUuid=t,l.timeWindows=e,l.custom=n,l.uuid=o;var a=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS,[],l,i,n);return this.addFeatures(a),a},createSatelliteTimeWindows1:function(t,e,o,i,l,n){l||(l={}),l.associatedUuid=t;for(var a=0;a=2800&&t[l].code<=2900&&i.push(t[l]);var a=null;return i.length>1&&(a=new n.FlagGroup(0,SuperMap.Plot.SymbolType.FLAGGROUP,[],{subObjects:i,ratio:e,uuid:o}),this.addFeatures(a)),a},createArcRegion:function(t,e,o,i,l,n,a,s,r,u,p){r||(r={}),r.centerPoint=t,r.radius=e,r.startAngle=o,r.endAngle=i,r.textContent=l,r.textPosition=n,r.uuid=a,r.custom=p;var h=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.ARCREGION,[],r,s,p);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)){var n={};n.negativeImage=o.negativeImage,n.symbolRank=parseInt(o.symbolRank),n.surroundLineType=parseInt(o.surroundLineType);var a=!1;(n.negativeImage||0!==n.surroundLineType||0!==n.symbolRank)&&(a=!0);var s=this._getSymbolDataFromCache(i,l);if(a||null===s){var r=new SuperMap.GetSymbolInfoParameters({libID:i,code:l,negativeImage:n.negativeImage,symbolRank:n.symbolRank,surroundLineType:n.surroundLineType,inputPoints:o.localePoints,subSymbols:o.subSymbols});L.supermap.symbolInfoService(this.serverUrl,this.options.serviceParams).getSymbolInfo(r,function(t){if(t.result.libID&&t.result.code){t.result.symbolType!==SuperMap.Plot.SymbolType.DOTSYMBOL||a||this._cacheSymbolData(t.result),s=SuperMap.Util.cloneObject(t.result),SuperMap.Plot.AnalysisSymbol.mergeSymbolDataAndServerData(o,s);var n={symbolData:o,serverUrl:this.serverUrl,serviceParams:this.options.serviceParams,isGeoJSONData:!0},r=L.supermap.plotting.PlottingObject.createSymbol(i,l,null,n);this.addFeatures(r),"function"==typeof e&&e({feature:r})}},this)}else{SuperMap.Plot.AnalysisSymbol.mergeSymbolDataAndServerData(o,s);var u={symbolData:o,serverUrl:this.serverUrl,isGeoJSONData:!0},p=L.supermap.plotting.PlottingObject.createSymbol(i,l,null,u);this.addFeatures(p),"function"==typeof e&&e({feature:p})}}else if(o.subSymbols&&0!==o.subSymbols.length){for(var h=[],c=0,g=o.subSymbols.length;c0&&(o.subSymbols[c].symbolData=this._getSymbolDataFromCache(o.subSymbols[c].libID,o.subSymbols[c].code),null===o.subSymbols[c].symbolData&&-1===SuperMap.Util.indexOf(h,o.subSymbols[c])&&h.push(o.subSymbols[c]))}for(var f=h.slice(),P=0;P=0&&null===(e=this._selectFeature(this.features[s],t.latlng,a));s--);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(){for(var t=arguments.length,e=Array(t),o=0;o=s.getWest()&&e.lng<=s.getEast()&&e.lat>=s.getSouth()&&e.lat<=s.getNorth())return t}else for(var p=this._map.latLngToLayerPoint(e),h=0,c=t.components.length;h=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 n=o.lat,a=o.lng,s=n-this._startPoint.lat,r=a-this._startPoint.lng;(s||r)&&(this._plottingObject._dragMoved||(this._plottingObject._dragMoved=!0,this._plottingObject.fire("dragstart",t)),this._startPoint.lat=n,this._startPoint.lng=a,this._plottingObject.fire("predrag",t),t.dLat=s,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:n(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,n=i-this._startPoint.lng;(l||n)&&(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=n,this._plottingObject.fire("drag",t))},_dragEnd:function(t){var e=t.target._latlng,o=this.moved();if(o){this._plottingObject.fire("dragend",{distance:n(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(){var t=this._plottingObject.getBounds();this.moveMarker._latlng=t.getCenter(),this.moveMarker.update()}})},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PointImage=void 0,o(0);var i=e.PointImage=L.Path.extend({options:{externalGraphic:"",graphicWidth:0,graphicHeight:0,graphicOpacity:1,graphicXOffset:void 0,graphicYOffset:void 0,rotation:0,graphicTitle:"",interactive:!0},_imageNode:null,initialize:function(t,e){L.setOptions(this,e),this._latlng=L.latLng(t[0])},onAdd:function(){L.Path.prototype.onAdd.call(this),this._updatePath()},onRemove:function(){this._imageNode&&this._imageNode.parentNode&&(this._renderer._rootGroup.removeChild(this._imageNode),delete this._imageNode,this._imageNode=null),this._imageNode&&(delete this._imageNode,this._imageNode=null),L.Path.prototype.onRemove.call(this)},setLatLngs:function(t){return this._latlng=L.latLng(t[0]),this.redraw(),this.fire("move",{latlng:this._latlng})},getLatLngs:function(){return[this._latlng]},getBounds:function(){return this._updateBounds(),this._bounds},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},getPxBounds:function(){this._point=this._map.latLngToLayerPoint(this._latlng);var t=void 0!=this.options.graphicXOffset?this.options.graphicXOffset:-.5*this.options.graphicWidth,e=void 0!=this.options.graphicYOffset?this.options.graphicYOffset:-.5*this.options.graphicHeight,o=this._point.x+t,i=this._point.y+e,l=o+this.options.graphicWidth,n=i+this.options.graphicHeight,a=new L.Bounds;if(this.options.rotation&&0!==this.options.rotation){var s=[];s.push(L.point(o,i)),s.push(L.point(o,n)),s.push(L.point(l,i)),s.push(L.point(l,n));for(var r=this.options.rotation*(Math.PI/180),u=0;u0&&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 n=e+i+" "+e+l;t[i+l]=L.DomUtil.create("div",n,o)}i("top","left"),i("top","right"),i("bottom","left"),i("bottom","right")},_clearControlPos:function(){L.DomUtil.remove(this._controlContainer)}})},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AvoidRegionControl=void 0,o(0);var i=o(8);e.AvoidRegionControl=L.Control.extend({_mouseTolerance:10,_editMarkers:null,_editMode:SuperMap.Plot.EditMode.EDITCIRCUMRECTANGLE,feature:null,_temportary:null,options:{avoidRegionStyle:{fill:!1,color:"#0000ff",dashArray:"2, 2",opacity:1,weight:1},draggable:!0,avoidIcon:L.divIcon({className:"leaflet-supermap-plot-avoid-icon-path",iconSize:[8,8]}),icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"})},initialize:function(t,e){if(L.version<"0.7")throw new Error("Leaflet.draw 0.2.3+ requires Leaflet 0.7.0+. Download latest from https://github.com/Leaflet/Leaflet/");L.Browser.touch&&L.supermap.plotting.getControl().getTouchMode()&&(this.options.avoidIcon=L.divIcon({className:"leaflet-supermap-plot-avoid-icon-path",iconSize:[15,15]}),this.options.icon=new L.DivIcon({iconSize:new L.Point(15,15),className:"leaflet-div-icon leaflet-editing-icon"})),L.Control.prototype.initialize.call(this,e),L.setOptions(this,e),this._temportary=new i.PlottingLayerBase("avoidRegionControl-temportary",t.serverUrl,{serviceParams:t.serviceParams}),this._editMarkers={},this.feature=t},onAdd:function(t){if(this.feature&&!this.feature.getLocked())return this.controlDiv=L.DomUtil.create("div","supermap-iclient-avoidregion"),this._map=t,this._markers=[],this._latlngs=[],this._markerGroup=new L.LayerGroup,this._map.addLayer(this._markerGroup),this._map.addLayer(this._temportary),this._map.on("mousemove",this._onMouseMove,this).on("click",this._onMapClick,this),this._showAvoidRegions(),this.controlDiv},onRemove:function(){this._hideAvoidRegions(),this._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers,delete this._latlngs,this.plotting&&(this._temportary.removeFeatures(this.plotting),delete this.plotting,this.plotting=null),this._map.removeLayer(this._temportary),delete this._temportary,this._map.off("mousemove",this._onMouseMove,this).off("click",this._onMapClick,this)},_showAvoidRegions:function(){for(var t=0;t1&&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+10&&(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 l.GraphicEditLayer(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(var 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 i.PlottingGraphic&&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(var 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);for(var i=e.getFeaturesInBounds(),l=0,n=i.length;l0)for(var s in i[l].components)if(i[l].components[s]._containsPoint(this._map.latLngToLayerPoint(t.latlng))){a=!0;break}if(a){if(!0===t.originalEvent.altKey&&!0!==t.originalEvent.ctrlKey&&-1!==SuperMap.Util.indexOf(o,i[l]))continue;if(!0===this.isEditable&&!1===this.isLocked&&e._map&&e._map.getPlotEditControl()&&(e._map.getPlotEditControl().unselectFeatures(),this.removeFeatures(i[l]),e._editLayer.addFeatures(i[l]),i[l].enableEdit||e._map.getPlotEditControl().enableEditFeatures(i[l]),e._map.getPlotEditControl().selectFeatures(i[l])),this.selectedFeatures.push(i[l]),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){for(var e=this.getFeaturesInBounds(),o=0,i=e.length;o0)for(var n in e[o].components)if(e[o].components[n]._containsPoint(this._map.latLngToLayerPoint(t.latlng))){l=!0;break}if(l){this.fire(SuperMap.Plot.Event.movingtargetcontextmenu,{features:[e[o]]});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(var o=0;o0)for(var i=0;i0)for(var l=0;l=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()),n=this.routeNode.style;n.labelAlign="lb",this._createAndDrawLayer(SuperMap.Plot.SymbolType.TEXTSYMBOL,[l],n,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))}}),a=e.geoRouteNode=function(t,e,o,i){return new n(t,e,o,i)};L.supermap.plotting.routeNode=a,L.supermap.plotting.RouteNode=n},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.literateSign=e.LiterateSign=void 0,o(0);var i=o(1),l=e.LiterateSign=i.GraphicObject.extend({route:null,towardNode:null,startRouteNode:null,textAnchor:null,space:null,inner:null,setPosition:function(t){this.textPosition=t,this._calculateOffset()},initialize:function(t,e,o,l){this.symbolName="标牌文字",this.symbolType=SuperMap.Plot.SymbolType.LITERATESIGN,i.GraphicObject.prototype.initialize.call(this,t,e,o,l)},destroy:function(){this.space=null,this.inner=null,this.textAnchor=null,i.GraphicObject.prototype.destroy.call(this)},_calculateParts:function(){if(null!==this.startRouteNode&&null!==this.towardNode&&null!==this.towardNode.textContent&&0!==this.towardNode.textContent.length){for(var t=this.route._getNodeByUuid(this.towardNode.routeNodeId),e=new SuperMap.Geometry.Point(this.startRouteNode.x,this.startRouteNode.y),o=new SuperMap.Geometry.Point(t.x,t.y),i=L.latLng((e.y+o.y)/2,(e.x+o.x)/2),l=SuperMap.Plot.PlottingUtil.getTextCount(this.towardNode.textContent[0]),n=1;n5?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)),n=SuperMap.Plot.PlottingUtil.distance({x:i.lng,y:i.lat},{x:l.lng,y:l.lat}),a=n,s=n*t,r=e.length+2,u=[],p=r*a*.5,h=new Object;h.type=SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,h.positionPoints=[],h.positionPoints.push(new SuperMap.Geometry.Point(p,0)),h.positionPoints.push(new SuperMap.Geometry.Point(-2*a+p,.5*s)),h.positionPoints.push(new SuperMap.Geometry.Point(-r*a+p,.5*s)),h.positionPoints.push(new SuperMap.Geometry.Point(-r*a+p,-.5*s)),h.positionPoints.push(new SuperMap.Geometry.Point(-2*a+p,-.5*s)),h.style={surroundLineFlag:!1,fontSize:12},u.push(h);for(var c=1;c<=e.length;c++){var g=new Object;g.type=SuperMap.Plot.SymbolType.POLYLINESYMBOL,g.positionPoints=[],g.positionPoints.push(new SuperMap.Geometry.Point(-(c+1)*a+p,.5*s)),g.positionPoints.push(new SuperMap.Geometry.Point(-(c+1)*a+p,-.5*s)),g.style={surroundLineFlag:!1,fontSize:12},u.push(g);var y=new Object;y.type=SuperMap.Plot.SymbolType.TEXTSYMBOL,y.positionPoints=[],y.positionPoints.push(new SuperMap.Geometry.Point(-(.5+c+1)*a+p,0)),y.textContent=e[c-1],y.style={surroundLineFlag:!1,fontSize:12,fontFamily:"Microsoft YaHei"},y.style.labelAlign="cm",u.push(y)}var f=new SuperMap.Geometry.Point(-1.4*a+p,0),P=new Object;P.type=SuperMap.Plot.SymbolType.TEXTSYMBOL,P.positionPoints=[],P.positionPoints.push(f),P.textContent=this.towardNode.index.toString(),P.style={surroundLineFlag:!1,fontSize:12,fontSizeLimit:!0,fontFamily:"Microsoft YaHei"},P.style.labelAlign="cm",u.push(P);var d=new Object;return d.type=SuperMap.Plot.SymbolType.CIRCLESYMBOL,d.positionPoints=[],d.positionPoints.push(f),d.positionPoints.push(new SuperMap.Geometry.Point(f.x,.4*a)),d.style={surroundLineFlag:!1,fontSize:12},u.push(d),u}}),n=e.literateSign=function(t,e,o,i){return new l(t,e,o,i)};L.supermap.plotting.literateSign=n,L.supermap.plotting.LiterateSign=l},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.flagGroup=e.FlagGroup=void 0,o(0);var i=o(6),l=e.FlagGroup=i.GroupObject.extend({ratio:null,scalePoints:null,scaleValues:null,initialize:function(t,e,o,l){i.GroupObject.prototype.initialize.call(this,t,e,o,l),this.libID=0,this.code=SuperMap.Plot.SymbolType.FLAGGROUP,this.symbolType=SuperMap.Plot.SymbolType.FLAGGROUP,this.symbolName="多旗",l.subObjects&&(this.subObjects=l.subObjects),null===this.ratio&&(this.ratio=.8)},destroy:function(){i.GroupObject.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(var 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,n=e.lat-o.lat,a=l*l,s=n*n,r=l*n,u=l*l+n*n;return i.lng=(r*(e.lat-t.lat)+e.lng*s+t.lng*a)/u,i.lat=(r*(e.lng-t.lng)+e.lat*a+t.lat*s)/u,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)),n=this._projectPoint(e,o,i),a=Math.sqrt(Math.pow(o.lng-n.lng,2)+Math.pow(o.lat-n.lat,2));this.ratio[t-1]=a/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(){i.GroupObject.prototype._parseSymbolData.call(this),this.symbolData&&(this.ratio=this.symbolData.ratio)},_setSymbolData:function(){i.GroupObject.prototype._setSymbolData.call(this),this.symbolData&&(this.symbolData.ratio=this.ratio)}}),n=e.flagGroup=function(t,e,o,i){return new l(t,e,o,i)};L.supermap.plotting.flagGroup=n,L.supermap.plotting.FlagGroup=l},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Text=e.PointImage=e.PlottingObjectDrag=e.EditMarker=void 0;var i=o(79),l=o(10),n=o(11),a=o(2);e.EditMarker=i.EditMarker,e.PlottingObjectDrag=l.PlottingObjectDrag,e.PointImage=n.PointImage,e.Text=a.Text},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.geoSymbolText1=e.GeoSymbolText1=e.geoSymbolText=e.GeoSymbolText=e.satelliteTimeWindows=e.SatelliteTimeWindows=e.satellite=e.Satellite=e.lineRelation=e.LineRelation=e.interferenceBeam=e.InterferenceBeam=e.navyRoute=e.NavyRoute=e.missileRoute=e.MissileRoute=e.literateSign=e.LiterateSign=e.airRoute=e.AirRoute=e.geoRouteNode=e.GeoRouteNode=e.Route=e.avoidRegion=e.AvoidRegion=e.airDeployment=e.AirDeployment=e.navyDeployment=e.NavyDeployment=e.flagGroup=e.FlagGroup=e.groupObject=e.GroupObject=e.arcRegion=e.ArcRegion=e.picture=e.Picture=e.dotSymbol=e.DotSymbol=e.algoSymbol=e.AlgoSymbol=e.GraphicObject=e.PlottingObject=e.Text=e.PointImage=e.PlottingObjectDrag=e.EditMarker=void 0;var i=o(18),l=o(5),n=o(1),a=o(7),s=o(40),r=o(78),u=o(77),p=o(6),h=o(17),c=o(38),g=o(76),y=o(37),f=o(4),P=o(15),d=o(74),S=o(16),m=o(73),b=o(72),L=o(71),v=o(39),M=o(70),A=o(69),T=o(68),_=o(67);e.EditMarker=i.EditMarker,e.PlottingObjectDrag=i.PlottingObjectDrag,e.PointImage=i.PointImage,e.Text=i.Text,e.PlottingObject=l.PlottingObject,e.GraphicObject=n.GraphicObject,e.AlgoSymbol=a.AlgoSymbol,e.algoSymbol=a.algoSymbol,e.DotSymbol=s.DotSymbol,e.dotSymbol=s.dotSymbol,e.Picture=r.Picture,e.picture=r.picture,e.ArcRegion=u.ArcRegion,e.arcRegion=u.arcRegion,e.GroupObject=p.GroupObject,e.groupObject=p.groupObject,e.FlagGroup=h.FlagGroup,e.flagGroup=h.flagGroup,e.NavyDeployment=c.NavyDeployment,e.navyDeployment=c.navyDeployment,e.AirDeployment=g.AirDeployment,e.airDeployment=g.airDeployment,e.AvoidRegion=y.AvoidRegion,e.avoidRegion=y.avoidRegion,e.Route=f.Route,e.GeoRouteNode=P.GeoRouteNode,e.geoRouteNode=P.geoRouteNode,e.AirRoute=d.AirRoute,e.airRoute=d.airRoute,e.LiterateSign=S.LiterateSign,e.literateSign=S.literateSign,e.MissileRoute=m.MissileRoute,e.missileRoute=m.missileRoute,e.NavyRoute=b.NavyRoute,e.navyRoute=b.navyRoute,e.InterferenceBeam=L.InterferenceBeam,e.interferenceBeam=L.interferenceBeam,e.LineRelation=v.LineRelation,e.lineRelation=v.lineRelation,e.Satellite=M.Satellite,e.satellite=M.satellite,e.SatelliteTimeWindows=A.SatelliteTimeWindows,e.satelliteTimeWindows=A.satelliteTimeWindows,e.GeoSymbolText=T.GeoSymbolText,e.geoSymbolText=T.geoSymbolText,e.GeoSymbolText1=_.GeoSymbolText1,e.geoSymbolText1=_.geoSymbolText1},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PlottingGraphic=void 0;var i=o(42),l=o(19),n=o(14),a=o(21);e.PlottingGraphic=L.Class.extend({_image:null,_lastPos:null,_lastImage:null,_latlng:null,_uuid:null,_trajectoryLine:null,_trajectoryPoints:null,_trajectoryPointGraphic:{},_rotation:null,options:{graphicWidth:0,graphicHeight:0},initialize:function(t,e){e=e||{},this.feature=t,t.graphic=this,this._latlng=e._latlng,this._image=e._image,this._uuid=e._uuid,this._rotation=0,this._trajectoryPoints=[]},onAdd:function(t){this.feature.movingTarget=!0,this.feature._map=t._map,this.feature.layer=t,this.layer=t,this._renderer=t._renderer,this._map=t._map,this.update()},onRemove:function(){null!=this._trajectoryLine&&this.layer instanceof n.MovingTargetLayer&&this.layer._removeTrajectory(this._trajectoryLine);for(var t=0;t=2){var o=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),i=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),l=SuperMap.Plot.PlottingUtil.radian(o,i)*SuperMap.Plot.PlottingUtil.RTOD;this._rotation=l-90}var a=this.feature.trajectory.getDisplayLatLngs(this._map.getBounds());if(!0===this.feature.trajectory.showTrackingLine?a.length<=1&&null!=this._trajectoryLine?(this.layer._removeTrajectory(this._trajectoryLine),delete this._trajectoryLine,this._trajectoryLine=null):a.length>1&&null===this._trajectoryLine?(this._trajectoryLine=L.polyline(a,{color:this.feature.trajectory.style.color,weight:this.feature.trajectory.style.weight,opacity:this.feature.trajectory.style.opacity}),this.layer._addTrajectory(this._trajectoryLine)):a.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(a)):null!=this._trajectoryLine&&(this.layer._removeTrajectory(this._trajectoryLine),this._trajectoryLine=null),!0===this.feature.trajectory.showTrackingPoint){if(0===a.length&&this._trajectoryPoints.length>0){for(var s=0;s0){var r=this.feature.trajectory.generateUuidKey(),u=[];if(this._trajectoryPointGraphic.hasOwnProperty(r))for(var p=0;p0&&(this._image.componentLatLngs.length=0),this._image.componentLatLngs=[];for(var e=0;e0&&(this._image.images.length=0),this._image.images=[];for(var o=0;o0&&(this._image.pictureFrames.length=0),this._image.pictureFrames=[];for(var n=0;n=this.libIDs.length?-1:this.libIDs[t]},getSymbolLibJSONInfo:function(t){return t>=this.libIDs.length?null:this.symbolLibJsons[t]},getSymbolLibByIndex:function(t){return t>=this.libIDs.length?null:this.symbolLibs[t]},getSymbolLibByLibId:function(t){for(var e=0;e=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 i.Route){var o=this._map.layerPointToLatLng(L.point(0,0)),l=this._map.layerPointToLatLng(L.point(this.options.tolerancePixel,0)),n=SuperMap.Plot.PlottingUtil.distance({x:o.lng,y:o.lat},{x:l.lng,y:l.lat});this.plotting._addRouteNodeByPos(t,n)}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){var n=new SuperMap.GetSymbolInfoParameters({libID:this.libID,code:this.code});n.inputPoints=L.Util.latLngsToSuperMapPoints(l),L.supermap.symbolInfoService(this._drawingLayer.serverUrl,this._drawingLayer.options.serviceParams).getSymbolInfo(n,function(t){this.plotting.symbolData=t.result,this.plotting.setLatLngs(l)},this)}else this.plotting.setLatLngs(l)}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()),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 i=[],l=0,n=this.plotting.subSymbols.length;l1&&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),n=this._calculateFinishDistance(o.latlng);if(L.Browser.touch&&L.supermap.plotting.getControl().getTouchMode()&&null==this.plotting){var a=this;this._createFeature(function(){a._latlngs.push(o.latlng),a.plotting.setLatLngs(a._latlngs),(a.plotting instanceof l.GraphicObject||a.plotting instanceof L.supermap.plotting.Route)&&(a._latlngs.length+1>=a.plotting.maxEditPts||n<20&&L.Browser.touch)?a._finishShape():Math.abs(i)<9*(window.devicePixelRatio||1)&&a.addVertex(o.latlng),a._enableNewMarkers()})}else(this.plotting instanceof l.GraphicObject||this.plotting instanceof L.supermap.plotting.Route)&&(this._latlngs.length+1>=this.plotting.maxEditPts||n<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}),n=this._map.latLngToContainerPoint(l.getLatLng());e=i.distanceTo(n)}else e=1/0;return e},_createMarker:function(t){var e=new L.Marker(t,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset});return this._markerGroup.addLayer(e),e},_disableNewMarkers:function(){this._disableMarkers=!0},_enableNewMarkers:function(){setTimeout(function(){this._disableMarkers=!1}.bind(this),50)}})},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GOAnimationWay=void 0,o(0);var i=o(3),l=e.GOAnimationWay=i.GOAnimation.extend({showPath:!1,tangentDirection:!1,pathWidth:.5,pathColor:"#00FFFF",currentPt:null,pathType:SuperMap.Plot.WayPathType.POLYLINE,wayPoints:null,shapePoints:null,pathFeature:null,pathLength:0,destroy:function(){null!==this.pathFeature&&(L.supermap.plotting.getControl().getGOAnimationManager().map.removeLayer(this.pathFeature),this.pathFeature=null);i.GOAnimation.prototype.destroy.call(this)},getGOAnimationType:function(){return SuperMap.Plot.GOAnimationType.ANIMATION_WAY},setShowPath:function(t){this.showPath=t},resetAnimationFeature:function(t){i.GOAnimation.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],n=i.y-l.lat,a=i.x-l.lng;if(this.animationGOFeature.move(n,a),this.tangentDirection){var s=o.angle;1===t&&(s=0);var r=this.animationGOFeature.dRotate;this.animationGOFeature._rotate(s-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+=n;var a=SuperMap.Plot.PlottingUtil.findPoint(e[i-1],e[i],t-l,0);return this.tangentDirection&&(o.angle=SuperMap.Plot.PlottingUtil.radian(a,e[i])/Math.PI*180),a},getJSONData:function(){var t=i.GOAnimation.prototype.getJSONData.call(this);t.showPath=this.showPath,t.tangentDirection=this.tangentDirection,t.pathType=this.pathType,t.pathWidth=this.pathWidth,t.pathColor=this.pathColor,t.wayPoints=[];for(var e=0;e1?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=i.GOAnimation.prototype.getJSONData.call(this);return t.showEffect=this.showEffect,t.finalDisplay=this.finalDisplay,t},fromJSONData:function(t){i.GOAnimation.prototype.fromJSONData.call(this,t),this.showEffect=t.showEffect,this.finalDisplay=t.finalDisplay}});L.supermap.plotting.GOAnimationShow=l},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GOAnimationScale=void 0,o(0);var i=o(3),l=e.GOAnimationScale=i.GOAnimation.extend({startScale:0,endScale:1,lastScale:null,getGOAnimationType:function(){return SuperMap.Plot.GOAnimationType.ANIMATION_SCALE},resetAnimationFeature:function(t){this.lastScale=null,this.animationGOFeature._resize(this.goFeature.initialScale.x/this.animationGOFeature.initialScale.x,this.animationGOFeature.getLatLngs()[0]),i.GOAnimation.prototype.resetAnimationFeature.call(this,t)},execute:function(){if(this.goFeature.symbolType!==SuperMap.Plot.SymbolType.DOTSYMBOL)return!1;if(!this.canExecute())return!1;this.lastScale=this.animationGOFeature.initialScale.x;var t=this.startScale;0===t&&(t=.1);var e=this.endScale;0===e&&(e=.1);var o=this.goFeature.initialScale.x*(t+this.ratio*(e-t));return this.animationGOFeature._resize(o/this.lastScale,this.animationGOFeature.getLatLngs()[0]),!0},getJSONData:function(){var t=i.GOAnimation.prototype.getJSONData.call(this);return t.startScale=this.startScale,t.endScale=this.endScale,t},fromJSONData:function(t){i.GOAnimation.prototype.fromJSONData.call(this,t),this.startScale=t.startScale,this.endScale=t.endScale}});L.supermap.plotting.GOAnimationScale=l},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GOAnimationRotate=void 0,o(0);var i=o(3),l=e.GOAnimationRotate=i.GOAnimation.extend({rotateDirection:SuperMap.Plot.RotateDirection.ClockWise,startAngle:0,endAngle:360,getGOAnimationType:function(){return SuperMap.Plot.GOAnimationType.ANIMATION_ROTATE},resetAnimationFeature:function(t){this.animationGOFeature._rotate(this.goFeature.dRotate-this.animationGOFeature.dRotate,this.animationGOFeature.getLatLngs()[0]),i.GOAnimation.prototype.resetAnimationFeature.call(this,t)},execute:function(){if(this.goFeature.symbolType!==SuperMap.Plot.SymbolType.DOTSYMBOL)return!1;if(!this.canExecute())return!1;var t=this.ratio,e=this._getCurrentAngle(this.startAngle,this.endAngle,t),o=this.animationGOFeature.dRotate;return this.animationGOFeature._rotate(e-o,this.animationGOFeature.getLatLngs()[0]),!0},_getCurrentAngle:function(t,e,o){var i=0,l=e-t,n=parseInt(Math.abs(l/360));if(t!==e)if(this.rotateDirection===SuperMap.Plot.RotateDirection.AntiClockWise)l<0&&(l+=360*(2*n+1)),i=t+l*o;else{var a=0;i=t+(360-(l=0===(a=l<0?l+360*(n+1):l-360*n)?360*n:360-a+360*n)*o)}return i},getJSONData:function(){var t=i.GOAnimation.prototype.getJSONData.call(this);return t.rotateDirection=this.rotateDirection,t.startAngle=this.startAngle,t.endAngle=this.endAngle,t},fromJSONData:function(t){i.GOAnimation.prototype.fromJSONData.call(this,t),this.rotateDirection=t.rotateDirection,this.startAngle=t.startAngle,this.endAngle=t.endAngle}});L.supermap.plotting.GOAnimationRotate=l},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GOAnimationGrow=void 0,o(0);var i=o(3),l=o(7),n=e.GOAnimationGrow=i.GOAnimation.extend({startScale:0,endScale:1,timeSpace:50,lastDrawTime:0,lineLength:0,controlPoints:[],initialize:function(t){i.GOAnimation.prototype.initialize.call(this,t),this.controlPoints=[],this.lineLength=0},getGOAnimationType:function(){return SuperMap.Plot.GOAnimationType.ANIMATION_GROW},_execute_1004:function(t){if(0===this.lineLength){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);this.lineLength+=SuperMap.Plot.PlottingUtil.distance(e,this.controlPoints[2]);for(var o=3;oe.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),n=new SuperMap.Geometry.Point(e.x+o,e.y-i);return this.animationGOFeature.setLatLngs(L.Util.superMapPointsToLatLngs([l,n])),!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;ln)return!1;var s=SuperMap.Plot.PlottingUtil.linePnt(i,this.controlPoints[l],a);e.push(s)}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),n=Math.PI/2+this.animationGOFeature.dRotate,a=i;SuperMap.Plot.PlottingUtil.rotateAngle(this.controlPoints[0],n,a);var s=[];s.push(this.controlPoints[0].clone()),s.push(a);for(var r=a.clone(),u=1;u1&&(this.startScale=1),this.endScale<0&&(this.endScale=0),this.endScale>1&&(this.endScale=1)},execute:function(){if(!(this.goFeature instanceof l.AlgoSymbol))return!1;if(!this.canExecute())return!1;this.endScale>1&&(this.endScale=1);var t=(new Date).getTime();if(this.lastDrawTime>0&&t-this.timeSpace=t);o++)i+=l;var n,a=new Object;return n=o0&&(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(),i.PlottingObjectDrag&&(this.dragging||(this.dragging=new i.PlottingObjectDrag(this)))},_clearComponents:function(){for(var t=0;t=this.minEditPts){var t=new L.Polygon(this.getLatLngs(),{smoothFactor:.05});this._addComponents(t),t.setStyle(this.style)}else if(this.getLatLngs().length>=2&&this.getLatLngs().length=u&&l<=h||u>h&&l<=u&&l>=h)){y=-1;break}c<=i||r!==p&&(cMath.max(r,p))||(u=u&&lh&&l=h)&&++y}else if(l===u&&(r<=p&&i>=r&&i<=p||r>=p&&i<=r&&i>=p)){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 l.Text){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 n=this._containsPoint(o[0]);n&&(e=1);for(var a=1;a1&&(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 u=0;u0;)if(1===i.length)a.push(i[0]),i.splice(0,1);else{for(var s=0,r=SuperMap.Plot.PlottingUtil.distance(t,i[0]),u=1;u=this.subSymbols[d].symbolData.innerCells[E].positionPoints[I].x&&(O=this.subSymbols[d].symbolData.innerCells[E].positionPoints[I].x),x<=this.subSymbols[d].symbolData.innerCells[E].positionPoints[I].y&&(x=this.subSymbols[d].symbolData.innerCells[E].positionPoints[I].y),w>=this.subSymbols[d].symbolData.innerCells[E].positionPoints[I].y&&(w=this.subSymbols[d].symbolData.innerCells[E].positionPoints[I].y);var C=L.latLng(T,A),D=this._map.latLngToLayerPoint(L.latLng(T,A)),R=new SuperMap.Geometry.Point(_,(x+w)/2),N=new SuperMap.Geometry.Point(R.x,R.y),U=new SuperMap.Geometry.Point(this.subSymbols[d].symbolData.anchorPoint.x,this.subSymbols[d].symbolData.anchorPoint.y),B=this._transitionPoint(N,D),k=this._transitionPoint(U,D);C.lat+=k.lat-B.lat,C.lng+=k.lng-B.lng;var F=this.subSymbols[d].symbolData.libID,G=this.subSymbols[d].symbolData.code;this.subSymbols[d].symbolData.annotationPosition=6;var V=SuperMap.Util.cloneObject(this.subSymbols[d].symbolData),j=L.supermap.plotting.PlottingObject.createSymbol(F,G,C,{serverUrl:this.serverUrl,symbolData:V,scaleByMap:!0,minScale:0,maxScale:2048,space:0});j.enableEdit=!0,j.ownerGroup=this,this._addComponents(j),this.bounds=this._calculateBounds(),this.subObjects.push(j)}if(this.bounds=new L.LatLngBounds,this.bounds=this._calculateBounds(),null!==this.textContent&&0!==this.textContent.length){var Y=L.latLng(n[0].lat+f/2+r,n[0].lng-5*r),z=L.supermap.plotting.PlottingObject.createSymbol(0,34,[Y],{textContent:this.textContent,serverUrl:this.serverUrl});z.style.labelAlign="rb",z.style.scaleByMap=!0,z.enableEdit=!0,z.ownerGroup=this,this._addComponents(z),this.bounds.extend(z.getBounds()),this.subObjects.push(z)}var W=new L.LatLngBounds(L.latLng(this.bounds.getSouth()-r,this.bounds.getWest()-r),L.latLng(this.bounds.getNorth()+r,this.bounds.getEast()+r)),X=[];X.push(L.latLng(W.getNorth(),W.getWest())),X.push(L.latLng(W.getSouth(),W.getEast()));var H=L.latLng(n[0].lat,n[0].lng);H.isFixedPos=!0,X.push(H);var Z=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.ANNOFRAMESYMBOL,X,{serverUrl:this.serverUrl});for(var J in Z.enableEdit=!0,Z.ownerGroup=this,this.subObjects.splice(0,0,Z),this._addComponents(Z),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;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,a=96*i.getHeight()/25.4/10;this.components[this._annotationId].options.graphicWidth=l,this.components[this._annotationId].options.graphicHeight=a}for(var s in this.components)s===this._annotationId&&this.components[s]instanceof n.Text?this.components[s].options.fontSize=this.style.fontSize:s!==this._annotationId&&this.components[s]instanceof n.Text?this.components[s].options.fontSize=t*(this.components[s].options.fontSize/this.prevScale/this.initialScale.x):s!==this._annotationId&&!0!==this.components[s].isLeadLine&&(this.components[s].options.weight=this.style.weight);for(var r=0;r45&&h<135||h>225&&h<315){var c=L.point(s.x-this.style.weight/2,s.y),g=L.point(s.x+this.style.weight/2,s.y);l=this._map.layerPointToLatLng(c),n=this._map.layerPointToLatLng(g)}else{var y=L.point(s.x,s.y-this.style.weight/2),f=L.point(s.x,s.y+this.style.weight/2);l=this._map.layerPointToLatLng(y),n=this._map.layerPointToLatLng(f)}var P=[this.getLatLngs()[0],l,n];this._createAndDrawLayer(32,P,{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";var l=L.latLng(t.getNorth(),t.getWest()),n=this._map.latLngToLayerPoint(l);n.x-=o,i=this._map.layerPointToLatLng(n)}else if(1===this.annotationPosition){e.labelAlign="rt";var a=L.latLng(t.getSouth(),t.getWest()),s=this._map.latLngToLayerPoint(a);s.x-=o,i=this._map.layerPointToLatLng(s)}else if(2===this.annotationPosition){e.labelAlign="lb";var r=L.latLng(t.getNorth(),t.getEast()),u=this._map.latLngToLayerPoint(r);u.x+=o,i=this._map.layerPointToLatLng(u)}else if(3===this.annotationPosition){e.labelAlign="lt";var p=L.latLng(t.getSouth(),t.getEast()),h=this._map.latLngToLayerPoint(p);h.x+=o,i=this._map.layerPointToLatLng(h)}else if(4===this.annotationPosition){e.labelAlign="cb";var c=L.latLng(t.getNorth(),(t.getWest()+t.getEast())/2),g=this._map.latLngToLayerPoint(c);g.y-=o,i=this._map.layerPointToLatLng(g)}else if(5===this.annotationPosition){e.labelAlign="ct";var y=L.latLng(t.getSouth(),(t.getWest()+t.getEast())/2),f=this._map.latLngToLayerPoint(y);f.y+=o,i=this._map.layerPointToLatLng(f)}else if(6===this.annotationPosition){e.labelAlign="rm";var P=L.latLng((t.getSouth()+t.getNorth())/2,t.getWest()),d=this._map.latLngToLayerPoint(P);d.x-=o,i=this._map.layerPointToLatLng(d)}else if(7===this.annotationPosition){e.labelAlign="lm";var S=L.latLng((t.getSouth()+t.getNorth())/2,t.getEast()),m=this._map.latLngToLayerPoint(S);m.x+=o,i=this._map.layerPointToLatLng(m)}else if(8===this.annotationPosition&&this.symbolData.middleMarkExist){var b;b=!0===this.limitWidthHeight?this.middleMarkBounds.scale(this.dScale*this.initialScale.x,this.anchorPoint):this._widthHeightLimitScale();var v=new SuperMap.Geometry.Point((b.left+b.right)/2,(b.top+b.bottom)/2);if(this.negativeImage){var M=SuperMap.Plot.PlottingUtil.projectPoint(v,new SuperMap.Geometry.Point(this.anchorPoint.x,100),new SuperMap.Geometry.Point(this.anchorPoint.x,this.anchorPoint.y));SuperMap.Plot.PlottingUtil.rotateAngle(M,Math.PI,v)}v.x-=this.anchorPoint.x,v.y-=this.anchorPoint.y;var A=this.dRotate*(Math.PI/180);SuperMap.Plot.PlottingUtil.rotateAngle(new SuperMap.Geometry.Point(0,0),A,v);var T=this._map.latLngToLayerPoint(this.getLatLngs()[0]);!0===this.positionOffset&&(T.x+=this.positionOffsetX*this.dScale,T.y+=this.positionOffsetY*this.dScale);var _=96*b.getWidth()/25.4/10,O=96*b.getHeight()/25.4/10;e.graphicWidth=_,e.graphicHeight=O,i=this._transitionPoint(v,T)}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 x={externalGraphic:e.externalGraphic,graphicWidth:e.graphicWidth,graphicHeight:e.graphicHeight,rotation:-this.dRotate},w=L.supermap.plotting.pointImage([i],x);this._annotationId=this.components.length,w.fromZoom=this._map.getZoom(),this._addComponents(w)}else if(8!==this.annotationPosition){if(!1===this.limitWidthHeight)var E=this.initialScale.xu&&(u=c)}p=parseInt(a.style.fontSize*r)+2*a.paddingY}var g=void 0,y=void 0,f=L.point(0,0),P=L.point(0,0);switch(a.textPosition){case SuperMap.Plot.AnnoPosition.LEFTTOP:a.style.labelAlign="rb",g=L.latLng(t.getNorth(),t.getWest()),(y=this._map.latLngToLayerPoint(g)).x+=a.offsetX,y.y+=a.offsetY,!0===a.border&&(f.x=y.x,f.y=y.y,P.x=y.x-u,P.y=y.y-p);break;case SuperMap.Plot.AnnoPosition.LEFTBOTTOM:a.style.labelAlign="rt",g=L.latLng(t.getSouth(),t.getWest()),(y=this._map.latLngToLayerPoint(g)).x+=a.offsetX,y.y+=a.offsetY,!0===a.border&&(f.x=y.x,f.y=y.y,P.x=y.x-u,P.y=y.y+p);break;case SuperMap.Plot.AnnoPosition.RIGHTTOP:a.style.labelAlign="lb",g=L.latLng(t.getNorth(),t.getEast()),(y=this._map.latLngToLayerPoint(g)).x+=a.offsetX,y.y+=a.offsetY,!0===a.border&&(f.x=y.x,f.y=y.y,P.x=y.x+u,P.y=y.y-p);break;case SuperMap.Plot.AnnoPosition.RIGHTBOTTOM:a.style.labelAlign="lt",g=L.latLng(t.getSouth(),t.getEast()),(y=this._map.latLngToLayerPoint(g)).x+=a.offsetX,y.y+=a.offsetY,!0===a.border&&(f.x=y.x,f.y=y.y,P.x=y.x+u,P.y=y.y+p);break;case SuperMap.Plot.AnnoPosition.TOP:a.style.labelAlign="cb",g=L.latLng(t.getNorth(),(t.getWest()+t.getEast())/2),(y=this._map.latLngToLayerPoint(g)).x+=a.offsetX,y.y+=a.offsetY,!0===a.border&&(f.x=y.x-u/2,f.y=y.y,P.x=y.x+u/2,P.y=y.y-p);break;case SuperMap.Plot.AnnoPosition.BOTTOM:a.style.labelAlign="ct",g=L.latLng(t.getSouth(),(t.getWest()+t.getEast())/2),(y=this._map.latLngToLayerPoint(g)).x+=a.offsetX,y.y+=a.offsetY,!0===a.border&&(f.x=y.x-u/2,f.y=y.y,P.x=y.x+u/2,P.y=y.y+p);break;case SuperMap.Plot.AnnoPosition.LEFT:a.style.labelAlign="rm",g=L.latLng((t.getSouth()+t.getNorth())/2,t.getWest()),(y=this._map.latLngToLayerPoint(g)).x+=a.offsetX,y.y+=a.offsetY,!0===a.border&&(f.x=y.x,f.y=y.y+p/2,P.x=y.x-u,P.y=y.y-p/2);break;case SuperMap.Plot.AnnoPosition.RIGHT:a.style.labelAlign="lm",g=L.latLng((t.getSouth()+t.getNorth())/2,t.getEast()),(y=this._map.latLngToLayerPoint(g)).x+=a.offsetX,y.y+=a.offsetY,!0===a.border&&(f.x=y.x,f.y=y.y+p/2,P.x=y.x+u,P.y=y.y-p/2);break;case SuperMap.Plot.AnnoPosition.ANCHOR:a.style.labelAlign="lm",g=L.latLng(e.lat,e.lng),(y=this._map.latLngToLayerPoint(g)).x+=a.offsetX,y.y+=a.offsetY,a.offsetX>0?(a.style.labelAlign="lm",!0===a.border&&(f.x=y.x,f.y=y.y+p/2,P.x=y.x+u,P.y=y.y-p/2)):(a.style.labelAlign="rm",!0===a.border&&(f.x=y.x,f.y=y.y+p/2,P.x=y.x-u,P.y=y.y-p/2))}var d=this._map.layerPointToLatLng(y);if(!0===a.showRelationLine&&(0!==a.offsetX||0!==a.offsetY)){var S=a.lineStyle;null==a.lineStyle&&(S=SuperMap.Util.copyAttributes(S,this.style)),S.lineColorLimit=!0,S.lineTypeLimit=!0,S.lineWidthLimit=!0;var m=this._createAndDrawLayer(SuperMap.Plot.SymbolType.POLYLINESYMBOL,[d,g],S);m.isSymbolText=!0,m.fromZoom=this._map.getZoom(),n.push(m)}var b=SuperMap.Util.copyAttributes(i,a.style);if(a.border){var v=this._map.layerPointToLatLng(f),M=this._map.layerPointToLatLng(P),A=this._createAndDrawLayer(SuperMap.Plot.SymbolType.RECTANGLESYMBOL,[v,M],SuperMap.Util.cloneObject(b));A.isSymbolText=!0,A.fromZoom=this._map.getZoom(),n.push(A);var T=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 n=this.symbolSizeInLib.w,a=this.symbolSize.w;this.symbolSizeInLib.wa.lat?n.lat:a.lat;if(!(e.latr))(e.lat-n.lat)*(a.lng-n.lng)/(a.lat-n.lat)+n.lng>e.lng&&o++}}return o%2==1},getGObjectsInCircle:function(t,e){if(t&&e){for(var o=[],l=this.map.getPlottingLayers(),n=0;nMath.sqrt(Math.pow(t.lng-u.lng,2)+Math.pow(t.lat-u.lat,2))&&o.push(r)}}}return o}},getGObjectsInRect:function(t,e){if(t&&e){for(var o=[],l=this.map.getPlottingLayers(),n=0;ne.lat?u.lng>t.lng&&u.lnge.lat&&o.push(r):u.lnge.lng&&u.late.lat&&o.push(r)}}}return o}}}),n=e.query=function(t){return new l(t)};L.supermap.plotting.query=n},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=e.TransactionManager=L.Evented.extend({map:null,undoTransactions:null,redoTransactions:null,maxCount:32,initialize:function(t){this.map=t,this.undoTransactions=[],this.redoTransactions=[],null===this.maxCount&&(this.maxCount=32)},destroy:function(){this.map=null,this.undoTransactions=null,this.redoTransactions=null,this.maxCount=null},setMaxCount:function(t){this.maxCount=t},add:function(t){this.undoTransactions.length>this.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&&r.setFontAlign(u[0]);else if("setLatLngs"===o[a].functionName)u.length>0&&r.setLatLngs(u[0]);else if("modifyPoint"===o[a].functionName)u.length>0&&r._modifyPoint(u[0],u[1]);else if("setTextContent"===o[a].functionName)u.length>0&&r.setTextContent(u[0]);else if("setRadiusText"===o[a].functionName)2===u.length&&r.setRadiusText(u[0],u[1]);else if("setType"===o[a].functionName&&r instanceof L.supermap.plotting.RouteNode)u.length>0&&r.setType(u[0]);else if("setStrokeColor"===o[a].functionName&&r.geometry instanceof SuperMap.Geometry.GroupObject)u.length>0&&r.setStyle(u[0]);else if("addAvoidRegion"===o[a].functionName)u.length>0&&(u[0]&&u[0].layer&&u[0].layer.removeFeatures(u[0]),e?r.removeAvoidRegions(u[0]):r.addAvoidRegion(u[0]));else if("removeAvoidRegions"===o[a].functionName){if(u.length>0){for(var p=0;p0&&(c=s.unGroupObject(o[a].undoParams[0])):"createGroupObject"===o[a].functionName?c=s.createGroupObject(o[a].redoParams[0]):"createFlags"===o[a].functionName&&(c=s.createFlags(o[a].redoParams[0])),null!==c&&s._map.getPlotEditControl().selectFeatures(c)}else"updateSymbolText"===o[a].functionName?u.length>0&&r.updateSymbolText(u[0],u[1]):o[a].functionName&&null!==u&&r[o[a].functionName](u[0],u[1]);if(o[a].propertyName){var g=o[a].undoValue;e||(g=o[a].redoValue),r.hasOwnProperty(o[a].propertyName)?r[o[a].propertyName]=g:null!==r&&(r.style[o[a].propertyName]=g)}r&&r.layer&&(r.symbolType!==SuperMap.Plot.SymbolType.DOTSYMBOL||8!==r.textPosition||"fontColor"!==o[a].propertyName&&"fontFamily"!==o[a].propertyName||r._calculateParts(),r.redraw(),r.fire(SuperMap.Plot.Event.reseteditmarkersvalues))}}else if(t.transType===SuperMap.Plot.TransactionType.REMOVE)for(var y=0;y0},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 r=s.layer._getFeatureFromEvent(t);r.symbolType===SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS&&(s=r)}if(this.transaction||(this.transaction=new SuperMap.Plot.Transaction,this.transaction.transType=SuperMap.Plot.TransactionType.EDIT,this.isAddTransInfo=!0),s instanceof i.PlottingObject)if(s instanceof l.GroupObject&&s.moveend)s.moveend=!1;else if(null!==s.ownerGroup&&s.ownerGroup.moveend)s.ownerGroup.moveend=!1;else if(this._editMode!==SuperMap.Plot.EditMode.ADDCONTROLPOINT)s instanceof l.GroupObject&&!s.isSelected?(!1===t.originalEvent.ctrlKey&&this.unselectFeatures(),this.selectFeatures(s)):s instanceof n.Route||s.isSelected||null!==s.ownerGroup&&!0!==s.ownerGroup.isSelected||(!1===t.originalEvent.ctrlKey&&this.unselectFeatures(),this.selectFeatures(s));else if(s instanceof n.Route||s.isSelected){if(!1===s.isLocked&&s.isSelected)if(s instanceof n.Route){var u=this._getAddPointTolerance();if(null===(P=s._selectNodeLayer(t.latlng,u))){var p=this._getAddPointTolerance(),h=s._addRouteNodeByPosWithoutLast(t.latlng,p);null!==h&&(this.unselectFeatures(),this.selectFeatures(h))}}else if(s instanceof a.GeoRouteNode&&s.route.isSelected){var c=s._isFirstNode(),g=s._isLastNode();if(!0===c||!0===g){var y=s.route._addRouteNodeByNode(s.routeNode,c,g);if(null!==y){this.unselectFeatures(),this.selectFeatures(y);var f=new SuperMap.Plot.TransactionInfo;f.layerId=y.layer._leaflet_id,f.uuid=y.uuid,f.functionName="setLatLngs",f.undoParams=[L.Util.cloneLatLngs(y.getLatLngs())],f.redoParams=[L.Util.cloneLatLngs(y.getLatLngs())],this.transaction.transInfos.push(f),this.transaction&&(L.supermap.plotting.getControl().getTransManager().add(this.transaction),this.transaction=new SuperMap.Plot.Transaction,this.isAddTransInfo=!0)}}else this.unselectFeatures(),this.selectFeatures(s)}else this._addPoint(s,t.latlng)}else if(!1===t.originalEvent.ctrlKey&&this.unselectFeatures(),this.selectFeatures(s),s instanceof a.GeoRouteNode&&((e=s._isFirstNode())||(o=s._isLastNode()))){var P=s.route._addRouteNodeByNode(s.routeNode,e,o);null!==P&&(this.unselectFeatures(),this.selectFeatures(P))}},_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 n=L.supermap.plotting.editMarker(e,{icon:this.options.scaleIcon,nHandle:-2,tag:t.scalePoints.length});n.owner=t,this._addToMapAndBindMarker(n),this._editMarkers[t.uuid].push(n),t.scalePoints.push(e),t._modifyPoint(t.scalePoints.length-1,e);var a=new SuperMap.Plot.TransactionInfo;a.layerId=t.layer._leaflet_id,a.uuid=t.uuid,a.functionName="setScaleValues",a.undoParams=[o],a.redoParams=[t.scaleValues],this.transaction.transInfos.push(a),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 s=t._getSymbolWayType();if(void 0!==SuperMap.Plot.AlgoSymbolFactory&&SuperMap.Plot.AlgoSymbolFactory.canPolylineConnect(t.libID,t.code)&&!0===t.polylineConnectLocationPoint&&(s=SuperMap.Plot.AddPoint_WayType.POLYLINE),SuperMap.Plot.AddPoint_WayType.UNKNOWN===s)return;var r=new SuperMap.Geometry.Point(e.lng,e.lat),u=-1;SuperMap.Plot.AddPoint_WayType.CURVE===s&&(u=this._addPointByCurve(t,r));var p=new SuperMap.Plot.Transaction;if(L.supermap.plotting.getControl().getTransManager().add(p),SuperMap.Plot.AddPoint_WayType.POLYLINE===s&&(u=this._addPointByPolyLine(t,r)),l=L.Util.latLngsToSuperMapPoints(t.getLatLngs()),u>0&&ui.length)return-1;for(var l=[],n=0,a=1,s=o.length;ay&&(c=y,h=g+1))}var f=o.slice();f.push(f[0]);for(var P=SuperMap.Plot.PlottingUtil.generateBeizerPointsNoCtrlPt(f),d=[],S=1,m=f.length;SO&&(T=O,A=_+1))}return A>h&&(h=-1),h},_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 r.PlottingLayer&&(t.layer.getLocked()||!t.layer.getEditable())){var i=t.getBounds();if(null!==i&&i.isValid()){var n=L.latLng(i.getNorth(),i.getEast()),u=L.latLng(i.getNorth(),i.getWest()),p=L.latLng(i.getSouth(),i.getEast()),h=L.latLng(i.getSouth(),i.getWest()),c=new L.Polygon([n,u,h,p],{smoothFactor:.5});L.setOptions(c,{weight:1,opacity:.5,color:"#0000ff",fillOpacity:.3,fillColor:"#0000ff"}),this._map.addLayer(c),e=c}}else if(t.getLocked()){var g=t._getHandlePointsByBounds();for(var y in g){var f=new L.LatLng(g[y].lat,g[y].lng),P=L.supermap.plotting.editMarker(f,{icon:this.options.lockedIcon,nHandle:-3});this._addToMapAndBindMarker(P),P.owner=t,o.push(P)}}else if(t instanceof l.GroupObject||t instanceof a.GeoRouteNode)if(t instanceof s.FlagGroup&&this._editMode!==SuperMap.Plot.EditMode.EDITCIRCUMRECTANGLE)for(var d=0;d9&&(D=-1):D=-3;var R=new L.LatLng(E.handlePoints[I].lat,E.handlePoints[I].lng),N=L.supermap.plotting.editMarker(R,{icon:this.options.editIcon,nHandle:D,tag:I});this._addToMapAndBindMarker(N),N.owner=t,o.push(N)}for(var U=0,B=E.rotatePoints.length;U1)for(var lt in t.scalePoints){var nt=new L.LatLng(t.scalePoints[lt].lat,t.scalePoints[lt].lng),at=t.scalePoints[lt].tag?t.scalePoints[lt].tag:lt,st=L.supermap.plotting.editMarker(nt,{icon:this.options.scaleIcon,nHandle:t.enableEdit?-2:-3,tag:at});this._addToMapAndBindMarker(st),o.push(st),st.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 l.GroupObject||t instanceof a.GeoRouteNode)if(t instanceof s.FlagGroup&&this._editMode!==SuperMap.Plot.EditMode.EDITCIRCUMRECTANGLE)for(var i in t.scalePoints)e[i]._latlng=t.scalePoints[i],e[i].update();else{var n=t._getHandleAndRotatePoints();for(var r in n.handlePoints)e[r]._latlng=n.handlePoints[r],e[r].update();if(this._editMode===SuperMap.Plot.EditMode.EDITCIRCUMRECTANGLE){var u=n.handlePoints.length;for(var p in n.rotatePoints)e[u+parseInt(p)]._latlng=n.rotatePoints[p],e[u+parseInt(p)].update()}}else if(this._editMode===SuperMap.Plot.EditMode.EDITCIRCUMRECTANGLE){var h=t._getHandleAndRotatePoints();for(var c in h.handlePoints)e[c]._latlng=h.handlePoints[c],e[c].update();var g=h.handlePoints.length;for(var y in h.rotatePoints)e[g+parseInt(y)]._latlng=h.rotatePoints[y],e[g+parseInt(y)].update()}else if(void 0!==t.scalePoints&&null!==t.scalePoints||(t.scalePoints=[]),t.symbolType===SuperMap.Plot.SymbolType.REGULARPOLYGON){var f=[t.getLatLngs()[0],t.components[0].getLatLngs()[0][0]];for(var P in f)e[P]._latlng=f[P],e[P].update()}else if(t.symbolType===SuperMap.Plot.SymbolType.PARALLELLINE){var d=L.Util.superMapPointsToLatLngs(t.superMapAlgoSymbol.controlPoints[0]);for(var S in t.getLatLngs()[0]=L.latLng(d[0].lat,d[0].lng),t.getLatLngs())e[S]._latlng=t.getLatLngs()[S],e[S].update()}else if(t.symbolType===SuperMap.Plot.SymbolType.SATELLITE||t.timeWindows&&t.timeWindows.length>1)for(var m in t.scalePoints){var b=parseInt(m);e[b]._latlng=t.scalePoints[m],e[b].update()}else if(t.getLatLngs().length+t.scalePoints.length===e.length){for(var v in t.getLatLngs())e[v]._latlng=t.getLatLngs()[v],e[v].update();var M=t.getLatLngs().length;for(var A in t.scalePoints){var T=M+parseInt(A);e[T]._latlng=t.scalePoints[A],e[T].update()}}else this._collectEditMarkers(t);else{var _=t.getBounds();if(null!==_&&_.isValid()){var O=L.latLng(_.getNorth(),_.getEast()),x=L.latLng(_.getNorth(),_.getWest()),w=L.latLng(_.getSouth(),_.getEast()),E=L.latLng(_.getSouth(),_.getWest());o.setLatLngs([O,x,E,w])}}}},_removeMarkers:function(t){var e=this._editMarkers[t.uuid];for(var o in e)this._unbindMarkerEvents(e[o]),this._map.removeLayer(e[o]);delete this._editMarkers[t.uuid];var i=this._disEditBox[t.uuid];i&&this._map.removeLayer(i),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){var e=L.Util.cloneLatLngs(t.target.owner.getLatLngs()),o=this._editMarkers[t.target.owner.uuid],i=o.indexOf(t.target);this._map.removeLayer(o[i]),o.splice(i,1),t.target.owner.latLngs.splice(i,1),t.target.owner.redraw();var l=new SuperMap.Plot.Transaction;L.supermap.plotting.getControl().getTransManager().add(l);var n=new SuperMap.Plot.TransactionInfo;n.layerId=t.target.owner.layer._leaflet_id,n.uuid=t.target.owner.layer.uuid,n.functionName="setLatLngs",n.undoParams=[e],n.redoParams=[t.target.owner.getLatLngs()],l.transInfos.push(n)}else if(this._editMode===SuperMap.Plot.EditMode.REMOVECONTROLPOINT&&t.target.owner.isSelected){var a=this._editMarkers[t.target.owner.uuid],s=a.indexOf(t.target),r=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(a[s]),a.splice(s,1),t.target.owner.latLngs.splice(s,1),t.target.owner.redraw();var u=new SuperMap.Plot.Transaction;L.supermap.plotting.getControl().getTransManager().add(u);var p=new SuperMap.Plot.TransactionInfo;p.layerId=t.target.owner.layer._leaflet_id,p.uuid=t.target.owner.uuid,p.functionName="setLatLngs",p.undoParams=[r],p.redoParams=[t.target.owner.getLatLngs()],u.transInfos.push(p)}},_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 n=this._map.latLngToLayerPoint(t.latlng),a=this._map.latLngToLayerPoint(t.oldLatLng),s=n.x-l.x-(a.x-l.x),r=n.y-l.y-(a.y-l.y);if(0!==s&&0!==r){var u=180*(Math.atan2(a.y-l.y,a.x-l.x)-Math.atan2(n.y-l.y,n.x-l.x))/Math.PI,p=u;if(void 0!==this._lastPixel)p=180*(Math.atan2(this._lastPixel.y-l.y,this._lastPixel.x-l.x)-Math.atan2(n.y-l.y,n.x-l.x))/Math.PI;!function(t,o){for(var i=0;i0&&o.selectedFeatures[s].setScale(u)}if(o.isAddTransInfo){var p=new SuperMap.Plot.TransactionInfo;p.layerId=o.selectedFeatures[s].layer._leaflet_id,p.uuid=o.selectedFeatures[s].uuid,p.functionName="setScale",o.transaction.transInfos.push(p)}}else{if(9===o.selectedFeatures[s]._getHandleCount()&&e&&e>0){var h=o._dragStartBounds[o.selectedFeatures[s].uuid],c=o._dragStartLatLngs[o.selectedFeatures[s].uuid],g=o.selectedFeatures[s]._getLatLng(e,h,n);o.selectedFeatures[s]._resizeLatLngs(g,e,h,c)}if(SuperMap.Plot.AlgoSymbolFactory.isAccessServer(o.selectedFeatures[s].libID,o.selectedFeatures[s].code)){var y=new SuperMap.GetSymbolInfoParameters;y.libID=o.selectedFeatures[s].libID,y.code=o.selectedFeatures[s].code,y.inputPoints=L.Util.latLngsToSuperMapPoints(o.selectedFeatures[s].getLatLngs()),y.scaleValues=o.selectedFeatures[s].scaleValues,y.subSymbols=o.selectedFeatures[s].subSymbols,a.push(o.selectedFeatures[s]),L.supermap.symbolInfoService(l.serverUrl,l.serviceParams).getSymbolInfo(y,function(t){for(var e=0;e0||r.lng>0&&r.lat<0?r.lng=r.lat*a/s*-1:r.lng=r.lat*a/s:r.lat<0&&r.lng>0||r.lat>0&&r.lng<0?r.lat=r.lng*s/a*-1:r.lat=r.lng*s/a);var u=1,p=l._resizeBounds(t.latlng,e,n),h=!0===Boolean(a)?(p.getEast()-p.getWest())/a:.5,c=!0===Boolean(s)?(p.getNorth()-p.getSouth())/s:.5;u=2===e||7===e?c:4===e||5===e?h:h3||Math.abs(a.y-this._lastDragPixel.y)>3)&&n-this.lastDownTime>100))return;var s=new SuperMap.GetSymbolInfoParameters;s.libID=e.libID,s.code=e.code,l?(s.inputPoints=L.Util.latLngsToSuperMapPoints(e.getLatLngs()),s.scalePoints=L.Util.latLngsToSuperMapPoints(e.scalePoints),s.scaleValues=e.scaleValues,s.newScalePoint=new SuperMap.Geometry.Point(t.latlng.lng,t.latlng.lat),s.newScalePointIndex=parseInt(t.target.options.tag)):(e.getLatLngs()[i]=t.target.getLatLng(),s.inputPoints=L.Util.latLngsToSuperMapPoints(e.getLatLngs()),s.scaleValues=e.scaleValues),s.subSymbols=e.subSymbols,L.supermap.symbolInfoService(e.serverUrl,e.serviceParams).getSymbolInfo(s,function(t){e.symbolData.innerCells=t.result.innerCells,e.symbolData.scalePoints=t.result.scalePoints,e.symbolData.scaleValues=t.result.scaleValues,e.redraw(),e._updateSymbolTexts(),this._resetEditMarkersValue(e)},this),this._lastDragPixel=a,this.lastDownTime=(new Date).getTime()}else if(-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){var r=new SuperMap.Plot.TransactionInfo;r.layerId=e.layer._leaflet_id,r.uuid=e.uuid,r.functionName="setLatLngs",this.transaction.transInfos.push(r)}}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(var u in e.ownerGroup.subObjects)e.ownerGroup.subObjects[u].redraw();e._updateSymbolTexts(),this._resetEditMarkersValue(e)}else if(-2===t.target.options.nHandle){var p=t.target.getLatLng();if(p.isScalePoint=!0,e._modifyPoint(parseInt(t.target.options.tag),p),e.symbolType===SuperMap.Plot.SymbolType.FLAGGROUP)for(var h=0,c=e.components.length;hg&&!0===this.pasteGeoSel[g])if(y instanceof n.Route){var P=f._getNodeFeature(f._getNodeByUuid(y.routeNode.id));this.selectedFeatures(P)}else this.selectFeatures(f);if(a[g]&&a[g].geoSymbolTexts)for(var d=0;di[r+1].x){var u=i[r+1];i[r+1]=i[r],i[r]=u;var p=a[r+1];a[r+1]=a[r],a[r]=p}for(var h=Math.abs(i[i.length-1].x-i[0].x)/(i.length-1),c=1;ci[f+1].y){var P=i[f+1];i[f+1]=i[f],i[f]=P;var d=a[f+1];a[f+1]=a[f],a[f]=d}for(var S=Math.abs(i[i.length-1].y-i[0].y)/(i.length-1),m=1;m0&&setTimeout(function(){for(var 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 n=t.options.labelRotation;t.options.labelRotation=0;var a=t.getPxBounds();t.options.labelRotation=n;var s=a.min.x,r=a.min.y,u=a.max.x-a.min.x,p=a.max.y-a.min.y;this._ctx.fillStyle=t.options.fontBackgroundColor,this._ctx.globalAlpha=1,this._ctx.save(),this._ctx.translate(s,r),0!=t.options.labelRotation&&this._ctx.rotate(t.options.labelRotation*Math.PI/180),this._ctx.fillRect(0,0,u,p),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 c=o.x,g=o.y,y=t.options.labelRotation*Math.PI/180,f=Math.sqrt(Math.pow(h.x-c,2)+Math.pow(h.y-g,2)),P=y+Math.atan2(h.y-g,h.x-c);h.x=c+f*Math.cos(P),h.y=g+f*Math.sin(P)}var d=t.options.fontStroke;t.options.fontStroke=!1;var S=t.options.fontColor;t.options.fontColor=t.options.fontShadowColor,this._updateTextPt(h,t),t.options.fontColor=S,t.options.fontStroke=d}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,n=void 0!==t.graphicYOffset?t.graphicYOffset:-.5*i,a=t.graphicOpacity||t.fillOpacity,s=this.point,r=s.x,u=s.y;if(!isNaN(r)&&!isNaN(u)){var p;e._ctx.save(),t.rotation&&(p=t.rotation/180*Math.PI),e._ctx.translate(r,u),p&&e._ctx.rotate(p),e._ctx.translate(l,n),e._ctx.globalAlpha=a;var h=L.Canvas.drawImageScaleFactor||(L.Canvas.drawImageScaleFactor=/android 2.1/.test(navigator.userAgent.toLowerCase())?320/window.screen.width:1);e._ctx.drawImage(this.img,0,0,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,n=(360-t.options.endAngle)*(Math.PI/180),a=(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,n,a,!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 n=o._drawFirst;n;n=n.next)n.layer.options.interactive&&n.layer._containsPoint(e)&&!this._map._draggableMoved(n.layer)&&(i=n.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=[],n=0;for(var a in this._map._layers)if(this._map._layers[a]._drawFirst)for(var s=this._map._layers[a]._drawFirst;s;s=s.next)if(s.layer.options.interactive&&s.layer._containsPoint(o)&&!this._map._draggableMoved(s.layer)&&(e=s.layer).hasOwnProperty("_eventParents")&&null!==e._eventParents)for(var r in e._eventParents)l.push(e),i.push(e._eventParents[r]);if(e&&l.length>1){if(i.length>0){for(var u=!1,p=[],h=[],c=0,g=i.length;c1){this._fireEvent([h[f]],t);break}if(!u){this._fireEvent([h[h.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,n,a,s,r=this._clickTolerance()+10;if(this._pxBounds&&!this._pxBounds.contains(t))return!1;for(o=0,n=this._parts.length;o1){if(i.length>0){for(var r=!1,u=[],p=[],h=0,c=i.length;h1){this._fireEvent([p[g]],t);break}if(!r){this._fireEvent([p[p.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 n=document.createElement("span");document.body.appendChild(n),n.style.width="auto",n.style.height="auto",o.options.fontSize&&(n.style.fontSize=new String(o.options.fontSize)+"px"),o.options.fontFamily&&(n.style.fontFamily=o.options.fontFamily),o.options.fontWeight&&(n.style.fontWeight=o.options.fontWeight),n.style.position="absolute",n.style.visibility="hidden",n.innerHTML=o.options.text;var a=n.clientWidth;l=o.options.fontPercent/100*a+o.options.text.length}t.setAttributeNS(null,"textLength",l),t.setAttributeNS(null,"lengthAdjust","spacingAndGlyphs")}t.setAttributeNS(null,"pointer-events","visible");var s=o.options.labelAlign||"cm";t.setAttributeNS(null,"text-anchor",L.SVG.LABEL_ALIGN[s[0]]||"middle"),!0===L.Browser.gecko&&t.setAttributeNS(null,"dominant-baseline",L.SVG.LABEL_ALIGN[s[1]]||"central");for(var r=function(){var t=L.SVG.LABEL_VFACTOR[s[1]];null==t&&(t=-.5);var e=t*(p-1);return L.Browser.ie&&(null===(t=L.SVG.LABEL_IE_VOFFSET[s[1]])&&(t=.35),e+=t),e},u=o.options.text.split("\n"),p=u.length;t.childNodes.length>p;)t.removeChild(t.lastChild);for(var h=0;h>>1)),0!==d?m.setAttribute("dy","0em"):0===h?m.setAttribute("dy",r()+"em"):m.setAttribute("dy","1em");var v=""===f[d]?" ":f[d];o.options.isUnicode?L.Browser.ie||L.Browser.ielt9?(this.element.innerHTML=v,m.textContent=this.element.innerHTML):m.innerHTML=v:m.textContent=v,m.parentNode||t.appendChild(m),P+=f[d],y=SuperMap.Plot.PlottingUtil.getTextWidth(o.options,P)+parseFloat(o.options.fontSpace)*(o.options.fontPercent/100)}}else{var M=i+"tspan"+h;o._tspanNodeObj&&o._tspanNodeObj[M]||(o._tspanNodeObj[M]=L.SVG.create("tspan"));var A=o._tspanNodeObj[M];if(!1===L.Browser.gecko&&A.setAttributeNS(null,"baseline-shift",L.SVG.LABEL_VSHIFT[s[1]]||"-35%"),100!==o.options.fontPercent){var T=SuperMap.Plot.PlottingUtil.getTextWidth(o.options,u[h]);A.setAttributeNS(null,"textLength",T),A.setAttributeNS(null,"lengthAdjust","spacingAndGlyphs")}A.setAttribute("x",e.x),0==h?A.setAttribute("dy",r()+"em"):A.setAttribute("dy","1em");var _=""===u[h]?" ":u[h];o.options.isUnicode?L.Browser.ie||L.Browser.ielt9?(this.element.innerHTML=_,A.textContent=this.element.innerHTML):A.innerHTML=_:A.textContent=_,A.parentNode||t.appendChild(A)}}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,n=isNaN(t.options.labelYOffset)?0:t.options.labelYOffset;i.x+=l,i.y-=n}if(!0===t.options.fontShadow){t._shadowTextNode&&t._shadowTextNode.parentNode||(t._shadowTextNode=L.SVG.create("text"),this._rootGroup.appendChild(t._shadowTextNode));var a=L.point(i.x,i.y);if(t.options.fontShadowOffsetX&&(a.x+=t.options.fontShadowOffsetX),t.options.fontShadowOffsetY&&(a.y+=t.options.fontShadowOffsetY),0!==t.options.labelRotation){var s=i.x,r=i.y,u=t.options.labelRotation*Math.PI/180,p=Math.sqrt(Math.pow(a.x-s,2)+Math.pow(a.y-r,2)),h=u+Math.atan2(a.y-r,a.x-s);a.x=s+p*Math.cos(h),a.y=r+p*Math.sin(h)}var c=t.options.fontStroke;t.options.fontStroke=!1;var g=t.options.fontColor;t.options.fontColor=t.options.fontShadowColor,this._updateTextPt(t._shadowTextNode,a,t,"shadow"),t.options.fontColor=g,t.options.fontStroke=c}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 f=t._textNode.getBBox();t._backgroundTextNode.x.baseVal.value=f.x,t._backgroundTextNode.y.baseVal.value=f.y,t._backgroundTextNode.width.baseVal.value=f.width,t._backgroundTextNode.height.baseVal.value=f.height,t._backgroundTextNode.style.fill=t.options.fontBackgroundColor,t.options.labelRotation&&t._backgroundTextNode.setAttributeNS(null,"transform","rotate("+t.options.labelRotation+" "+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,n=void 0!=t.options.graphicYOffset?t.options.graphicYOffset:-.5*i,a=t.options.graphicOpacity||t.options.fillOpacity;t._imageNode.setAttributeNS(null,"x",(t._point.x+l).toFixed()),t._imageNode.setAttributeNS(null,"y",(t._point.y+n).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: "+a),t._imageNode.onclick=L.SVG.preventDefault;var s=t.options.rotation;void 0===s&&void 0===t._imageNode._rotation||!t._point||(t._imageNode._rotation=s,s|=0,t._imageNode.setAttributeNS(null,"transform","rotate("+s+" "+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()}},function(t,e,o){"use strict";var i=o(9),l=o(35),n=o(14);L.Map.include({getFeatureByUuid:function(t){var e=[];for(var o in this._layers){var a;if(this._layers[o]instanceof i.PlottingLayer)null!==(a=this._layers[o].getFeatureByUuid(t))&&e.push(a);if(this._layers[o]instanceof l.PlottingGraphicLayer)null!==(a=this._layers[o].getFeatureByUuid(t))&&e.push(a);if(this._layers[o]instanceof n.MovingTargetLayer)null!==(a=this._layers[o].getFeatureByUuid(t))&&e.push(a)}return 0===e.length?null:e[0]},getPlottingLayers:function(){var t=[],e=this._layers;for(var o in e)e[o]instanceof i.PlottingLayer&&t.push(e[o]);return t},clearPlottingLayers:function(){var t=this._layers;for(var e in t)t[e]instanceof i.PlottingLayer&&(t[e].removeAllFeatures(),this.removeLayer(t[e]))},getLayer:function(t){var e=this._layers;for(var o in e)if(e[o]._leaflet_id===t)return e[o]},getLayersByName:function(t){return this.getLayersBy("name",t)},getLayersBy:function(t,e){return this.getBy("_layers",t,e)},getBy:function(t,e,o){var i="function"==typeof o.test,l=[];for(var n in this[t])l.push(this[t][n]);return SuperMap.Array.filter(l,function(t){return t[e]===o||i&&o.test(t[e])})},latLngToLayerPoint:function(t){return this.project(L.latLng(t))._subtract(this.getPixelOrigin())}})},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.geoSymbolText1=e.GeoSymbolText1=void 0,o(0);var i=o(1),l=(o(18),e.GeoSymbolText1=i.GraphicObject.extend({space:null,offsetX:null,offsetY:null,initialize:function(t,e,o,l){this.minEditPts=1,this.maxEditPts=1,this.libID=0,this.code=SuperMap.Plot.SymbolType.SYMBOLTEXT1,this.symbolType=SuperMap.Plot.SymbolType.SYMBOLTEXT1,this.symbolName="对象标注(带指示线)",null===this.space&&(this.space=10),null===this.offsetX&&(this.offsetX=60),null===this.offsetY&&(this.offsetY=30),i.GraphicObject.prototype.initialize.call(this,t,e,o,l),this.style.sizeFixed=!1},destroy:function(){this.space=null,this.offsetX=null,this.offsetY=null,i.GraphicObject.prototype.destroy.call(this)},removeSymbolTextsFromDotSymbol:function(t){if(t&&"string"==typeof t){var e=this._map.getFeatureByUuid(t);if(e)for(var o=0,i=e.geoSymbolTexts.length;oe&&(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[p].style.labelAlign="lm",!0===g&&(m.x=f.x,m.y=f.y+S/2,b.x=f.x+d,b.y=f.y-S/2)):(o[p].style.labelAlign="rm",!0===g&&(m.x=f.x,m.y=f.y+S/2,b.x=f.x-d,b.y=f.y-S/2))}var v=this._map.layerPointToLatLng(f);if(0!==o[p].offsetX||0!==o[p].offsetY){var M={};M.positionPoints=[v,y],M.style={},M.type=SuperMap.Plot.SymbolType.POLYLINESYMBOL,e.push(M)}var A=SuperMap.Util.copyAttributes(s,this.symbolTexts[p].style);if(g){var T=this._map.layerPointToLatLng(m),_=this._map.layerPointToLatLng(b),O={};O.positionPoints=[T,_],O.style=SuperMap.Util.cloneObject(A),O.type=SuperMap.Plot.SymbolType.RECTANGLESYMBOL,e.push(O),P=L.latLng((_.lat-T.lat)/2+T.lat,(T.lng-_.lng)/2+_.lng)}else P=v;var x={};x.positionPoints=P,x.type=SuperMap.Plot.SymbolType.TEXTSYMBOL,x.style=SuperMap.Util.cloneObject(A),x.textContent=o[p].textContent,g&&(x.style.labelAlign="cm"),e.push(x),this.latLngs.push(v)}}for(var w,E=0;E0){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(var l=0,n=t.length;l1&&(this._createAndDrawLayer(24,h,{surroundLineFlag:!1,lineWidthLimit:!0,weight:4*t.style.weight+this.style.weight}),h[0].isScalePoint=!0,h[0].tag=2*n,this.scalePoints.push(h[0]),h[h.length-1].isScalePoint=!0,h[h.length-1].tag=2*n+1,this.scalePoints.push(h[h.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(n[0],a[p])&&(r=SuperMap.Plot.PlottingUtil.distance(n[0],a[p]),u=p);for(var h=0;h=SuperMap.Plot.PlottingUtil.distance(n[0],a[g])&&(c=SuperMap.Plot.PlottingUtil.distance(n[0],a[g]),u=g);for(var y=0;ySuperMap.Plot.PlottingUtil.distance(n[u],i[0])&&(r=SuperMap.Plot.PlottingUtil.distance(n[u],i[0]),a=u);var p=0;0===a&&(a=1);for(var h=0;h=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;o=d.length);m++){var M=d[b];if(void 0!==M.symbolData&&null!==M.symbolData){for(var A=M.symbolData.libID,T=M.symbolData.code,_=P.lng+m*(r+Math.abs(g.getEast()-g.getWest())),O=P.lat-(2*r+Math.abs(g.getNorth()-g.getSouth())/2),x=0,w=0,E=0,I=0,C=0;C=M.symbolData.innerCells[C].positionPoints[D].x&&(w=M.symbolData.innerCells[C].positionPoints[D].x),E<=M.symbolData.innerCells[C].positionPoints[D].y&&(E=M.symbolData.innerCells[C].positionPoints[D].y),I>=M.symbolData.innerCells[C].positionPoints[D].y&&(I=M.symbolData.innerCells[C].positionPoints[D].y);var R=L.latLng(O,_),N=this._map.latLngToLayerPoint(L.latLng(O,_)),U=new SuperMap.Geometry.Point((x+w)/2,E),B=new SuperMap.Geometry.Point(U.x,U.y),k=new SuperMap.Geometry.Point(d[b].symbolData.anchorPoint.x,d[b].symbolData.anchorPoint.y),F=this._transitionPoint(B,N),G=this._transitionPoint(k,N);R.lat+=G.lat-F.lat,R.lng+=G.lng-F.lng,M.symbolData.annotationPosition=5;var V=SuperMap.Util.cloneObject(M.symbolData),j=L.supermap.plotting.PlottingObject.createSymbol(A,T,R,{symbolData:V,scaleByMap:!0,minScale:0,maxScale:2048,space:0});j.enableEdit=!0,j.ownerGroup=this,this._addComponents(j),this.subObjects.push(j),b++}}this.bounds=this._calculateBounds(),P.lat=this.bounds.getSouth()}if(this.isShowTooltip){var Y=new L.LatLngBounds(L.latLng(this.bounds.getSouth()-r,this.bounds.getWest()-r),L.latLng(this.bounds.getNorth()+r+1.2,this.bounds.getEast()+r)),z=[];z.push(L.latLng(Y.getNorth(),Y.getWest())),z.push(L.latLng(Y.getSouth(),Y.getEast()));var W=L.latLng(n[0].lat,n[0].lng);W.isFixedPos=!0,z.push(W);var X=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.ANNOFRAMESYMBOL,z,{serverUrl:this.serverUrl});for(var H in X.enableEdit=!0,X.ownerGroup=this,this.subObjects.splice(0,0,X),this._addComponents(X),this._clearComponents(),this.subObjects)this.subObjects[H].enableEdit=!0,this.subObjects[H].ownerGroup=this,this._addComponents(this.subObjects[H])}}}},_setSubSymbolText:function(){for(var t=0;t1&&(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=[],l.GraphicObject.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,i.AlgoSymbol.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;p--)u.push(r[p]);this._addComponents(L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.PATHTEXT,u,{textContent:this.textContent,showPathLine:!1,isCurve:!1,relLineText:s},this.style)),o=a[Math.ceil(a.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 n;if(null===this.map)n=0;else{var a=this._map.layerPointToLatLng(L.point(0,0)),s=this._map.layerPointToLatLng(L.point(this.subSymbolDefaultPixelSize,0));n=SuperMap.Plot.PlottingUtil.distance(new SuperMap.Geometry.Point(a.lng,a.lat),new SuperMap.Geometry.Point(s.lng,s.lat))}var r=SuperMap.Plot.PlottingUtil.findPoint(e,o,n,12.5),u=SuperMap.Plot.PlottingUtil.findPoint(e,o,n,-12.5),p=[];p.push(L.latLng(e.y,e.x)),p.push(L.latLng(r.y,r.x)),p.push(L.latLng(u.y,u.x)),this._createAndDrawLayer(SuperMap.Plot.SymbolType.ARBITRARYPOLYGONSYMBOL,p,{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),c=SuperMap.Plot.PlottingUtil.findPoint(o,e,.8*i,0),g=SuperMap.Plot.PlottingUtil.findPoint(h,e,.02*i,90),y=SuperMap.Plot.PlottingUtil.findPoint(c,e,.02*i,90),f=L.latLng(g.y,g.x),P=L.latLng(y.y,y.x),d=SuperMap.Plot.RelLineText.ONLEFTLINE,S=[];g.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,l){var n=!1;1===this.latLngs.length&&(n=!0,this.latLngs.push(this.scalePoints[0])),i.AlgoSymbol.prototype._resizeLatLngs.call(this,t,e,o,l),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]),n&&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){var n=SuperMap.Plot.PlottingUtil.destinationVincenty(this.centerPoint,360-e+90,1e3*this.radius);o.push(n)}return o}}),a=e.arcRegion=function(t,e,o,i){return new n(t,e,o,i)};L.supermap.plotting.arcRegion=a},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.picture=e.Picture=void 0,o(0);var i=o(1),l=e.Picture=i.GraphicObject.extend({path:null,symbolTexts:null,symbolTextComponents:null,bloodVolumes:null,bloodVolumeComponents:null,trajectory:null,antoRotation:null,getPath:function(){return this.path},setPath:function(t,e,o){this.path!==t&&(this.path=t,this.style.graphicWidth=e,this.style.graphicHeight=o,this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues))},getBloodVolumes:function(){return this.bloodVolumes},getSymbolTexts:function(){return this.symbolTexts},setScale:function(t){isNaN(t)||(this.style.graphicHeight*=t/this.dScale,this.style.graphicWidth*=t/this.dScale,this.dScale=t,this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues))},setRotate:function(t){isNaN(t)||(this.dRotate+=t,this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues))},initialize:function(t,e,o,l){this.code=SuperMap.Plot.SymbolType.PICTURE,this.libID=0,this.symbolType=SuperMap.Plot.SymbolType.PICTURE,this.symbolName="图片",this.minEditPts=1,this.maxEditPts=1,this.symbolTexts=[],this.bloodVolumes=[],this.symbolTextComponents=[],this.bloodVolumeComponents=[],this.autoRotation=!1,i.GraphicObject.prototype.initialize.call(this,t,e,o,l),null===this.path&&(this.path="../img/marker.png")},_calculateParts:function(){if(!(this.getLatLngs().lengthu&&(u=c)}p=parseInt(a.style.fontSize*r)+2*a.paddingY}var g=void 0,y=void 0,f=L.point(0,0),P=L.point(0,0);switch(a.textPosition){case SuperMap.Plot.AnnoPosition.LEFTTOP:a.style.labelAlign="rb",g=L.latLng(t.getNorth(),t.getWest()),(y=this._map.latLngToLayerPoint(g)).x+=a.offsetX,y.y+=a.offsetY,!0===a.border&&(f.x=y.x,f.y=y.y,P.x=y.x-u,P.y=y.y-p);break;case SuperMap.Plot.AnnoPosition.LEFTBOTTOM:a.style.labelAlign="rt",g=L.latLng(t.getSouth(),t.getWest()),(y=this._map.latLngToLayerPoint(g)).x+=a.offsetX,y.y+=a.offsetY,!0===a.border&&(f.x=y.x,f.y=y.y,P.x=y.x-u,P.y=y.y+p);break;case SuperMap.Plot.AnnoPosition.RIGHTTOP:a.style.labelAlign="lb",g=L.latLng(t.getNorth(),t.getEast()),(y=this._map.latLngToLayerPoint(g)).x+=a.offsetX,y.y+=a.offsetY,!0===a.border&&(f.x=y.x,f.y=y.y,P.x=y.x+u,P.y=y.y-p);break;case SuperMap.Plot.AnnoPosition.RIGHTBOTTOM:a.style.labelAlign="lt",g=L.latLng(t.getSouth(),t.getEast()),(y=this._map.latLngToLayerPoint(g)).x+=a.offsetX,y.y+=a.offsetY,!0===a.border&&(f.x=y.x,f.y=y.y,P.x=y.x+u,P.y=y.y+p);break;case SuperMap.Plot.AnnoPosition.TOP:a.style.labelAlign="cb",g=L.latLng(t.getNorth(),(t.getWest()+t.getEast())/2),(y=this._map.latLngToLayerPoint(g)).x+=a.offsetX,y.y+=a.offsetY,!0===a.border&&(f.x=y.x-u/2,f.y=y.y,P.x=y.x+u/2,P.y=y.y-p);break;case SuperMap.Plot.AnnoPosition.BOTTOM:a.style.labelAlign="ct",g=L.latLng(t.getSouth(),(t.getWest()+t.getEast())/2),(y=this._map.latLngToLayerPoint(g)).x+=a.offsetX,y.y+=a.offsetY,!0===a.border&&(f.x=y.x-u/2,f.y=y.y,P.x=y.x+u/2,P.y=y.y+p);break;case SuperMap.Plot.AnnoPosition.LEFT:a.style.labelAlign="rm",g=L.latLng((t.getSouth()+t.getNorth())/2,t.getWest()),(y=this._map.latLngToLayerPoint(g)).x+=a.offsetX,y.y+=a.offsetY,!0===a.border&&(f.x=y.x,f.y=y.y+p/2,P.x=y.x-u,P.y=y.y-p/2);break;case SuperMap.Plot.AnnoPosition.RIGHT:a.style.labelAlign="lm",g=L.latLng((t.getSouth()+t.getNorth())/2,t.getEast()),(y=this._map.latLngToLayerPoint(g)).x+=a.offsetX,y.y+=a.offsetY,!0===a.border&&(f.x=y.x,f.y=y.y+p/2,P.x=y.x+u,P.y=y.y-p/2);break;case SuperMap.Plot.AnnoPosition.ANCHOR:a.style.labelAlign="lm",g=L.latLng(e.lat,e.lng),(y=this._map.latLngToLayerPoint(g)).x+=a.offsetX,y.y+=a.offsetY,a.offsetX>0?(a.style.labelAlign="lm",!0===a.border&&(f.x=y.x,f.y=y.y+p/2,P.x=y.x+u,P.y=y.y-p/2)):(a.style.labelAlign="rm",!0===a.border&&(f.x=y.x,f.y=y.y+p/2,P.x=y.x-u,P.y=y.y-p/2))}var d=this._map.layerPointToLatLng(y);if(!0===a.showRelationLine&&(0!==a.offsetX||0!==a.offsetY)){var S=a.lineStyle;null==a.lineStyle&&(S=SuperMap.Util.copyAttributes(S,this.style)),S.lineColorLimit=!0,S.lineTypeLimit=!0,S.lineWidthLimit=!0;var m=this._createAndDrawLayer(SuperMap.Plot.SymbolType.POLYLINESYMBOL,[d,g],S);m.isSymbolText=!0,m.fromZoom=this._map.getZoom(),n.push(m)}var b=SuperMap.Util.copyAttributes(i,a.style);if(a.border){var v=this._map.layerPointToLatLng(f),M=this._map.layerPointToLatLng(P),A=this._createAndDrawLayer(SuperMap.Plot.SymbolType.RECTANGLESYMBOL,[v,M],SuperMap.Util.cloneObject(b));A.isSymbolText=!0,A.fromZoom=this._map.getZoom(),n.push(A);var T=f.x>>32-e}function o(t,e){var o,i,l,n,a;return l=2147483648&t,n=2147483648&e,a=(1073741823&t)+(1073741823&e),(o=1073741824&t)&(i=1073741824&e)?2147483648^a^l^n:o|i?1073741824&a?3221225472^a^l^n:1073741824^a^l^n:a^l^n}function i(t,i,l,n,a,s,r){return o(e(t=o(t,o(o(function(t,e,o){return t&e|~t&o}(i,l,n),a),r)),s),i)}function l(t,i,l,n,a,s,r){return o(e(t=o(t,o(o(function(t,e,o){return t&o|e&~o}(i,l,n),a),r)),s),i)}function n(t,i,l,n,a,s,r){return o(e(t=o(t,o(o(function(t,e,o){return t^e^o}(i,l,n),a),r)),s),i)}function a(t,i,l,n,a,s,r){return o(e(t=o(t,o(o(function(t,e,o){return e^(t|~o)}(i,l,n),a),r)),s),i)}function s(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,u,p,h,c,g,y,f,P,d=Array();for(d=function(t){for(var e,o=t.length,i=o+8,l=16*((i-i%64)/64+1),n=Array(l-1),a=0,s=0;s>>29,n}(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)),g=1732584193,y=4023233417,f=2562383102,P=271733878,r=0;r.3&&(d=.3),this.scaleValues[1]=d}}}}]),e}();SuperMapAlgoPlot.AlgoSymbol322=l},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var o=0;o.7&&(L=.7),this.scaleValues[2]=L}}}}]),e}();SuperMapAlgoPlot.AlgoSymbol15200=l},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var o=0;o=2&&t.length=2&&t.length0&&(this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,o.shapePts,{strokeWidth:0,weight:0,lineWidthLimit:!0}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,n),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,a),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,o.LeftArowHead,{lineTypeLimit:!0}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,o.LeftArowRightBody),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,c),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,g),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,o.RightArowHead,{lineTypeLimit:!0}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,m),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,b)),this.scalePoints=[];for(var A=0;Athis.SV1_MaxValue&&(i=this.SV1_MaxValue)}else i=SuperMapAlgoPlot.PlottingUtil.distance(s.projectPoint,n)=0;--x)O.push(A[x]);var w=SuperMapAlgoPlot.PlottingUtil.clonePoints(O);w.push(w[0]),this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,w,{lineWidthLimit:!0,strokeWidth:0,weight:0,surroundLineFlag:!1}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,[O[0],O[1]]),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,[O[2],O[3]]),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,[O[3],O[4],O[5],O[6],O[7]],{lineTypeLimit:!0}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,[O[7],O[8]]),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,[O[9],O[10]]),this.scalePoints=[];var E=A[0].clone();E.isScalePoint=!0,E.tag=0,this.scalePoints.push(E);var I=A[3].clone();I.isScalePoint=!0,I.tag=1,this.scalePoints.push(I);var C=A[4].clone();C.isScalePoint=!0,C.tag=2,this.scalePoints.push(C),this.finish()}}},{key:"modifyPoint",value:function(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(),n=o[1].clone(),a=e.clone();if(0==t){var s=SuperMapAlgoPlot.PlottingUtil.distance(a,l)/i;this.scaleValues[0]=s}else if(1==t){var r=SuperMapAlgoPlot.PlottingUtil.projectPoint(a,l,n),u=SuperMapAlgoPlot.PlottingUtil.distance(r,a)/i;this.scaleValues[1]=u;var p=SuperMapAlgoPlot.PlottingUtil.distance(r,n)/i;this.scaleValues[3]=p}else if(2==t){var h=SuperMapAlgoPlot.PlottingUtil.projectPoint(a,l,n),c=SuperMapAlgoPlot.PlottingUtil.distance(h,a)/i;this.scaleValues[2]=c;var g=SuperMapAlgoPlot.PlottingUtil.distance(h,n)/i;this.scaleValues[4]=g}}this.calculateParts()}}]),e}();SuperMapAlgoPlot.AlgoSymbol1020=l},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var o=0;o=0;--v)L.push(S[v]);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=S[0].clone();M.isScalePoint=!0,M.tag=0,this.scalePoints.push(M);var A=S[1].clone();A.isScalePoint=!0,A.tag=1,this.scalePoints.push(A);var T=S[2].clone();T.isScalePoint=!0,T.tag=2,this.scalePoints.push(T),this.finish()}}},{key:"modifyPoint",value:function(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(),n=o[1].clone(),a=e.clone();if(0==t){var s=SuperMapAlgoPlot.PlottingUtil.distance(a,l)/i;this.scaleValues[0]=s}else if(1==t){var r=SuperMapAlgoPlot.PlottingUtil.projectPoint(a,l,n),u=SuperMapAlgoPlot.PlottingUtil.distance(r,a)/i;this.scaleValues[1]=u;var p=SuperMapAlgoPlot.PlottingUtil.distance(r,n)/i;this.scaleValues[3]=p}else if(2==t){var h=SuperMapAlgoPlot.PlottingUtil.projectPoint(a,l,n),c=SuperMapAlgoPlot.PlottingUtil.distance(h,a)/i;this.scaleValues[2]=c;var g=SuperMapAlgoPlot.PlottingUtil.distance(h,n)/i;this.scaleValues[4]=g}}this.calculateParts()}}]),e}();SuperMapAlgoPlot.AlgoSymbol1019=l},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var o=0;o=2&&t.length=0;f--)e.push(u[f]),i.push(u[f])}return{shapePts:e,leftBodyPts:o,rightBodyPts:i,arrowHeadPts:l}}},{key:"updateScalePoints",value:function(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--;for(var n=[],a=0;a0&&S>0){var b=1/(f-y[2].x),L=-1/(P-y[2].y),v=1*y[2].y/(P-y[2].y)-1*y[2].x/(f-y[2].x);m=Math.abs(b*y[0].x+L*y[0].y+v)/Math.sqrt(b*b+L*L)}else S<=1e-4?m=Math.abs(P-y[1].y):d<=1e-4&&(m=Math.abs(f-y[1].x));var M=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(m,y[2],new SuperMapAlgoPlot.Point(f,P)),A=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(y[1],y[2],y[0]);A?(a[1]=y[1],s[1]=y[0]):(a[1]=y[0],s[1]=y[1]),y[1]=new SuperMapAlgoPlot.Point((y[0].x+y[1].x)/2,(y[0].y+y[1].y)/2);var T=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))*this.sv_AtWidthDivAwWidth,_=(i=T*this.sv_AtLenDivAtWidth)*n;SuperMapAlgoPlot.PlottingUtil.equalFuzzy(l,0)||(_=(i=t*l)*n);var O,x,w=SuperMapAlgoPlot.PlottingUtil.distance(y[c],y[c-1]),E=2*i;w0&&(y[c]=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(i,y[c],N)),D=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(_,y[c+1],y[c]),(A=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(y[c],y[c+1],D.pntLeft))?(s[c]=new SuperMapAlgoPlot.Point(D.pntLeft.x,D.pntLeft.y),a[c]=new SuperMapAlgoPlot.Point(D.pntRight.x,D.pntRight.y)):(s[c]=new SuperMapAlgoPlot.Point(D.pntRight.x,D.pntRight.y),a[c]=new SuperMapAlgoPlot.Point(D.pntLeft.x,D.pntLeft.y)),I=2;I=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,n=o.rightBodyPts,a=[];a.push(l[l.length-1]),a.push(n[n.length-1]);var s=[];s.push(this.scaleValues[3]),s.push(this.scaleValues[4]),s.push(this.scaleValues[0]),s.push(this.scaleValues[1]);var r=SuperMapAlgoPlot.ArrowToolkit.generateArrowHeadShapePts(e,a,s,i,SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_WITHOUT_EAR),u=[];u=(u=u.concat(l)).concat(r);for(var p=n.length-1;p>=0;p--)u.push(n[p]);u.push(u[0]),this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,u,{lineWidthLimit:!0,strokeWidth:0,weight:0,surroundLineFlag:!1});for(var h=SuperMapAlgoPlot.PlottingUtil.clonePoints(l),c=[],g=n.length-1;g>=0;g--)c.push(n[g]);c=c.concat(h),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,c);var y=SuperMapAlgoPlot.PlottingUtil.clonePoints(r);y.push(n[n.length-1]),y.splice(0,0,l[l.length-1]),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,y,{lineTypeLimit:!0});var f=new SuperMapAlgoPlot.Point((a[0].x+a[1].x)/2,(a[0].y+a[1].y)/2),P=new SuperMapAlgoPlot.Point(f.x,f.y);P.isScalePoint=!0,P.tag=0,this.scalePoints.push(P);var d=new SuperMapAlgoPlot.Point(l[l.length-1].x,l[l.length-1].y);d.isScalePoint=!0,d.tag=1,this.scalePoints.push(d);var S=new SuperMapAlgoPlot.Point(r[0].x,r[0].y);S.isScalePoint=!0,S.tag=2,this.scalePoints.push(S),this.finish()}}},{key:"modifyPoint",value:function(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),n=this.scaleValues[0],a=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);a=SuperMapAlgoPlot.PlottingUtil.clearSamePts(a);var s=SuperMapAlgoPlot.PlottingUtil.polylineDistance(a),r=s*n;if(0==t){var u=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,a[a.length-2],a[a.length-1]),p=u.projectPoint;if(u.isOnline){var h=SuperMapAlgoPlot.PlottingUtil.distance(p,a[a.length-1]);this.scaleValues[0]=h/s}}else if(1==t){var c=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,i,l).projectPoint,g=SuperMapAlgoPlot.PlottingUtil.distance(c,o);this.scaleValues[1]=g/r}else if(2==t){var y=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,a[1],l).projectPoint,f=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(y,o,a[1]),P=f.projectPoint,d=SuperMapAlgoPlot.PlottingUtil.distance(P,o);!1===f.isOnline&&(this.scaleValues[4]=d/r)}}this.calculateParts()}}]),e}();SuperMapAlgoPlot.AlgoSymbol1017=l},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var o=0;o1)if(this.arrowBodyType!==SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_COATTAIL)this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,o);else for(var p=0,h=o.length-1;p1&&this.addCell(m,u,e),r.length>1&&this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,r)}}}]),e}();SuperMapAlgoPlot.AlgoSymbol1016=l},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=e.AlgoSymbol1015=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return o.subSymbolDefaultPixelSize=15,o.CLASS_NAME="SuperMapAlgoPlot.AlgoSymbol1015",o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,SuperMapAlgoPlot.AlgoSymbol1009),e}();SuperMapAlgoPlot.AlgoSymbol1015=i},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=e.AlgoSymbol1014=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return o.subSymbolDefaultPixelSize=15,o.CLASS_NAME="SuperMapAlgoPlot.AlgoSymbol1014",o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,SuperMapAlgoPlot.AlgoSymbol1008),e}();SuperMapAlgoPlot.AlgoSymbol1014=i},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=e.AlgoSymbol1013=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return o.subSymbolDefaultPixelSize=15,o.CLASS_NAME="SuperMapAlgoPlot.AlgoSymbol1013",o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,SuperMapAlgoPlot.AlgoSymbol1007),e}();SuperMapAlgoPlot.AlgoSymbol1013=i},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=e.AlgoSymbol1012=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return o.subSymbolDefaultPixelSize=15,o.CLASS_NAME="SuperMapAlgoPlot.AlgoSymbol1012",o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,SuperMapAlgoPlot.AlgoSymbol1005),e}();SuperMapAlgoPlot.AlgoSymbol1012=i},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var o=0;o=0;f--)e.push(u[f]),i.push(u[f])}return{shapePts:e,leftBodyPts:o,rightBodyPts:i,arrowHeadPts:l}}},{key:"updateScalePoints",value:function(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--;for(var n=[],a=0;a0&&S>0){var b=1/(f-y[2].x),L=-1/(P-y[2].y),v=1*y[2].y/(P-y[2].y)-1*y[2].x/(f-y[2].x);m=Math.abs(b*y[0].x+L*y[0].y+v)/Math.sqrt(b*b+L*L)}else S<=1e-4?m=Math.abs(P-y[1].y):d<=1e-4&&(m=Math.abs(f-y[1].x));var M=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(m,y[2],new SuperMapAlgoPlot.Point(f,P)),A=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(y[1],y[2],y[0]);A?(a[1]=y[1],s[1]=y[0]):(a[1]=y[0],s[1]=y[1]),y[1]=new SuperMapAlgoPlot.Point((y[0].x+y[1].x)/2,(y[0].y+y[1].y)/2);var T=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))*this.sv_AtWidthDivAwWidth,_=(i=T*this.sv_AtLenDivAtWidth)*n;SuperMapAlgoPlot.PlottingUtil.equalFuzzy(l,0)||(_=(i=t*l)*n);var O,x,w=SuperMapAlgoPlot.PlottingUtil.distance(y[c],y[c-1]),E=2*i;w0&&(y[c]=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(i,y[c],N)),D=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(_,y[c+1],y[c]),(A=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(y[c],y[c+1],D.pntLeft))?(s[c]=new SuperMapAlgoPlot.Point(D.pntLeft.x,D.pntLeft.y),a[c]=new SuperMapAlgoPlot.Point(D.pntRight.x,D.pntRight.y)):(s[c]=new SuperMapAlgoPlot.Point(D.pntRight.x,D.pntRight.y),a[c]=new SuperMapAlgoPlot.Point(D.pntLeft.x,D.pntLeft.y)),I=2;I=2&&t.length=0;b--)e.push(h[b]),i.push(h[b]);for(var L=1;L0&&this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,n,{surroundLineFlag:!1,fillLimit:!0,fill:!0,lineTypeLimit:!0})}}}]),e}();SuperMapAlgoPlot.AlgoSymbol1008=l},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var o=0;o0&&this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,r,{surroundLineFlag:!1,fillLimit:!0,fillColorLimit:!1,fill:!0})}else{this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,i);n.length>0&&this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,n,{surroundLineFlag:!1,fillLimit:!0,fillColorLimit:!1,fill:!0,lineTypeLimit:!0})}}}}]),e}();SuperMapAlgoPlot.AlgoSymbol1007=l},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var o=0;o=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:v});for(var E=0;E0&&(this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,I,{surroundLineFlag:!1,lineWidthLimit:!0,strokeWidth:0,weight:0}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,I,{surroundLineFlag:!1})),this.scalePoints=[];for(var C=0;Cthis.SV1_MaxValue&&(o=this.SV1_MaxValue)}else o=SuperMapAlgoPlot.PlottingUtil.distance(a.projectPoint,l)0&&this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,l)}}}]),e}();SuperMapAlgoPlot.AlgoSymbol1005=l},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var o=0;o=2&&t.length=2;L--)g.push(o[L]);g.push({x:y.x,y:y.y,z:S});var v=[];this.ComputeBeizerZValueByDis(g,a,v);for(var M=[],A=0;A0&&v.length>0&&M.length>0){u=(u=(u=(u=[]).concat(b)).concat(M)).concat(v),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,u,{surroundLineFlag:!1});for(var _=[],O=0;O=0;f--)e.push(u[f]),i.push(u[f])}return{shapePts:e,leftBodyPts:o,rightBodyPts:i,arrowHeadPts:l}}},{key:"updateScalePoints",value:function(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--;for(var n=[],a=0;a0&&S>0){var b=1/(f-y[2].x),L=-1/(P-y[2].y),v=1*y[2].y/(P-y[2].y)-1*y[2].x/(f-y[2].x);m=Math.abs(b*y[0].x+L*y[0].y+v)/Math.sqrt(b*b+L*L)}else S<=1e-4?m=Math.abs(P-y[1].y):d<=1e-4&&(m=Math.abs(f-y[1].x));var M=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(m,y[2],new SuperMapAlgoPlot.Point(f,P)),A=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(y[1],y[2],y[0]);A?(a[1]=y[1],s[1]=y[0]):(a[1]=y[0],s[1]=y[1]),y[1]=new SuperMapAlgoPlot.Point((y[0].x+y[1].x)/2,(y[0].y+y[1].y)/2);var T=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))*this.sv_AtWidthDivAwWidth,_=(i=T*this.sv_AtLenDivAtWidth)*n;SuperMapAlgoPlot.PlottingUtil.equalFuzzy(l,0)||(_=(i=t*l)*n);var O,x,w=SuperMapAlgoPlot.PlottingUtil.distance(y[c],y[c-1]),E=2*i;w0&&(y[c]=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(i,y[c],N)),D=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(_,y[c+1],y[c]),(A=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(y[c],y[c+1],D.pntLeft))?(s[c]=new SuperMapAlgoPlot.Point(D.pntLeft.x,D.pntLeft.y),a[c]=new SuperMapAlgoPlot.Point(D.pntRight.x,D.pntRight.y)):(s[c]=new SuperMapAlgoPlot.Point(D.pntRight.x,D.pntRight.y),a[c]=new SuperMapAlgoPlot.Point(D.pntLeft.x,D.pntLeft.y)),I=2;I=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),n=l.arrowTouLen,a=l.leftBodyPts,s=l.rightBodyPts,r=[];r.push(a[a.length-1]),r.push(s[s.length-1]);var u=[];u.push(this.scaleValues[3]),u.push(this.scaleValues[4]),u.push(0),u.push(0);var p=SuperMapAlgoPlot.ArrowToolkit.generateArrowHeadShapePts(t,r,u,n,SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_WITHOUT_EAR),h=[];h=(h=h.concat(a)).concat(p);for(var c=s.length-1;c>=0;c--)h.push(s[c]);if(h.push(a[0]),i){for(var g=[],y={x:o[1].x,y:o[1].y,z:o[1].z},f={x:o[0].x,y:o[0].y,z:o[0].z},P=0;P=2&&t.length2*i-1){for(var s=0;sf[v].length)){for(var M=c[v][c[v].length-1],A=g[v][0],T=new SuperMapAlgoPlot.Point(.5*(M.x+A.x),.5*(M.y+A.y)),_=f[v][f[v].length-1],O=f[v][f[v].length-2],x=this.ComputeZValue(T,_,O),w={x:T.x,y:T.y,z:x},E=[],I=[],C=0;C=0;N--)if(v==i-1)R.push(f[v][N]);else{var U={x:f[v][N].x,y:f[v][N].y,z:.5*(f[v][N].z+f[v+1][N].z)};R.push(U)}this.ComputeBeizerZValueByDis(R,g[v],E),b.push(E),E=[];for(var B=y[v],k=0;k0&&this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,G,{surroundLineFlag:!1}),this.scalePoints=this.scalePoints.concat(this.m_scalePoints),!0}u.shapePts.length>0&&(this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,u.shapePts,{surroundLineFlag:!1,lineWidthLimit:!0,strokeWidth:0,weight:0}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,u.shapePts,{surroundLineFlag:!1})),this.scalePoints=[];for(var j=0;jthis.MAX_SCALEVALUE?n=this.MAX_SCALEVALUE:n3)for(var a=i-1,s=0,r=a;s3)for(var n=i-1,a=0,s=n;a0)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,n=this.MIN_PTCOUNT_PERARROW;lb&&(m=.5*b);var L=m*c;f.push(f[p].clone());var v,M=0;v=P-m;var A=[],T=0;for(T=2;T<=p;T++)M+=SuperMapAlgoPlot.PlottingUtil.distance(f[T-1],f[T-2]),SuperMapAlgoPlot.PlottingUtil.equalFuzzy(v,0,1e-14)?A[T]=0:SuperMapAlgoPlot.PlottingUtil.equalFuzzy(v-M,0,1e-14)?A[T]=L:A[T]=L+(d-L)*Math.pow((v-M)/v,this.SV_ATScaleParameter);A[p+1]=L;var _=new SuperMapAlgoPlot.Point(0,0),O=new SuperMapAlgoPlot.Point(0,0),x=new SuperMapAlgoPlot.Point(0,0);for(T=2;T<=p;T++){SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(this.AB_CTRLPT_RATE1,this.AB_CTRLPT_RATE2,f[T-2],f[T-1],f[T],O,x),p==T&&SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(this.AB_CTRLPT_RATE3,f[p],f[p-1],x,_);var w=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(A[T],O,f[T-1]);n[T]=w.pntLeft,l[T]=w.pntRight}var E,I,C=_.clone();if(SuperMapAlgoPlot.PlottingUtil.distance(f[p],C)>0){var D=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(m,f[p],_);f[p]=D.clone()}for(S=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(L,f[p+1],f[p]),l[p+1]=S.pntLeft,n[p+1]=S.pntRight,T=2;T<=p;T++)SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(this.AB_CTRLPT_RATE2,this.AB_CTRLPT_RATE2,l[T-1],l[T],l[T+1],O,x),a[T]=O.clone(),s[T]=x.clone(),SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(this.AB_CTRLPT_RATE2,this.AB_CTRLPT_RATE2,n[T-1],n[T],n[T+1],O,x),r[T]=O.clone(),u[T]=x.clone();SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(this.AB_CTRLPT_RATE3,l[1],l[2],a[2],_),s[1]=_.clone(),SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(this.AB_CTRLPT_RATE3,n[1],n[2],r[2],_),u[1]=_.clone();I=SuperMapAlgoPlot.PlottingUtil.distance(l[p+1],l[p])*(1/3),(E=SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale(I,f[p],f[p+1])).x+=l[p+1].x-f[p].x,E.y+=l[p+1].y-f[p].y,I=(d-L)*Math.pow(I/v,this.SV_ATScaleParameter+.3),S=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(I,l[p+1],E),a[p+1]=S.pntLeft.clone(),I=SuperMapAlgoPlot.PlottingUtil.distance(n[p+1],n[p])*(1/3),(E=SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale(I,f[p],f[p+1])).x+=n[p+1].x-f[p].x,E.y+=n[p+1].y-f[p].y,I=(d-L)*Math.pow(I/v,this.SV_ATScaleParameter+.3),S=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(I,n[p+1],E),r[p+1]=S.pntRight.clone();var R=[],N=m*y,U=SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale(N,f[p],f[p+1]);this.m_scalePoints.push(U.clone()),N=m*g,S=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(N,f[p+1],U),R.push(S.pntRight),R.push(f[p+1]),R.push(S.pntLeft);var B=[];for(B.push(l[p+1]),T=p;T>=1;T--)B.push(a[T+1]),B.push(s[T]),B.push(l[T]);var k=[];for(T=1;T<=p;T++)k.push(n[T]),k.push(u[T]),k.push(r[T+1]);k.push(n[p+1]),i.push.apply(i,k),i.push.apply(i,R),i.push.apply(i,B),o=m/P;var F=[];for(T=B.length-1;T>=0;T--)F.push(B[T]);return{dATLenDivABLen:o,arrowBodyPts:i}}},{key:"generateAYPts",value:function(t,e,o,i,l){var n=new SuperMapAlgoPlot.Point(.5*(t[2].x+o[2].x),.5*(t[2].y+o[2].y)),a=new SuperMapAlgoPlot.Point(.5*(t[1].x+o[1].x),.5*(t[1].y+o[1].y)),s=new SuperMapAlgoPlot.Point(.5*(t[0].x+o[0].x),.5*(t[0].y+o[0].y)),r=SuperMapAlgoPlot.PlottingUtil.distance(n,a),u=SuperMapAlgoPlot.PlottingUtil.distance(s,a),p=l*(r+u),h=new SuperMapAlgoPlot.Point(0,0),c=new SuperMapAlgoPlot.Point(0,0),g=new SuperMapAlgoPlot.Point(0,0);if(p>r){p=r+u-p,h=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(p,s,a);var y=SuperMapAlgoPlot.PlottingUtil.distance(t[1],t[0]),f=SuperMapAlgoPlot.PlottingUtil.distance(o[1],o[0]);y=y*p/u,c=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(y,t[0],t[1]),f=f*p/u,g=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(f,o[0],o[1])}else{h=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(p,n,a);var P=SuperMapAlgoPlot.PlottingUtil.distance(t[1],t[2]),d=SuperMapAlgoPlot.PlottingUtil.distance(o[1],o[2]);P=P*p/r,c=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(P,t[2],t[1]),d=d*p/r,g=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(d,o[2],o[1])}this.m_scalePoints.push(h.clone());var S=this.SV_ArrowWoCtrl*SuperMapAlgoPlot.PlottingUtil.distance(h,c),m=this.SV_ArrowWoCtrl*SuperMapAlgoPlot.PlottingUtil.distance(h,g),b=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(S,h,c),L=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(m,h,g),v=e[11].clone(),M=e[10].clone(),A=i[5].clone(),T=i[6].clone(),_=SuperMapAlgoPlot.PlottingUtil.intersectLines(M,v,h,c),O=SuperMapAlgoPlot.PlottingUtil.distance(_.intersectPoint,M),x=SuperMapAlgoPlot.PlottingUtil.distance(M,h);O=O>x?this.SV_AJCtrl*x:this.SV_AJCtrl*O;var w=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(O,M,v);v=w.clone(),e[11]=w.clone(),_=SuperMapAlgoPlot.PlottingUtil.intersectLines(T,A,h,g),O=(O=SuperMapAlgoPlot.PlottingUtil.distance(_.intersectPoint,T))>(x=SuperMapAlgoPlot.PlottingUtil.distance(T,h))?this.SV_AJCtrl*x:this.SV_AJCtrl*O,A=(w=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(O,T,A)).clone(),i[5]=w.clone();var E=[];E.push(M),E.push(v),E.push(b),E.push(h);var I=[];return I.push(h),I.push(L),I.push(A),I.push(T),{arrowLeftYaoPts:E,arrowRightYaoPts:I}}}]),e}();SuperMapAlgoPlot.AlgoSymbol1002=l},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var o=0;o=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),n=l.arrowTouLen,a=l.leftBodyPts,s=l.rightBodyPts,r=[];r.push(a[a.length-1]),r.push(s[s.length-1]);var u=[];u.push(this.scaleValues[3]),u.push(this.scaleValues[4]),u.push(this.scaleValues[0]),u.push(this.scaleValues[1]);var p=SuperMapAlgoPlot.ArrowToolkit.generateArrowHeadShapePts(t,r,u,n,SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_WITHOUT_EAR),h=[];if(i){for(var c=[],g=[],y=[],f=0;f=0;v--)h.push(y[v]);var M=new SuperMapAlgoPlot.Point((r[0].x+r[1].x)/2,(r[0].y+r[1].y)/2),A=new SuperMapAlgoPlot.Point(M.x,M.y);A.isScalePoint=!0,A.tag=0,this.addScalePoint(A);var T=new SuperMapAlgoPlot.Point(a[a.length-1].x,a[a.length-1].y);T.isScalePoint=!0,T.tag=1,this.addScalePoint(T);var _=new SuperMapAlgoPlot.Point(p[0].x,p[0].y);_.isScalePoint=!0,_.tag=2,this.addScalePoint(_);for(var O=0;O=0;w--)h.push(s[w]);var E=new SuperMapAlgoPlot.Point((r[0].x+r[1].x)/2,(r[0].y+r[1].y)/2),I=new SuperMapAlgoPlot.Point(E.x,E.y);I.isScalePoint=!0,I.tag=0,this.addScalePoint(I);var C=new SuperMapAlgoPlot.Point(a[a.length-1].x,a[a.length-1].y);C.isScalePoint=!0,C.tag=1,this.addScalePoint(C);var D=new SuperMapAlgoPlot.Point(p[0].x,p[0].y);D.isScalePoint=!0,D.tag=2,this.addScalePoint(D)}this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,h,{surroundLineFlag:!1,lineWidthLimit:!0,strokeWidth:0,weight:0}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,h)}}},{key:"modifyPoint",value:function(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),n=this.scaleValues[0],a=SuperMapAlgoPlot.PlottingUtil.polylineDistance(this.controlPoints),s=a*n;if(0==t){var r=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,this.controlPoints[this.controlPoints.length-2],this.controlPoints[this.controlPoints.length-1]),u=r.projectPoint;if(r.isOnline){var p=SuperMapAlgoPlot.PlottingUtil.distance(u,this.controlPoints[this.controlPoints.length-1]);this.scaleValues[0]=p/a}}else if(1==t){var h=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,i,l).projectPoint,c=SuperMapAlgoPlot.PlottingUtil.distance(h,o);this.scaleValues[1]=c/s}else if(2==t){var g=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,this.controlPoints[1],l).projectPoint,y=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(g,o,this.controlPoints[1]),f=y.projectPoint,P=SuperMapAlgoPlot.PlottingUtil.distance(f,o);!0===y.inOnline?this.scaleValues[4]=-P/s:this.scaleValues[4]=P/s}}this.calculateParts()}}]),e}();SuperMapAlgoPlot.AlgoSymbol1001=l},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var o=0;o=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,n=SuperMapAlgoPlot.Primitives.getArcSpatialData(t[0],e,e,0,o,i,l);0!==n.length&&this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,n)}}}]),e}();SuperMapAlgoPlot.NewArc=l},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var o=0;o=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,n=[];n.push(t[0]),(n=n.concat(SuperMapAlgoPlot.Primitives.getArcSpatialData(t[0],e,e,0,o,i,l))).push(t[0]),0!==n.length&&this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,n)}}}]),e}();SuperMapAlgoPlot.NewPie=l},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var o=0;o2*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),n=SuperMapAlgoPlot.PlottingUtil.polylineDistance(i);if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(l,0)||SuperMapAlgoPlot.PlottingUtil.equalFuzzy(n,0))return;var a=-1;a=t%2==0?Math.floor(t/2):Math.floor((t+1)/2);var s=(e.x-o[a].x)/l,r=(e.y-o[a].y)/l;this.scaleValues[2*t]=s,this.scaleValues[2*t+1]=r}}}]),e}();SuperMapAlgoPlot.Polybezier=l},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var o=0;o1&&(this.scaleValues[2]=1)}}else if(2===t){var P=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,o[0],o[1]);if(P.isOnline){var d=this.scaleValues[3]*(this.style.weight||this.style.strokeWidth),S=this.getLonLatDistanceFromPixel(d),m=S*this.scaleValues[5],b=SuperMapAlgoPlot.PlottingUtil.findPointInLine(o[1],o[0],S),L=SuperMapAlgoPlot.PlottingUtil.findPointInLine(b,o[1],m);S=SuperMapAlgoPlot.PlottingUtil.distance(o[1],P.projectPoint),d=this.getPixelDistanceFromLonLat(S),this.scaleValues[3]=d/(this.style.weight||this.style.strokeWidth);var v=SuperMapAlgoPlot.PlottingUtil.distance(e,P.projectPoint),M=this.getPixelDistanceFromLonLat(v);this.scaleValues[4]=M/(this.style.weight||this.style.strokeWidth),m=SuperMapAlgoPlot.PlottingUtil.distance(L,P.projectPoint),this.scaleValues[5]=m/S}}else if(3===t){var A=this.scaleValues[3]*(this.style.weight||this.style.strokeWidth),T=this.getLonLatDistanceFromPixel(A),_=SuperMapAlgoPlot.PlottingUtil.findPointInLine(o[1],o[0],T),O=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,_,o[1]);if(O.isOnline){var x=SuperMapAlgoPlot.PlottingUtil.distance(_,O.projectPoint);this.scaleValues[5]=x/T,this.scaleValues[5]<0?this.scaleValues[5]=0:this.scaleValues[5]>1&&(this.scaleValues[5]=1)}}}this.calculateParts()}}]),e}();SuperMapAlgoPlot.LinearArrow=l},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var o=0;oo);s++){var r=SuperMapAlgoPlot.PlottingUtil.findPointInPolyLine(n,l+i*s);if(-1!==r.index){var u=new SuperMapAlgoPlot.Point(r.pt.x,r.pt.y),p=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(i/2,e[r.index],u);this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,[p.pntLeft,p.pntRight])}}this.finish()}}}]),e}();SuperMapAlgoPlot.Wire=l},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var o=0;o=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 n=this.scaleValues[0]*SuperMapAlgoPlot.PlottingUtil.distance(i,l);e=[SuperMapAlgoPlot.PlottingUtil.findPoint(i,l,n,0)]}this.addCell(34,e,o,this.textContent);var a=new SuperMapAlgoPlot.Point(e[0].x,e[0].y);a.isScalePoint=!0,a.tag=0,this.scalePoints=[],this.addScalePoint(a)}}else this.controlPoints.length>=2&&this.controlPoints.length=this.minEditPts&&this.computeLine(e)}},{key:"computeLine",value:function(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(var l=0;l1)){if(t=(1-t)/2,this.controlPoints.length>=this.minEditPts){var e,o,i,l;this.scalePoints=[];var n=[];this.controlPoints[0].x=2&&this.controlPoints.lengthi?Math.abs((e-i)/(t-o))>a?2:1:ea?4:1:t>l?e>i?Math.abs((e-i)/(t-l))>a?2:3:ea?4:3:e>i?2:e1?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()}}},{key:"getTextPathPts",value:function(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)}},{key:"computeText",value:function(t,e,o){if(!(t.length<2)){for(var i=e.length,l=t,n=l.length,a=0,s=0;s180&&(T-=360),T<-180&&(T+=360),T>90&&T<=180?(L=-180,m=!0,b=!0):T>-180&&T<-90&&(L=180,m=!0,b=!0),!0,0!=L?this.relLineText===SuperMapAlgoPlot.RelLineText.ONLINE||(y=this.relLineText===SuperMapAlgoPlot.RelLineText.ONLEFTLINE?"lt":"lb"):this.relLineText===SuperMapAlgoPlot.RelLineText.ONLINE||(y=this.relLineText===SuperMapAlgoPlot.RelLineText.ONLEFTLINE?"lb":"lt");for(var _=0;_a);_++){var O=_;for(b&&(O=i-_-1),v=(S=f[O]).getWidth(),m&&(u+=v);p<=u&&h=0){for(var C=[],D=0;D<=A.index;D++)C.push(o[D]);C.push(A.pt),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,C)}if(I.index>=0){var R=[];R.push(I.pt);for(var N=I.index+1;N2){for(var i=-1,l=t.length-2;l>=0;l--)if(ethis.controlPoints.length))if(2===this.controlPoints.length){var 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),n=SuperMapAlgoPlot.PlottingUtil.circlePoint(l,o,o,i+90),a=SuperMapAlgoPlot.PlottingUtil.circlePoint(l,3*o,3*o,i+90);this.addCell(SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL,[n,new SuperMapAlgoPlot.Point(n.x+o,n.y)]),this.addCell(SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL,[a,new SuperMapAlgoPlot.Point(a.x+o,a.y)])}else{var s=this.controlPoints[0].clone(),r=this.controlPoints[1].clone(),u=this.controlPoints[2].clone(),p=0;p=SuperMapAlgoPlot.PlottingUtil.isRight(u,s,r)?180*SuperMapAlgoPlot.PlottingUtil.radian(r,s)/Math.PI+90:180*SuperMapAlgoPlot.PlottingUtil.radian(s,r)/Math.PI+90;var h=SuperMapAlgoPlot.PlottingUtil.distance(s,r)/2,c=new SuperMapAlgoPlot.Point((s.x+r.x)/2,(s.y+r.y)/2),g=SuperMapAlgoPlot.PlottingUtil.circlePoint(c,h,h,p),y=SuperMapAlgoPlot.PlottingUtil.plumbLineLen(u,s,r);if(y<=4*h){var f=SuperMapAlgoPlot.PlottingUtil.circlePoint(c,3*h,3*h,p);this.addCell(SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL,[g,new SuperMapAlgoPlot.Point(g.x+h,g.y)]),this.addCell(SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL,[f,new SuperMapAlgoPlot.Point(f.x+h,f.y)])}else{for(var P=SuperMapAlgoPlot.PlottingUtil.circlePoint(c,y-h,y-h,p),d=180*Math.acos(h/(y-2*h))/Math.PI,S=p-d,m=p-180+d,b=p-180-d+360,L=[],v=p+d-360;v<=S;v+=4){var M=SuperMapAlgoPlot.PlottingUtil.circlePoint(g,h,h,v);L.push(M)}var A=SuperMapAlgoPlot.PlottingUtil.circlePoint(g,h,h,S);L.push(A);for(var T=[],_=m;_=0;E--)w.push(T[E]);this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,w)}}}}]),e}();SuperMapAlgoPlot.CurveEight=l},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var o=0;o=this.minEditPts){for(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),n=SuperMapAlgoPlot.PlottingUtil.parallel(this.controlPoints,-i/2),a=180*SuperMapAlgoPlot.PlottingUtil.radian(t,e)/Math.PI,s=[],r=a+90;r<=a+270;r+=10){var u=SuperMapAlgoPlot.PlottingUtil.circlePoint(t,i/2,i/2,r);s.push(u)}for(var p=[],h=a-90;h<=a+90;h+=10){var c=SuperMapAlgoPlot.PlottingUtil.circlePoint(e,i/2,i/2,h);p.push(c)}var g=[];(g=(g=(g=(g=g.concat(s)).concat(n)).concat(p)).concat(l)).push(g[0]),this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,g);var y=new SuperMapAlgoPlot.Point(s[0].x,s[0].y);this.addScalePoint(y)}}},{key:"modifyPoint",value:function(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()}}]),e}();SuperMapAlgoPlot.Runway=l},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var o=0;o0)for(var l=0;l2*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 n=(e.x-o[l].x)/i,a=(e.y-o[l].y)/i;this.scaleValues[2*t]=n,this.scaleValues[2*t+1]=a}this.calculateParts()}},{key:"reSample",value:function(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),n=0,a=0,s=0,r=2*Math.PI;l=t[0],o.push(l);for(var u=!1,p=!1,h=!1,c=1;c0||SuperMapAlgoPlot.PlottingUtil.equalFuzzy(0,y)?Math.acos(g):2*Math.PI-Math.acos(g),r>2*Math.PI&&n+2*Math.PIs&&(n-=2*Math.PI,r>2*Math.PI&&(r-=2*Math.PI)),n>s&&nn+f&&(r=n+f):(h=!0,r=n+f),u=!0}else l=t[c-1],c--,o.push(l),s=0,r=2*Math.PI,u=!1,p=!1,h=!1}return o.push(t[i-1]),o}return o}},{key:"reSampleByAngle",value:function(t,e){var o=[],i=t.length;if(null==t||i<=0||e<=0)return o;for(var l=t,n=i,a=!1;SuperMapAlgoPlot.PlottingUtil.equalFuzzy(l[0].x,l[n-1].x)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(l[0].y,l[n-1].y);){if((n-=1)<=0)return o;a=!0}var s,r,u=[];for(s=0;s1e-10&&SuperMapAlgoPlot.PlottingUtil.distance(l[r],l[s+1])>1e-10){var p=180*SuperMapAlgoPlot.PlottingUtil.InnerAngle(l[s],l[r],l[s+1])/Math.PI;p>e&&p<180-e&&(u[s]=1,r++)}var h=0;for(s=0;s0){for(a&&h++,o=[],r=0,s=0;sMath.abs(this.scaleValues[i]-this.scaleValues[l]))for(var a=0;a<2;a++){var s,r,u;0==a?(u=i,s=SuperMapAlgoPlot.PlottingUtil.radian(o[i],o[l])*SuperMapAlgoPlot.PlottingUtil.RTOD,r=Math.acos((n*n+this.scaleValues[i]*this.scaleValues[i]-this.scaleValues[l]*this.scaleValues[l])/(2*n*this.scaleValues[i]))*SuperMapAlgoPlot.PlottingUtil.RTOD):(u=l,s=SuperMapAlgoPlot.PlottingUtil.radian(o[l],o[i])*SuperMapAlgoPlot.PlottingUtil.RTOD,r=Math.acos((n*n+this.scaleValues[l]*this.scaleValues[l]-this.scaleValues[i]*this.scaleValues[i])/(2*n*this.scaleValues[l]))*SuperMapAlgoPlot.PlottingUtil.RTOD);var p=s-r,h=s+r,c=p<0&&h>0||p>360||h>360;p=this.adjustAngle(p),h=this.adjustAngle(h);for(var g=this.angleRange[u].length-1;g>=0;g--)if(c){if(h>this.angleRange[u][g].End||SuperMapAlgoPlot.PlottingUtil.equalFuzzy(h,this.angleRange[u][g].End)){this.angleRange[u].splice(g,1);continue}if(h>this.angleRange[u][g].Start&&(this.angleRange[u][g].Start=h),pthis.angleRange[u][g].End)this.angleRange[u].splice(g,1);else if(p>this.angleRange[u][g].Start&&hthis.angleRange[u][g].End)continue;if(p>this.angleRange[u][g].Start&&(this.angleRange[u][g].End=p),h=0;P--){for(var d=this.adjustAngle(this.angleRange[f][P].Start),S=this.adjustAngle(this.angleRange[f][P].End);S=0;x--)for(var w=0;w<_[x].length;w++){for(var E in _)if(parseInt(E)!==x){var I=_[E];if(SuperMapAlgoPlot.PlottingUtil.ptIsInPolygon(I,_[x][w])){var C=x,D=parseInt(E);_[D].push(_[D][0]),_[C].push(_[C][0]),_[D]=_[D].concat(_[C]),_.splice(C,1);break}}if(!isNaN(C)&&!isNaN(D))break}for(var R=0;R<_.length;R++){var N={type:SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,positionPoints:_[R],style:{surroundLineFlag:!1,lineWidthLimit:!0,weight:0,strokeWidth:0}};this.components.splice(0,0,N)}for(var U=0;U=0;n--)e.push(t[l][n]);if(t.splice(l,1),void 0!==(o=this.generatePolygon(t,e))&&0!==o.length)return o}}},{key:"modifyPoint",value:function(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()}},{key:"adjustAngle",value:function(t){for(;t>360;)t-=360;for(;t<0;)t+=360;return t}},{key:"getCircleLonLat",value:function(t,e){return null===this.map?2*this.getDefaultSubSymbolSize():this.map&&"undefined"!=typeof L&&void 0!==L.Map&&this.map instanceof L.Map?((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}}]),e}();SuperMapAlgoPlot.CombinationalCircle=l},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var o=0;o360;)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);for(var e=SuperMapAlgoPlot.PlottingUtil.distance(t[0],t[1]),o=SuperMapAlgoPlot.PlottingUtil.distance(t[0],t[2]),i=[],l=[],n=Math.PI/180,a=(this.scaleValues[1]-this.scaleValues[0])/72,s=this.scaleValues[0];s=0;y--)c.push(l[y]);this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,c,{surroundLineFlag:!1,lineWidthLimit:!0,weight:0,strokeWidth:0}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,i),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,l);var f=t[0].x+e/2*Math.cos(this.scaleValues[0]*n),P=t[0].y+e/2*Math.sin(this.scaleValues[0]*n),d=t[0].x+o/2*Math.cos(this.scaleValues[1]*n),S=t[0].y+o/2*Math.sin(this.scaleValues[1]*n),m=new SuperMapAlgoPlot.Point(f,P);m.isScalePoint=!0,m.tag=0,this.addScalePoint(m);var b=new SuperMapAlgoPlot.Point(d,S);b.isScalePoint=!0,b.tag=1,this.addScalePoint(b)}}},{key:"modifyPoint",value:function(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()}}]),e}();SuperMapAlgoPlot.ConcentricCircle=l},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var o=0;o1)){if(t=(1-t)/2,this.controlPoints.length>=this.minEditPts){var e,o,i,l;this.scalePoints=[];var n=[];this.controlPoints[0].x=2&&this.controlPoints.lengthi?Math.abs((s-i)/(a-o))>u?2:1:su?4:1:a>l?s>i?Math.abs((s-i)/(a-l))>u?2:3:su?4:3:s>i?2:si&&(h=i),h<(i+n)/2&&(h=(i+n)/2),p=1-2*(i-h)/(i-n);break;case 2:case 4:var c=r.x+(e.x-r.x);c>l&&(c=l),c<(o+l)/2&&(c=(o+l)/2),p=1-2*(l-c)/(l-o)}p<0&&(p=0),p>1&&(p=1),this.scaleValues[0]=p}this.calculateParts()}},{key:"calculateArc",value:function(t,e,o,i,l,n){(!l||1!=l&&-1!=l)&&(l=-1),n||(n=360);for(var a=Math.PI/n/2,s=a*l,r=Math.abs(i-o),u=[],p=o,h=0;h2*Math.PI?p-2*Math.PI:p}return u}},{key:"getAction",value:function(t,e,o,i,l,n){var a=(i-n)/(l-o);return ti?Math.abs((e-i)/(t-o))>a?2:1:ea?4:1:t>l?e>i?Math.abs((e-i)/(t-l))>a?2:3:ea?4:3:e>i?2:e=this.minEditPts){var e,o,i,l;t[0].xi?Math.abs((e-i)/(t-o))>a?2:1:ea?4:1:t>l?e>i?Math.abs((e-i)/(t-l))>a?2:3:ea?4:3:e>i?2:e1)){if(t=(1-t)/2,this.controlPoints.length>=this.minEditPts){var e,o,i,l,n,a;this.controlPoints[2]&&(this.controlPoints[2].isFixedPos=!0),this.controlPoints[0].xo?Math.abs((a-o)/(n-e))>r?2:1:ar?4:1:n>i?a>o?Math.abs((a-o)/(n-i))>r?2:3:ar?4:3:a>o?2:ai?Math.abs((s-i)/(a-o))>u?2:1:su?4:1:a>l?s>i?Math.abs((s-i)/(a-l))>u?2:3:su?4:3:s>i?2:si&&(h=i),h<(i+n)/2&&(h=(i+n)/2),p=1-2*(i-h)/(i-n);break;case 2:case 4:var c=r.x+(e.x-r.x);c>l&&(c=l),c<(o+l)/2&&(c=(o+l)/2),p=1-2*(l-c)/(l-o)}p<0&&(p=0),p>1&&(p=1),this.scaleValues[0]=p}this.calculateParts()}}]),e}();SuperMapAlgoPlot.GeoTooltipBox=l},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var o=0;o=2&&t.lengtho.x&&s.xo.y&&s.yi.x||s.yi.y)&&(e[0]=n,e[3]=o),4==e.length&&this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,e)}}},{key:"GetPointsByTrapezoid",value:function(t,e,o,i,l){var n=e.x,a=e.y,s=o.x,r=o.y,u=i.x,p=i.y,h=0,c=0,g=0,y=0;if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(Math.abs(a-r),0))h=n+s-u,c=p;else if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(Math.abs(n-s),0))h=u,c=a+r-p;else{var f=1*(a-r)/(n-s),P=p-f*u;c=f*(h=((r+a)/2+(n+s)/(2*f)-P)/(f+1/f))+P,h=2*h-u,c=2*c-p}var d=Math.sqrt(1*(n-s)*(n-s)+1*(a-r)*(a-r)),S=Math.sqrt(1*(n-h)*(n-h)+1*(a-c)*(a-c));d>0?(g=n+(s-n)*S/d,y=a+(r-a)*S/d):(g=n,y=a);var m=g+(h-g)*t,b=y+(c-y)*t;l.x=m,l.y=b}}]),e}();SuperMapAlgoPlot.Trapezoid=l},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var o=0;o0&&l<.4&&(this.scaleValues[0]=l)}else if(1==t){var n=new SuperMapAlgoPlot.Point((o[0].x+o[1].x)/2,(o[0].y+o[1].y)/2),a=SuperMapAlgoPlot.PlottingUtil.distance(e,n)/i;0a&&(this.scaleValues[1]=a)}}this.calculateParts()}}]),e}();SuperMapAlgoPlot.Brace=l},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var o=0;o2?SuperMapAlgoPlot.PlottingUtil.radian(e[e.length-1],e[e.length-2]):SuperMapAlgoPlot.PlottingUtil.radian(e[1],e[0]))-n,s=e[e.length-1].x+l*Math.cos(a),r=e[e.length-1].y+l*Math.sin(a),u=new SuperMapAlgoPlot.Point(s,r),p=i+n,h=e[e.length-1].x+l*Math.cos(p),c=e[e.length-1].y+l*Math.sin(p),g=new SuperMapAlgoPlot.Point(h,c),y=[];y.push(u),y.push(e[e.length-1].clone()),y.push(g);var f={surroundLineFlag:!1,fillLimit:!0,lineTypeLimit:!0},P=SuperMapAlgoPlot.PlottingUtil.radian(e[0],e[1]);a=P-n,s=e[0].x+l*Math.cos(a),r=e[0].y+l*Math.sin(a),u=new SuperMapAlgoPlot.Point(s,r),p=P+n,h=e[0].x+l*Math.cos(p),c=e[0].y+l*Math.sin(p),g=new SuperMapAlgoPlot.Point(h,c);var d=[];d.push(u),d.push(e[0].clone()),d.push(g);var S=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(S,d,f):this.scaleValues[1]===SuperMapAlgoPlot.ArrowLineType.TRIANGLESOLID&&this.addCell(S,d,f),this.scaleValues[2]===SuperMapAlgoPlot.ArrowLineType.DOUBLELINE?this.addCell(m,y,f):this.scaleValues[2]===SuperMapAlgoPlot.ArrowLineType.TRIANGLESOLID&&this.addCell(m,y,f),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,e),this.finish()}}}]),e}();SuperMapAlgoPlot.ArrowLine=l},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var o=0;o=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);for(var l=[],n=1;ny)break;if(p>=g){var P=u.split("");u="";for(var d="",S=P.length,m=0;m=g){var b=P[m];if(P[m]="\n",a++,s.weight?f=parseFloat(s.fontSize)*a+a+2*s.weight+.2*parseFloat(s.fontSize):this.style.strokeWidth&&(f=parseFloat(s.fontSize)*a+a+2*s.strokeWidth+.2*parseFloat(s.fontSize)),!(f.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),n=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(l*(o-e),t),a=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(l*(o+e),t);return i.startIndex=n.index,i.startPt=n.pts,i.endIndex=a.index,i.endPt=a.pts,i}},{key:"computeDashLine",value:function(t,e,o){var i=[],l=SuperMapAlgoPlot.PlottingUtil.polylineDistance(o);if(l<=0)return[];for(var n,a=o[0],s=1,r=0,u=!0,p=!0;r2){for(var r=-1,u=t.length-2;u>=0;u--)if(o1){SuperMapAlgoPlot.PlottingUtil.distance(t[t.length-1],t[t.length-2])>s&&(n=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(s,[t[t.length-1],t[t.length-2]])).bfind&&(t.splice(t.length-1,1),t.push(n.pts)),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,t);var p=t[t.length-1],h=a,c=o;if(void 0===p)return t;var g=SuperMapAlgoPlot.PlottingUtil.radian(p,h)*SuperMapAlgoPlot.PlottingUtil.RTOD,y=SuperMapAlgoPlot.PlottingUtil.circlePoint(h,c,c,g+157.5),f=SuperMapAlgoPlot.PlottingUtil.circlePoint(h,c,c,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,[y,a,f],P)}else this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,l)}},{key:"addDovetailArrow",value:function(t,e){if(t.length<2)return t;var o,i=SuperMapAlgoPlot.PlottingUtil.polylineDistance(this.controlPoints);void 0===e&&(e=(this.isEdit,.5*this.getSubSymbolScaleValue())),o=i*e;var l=t[t.length-1];if(t.length>2){for(var n=-1,a=t.length-2;a>=0;a--)if(oe||i<=0)&&(i=e),i}},{key:"computeSubSymbol",value:function(t,e,o,i,l,n){if(null==t.symbolData||null==t.symbolData.innerCells)return null;void 0===l&&(l=0),void 0===n&&(n=0);for(var a=SuperMapAlgoPlot.AnalysisSymbol.analysisSymbolCells(t.symbolData,!0),s=0,r=0,u=0,p=0,h=0;hc[g].x&&(u=c[g].x),p>c[g].y&&(p=c[g].y)}var f=new SuperMapAlgoPlot.Point(s,r),P=new SuperMapAlgoPlot.Point(u,p),d=(f.y-P.y)/o,S=(f.x-P.x)/o,m=S>d?S:d,b=new SuperMapAlgoPlot.Point(.5*(f.x+P.x),.5*(f.y+P.y));b.x+=l*(f.x-P.x),b.y+=n*(f.y-P.y);for(var L=0,v=a.length;L=n)return o.z;if(s>=n)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==(a=SuperMapAlgoPlot.PlottingUtil.distance(e,l))?e.z:e.z-(e.z-o.z)*(a/n)}},{key:"ComputeBeizerZValueByDis",value:function(t,e,o){if(t.length<2)return!1;for(var i=[],l=0;l2){var r=t.length;t.splice(2,r-2)}var u=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t);i.arrowTouLen=u*l;for(var p=SuperMapAlgoPlot.PlottingUtil.findPointInPolyLine(t,u-i.arrowTouLen).pt,h=[],c=i.arrowTouLen*a,g=i.arrowTouLen*n,y=t.length-1,f=0;ft.length)return l;var n,a=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t),s=SuperMapAlgoPlot.PlottingUtil.equalFuzzy(e,0);switch(o){case SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_POLYLINE:l=l.concat(t),i&&!s&&SuperMapAlgoPlot.PlottingUtil.distance(t[t.length-1],t[t.length-2])>e&&(n=SuperMapAlgoPlot.PlottingUtil.findPointInPolyLine(t,a-e),l.splice(l.length-1,1),l.push(n.pt));break;case SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_POLYBEZIER:if(2==t.length)l=l.concat(t),i&&!s&&SuperMapAlgoPlot.PlottingUtil.distance(t[t.length-1],t[t.length-2])>e&&(n=SuperMapAlgoPlot.PlottingUtil.findPointInPolyLine(t,a-e),l.splice(l.length-1,1),l.push(n.pt));else{var r=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(t);if(s)l=l.concat(r);else{var u=r[r.length-1];if(!s&&(e1;p--){if(!(e>SuperMapAlgoPlot.PlottingUtil.distance(u,r[p]))){var h=SuperMapAlgoPlot.PlottingUtil.findPoint(u,r[p],e,0);r.push(h),l=r;break}r.splice(p,1)}i||l.push(u)}else l=l.concat(r)}}break;case SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_COATTAIL:var c=e;if(c>a)return l;for(var g,y,f=Math.ceil(a/(1.4*c)),P=0,d=[],S=0;St.length)return i;switch(o){case SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_POLYLINE:var l=t[0],n=t[1],a=SuperMapAlgoPlot.PlottingUtil.distance(l,n);if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(a,e,1e-7)||a>e){var s=SuperMapAlgoPlot.PlottingUtil.findPoint(l,n,e,0),r=e*Math.tan(.125*Math.PI),u=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(r,t[0],s);i.push(u.pntLeft),i.push(t[0]),i.push(u.pntRight)}break;case SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_TRIANGLE:break;case SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_TRIANGLE_SOLID:var p=t[0],h=t[1],c=SuperMapAlgoPlot.PlottingUtil.distance(p,h);if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(c,e,1e-7)||c>e){var g=e*Math.tan(.125*Math.PI),y=SuperMapAlgoPlot.PlottingUtil.findPoint(p,h,e,0),f=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(g,t[0],y);i.push(f.pntLeft),i.push(p),i.push(f.pntRight),i.push(f.pntLeft)}break;case SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_COATTAIL:var P=t[0],d=2*Math.sqrt(e*e/3),S=SuperMapAlgoPlot.PlottingUtil.distance(t[0],t[1]);if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(d/2,S,1e-7)||S>d/2){var m=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],d,20),b=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],d,-20),L=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],d/2,0);i.push(P),i.push(m),i.push(L),i.push(b),i.push(P)}break;case SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_COATTAIL_HOLLOW:var v=[],M=t[0],A=2*Math.sqrt(e*e/3),T=SuperMapAlgoPlot.PlottingUtil.distance(t[0],t[1]);if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(A/1.4,T,1e-7)||T>A/1.4){var _=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],A,20),O=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],A,-20),x=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],A/1.4,0);v.push(M),v.push(_),v.push(x),v.push(O),v.push(M);var w=new SuperMapAlgoPlot.Point((v[0].x+v[1].x)/2,(v[0].y+v[1].y)/2),E=new SuperMapAlgoPlot.Point((v[3].x+v[4].x)/2,(v[3].y+v[4].y)/2),I=new SuperMapAlgoPlot.Point((w.x+E.x)/2,(w.y+E.y)/2),C=.75*SuperMapAlgoPlot.PlottingUtil.distance(w,E)/2,D=SuperMapAlgoPlot.PlottingUtil.findPointInLine(I,w,C),R=SuperMapAlgoPlot.PlottingUtil.findPointInLine(I,E,C);i.push(v[0]),i.push(D),i.push(v[1]),i.push(v[2]),i.push(v[3]),i.push(R),i.push(v[4])}}return i},SuperMapAlgoPlot.ArrowToolkit.generateArrowTailShapePts=function(t,e,o,i){for(var l=e.length,n=[],a=0,s=0;s0&&P>0){var S=1/(g-t[2].x),m=-1/(y-t[2].y),b=1*t[2].y/(y-t[2].y)-1*t[2].x/(g-t[2].x);d=Math.abs(S*t[0].x+m*t[0].y+b)/Math.sqrt(S*S+m*m)}else P<=1e-4?d=Math.abs(y-t[1].y):f<=1e-4&&(d=Math.abs(g-t[1].x));var L=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(d,t[2],new SuperMapAlgoPlot.Point(g,y)),v=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(t[1],t[2],t[0]);v?(n[1]=t[1],a[1]=t[0]):(n[1]=t[0],a[1]=t[1]),t[1]=new SuperMapAlgoPlot.Point((t[0].x+t[1].x)/2,(t[0].y+t[1].y)/2);var M=Math.sqrt((L.pntLeft.x-L.pntRight.x)*(L.pntLeft.x-L.pntRight.x)+(L.pntLeft.y-L.pntRight.y)*(L.pntLeft.y-L.pntRight.y))*SuperMapAlgoPlot.ArrowToolkit.ConstValue.sv_AtWidthDivAwWidth,A=(l=M*SuperMapAlgoPlot.ArrowToolkit.ConstValue.sv_AtLenDivAtWidth)*c;SuperMapAlgoPlot.PlottingUtil.equalFuzzy(h,0)||(A=(l=i*h)*c);var T,_,O=SuperMapAlgoPlot.PlottingUtil.distance(t[e],t[e-1]),x=2*l;O0&&(t[e]=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(l,t[e],D)),I=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(A,t[e+1],t[e]),(v=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(t[e],t[e+1],I.pntLeft))?(a[e]=new SuperMapAlgoPlot.Point(I.pntLeft.x,I.pntLeft.y),n[e]=new SuperMapAlgoPlot.Point(I.pntRight.x,I.pntRight.y)):(a[e]=new SuperMapAlgoPlot.Point(I.pntRight.x,I.pntRight.y),n[e]=new SuperMapAlgoPlot.Point(I.pntLeft.x,I.pntLeft.y)),w=2;w1&&t.push(l),l=[],e=s.GetX(),o=s.GetY(),l.push(new SuperMapAlgoPlot.Point(e,o));break;case 1:e=s.GetX(),o=s.GetY(),l.push(new SuperMapAlgoPlot.Point(e,o));break;case 2:if(3!=i.elements[a+1].GetType()||3!=i.elements[a+1].GetType())break;for(var r=i.elements[a-1].GetX(),u=i.elements[a-1].GetY(),p=s.GetX(),h=s.GetY(),c=i.elements[a+1].GetX(),g=i.elements[a+1].GetY(),y=i.elements[a+2].GetX(),f=i.elements[a+2].GetY(),P=0;P<=1;P+=.03125){var d=P*P,S=d*P,m=1-3*P+3*d-S,b=3*(P-2*d+S),L=3*(d-S),v=S;l.push(new SuperMapAlgoPlot.Point(m*r+b*p+L*c+v*y,m*u+b*h+L*g+v*f))}a+=2}}return l.length>1&&t.push(l),!0}},{key:"ensureData",value:function(){null==this.m_pData&&this.ensureData_helper()}},{key:"ensureData_helper",value:function(){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}},{key:"detach",value:function(){1!=this.m_pData.ref&&this.detach_helper(),this.setBoundsDirty(!0)}},{key:"detach_helper",value:function(){var t=new SuperMapAlgoPlot.Path2DData;null==this.m_pData||this.mtDeRef(this.m_pData.ref)||(this.m_pData=null),this.m_pData=t}},{key:"setBoundsDirty",value:function(t){this.getDataPtr().isBoundsDirty=t}},{key:"getDataPtr",value:function(){return this.m_pData}},{key:"IsEmpty",value:function(){if(null==this.m_pData)return!0;var t=this.m_pData.elements.length;return 0==t||1==t&&0==this.m_pData.elements[0].GetType()}},{key:"GetElementCount",value:function(){return null!=this.m_pData?this.m_pData.elements.length:0}}],[{key:"mtRef",value:function(t){return 0!=++t}},{key:"mtDeRef",value:function(t){return 0!=--t}}]),t}();SuperMapAlgoPlot.Path2D=l},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AlgoSymbol322=e.AlgoSymbol321=e.AlgoSymbol320=e.AlgoSymbol15200=e.AlgoSymbol315=e.AlgoSymbol1022=e.AlgoSymbol1021=e.AlgoSymbol1020=e.AlgoSymbol1019=e.AlgoSymbol1018=e.AlgoSymbol1017=e.AlgoSymbol1016=e.AlgoSymbol1015=e.AlgoSymbol1014=e.AlgoSymbol1013=e.AlgoSymbol1012=e.AlgoSymbol1011=e.AlgoSymbol1010=e.AlgoSymbol1009=e.AlgoSymbol1008=e.AlgoSymbol1007=e.AlgoSymbol1006=e.AlgoSymbol1005=e.AlgoSymbol1004=e.AlgoSymbol1003=e.AlgoSymbol1002=e.AlgoSymbol1001=e.NewArc=e.NewPie=e.Polybezier=e.LinearArrow=e.Wire=e.PolygonRegion=e.LineRelation=e.LineMarking=e.PathText=e.CurveEight=e.Runway=e.NodeChain=e.FreeCurve=e.CombinationalCircle=e.ConcentricCircle=e.SymbolTextBox=e.GeoTooltipBoxM=e.GeoTooltipBox=e.Trapezoid=e.Brace=e.RegularPolygon=e.ArrowLine=e.AlgoSymbol=e.ArrowToolkit=e.Path2DData=e.Element=e.Path2D=void 0;var i=o(138),l=o(137),n=o(136),a=o(135),s=o(134),r=o(133),u=o(132),p=o(131),h=o(130),c=o(129),g=o(128),y=o(127),f=o(126),P=o(125),d=o(124),S=o(123),m=o(122),b=o(121),L=o(120),v=o(119),M=o(118),A=o(117),T=o(116),_=o(115),O=o(114),x=o(113),w=o(112),E=o(111),I=o(110),C=o(109),D=o(108),R=o(107),N=o(106),U=o(105),B=o(104),k=o(103),F=o(102),G=o(101),V=o(100),j=o(99),Y=o(98),z=o(97),W=o(96),X=o(95),H=o(94),Z=o(93),J=o(92),q=o(91),K=o(90),Q=o(89),$=o(88),tt=o(87),et=o(86),ot=o(85);e.Path2D=i.Path2D,e.Element=l.Element,e.Path2DData=n.Path2DData,e.ArrowToolkit=a.ArrowToolkit,e.AlgoSymbol=s.AlgoSymbol,e.ArrowLine=r.ArrowLine,e.RegularPolygon=u.RegularPolygon,e.Brace=p.Brace,e.Trapezoid=h.Trapezoid,e.GeoTooltipBox=c.GeoTooltipBox,e.GeoTooltipBoxM=g.GeoTooltipBoxM,e.SymbolTextBox=y.SymbolTextBox,e.ConcentricCircle=f.ConcentricCircle,e.CombinationalCircle=P.CombinationalCircle,e.FreeCurve=d.FreeCurve,e.NodeChain=S.NodeChain,e.Runway=m.Runway,e.CurveEight=b.CurveEight,e.PathText=L.PathText,e.LineMarking=v.LineMarking,e.LineRelation=M.LineRelation,e.PolygonRegion=A.PolygonRegion,e.Wire=T.Wire,e.LinearArrow=_.LinearArrow,e.Polybezier=O.Polybezier,e.NewPie=x.NewPie,e.NewArc=w.NewArc,e.AlgoSymbol1001=E.AlgoSymbol1001,e.AlgoSymbol1002=I.AlgoSymbol1002,e.AlgoSymbol1003=C.AlgoSymbol1003,e.AlgoSymbol1004=D.AlgoSymbol1004,e.AlgoSymbol1005=R.AlgoSymbol1005,e.AlgoSymbol1006=N.AlgoSymbol1006,e.AlgoSymbol1007=U.AlgoSymbol1007,e.AlgoSymbol1008=B.AlgoSymbol1008,e.AlgoSymbol1009=k.AlgoSymbol1009,e.AlgoSymbol1010=F.AlgoSymbol1010,e.AlgoSymbol1011=G.AlgoSymbol1011,e.AlgoSymbol1012=V.AlgoSymbol1012,e.AlgoSymbol1013=j.AlgoSymbol1013,e.AlgoSymbol1014=Y.AlgoSymbol1014,e.AlgoSymbol1015=z.AlgoSymbol1015,e.AlgoSymbol1016=W.AlgoSymbol1016,e.AlgoSymbol1017=X.AlgoSymbol1017,e.AlgoSymbol1018=H.AlgoSymbol1018,e.AlgoSymbol1019=Z.AlgoSymbol1019,e.AlgoSymbol1020=J.AlgoSymbol1020,e.AlgoSymbol1021=q.AlgoSymbol1021,e.AlgoSymbol1022=K.AlgoSymbol1022,e.AlgoSymbol315=Q.AlgoSymbol315,e.AlgoSymbol15200=$.AlgoSymbol15200,e.AlgoSymbol320=tt.AlgoSymbol320,e.AlgoSymbol321=et.AlgoSymbol321,e.AlgoSymbol322=ot.AlgoSymbol322},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AlgoSymbolFactory=e.BasicAlgoSymbolFactory=void 0;var i=o(44),l=o(84);e.BasicAlgoSymbolFactory=i.BasicAlgoSymbolFactory,e.AlgoSymbolFactory=l.AlgoSymbolFactory},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.AddPoint_WayType=SuperMapAlgoPlot.AddPoint_WayType={UNKNOWN:0,POLYLINE:1,CURVE:2}},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.RouteNodePrimitives=SuperMapAlgoPlot.RouteNodePrimitives=SuperMapAlgoPlot.RouteNodePrimitives||{};SuperMapAlgoPlot.RouteNodePrimitives={initialize:function(){},rendezvousPoint:function(){var 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};var 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(){var 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};var 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(){var 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};var 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){var o=[],i=new SuperMapAlgoPlot.Point(0,0),l=new SuperMapAlgoPlot.Point(0,30);t||(t=90);var n=new Object;n.type=SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,n.positionPoints=[];for(var a=t+10;a<170+t;a+=10){var s=SuperMapAlgoPlot.PlottingUtil.findPoint(i,l,30,a);n.positionPoints.push(s)}n.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},o.push(n);var r=n.positionPoints[n.positionPoints.length-1],u=n.positionPoints[n.positionPoints.length-2],p=SuperMapAlgoPlot.PlottingUtil.findPoint(r,u,9,22.5),h=SuperMapAlgoPlot.PlottingUtil.findPoint(r,u,9,-22.5),c=new Object;c.type=SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,c.positionPoints=[],c.positionPoints.push(p),c.positionPoints.push(r.clone()),c.positionPoints.push(h),c.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},o.push(c);var g=new Object;g.type=SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,g.positionPoints=[];for(var y=190+t;y<350+t;y+=10){var f=SuperMapAlgoPlot.PlottingUtil.findPoint(i,l,30,y);g.positionPoints.push(f)}g.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},o.push(g);var P=g.positionPoints[g.positionPoints.length-1],d=g.positionPoints[g.positionPoints.length-2],S=SuperMapAlgoPlot.PlottingUtil.findPoint(P,d,9,22.5),m=SuperMapAlgoPlot.PlottingUtil.findPoint(P,d,9,-22.5),b=new Object;b.type=SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,b.positionPoints=[],b.positionPoints.push(S),b.positionPoints.push(P.clone()),b.positionPoints.push(m),b.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},o.push(b);for(var L=0;L=3){var e=SuperMapAlgoPlot.PlottingUtil.distance(t[0],t[1]);SuperMapAlgoPlot.PlottingUtil.isRight(t[0],t[1],t[2])&&(e=-e);for(var o=[],i=1;i=3){var 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){for(var 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)),n=360/this.nSegmentCount,a=0;a=3){var e=this.getArcInfo(t[0],t[1],t[2]);e.dStartAngle*=Math.PI/180,e.dEndAngle*=Math.PI/180;var 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){var e=this.getArcInfo(t[0],t[1],t[2]);e.dStartAngle*=Math.PI/180,e.dEndAngle*=Math.PI/180;var 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){var e=this.getArcInfo(t[0],t[1],t[2]);e.dStartAngle*=Math.PI/180,e.dEndAngle*=Math.PI/180;var 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){var n=SuperMapAlgoPlot.PlottingUtil.projectPoint(t[2],t[0],t[1]);l=SuperMapAlgoPlot.PlottingUtil.distance(n,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){var a=2*Math.PI,s=a/this.nSegmentCount,r=this.getArcSpatialData(t[0],i,l,e,0,a,s);if(!0===o){var u=Math.sin(e),p=Math.cos(e);t[2].x>t[1].x?(t[2].x=t[0].x-l*u,t[2].y=t[0].y+l*p):(t[2].x=t[0].x+l*u,t[2].y=t[0].y-l*p)}return r}},getArcSpatialData:function(t,e,o,i,l,n,a){var s=[];if(Math.abs(a)<1e-9)return s;for(;nl+2*Math.PI;)l+=2*Math.PI;var r=Math.cos(i)*e,u=Math.sin(i)*e,p=Math.cos(i)*o,h=Math.sin(i)*o,c=this.calcEllipseRadian(l,e,o),g=this.calcEllipseRadian(n,e,o);g-c<1e-5&&(g+=2*Math.PI);var y=Math.round(Math.abs((g-c)/a)+1);if(y<2)return s;for(var f=0;fs.length&&(s[s.length-1].x=t.x+r*Math.cos(g)-h*Math.sin(g),s[s.length-1].y=t.y+u*Math.cos(g)+p*Math.sin(g)),s},getArcInfo:function(t,e,o){var i={};i.pntCenter=new SuperMapAlgoPlot.Point(0,0),i.dRadius=0,i.dStartAngle=0,i.dEndAngle=0;var l=e.x-t.x,n=e.y-t.y;if(Math.abs(l)<1e-9){var a={},s={};a.x=(e.x+t.x)/2,a.y=(e.y+t.y)/2,s.x=(e.x+o.x)/2,s.y=(e.y+o.y)/2;var r=0;Math.abs(o.x-e.x)>=1e-9&&(r=(o.y-e.y)/(o.x-e.x)),i.pntCenter.y=a.y,Math.abs(r)<1e-9?i.pntCenter.x=s.x:i.pntCenter.x=s.x-r*(a.y-s.y)}else{var u={},p={};u.x=(e.x+t.x)/2,u.y=(e.y+t.y)/2,p.x=(e.x+o.x)/2,p.y=(e.y+o.y)/2;var h=n/l,c=1;Math.abs(h)<1e-9?(i.pntCenter.x=u.x,Math.abs(o.x-e.x<1e-9)?i.pntCenter.y=p.y:i.pntCenter.y=-(o.x-e.x)/(o.y-e.y)*(i.pntCenter.x-p.x)+p.y):Math.abs(o.x-e.x)<1e-9?(i.pntCenter.y=p.y,i.pntCenter.x=-h*(i.pntCenter.y-u.y)+u.x):(c=(o.y-e.y)/(o.x-e.x),i.pntCenter.x=(h*c*(u.y-p.y)+c*u.x-h*p.x)/(c-h),i.pntCenter.y=(p.x-u.x+c*p.y-h*u.y)/(c-h))}var g=Math.atan2(t.y-i.pntCenter.y,t.x-i.pntCenter.x),y=Math.atan2(o.y-i.pntCenter.y,o.x-i.pntCenter.x);if(SuperMapAlgoPlot.PlottingUtil.isCounterClockwise(t,e,o)){for(;g>=2*Math.PI;)g-=2*Math.PI;for(;g<0;)g+=2*Math.PI;for(;y>2*Math.PI;)y-=2*Math.PI;for(;y=2*Math.PI;)y-=2*Math.PI;for(;y<0;)y+=2*Math.PI;for(;g>2*Math.PI;)g-=2*Math.PI;for(;y>g;)g+=2*Math.PI;var f=g;g=y,y=f}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*y/Math.PI,i.dStartAngle=180*g/Math.PI,i},calcEllipseRadian:function(t,e,o){var i=t,l=e*Math.sin(t),n=o*Math.cos(t),a=Math.atan2(l,n);if(t>Math.PI)for(;i>Math.PI;)i-=2*Math.PI,a+=2*Math.PI;else if(t<-Math.PI)for(;i<-Math.PI;)i+=2*Math.PI,a-=2*Math.PI;return a},getKendyShapePts:function(t){var e=[];if(2>(t=SuperMapAlgoPlot.PlottingUtil.clearSamePts(t)).length)return e;var o=this.calcShapePoints(t);if(12!=o.length)return e;o.push(o[0]),o.push(o[1]),o.splice(0,1);for(var i=0;i=i&&l>=n){var u=a.clone();a=r.clone(),r=u.clone()}else if(n>=i&&n>=l){var p=r.clone();r=s.clone(),s=p.clone()}if(!SuperMapAlgoPlot.PlottingUtil.isRight(r,a,s)){var h=a.clone();a=s.clone(),s=h.clone()}e[0]=a,e[1]=s,e[2]=r}return e},GetPtsByTriangle:function(t,e,o,i,l){var n=new SuperMapAlgoPlot.Point(0,0),a=0,s=0;return a=SuperMapAlgoPlot.PlottingUtil.distance(l,o),s=SuperMapAlgoPlot.PlottingUtil.distance(i,l),1==e&&(a*=2),2==e&&(s*=2),n.x=(a*i.x+s*o.x)/(a+s),n.y=(a*i.y+s*o.y)/(a+s),{pl:this.GetWhichPtOfNormal(t,o,n,l),pr:this.GetWhichPtOfNormal(t,i,n,l)}},GetWhichPtOfNormal:function(t,e,o,i){var l=0;l=SuperMapAlgoPlot.PlottingUtil.distance(i,e)/t;var n=this.GetPointsOfNormal(l,o,i);return SuperMapAlgoPlot.PlottingUtil.distance(e,n.pt4)>=(l=SuperMapAlgoPlot.PlottingUtil.distance(e,n.pt3))?n.pt3:n.pt4},getBezierPtsWithScalePts:function(t,e,o,i){var l=[],n=t.x,a=t.y,s=e.x,r=e.y,u=o.x,p=o.y,h=i.x,c=i.y;if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(n,s,1e-10)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(a,r,1e-10)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(u,h,1e-10)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(p,c,1e-10))l.push(new SuperMapAlgoPlot.Point(n,a)),l.push(new SuperMapAlgoPlot.Point(u,p));else for(var g=0;g<=1;g+=.03125){var y,f,P,d,S=g*g,m=S*g;y=1-3*g+3*S-m,f=3*(g-2*S+m),P=3*(S-m),d=m;var b=new SuperMapAlgoPlot.Point(y*n+f*s+P*u+d*h,y*a+f*r+P*p+d*c);l.push(b)}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}}}},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};e.PlottingUtil=SuperMapAlgoPlot.PlottingUtil=SuperMapAlgoPlot.PlottingUtil||{};SuperMapAlgoPlot.PlottingUtil.DEFAULT_PRECISION=14,SuperMapAlgoPlot.PlottingUtil.DPI=96,SuperMapAlgoPlot.PlottingUtil.RTOD=57.29577951308232,SuperMapAlgoPlot.PlottingUtil.DTOR=.017453292519943295,SuperMapAlgoPlot.PlottingUtil.dirAngle=function(t,e){var o,i,l,n;o=e.x,i=e.y,l=o-t.x,n=i-t.y;var a=Math.atan2(n,l);return a<0&&(a+=2*Math.PI),a},SuperMapAlgoPlot.PlottingUtil.generateUuid=function(){for(var t=[],e=0;e<36;e++)t[e]="0123456789abcdef".substr(Math.floor(16*Math.random()),1);return t[14]="4",t[19]="0123456789abcdef".substr(3&t[19]|8,1),t[8]=t[13]=t[18]=t[23]="-",t.join("")},SuperMapAlgoPlot.PlottingUtil.cloneObject=function(t){return JSON.parse(JSON.stringify(t))},SuperMapAlgoPlot.PlottingUtil.colorRGBA=function(t,e){var o=t.substring(1,3),i=parseInt(o,16),l=t.substring(3,5),n=parseInt(l,16),a=t.substring(5);return"rgba("+i+","+n+","+parseInt(a,16)+","+e+")"},SuperMapAlgoPlot.PlottingUtil.colorRGBToString=function(t){var e=t.red.toString(16);e.length<2&&(e="0"+e);var o=t.green.toString(16);o.length<2&&(o="0"+o);var i=t.blue.toString(16);return i.length<2&&(i="0"+i),"#"+e+o+i},SuperMapAlgoPlot.PlottingUtil.colorStringToRGB=function(t){var e={},o=t.substring(1,3);e.red=parseInt(o,16);var i=t.substring(3,5);e.green=parseInt(i,16);var l=t.substring(5);return e.blue=parseInt(l,16),e},SuperMapAlgoPlot.PlottingUtil.decimalToHex=function(t){for(var e=t.toString(16);e.length<8;)e="0"+e;var o=e.substring(0,2),i=e.substring(2,4),l=e.substring(4,6);return{color:"#"+e.substring(6)+l+i,alpha:parseInt(o,16)/255}},SuperMapAlgoPlot.PlottingUtil.hexToDecimal=function(t,e){var o=t.substring(1,3),i=t.substring(3,5),l=t.substring(5),n=parseInt(l+i+o,16),a=Math.round(255*e).toString(16);return parseInt(a+"000000",16)+n},SuperMapAlgoPlot.PlottingUtil.getAlign=function(t){return"TOPLEFT"===t?"lt":"TOPCENTER"===t?"ct":"TOPRIGHT"===t?"rt":"BOTTOMLEFT"===t?"lb":"BOTTOMCENTER"===t?"cb":"BOTTOMRIGHT"===t?"rb":"MIDDLELEFT"===t?"lm":"MIDDLECENTER"===t?"cm":"MIDDLERIGHT"===t?"rm":"lt"},SuperMapAlgoPlot.PlottingUtil.trim=function(t){return null==t?"":t.replace(/(^\s*)|(\s*$)/g,"")},SuperMapAlgoPlot.PlottingUtil.getTextWidth=function(t,e){" "===e&&(e="_");var o=document.createElement("span");document.body.appendChild(o),o.style.width="auto",o.style.height="auto",t.fontSize&&(o.style.fontSize=new String(t.fontSize)+"px"),t.fontFamily&&(o.style.fontFamily=t.fontFamily),t.fontWeight&&(o.style.fontWeight=t.fontWeight),o.style.position="absolute",o.style.visibility="hidden",o.style.display="inline-block",o.innerHTML=e;var i=o.clientWidth,l=e.length;return void 0===t.fontSpace&&void 0===t.fontPercent||(0!==t.fontSpace&&100!==t.fontPercent&&void 0!==t.fontSpace||void 0!==t.fontPercent?i=t.fontPercent/100*i+t.fontSpace*(t.fontPercent/100)*(l-1):0===t.fontSpace&&100!==t.fontPercent&&void 0!==t.fontPercent?i=t.fontPercent/100*i:0!==t.fontSpace&&100===t.fontPercent&&void 0!==t.fontSpace&&(i+=t.fontSpace*(l-1))),document.body.removeChild(o),i},SuperMapAlgoPlot.PlottingUtil.getTextCount=function(t){for(var e=0,o=0,i=0;i255?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:for(var o=[],l=0,n=e.length;l0?"{"+u.join(",")+"}":"{}"}return e.toString()}},SuperMapAlgoPlot.PlottingUtil.copyFeature=function(t){var e=null;if(null!=t&&t.geometry){var 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){for(var o=[],i=[],l=0;l2*h?i.push(a):(i[i.length-1]=p,i.push(a))}else i.push(a)}else i.push(n),i.push(a);(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;for(var o=0,i={x:0,y:0},l={x:0,y:0},n=2;n=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;var n=e.x-t.x,a=e.y-t.y,s=i.x-o.x,r=i.y-o.y,u=n*r-s*a;if(SuperMapAlgoPlot.PlottingUtil.isNear(u))return l;var p=(n*(t.y-o.y)-a*(t.x-o.x))/u,h=new SuperMapAlgoPlot.Point(0,0);return h.x=p*s+o.x,h.y=p*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(var o=0;o=0;a--)e.push(t[i][a]);t.splice(i,1);var s=l(t,e);if(void 0!==s&&0!==s.length)return s}return e}if(SuperMapAlgoPlot.PlottingUtil.isArray(t)||(t=[t]),0===t.length)return[];if(1===t.length)return t[0];for(var n=0;n2&&L.push(v)}return L},SuperMapAlgoPlot.PlottingUtil.isRight=function(t,e,o){var i=e,l=o,n=e,a=t;return(l.x-i.x)*(a.y-n.y)-(a.x-n.x)*(l.y-i.y)<0},SuperMapAlgoPlot.PlottingUtil.radian=function(t,e){var 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){var l=SuperMapAlgoPlot.PlottingUtil.radian(e,t),n=(l+SuperMapAlgoPlot.PlottingUtil.radian(e,o))/2,a=Math.cos(n-l+Math.PI/2),s=i;SuperMapAlgoPlot.PlottingUtil.isNear(a,.15)||(s=i/a);var r=e.x+s*Math.cos(n),u=e.y+s*Math.sin(n);return new SuperMapAlgoPlot.Point(r,u)},SuperMapAlgoPlot.PlottingUtil.findPoint=function(t,e,o,i){if(t===e||Math.abs(o)<1e-18)return t;var l=SuperMapAlgoPlot.PlottingUtil.radian(t,e)+i*Math.PI/180,n=t.x+o*Math.cos(l),a=t.y+o*Math.sin(l);return new SuperMapAlgoPlot.Point(n,a)},SuperMapAlgoPlot.PlottingUtil.isSameQuadrant=function(t,e,o,i){var l=(e.x-t.x)*(i.x-o.x),n=(e.y-t.y)*(i.y-o.y);return!(Math.abs(l)<1e-18&&Math.abs(n)<1e-18)&&((l>0||Math.abs(l)<1e-18)&&(n>0||Math.abs(n)<1e-18))},SuperMapAlgoPlot.PlottingUtil.isCross=function(t,e,o,i){var 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;var n=0,a=0;if(n=t.x>e.x?t.x:e.x,a=t.x1e-16&&i.x-n>1e-16||o.x-a<-1e-16&&i.x-a<-1e-16)return!1;if(n=t.y>e.y?t.y:e.y,a=t.y1e-16&&i.y-n>1e-16||o.y-a<-1e-16&&i.y-a<-1e-16)return!1;var s=e.x-t.x,r=e.y-t.y,u=i.x-o.x,p=i.y-o.y,h=t.x-o.x,c=t.y-o.y,g=s*p-u*r,y=g;if(Math.abs(s)>1e-18&&Math.abs(u)>1e-18&&(y/=s*u),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));var f=(s*c-r*h)/g,P=(u*c-p*h)/g;return!(f<0&&(Math.abs(f*u)>1e-16||Math.abs(f*p)>1e-16))&&(!(f>1&&(Math.abs((f-1)*u)>1e-16||Math.abs((f-1)*p)>1e-16))&&(!(P<0&&(Math.abs(P*s)>1e-16||Math.abs(P*r)>1e-16))&&(!(P>1&&(Math.abs((P-1)*s)>1e-16||Math.abs((P-1)*r)>1e-16))&&(Math.abs(f)<1e-18?(l.x=o.x,l.y=o.y,!0):Math.abs(f-1)<1e-18?(l.x=i.x,l.y=i.y,!0):Math.abs(P)<1e-18?(l.x=t.x,l.y=t.y,!0):Math.abs(P-1)<1e-18?(l.x=e.x,l.y=e.y,!0):!(f<0&&(Math.abs(f*u)>1e-16||Math.abs(f*p)>1e-16))&&(!(f>1&&(Math.abs((f-1)*u)>1e-16||Math.abs((f-1)*p)>1e-16))&&(!(P<0&&(Math.abs(P*s)>1e-16||Math.abs(P*r)>1e-16))&&(!(P>1&&(Math.abs((P-1)*s)>1e-16||Math.abs((P-1)*r)>1e-16))&&(l.x=f*u+o.x,l.y=f*p+o.y,!0))))))))},SuperMapAlgoPlot.PlottingUtil.parallel=function(t,e){var o=[],i=t.length;if(!t||null==t||t.length<2)return o;var 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));for(var n=t[0],a=t[1],s=t[1],r=1;r1&&(a=1);var s=(o.x-e.x)*a+e.x,r=(o.y-e.y)*a+e.y,u=(s-t.x)*(s-t.x)+(r-t.y)*(r-t.y);return Math.sqrt(u)},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){for(var e=t.length,o=0;o=e)){var n=t[l].x,a=t[l].y,s=t[l+2].x,r=t[l+2].y,u=t[l+4].x,p=t[l+4].y,h=t[l+3].x,c=t[l+3].y;if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(n,s,1e-10)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(a,r,1e-10)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(u,h,1e-10)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(p,c,1e-10))o.push(new SuperMapAlgoPlot.Point(n,a)),o.push(new SuperMapAlgoPlot.Point(u,p));else for(var g=0;g<=1;g+=.03125){var y,f,P,d,S=g*g,m=S*g;y=1-3*g+3*S-m,f=3*(g-2*S+m),P=3*(S-m),d=m;var b=new SuperMapAlgoPlot.Point(y*n+f*s+P*u+d*h,y*a+f*r+P*p+d*c);o.push(b)}}return o},SuperMapAlgoPlot.PlottingUtil.computeBeizerPoints0=function(t,e,o){var i=SuperMapAlgoPlot.PlottingUtil.polylineDistance(e),l=[],n=[],a=[];if(t){n.push(e[0]);var s=o[0],r=o[1],u=e[0].x+i*s,p=e[0].y+i*r;n.push(new SuperMapAlgoPlot.Point(u,p)),l.push(new SuperMapAlgoPlot.Point(u,p));for(var h=1;h0?(p=e+(i-e)*f/y,h=o+(l-o)*f/y):(p=e,h=o),s.x=p+(r-p)*t,s.y=h+(u-h)*t,s},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;var i=t.x-e.x,l=t.y-e.y,n=t.x-o.x,a=t.y-o.y,s=(i*n+l*a)/(Math.sqrt(i*i+l*l)*Math.sqrt(n*n+a*a));return!!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(s,-1,.1)},SuperMapAlgoPlot.PlottingUtil.pointIsOnPolyLines=function(t,e){if(!e||0===e.length)return{isOnPolyLine:!1,index:-1};for(var o=!1,i=-1,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;var i=e.x-t.x,l=e.y-t.y,n=o/Math.sqrt(i*i+l*l),a=t.x+i*n,s=t.y+l*n;return new SuperMapAlgoPlot.Point(a,s)},SuperMapAlgoPlot.PlottingUtil.operateControlPoints=function(t){var e=t,o=e.length;if(3==o){var i=new SuperMapAlgoPlot.Point(0,0);SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(1,t[0],t[1],t[2],i),e.push(i)}if(o>4&&(e.splice(4,o-4),o=e.length),SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(t[0],t[1],e[2])){var l=e[0];e[0]=e[1],e[1]=l}if(!SuperMapAlgoPlot.PlottingUtil.pointIsRightToVerticle(e[0],e[1],e[2])){var n=e[2];e[2]=e[3],e[3]=n}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){var 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),n=new SuperMapAlgoPlot.Point(o.x-i.x,o.y-i.y);return l.x*n.x+l.y*n.y>0},SuperMapAlgoPlot.PlottingUtil.linePnt=function(t,e,o){var i=SuperMapAlgoPlot.PlottingUtil.distance(t,e);if(0==i)return t;var l=o/i;return SuperMapAlgoPlot.PlottingUtil.findPointOnLineByRatio(l,t,e)},SuperMapAlgoPlot.PlottingUtil.findPointOnLineByRatio=function(t,e,o){var 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){var i=e,l=Math.cos(i),n=Math.sin(i),a=o.x-t.x,s=o.y-t.y;return o.x=a*l-s*n+t.x,o.y=a*n+s*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]};for(var o=0,i=0;ie||SuperMapAlgoPlot.PlottingUtil.equalFuzzy(o,e)){var l=o-e,n=t[i+1],a=t[i],s=l/SuperMapAlgoPlot.PlottingUtil.distance(n,a),r=new SuperMapAlgoPlot.Point(0,0);return r.x=n.x+(a.x-n.x)*s,r.y=n.y+(a.y-n.y)*s,{index:i,pt:r}}return{index:-1,pt:null}},SuperMapAlgoPlot.PlottingUtil.polylineDistance=function(t){if(0===t.length)return 0;for(var e=0,o=0;o=t.x&&e.y>=t.y?1:e.xt.y?2:e.x<=t.x&&e.y<=t.y?3:4)==(r=o.x>t.x&&o.y>t.y?1:o.xt.y?2:o.xi&&n>i)&&(a=0);else switch(s){case 1:(4==r&&li)&&(a=0);break;case 2:(1==r&&li)&&(a=0);break;case 3:(2==r&&li)&&(a=0);break;case 4:(3==r&&li)&&(a=0)}var u=new SuperMapAlgoPlot.Point(0,0);return SuperMapAlgoPlot.PlottingUtil.equalFuzzy(i-1.7976931348623157e308,0)?(u.x=t.x,u.y=e.y):SuperMapAlgoPlot.PlottingUtil.equalFuzzy(i,0)?(u.x=e.x,u.y=t.y):(u.x=(i*(e.y-t.y)+i*i*t.x+e.x)/(i*i+1),u.y=t.y+i*(u.x-t.x)),{isOnline:1===a,projectPoint:u}},SuperMapAlgoPlot.PlottingUtil.coordinateTrans=function(t,e,o){var i=SuperMapAlgoPlot.PlottingUtil.distance(new SuperMapAlgoPlot.Point(0,0),e),l=SuperMapAlgoPlot.PlottingUtil.radian(new SuperMapAlgoPlot.Point(0,0),e)+o*Math.PI/180,n=i*Math.cos(l)+t.x,a=i*Math.sin(l)+t.y;return new SuperMapAlgoPlot.Point(n,a)},SuperMapAlgoPlot.PlottingUtil.triangleHeightAndPartBottomLen=function(t,e,o){var i=void 0,l=void 0,n=(o.x-e.x)*(o.x-e.x)+(o.y-e.y)*(o.y-e.y),a=Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y)),s=Math.sqrt((t.x-o.x)*(t.x-o.x)+(t.y-o.y)*(t.y-o.y));if(0==s||0==a)i=0,l=0;else if(0==n)i=a,l=0;else{var r=(a*a+s*s-n)/2/a/s,u=0;r>=1?(r=1,u=0):u=Math.sqrt(1-r*r),i=s*r,l=s*u}return{dLen1:i,dLen2:l}},SuperMapAlgoPlot.PlottingUtil.paraLine=function(t,e,o){var i=[];if(2>t.length)return i;if(o){var l=t[1].clone();l=SuperMapAlgoPlot.PlottingUtil.rotateAngle(t[0],Math.PI/2,l),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(t[0],l,e));for(var n=1;nMath.PI/2?r-Math.PI/2:Math.PI/2-r;var p=e/Math.cos(u);l=t[n+1].clone(),l=SuperMapAlgoPlot.PlottingUtil.rotateAngle(t[n],r,l),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(t[n],l,p))}l=t[t.length-2].clone(),l=SuperMapAlgoPlot.PlottingUtil.rotateAngle(t[t.length-1],-1*Math.PI/2,l),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(t[t.length-1],l,e))}else{var h=t[1].clone();h=SuperMapAlgoPlot.PlottingUtil.rotateAngle(t[0],-Math.PI/2,h),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(t[0],h,e));for(var c=1;cMath.PI/2?f-Math.PI/2:Math.PI/2-f;var d=e/Math.cos(P);h=t[c-1].clone(),h=SuperMapAlgoPlot.PlottingUtil.rotateAngle(t[c],f,h),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(t[c],h,d))}h=t[t.length-2].clone(),h=SuperMapAlgoPlot.PlottingUtil.rotateAngle(t[t.length-1],Math.PI/2,h),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(t[t.length-1],h,e))}return i},SuperMapAlgoPlot.PlottingUtil.circlePoint=function(t,e,o,i){i*=Math.PI/180;var l=t.x+e*Math.cos(i),n=t.y+o*Math.sin(i);return new SuperMapAlgoPlot.Point(l,n)},SuperMapAlgoPlot.PlottingUtil.getPolygonCenterPt=function(t){if(!t||0===t.length)return null;for(var e=0,o=0,i=0;ia.y?n.y:a.y;if(!(e.yr))(e.y-n.y)*(a.x-n.x)/(a.y-n.y)+n.x>e.x&&o++}}return o%2==1},SuperMapAlgoPlot.PlottingUtil.projectPtOnPolyLine=function(t,e){if(2>e.length)return{index:-1,pt:null};for(var 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){var 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;var i=SuperMapAlgoPlot.PlottingUtil.distance(t,e),l=SuperMapAlgoPlot.PlottingUtil.distance(t,o),n=SuperMapAlgoPlot.PlottingUtil.distance(e,o),a=(i*i+l*l-n*n)/(2*i*l);return a>1&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(a,1)?a=1:a<1&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(a,-1)&&(a=-1),Math.acos(a)},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){var i=[],l=SuperMapAlgoPlot.PlottingUtil.clonePoints(t),n=l.length;if(n<2)return i;var a=new SuperMapAlgoPlot.Point(0,0);if(o){if(n<3)a=l[1].clone(),SuperMapAlgoPlot.PlottingUtil.rotateAngle(l[0],Math.PI,a),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(l[0],a,e));else{for(var s=SuperMapAlgoPlot.PlottingUtil.radian(l[0],l[1]),r=SuperMapAlgoPlot.PlottingUtil.radian(l[0],l[l.length-1])-s;r<0;)r+=2*Math.PI;var u=r/2,p=void 0;p=u>Math.PI/2?u-Math.PI/2:Math.PI/2-u;var h=e/Math.cos(p);a=l[1].clone(),a=SuperMapAlgoPlot.PlottingUtil.rotateAngle(l[0],u,a),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(l[0],a,h))}for(var c=1;cMath.PI/2?f-Math.PI/2:Math.PI/2-f;var d=e/Math.cos(P);a=l[c+1].clone(),a=SuperMapAlgoPlot.PlottingUtil.rotateAngle(l[c],f,a),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(l[c],a,d))}if(n<3)a=l[n-2].clone(),SuperMapAlgoPlot.PlottingUtil.rotateAngle(l[n-1],0,a),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(l[n-1],a,e));else{for(var S=SuperMapAlgoPlot.PlottingUtil.radian(l[n-1],l[0]),m=SuperMapAlgoPlot.PlottingUtil.radian(l[n-1],l[n-2])-S;m<0;)m+=2*Math.PI;var b=m/2,L=void 0;L=b>Math.PI/2?b-Math.PI/2:Math.PI/2-b;var v=e/Math.cos(L);a=l[0].clone(),a=SuperMapAlgoPlot.PlottingUtil.rotateAngle(l[n-1],b,a),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(l[n-1],a,v))}}else{if(n<3){var M=l[1].clone();SuperMapAlgoPlot.PlottingUtil.rotateAngle(l[0],0,M),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(l[0],M,e))}else{for(var A=SuperMapAlgoPlot.PlottingUtil.radian(l[0],l[1]),T=SuperMapAlgoPlot.PlottingUtil.radian(l[0],l[n-1])-A;T<0;)T+=2*Math.PI;var _=Math.PI-T/2,O=void 0;O=_>Math.PI/2?_-Math.PI/2:Math.PI/2-_;var x=e/Math.cos(O);a=l[n-1].clone(),a=SuperMapAlgoPlot.PlottingUtil.rotateAngle(l[0],_,a),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(l[0],a,x))}for(var w=1;wMath.PI/2?C-Math.PI/2:Math.PI/2-C;var R=e/Math.cos(D);a=l[w-1].clone(),a=SuperMapAlgoPlot.PlottingUtil.rotateAngle(l[w],C,a),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(l[w],a,R))}if(n<3)a=l[n-2].clone(),SuperMapAlgoPlot.PlottingUtil.rotateAngle(l[n-1],Math.PI,a),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(l[n-1],a,e));else{for(var N=SuperMapAlgoPlot.PlottingUtil.radian(l[n-1],l[0]),U=SuperMapAlgoPlot.PlottingUtil.radian(l[n-1],l[n-2])-N;U<0;)U+=2*Math.PI;var B=Math.PI-U/2,k=void 0;k=B>Math.PI/2?B-Math.PI/2:Math.PI/2-B;var F=e/Math.cos(k);a=l[n-2].clone(),a=SuperMapAlgoPlot.PlottingUtil.rotateAngle(l[n-1],B,a),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(l[n-1],a,F))}}return i},SuperMapAlgoPlot.PlottingUtil.getOutRectangleDis=function(t){if(2>t.length)return 0;for(var e=t[0].x,o=t[0].x,i=t[0].y,l=t[0].y,n=1;nt[n].x&&(o=t[n].x),it[n].y&&(l=t[n].y);return SuperMapAlgoPlot.PlottingUtil.distance(new SuperMapAlgoPlot.Point(e,i),new SuperMapAlgoPlot.Point(o,l))},SuperMapAlgoPlot.PlottingUtil.clonePoints=function(t){var e=[];if(void 0===t||null===t)return e;if(SuperMapAlgoPlot.PlottingUtil.isArray(t)||(t=[t]),t&&null!=t)for(var o=0;o1e-12&&--f>0;){var P=Math.sin(g),d=Math.cos(g),S=Math.sqrt(c*P*(c*P)+(p*h-u*c*d)*(p*h-u*c*d));if(0==S)return 0;var m=u*h+p*c*d,b=Math.atan2(S,m),v=Math.asin(p*c*P/S),M=Math.cos(v)*Math.cos(v),A=m-2*u*h/M,T=r/16*M*(4+r*(4-3*M));y=g,g=o+(1-T)*r*Math.sin(v)*(b+T*S*(A+T*m*(2*A*A-1)))}if(0==f)return NaN;var _=M*(a*a-s*s)/(s*s),O=_/1024*(256+_*(_*(74-47*_)-128));return(s*(1+_/16384*(4096+_*(_*(320-175*_)-768)))*(b-O*S*(A+O/4*(m*(2*A*A-1)-O/6*A*(4*S*S-3)*(4*A*A-3))))).toFixed(3)/1e3},SuperMapAlgoPlot.PlottingUtil.destinationVincenty=function(t,e,o){var i,l,n=SuperMapAlgoPlot.PlottingUtil,a=n.VincentyConstants,s=a.a,r=a.b,u=a.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 p=o,h=n.rad(e),c=Math.sin(h),g=Math.cos(h),y=(1-u)*Math.tan(n.rad(l)),f=1/Math.sqrt(1+y*y),P=y*f,d=Math.atan2(y,g),S=f*c,m=1-S*S,b=m*(s*s-r*r)/(r*r),v=1+b/16384*(4096+b*(b*(320-175*b)-768)),M=b/1024*(256+b*(b*(74-47*b)-128)),A=p/(r*v),T=2*Math.PI;Math.abs(A-T)>1e-12;){var _=Math.cos(2*d+A),O=Math.sin(A),x=Math.cos(A);T=A,A=p/(r*v)+M*O*(_+M/4*(x*(2*_*_-1)-M/6*_*(4*O*O-3)*(4*_*_-3)))}var w=P*O-f*x*g,E=Math.atan2(P*x+f*O*g,(1-u)*Math.sqrt(S*S+w*w)),I=u/16*m*(4+u*(4-3*m)),C=Math.atan2(O*c,f*x-P*O*g)-(1-I)*u*S*(A+I*O*(_+I*x*(2*_*_-1)));return"undefined"!=typeof L&&void 0!==L.LatLng&&t instanceof L.LatLng?L.latLng(n.deg(E),i+n.deg(C)):new SuperMap.LonLat(i+n.deg(C),n.deg(E))}},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.AnalysisSymbol=SuperMapAlgoPlot.AnalysisSymbol=SuperMapAlgoPlot.AnalysisSymbol||{};SuperMapAlgoPlot.AnalysisSymbol.analysisBasicInfo=function(t){var 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){var e=SuperMapAlgoPlot.PlottingUtil.DPI,o=new Object;o.anchorPoint=new SuperMapAlgoPlot.Point(t.anchorPoint.x,t.anchorPoint.y);var 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){var o=new Object;if(o.subSymbols=[],o.scalePoints=[],o.scaleValues=[],e&&t.subSymbols)for(var i=0;if?e.scaleValues[f]=t.scaleValues[f]:e.scaleValues.push(t.scaleValues[f]);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{var P=void 0;P=!0===o?L.Util.latLngsToSuperMapPoints(t.getLatLngs()):t.controlPoints,e.localePoints=[];var d=P.length;t.symbolType===SuperMapAlgoPlot.SymbolType.ELLIPSESYMBOL&&(d=3);for(var S=0;Sw?e.scaleValues[w]=t.scaleValues[w]:e.scaleValues.push(t.scaleValues[w]);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(var i=0;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}},{key:"createGradientDirection",value:function(){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}}}}]),t}();SuperMap.Plot.CalculateSVGGradient=l},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var o=0;oMath.abs(e.y-e.y)?Math.abs(t.x-e.x):Math.abs(t.y-e.y)}}}},{key:"createGradient",value:function(){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,n=this.feature.style.fillCenterOffsetY*e.r,a=e.r/Math.sqrt(2)+Math.abs(l)>e.r/Math.sqrt(2)+Math.abs(n)?e.r/Math.sqrt(2)+Math.abs(l):e.r/Math.sqrt(2)+Math.abs(n);(t=this.getContext().createRadialGradient(e.center.x+l,e.center.y-n,0,e.center.x+l,e.center.y-n,a)).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}}},{key:"createTextureFill",value:function(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,n=SuperMap.Plot.PlottingUtil.colorStringToRGB(t[0].color);o.strokeStyle="rgba("+n.red+","+n.green+","+n.blue+","+t[0].opacity+")",o.lineWidth=1;var a=SuperMap.Plot.PlottingUtil.colorStringToRGB(t[1].color);switch(o.fillStyle="rgba("+a.red+","+a.green+","+a.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 s=o.createPattern(e,"repeat");return document.body.removeChild(e),s}}},{key:"createFillMode",value:function(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}},{key:"getGradientDirection",value:function(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)),n=Math.pow(2,-52);return(i.x<=0||Math.abs(i.x)<=n)&&(i.x=0),(i.y<=0||Math.abs(i.y)<=n)&&(i.y=0),(l.x<=0||Math.abs(l.x)<=n)&&(l.x=0),(l.y<=0||Math.abs(l.y)<=n)&&(l.y=0),{x1:i.x,y1:i.y,x2:l.x,y2:l.y}}}]),t}();SuperMap.Plot.CalculateCanvasGradient=l},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CalculateSVGGradient=e.CalculateCanvasGradient=void 0;var i=o(149),l=o(148);e.CalculateCanvasGradient=i.CalculateCanvasGradient,e.CalculateSVGGradient=l.CalculateSVGGradient},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=e.TransactionInfo=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=e||{},this.layer=e.layer?e.layer:null,this.feature=e.feature?e.feature:null,this.uuid=e.uuid?e.uuid:null,this.functionName=e.functionName?e.functionName:null,this.undoParams=e.undoParams?e.undoParams:null,this.redoParams=e.redoParams?e.redoParams:null,this.propertyName=e.propertyName?e.propertyName:null,this.undoValue=e.undoValue?e.undoValue:null,this.redoValue=e.redoValue?e.redoValue:null,this.CLASS_NAME="SuperMap.Plot.TransactionInfo"};SuperMap.Plot.TransactionInfo=i},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var o=0;o0&&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;l