/*! * * iclient-plot-leaflet.(https://iclient.supermap.io) * Copyright© 2000 - 2023 SuperMap Software Co.Ltd * version: v11.1.0 * */!function(){var t={61:function(){L.Path.include({onBefore:function(t){this._renderer._beforePath(this,t),this._reset(),this._renderer._addPath(this)}})},293:function(){L.SVG.include({_drawPlottingLayers:function(t){t.map(function(e){return e instanceof L.Polyline&&e._update(),e instanceof L.Polygon&&e._update(),t})},getEvents:function(){var t=this;this._map.on("layeradd",function(e){e.layer===t&&(L.DomEvent.on(t._container,"mousemove",L.Util.throttle(t._onMouseMove,32,t),t),L.DomEvent.on(t._container,"mouseout",t._handleMouseOut,t))});var e=L.Renderer.prototype.getEvents.call(this);return e.zoomstart=this._onZoomStart,e},_onClick:function(t){var e,o=this._map.mouseEventToLayerPoint(t),i=[],n=[];for(var l in this._layers){var a=this._layers[l];if(a.options.interactive&&"function"==typeof a._containsPoint&&a._containsPoint(o)&&!this._map._draggableMoved(a)&&(e=a,Object.prototype.hasOwnProperty.call(e,"_eventParents")&&null!=e._eventParents))for(var s in e._eventParents)n.push(e),i.push(e._eventParents[s])}if(e&&n.length>1){if(i.length>0){for(var r=!1,u=[],p=[],h=0,c=i.length;h1){this._fireEvent([p[y]],t);break}if(!r){this._fireEvent([p[p.length-1]],t);break}}}}else e&&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 n in this._layers)(o=this._layers[n]).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 n;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&&(n=o.options.fontSpace+o.options.fontPercent/100*parseFloat(o.options.fontSize)*o.options.text.length),100!==o.options.fontPercent&&0===o.options.fontSpace){var l=document.createElement("span");document.body.appendChild(l),l.style.width="auto",l.style.height="auto",o.options.fontSize&&(l.style.fontSize=new String(o.options.fontSize)+"px"),o.options.fontFamily&&(l.style.fontFamily=o.options.fontFamily),o.options.fontWeight&&(l.style.fontWeight=o.options.fontWeight),l.style.position="absolute",l.style.visibility="hidden",l.innerHTML=o.options.text;var a=l.clientWidth;n=o.options.fontPercent/100*a+o.options.text.length}t.setAttributeNS(null,"textLength",n),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 M=""===f[d]?" ":f[d];o.options.isUnicode?L.Browser.ie||L.Browser.ielt9?(this.element.innerHTML=M,m.textContent=this.element.innerHTML):m.innerHTML=M:m.textContent=M,m.parentNode||t.appendChild(m),P+=f[d],g=SuperMap.Plot.PlottingUtil.getTextWidth(o.options,P)+parseFloat(o.options.fontSpace)*(o.options.fontPercent/100)}}else{var v=i+"tspan"+h;o._tspanNodeObj&&o._tspanNodeObj[v]||(o._tspanNodeObj[v]=L.SVG.create("tspan"));var A=o._tspanNodeObj[v];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 n=isNaN(t.options.labelXOffset)?0:t.options.labelXOffset,l=isNaN(t.options.labelYOffset)?0:t.options.labelYOffset;i.x+=n,i.y-=l}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 y=t.options.fontColor;t.options.fontColor=t.options.fontShadowColor,this._updateTextPt(t._shadowTextNode,a,t,"shadow"),t.options.fontColor=y,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 g=t._shadowTextNode;if(g&&g.parentNode||(g=t._textNode),!g||!g.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 n=void 0!=t.options.graphicXOffset?t.options.graphicXOffset:-.5*o,l=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+n).toFixed()),t._imageNode.setAttributeNS(null,"y",(t._point.y+l).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 n=t._empty()?"M0 0":"M"+(e.x-o)+","+e.y+i+2*o+",0 "+i+2*-o+",0 ";this._setPath(t,n)}}}),L.SVG.LABEL_ALIGN={l:"start",r:"end",b:"bottom",t:"hanging"},L.SVG.LABEL_VSHIFT={t:"-83%",b:"0"},L.SVG.LABEL_VFACTOR={t:0,b:-1},L.SVG.LABEL_IE_VOFFSET={t:.86,b:0},L.SVG.preventDefault=function(t){t.preventDefault&&t.preventDefault()}},203:function(){L.supermap.TiledMapLayer.include({setVisibility:function(t){return t?this.setOpacity(100):this.setOpacity(0),0},getVisibility:function(){return 0!=this.options.opacity}})}},e={};function o(i){var n=e[i];if(void 0!==n)return n.exports;var l=e[i]={exports:{}};return t[i](l,l.exports,o),l.exports}!function(){"use strict";var t=window.SuperMap=window.SuperMap||{};t.Plot=t.Plot||{},window.SuperMapAlgoPlot=t.Plot||{},SuperMap.Plot.ArrowTailType={ARROWTAIL_NONE:0,ARROWTAIL_LINE:1,ARROWTAIL_CURVE:2,ARROWTAIL_COATTAIL:3,ARROWTAIL_COATTAIL_POLYBODY:4},SuperMap.Plot.ArrowHeadType={ARROWHEAD_POLYLINE:0,ARROWHEAD_TRIANGLE:1,ARROWHEAD_COATTAIL:2,ARROWHEAD_TRIANGLE_SOLID:3,ARROWHEAD_WITH_EAR:4,ARROWHEAD_WITHOUT_EAR:5,ARROWHEAD_COATTAIL_HOLLOW:6},SuperMap.Plot.ArrowBodyType={ARROWBODY_POLYLINE:0,ARROWBODY_POLYBEZIER:1,ARROWBODY_PARALLEL:2,ARROWBODY_TRAPEZOID:3,ARROWBODY_MULTIPOLYBEZIER:4,ARROWBODY_COATTAIL:5},SuperMap.Plot.SymbolType={DOTSYMBOL:1,ALGOSYMBOL:2,TEXTSYMBOL:34,ELLIPSESYMBOL:31,CIRCLESYMBOL:29,RECTANGLESYMBOL:26,ARBITRARYPOLYGONSYMBOL:32,POLYLINESYMBOL:24,PARALLELOGRAM:28,ARCSYMBOL:44,NEWARCSYMBOL:4401,REGULARPOLYGON:410,CHORDSYMBOL:370,NEWCHORDSYMBOL:3701,PIESYMBOL:380,NEWPIESYMBOL:3801,KIDNEY:390,POLYBEZIERSYMBOL:590,PARALLELLINE:48,BRACESYMBOL:400,ANNOFRAMESYMBOL:320,ANNOFRAMESYMBOLM:321,TRAPEZOIDSYMBOL:350,POLYBEZIERCLOSESYMBOL:360,GROUPOBJECT:1e3,LINERELATION:1001,INTERFERENCEBEAM:1002,POLYGONREGION:1003,ARCREGION:1004,AIRROUTE:1005,NAVYROUTE:1006,MISSILEROUTE:1007,NAVYDEPLOYMENT:1008,AIRDEPLOYMENT:1009,SATELLITE:1010,SATELLITETIMEWINDOWS:1011,SYMBOLTEXT:1012,RUNWAY:1013,CURVEEIGHT:1014,ROUTENODE:1015,ARROWLINE:1016,PATHTEXT:1017,LITERATESIGN:1018,CONCENTRICCIRCLE:1019,FLAGGROUP:1020,SYMBOLTEXT1:1021,COMBINATIONALCIRCLE:1022,FREECURVE:1023,SYMBOLTEXTBOX:1024,NODECHAIN:1025,LINEMARKING:1026,AVOIDREGION:1027,WIRE:1028,LINEARARROW:1029,PICTURE:3e3},SuperMap.Plot.LineRelationType={SOLID:0,DASH:1,ARROW:2},SuperMap.Plot.AlgoSurroundLineType={NONE:0,INNER:1,OUT:2,ALL:3},SuperMap.Plot.RouteNodeType={RENDEZVOUS:"RENDEZVOUS",EXPANDING:"EXPANDING",VOLLEY:"VOLLEY",STANDBY:"STANDBY",SUPPLY:"SUPPLY",TAKEOFF:"TAKEOFF",INITIAL:"INITIAL",VISUALINITAL:"VISUALINITAL",LANCH:"LANCH",TURNING:"TURNING",AIMING:"AIMING",COMMONROUTE:"COMMONROUTE",WEAPONLAUNCH:"WEAPONLAUNCH",TARGET:"TARGET",ATTACK:"ATTACK",SUPPRESS:"SUPPRESS",EIGHTSPIRAL:"EIGHTSPIRAL",HAPPYVALLEY:"HAPPYVALLEY"},SuperMap.Plot.RelLineText={ONLINE:0,ONLEFTLINE:1,ONRIGHTLINE:2,ONBOTHLINE:3},SuperMap.Plot.RadiusLineType={NONE:0,SOLID:1,ARROW:2},SuperMap.Plot.Position={TOP:4,BOTTOM:5,LEFT:6,RIGHT:7},SuperMap.Plot.AnnoPosition={LEFTTOP:0,LEFTBOTTOM:1,RIGHTTOP:2,RIGHTBOTTOM:3,TOP:4,BOTTOM:5,LEFT:6,RIGHT:7,MIDDLE:8,ANCHOR:9},SuperMap.Plot.ArrowLineType={DOUBLELINE:0,TRIANGLESOLID:1,NONE:2},SuperMap.Plot.TextBoxType={WITHTIPBOX:0,RECTBOX:1,LINEBOX:2,NONEBOX:3},SuperMap.Plot.PositionOffsetType={LINE:0,GRADIENTLINE:1},SuperMap.Plot.AlignType={LEFT:0,RIGHT:1,UP:2,DOWN:3,VERTICALCENTER:4,HORIZONTALCENTER:5},SuperMap.Plot.EditMode={ADDCONTROLPOINT:0,EDITCONTROLPOINT:1,EDITCIRCUMRECTANGLE:2,REMOVECONTROLPOINT:3};SuperMap.Plot.EqualLargeType={WIDTH:0,HEIGHT:1,SAME:2},SuperMap.Plot.UniformDistributionType={LEVEL:0,VERTICAL:1};SuperMap.Plot.TransactionType={CREATE:0,EDIT:1,REMOVE:2},SuperMap.Plot.Event=SuperMap.Plot.Event||{};SuperMap.Plot.Event.beforefeatureadded="beforefeatureadded",SuperMap.Plot.Event.featureadded="featureadded",SuperMap.Plot.Event.beforefeaturesselected="beforefeaturesselected",SuperMap.Plot.Event.featuresselected="featuresselected",SuperMap.Plot.Event.updateFeature="updateFeature",SuperMap.Plot.Event.beforefeaturesunselected="beforefeaturesunselected",SuperMap.Plot.Event.featuresunselected="featuresunselected",SuperMap.Plot.Event.beforefeaturesmodified="beforefeaturesmodified",SuperMap.Plot.Event.featuresmodified="featuresmodified",SuperMap.Plot.Event.beforefeaturesremoved="beforefeaturesremoved",SuperMap.Plot.Event.featuresremoved="featuresremoved",SuperMap.Plot.Event.beforefeaturesadded="beforefeaturesadded",SuperMap.Plot.Event.featuresadded="featuresadded",SuperMap.Plot.Event.movingtargetsselected="featuresselected",SuperMap.Plot.Event.movingtargetsunselected="featuresunselected",SuperMap.Plot.Event.movingtargetcontextmenu="featurecontextmenu",SuperMap.Plot.Event.initializecompleted="initializecompleted",SuperMap.Plot.Event.cachecompleted="cachecompleted",SuperMap.Plot.Event.plottinglayeradded="plottinglayeradded",SuperMap.Plot.Event.plottinglayerremoved="plottinglayerremoved",SuperMap.Plot.Event.plottinglayeractive="plottinglayeractive",SuperMap.Plot.Event.childplotlayeradded="childplotlayeradded",SuperMap.Plot.Event.childplotlayerremoved="childplotlayerremoved",SuperMap.Plot.Event.childplotlayeractive="childplotlayeractive",SuperMap.Plot.Event.reseteditmarkersvalues="reseteditmarkersvalues",SuperMap.Plot.Event.reseteditmarkers="reseteditmarkers",SuperMap.Plot.Event.animationcreated="animationcreated",SuperMap.Plot.Event.animationdeleted="animationdeleted",SuperMap.Plot.Event.animationmodify="animationmodify",SuperMap.Plot.Event.animationbegin="animationbegin",SuperMap.Plot.Event.animationend="animationend",SuperMap.Plot.Event.animatitonpropertyconfig="animatitonpropertyconfig",SuperMap.Plot.Event.wayfeaturedrawfinished="wayfeaturedrawfinished",SuperMap.Plot.Event.wayfeaturemodifyfinished="wayfeaturemodifyfinished";SuperMap.Plot.GOAnimationType={ANIMATION_UNKNOWN:-1,ANIMATION_WAY:0,ANIMATION_BLINK:1,ANIMATION_ATTRIBUTE:2,ANIMATION_SHOW:3,ANIMATION_ROTATE:4,ANIMATION_SCALE:5,ANIMATION_GROW:6,ANIMATION_HIDE_EXP:12,ANIMATION_REDUCE_EXP:13,ANIMATION_MOVEIN_EXP:14,ANIMATION_MOVEOUT_EXP:15,ANIMATION_ZOOMIN_EXP:16,ANIMATION_ZOOMOUT_EXP:17,ANIMATION_CURVE_EXP:18,ANIMATION_BROKENLINE_EXP:19,ANIMATION_GROW_EXP:20,ANIMATION_WAY_EXP:21,ANIMATION_BLINK_EXP:22,ANIMATION_SHOW_EXP:23,ANIMATION_MOVEVIEW_EXP:24},SuperMap.Plot.BlinkAnimationBlinkStyle={Blink_Frequency:0,Blink_Number:1},SuperMap.Plot.BlinkAnimationReplaceStyle={Replace_NoColor:0,Replace_Color:1},SuperMap.Plot.RotateDirection={ClockWise:0,AntiClockWise:1},SuperMap.Plot.WayPathType={POLYLINE:0,CURVE:1};var e=SuperMap.Plot.GOAnimationState={UNKNOWN:0,PLAYING:1,PAUSE:2,STOP:3,RESET:4},i=SuperMap.Plot.AnimationPlayType={PLAYFROMNOW:0,PLAYSAMELASTONE:1,PLAYAFTERLASTONE:2,UNKNOWN:3};function n(t){"@babel/helpers - typeof";return(n="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})(t)}function l(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 n=i;ni&&(s=n),n=s;nMath.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 n=this.feature.style.fillCenterOffsetX*e.r,l=this.feature.style.fillCenterOffsetY*e.r,a=e.r/Math.sqrt(2)+Math.abs(n)>e.r/Math.sqrt(2)+Math.abs(l)?e.r/Math.sqrt(2)+Math.abs(n):e.r/Math.sqrt(2)+Math.abs(l);(t=this.getContext().createRadialGradient(e.center.x+n,e.center.y-l,0,e.center.x+n,e.center.y-l,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,n=e.height,l=SuperMap.Plot.PlottingUtil.colorStringToRGB(t[0].color);o.strokeStyle="rgba(".concat(l.red,",").concat(l.green,",").concat(l.blue,",").concat(t[0].opacity,")"),o.lineWidth=1;var a=SuperMap.Plot.PlottingUtil.colorStringToRGB(t[1].color);switch(o.fillStyle="rgba(".concat(a.red,",").concat(a.green,",").concat(a.blue,",").concat(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,n),o.lineTo(i,0);break;case 3:o.moveTo(0,0),o.lineTo(i,0),o.moveTo(0,0),o.lineTo(0,n);break;case 4:o.moveTo(0,n),o.lineTo(i,0),o.moveTo(0,0),o.lineTo(i,n);break;case 5:o.moveTo(0,0),o.lineTo(i,n);break;case 6:o.moveTo(0,0),o.lineTo(i,0);break;case 7:o.moveTo(0,0),o.lineTo(0,n)}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)),n=e(o(360-t%360)),l=Math.pow(2,-52);return(i.x<=0||Math.abs(i.x)<=l)&&(i.x=0),(i.y<=0||Math.abs(i.y)<=l)&&(i.y=0),(n.x<=0||Math.abs(n.x)<=l)&&(n.x=0),(n.y<=0||Math.abs(n.y)<=l)&&(n.y=0),{x1:i.x,y1:i.y,x2:n.x,y2:n.y}}}])&&Wt(e.prototype,o),i&&Wt(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Ht(t,e){for(var o=0;o0&&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}}}}])&&Ht(e.prototype,o),i&&Ht(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Jt(t,e){for(var o=0;of?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;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(null!=e.isEdit&&(t.isEdit=e.isEdit),Object.prototype.hasOwnProperty.call(e,"version")&&(t.version=e.version),Object.prototype.hasOwnProperty.call(e,"libID")&&(t.libID=parseInt(e.libID)),Object.prototype.hasOwnProperty.call(e,"code")&&(t.code=parseInt(e.code)),Object.prototype.hasOwnProperty.call(e,"algoMaxEditPts")&&(t.maxEditPts=parseInt(e.algoMaxEditPts)),Object.prototype.hasOwnProperty.call(e,"algoMinEditPts")&&(t.minEditPts=parseInt(e.algoMinEditPts)),Object.prototype.hasOwnProperty.call(e,"symbolType")&&(t.symbolType=parseInt(e.symbolType)),Object.prototype.hasOwnProperty.call(e,"symbolName")&&(t.symbolName=e.symbolName),Object.prototype.hasOwnProperty.call(e,"textContent")&&(t.textContent=e.textContent),Object.prototype.hasOwnProperty.call(e,"bubbleHeight")&&(t.bubbleHeight=e.bubbleHeight),Object.prototype.hasOwnProperty.call(e,"bubbleWidth")&&(t.bubbleWidth=e.bubbleWidth),Object.prototype.hasOwnProperty.call(e,"description")&&(t.description=e.description),Object.prototype.hasOwnProperty.call(e,"mediaList")&&(t.mediaList=e.mediaList),null!=e.dScale?t.dScale=e.dScale:void 0!==e.scale2D&&(t.dScale=e.scale2D.x),null!=e.dRotate?t.dRotate=e.dRotate:void 0!==e.rotate2D&&(t.dRotate=e.rotate2D.x),null!=e.resolution&&(t.resolution=e.resolution),null!=e.uuid&&(t.uuid=e.uuid),null!=e.associatedUuid&&(t.associatedUuid=e.associatedUuid),null!=e.textDisplay&&(t.textDisplay=e.textDisplay),null!=e.annotationPosition&&(o?t.annotationPosition=e.annotationPosition:t.textPosition=e.annotationPosition),null!=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;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=[],i=0,n=e.length;i0?"{"+r.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.inverse=function(t){for(var e=[],o=t.length-1;o>=0;o--)e.push(t[o]);return e},SuperMapAlgoPlot.PlottingUtil.getSurroundLinePts=function(t,e){for(var o=[],i=[],n=0;n2*h?i.push(a):(i[i.length-1]=p,i.push(a))}else i.push(a)}else i.push(l),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},n={x:0,y:0},l=2;l=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 n={isIntersectLines:!1};if(t.x===e.x&&t.y===e.y||o.x===i.x&&o.y===i.y)return n;var l=e.x-t.x,a=e.y-t.y,s=i.x-o.x,r=i.y-o.y,u=l*r-s*a;if(SuperMapAlgoPlot.PlottingUtil.isNear(u))return n;var p=(l*(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,n.isIntersectLines=!0,n.intersectPoint=h,n},SuperMap.Plot.PlottingUtil.limitSigDigs=function(t,e){var o=0;if(e>0){var i=new Number(t);o=parseFloat(i.toPrecision(e))}return o},SuperMap.Plot.PlottingUtil.containsPoint=function(t,e){for(var o=SuperMap.Plot.PlottingUtil.getPolygonCenterPt(t.components),i=SuperMap.Plot.PlottingUtil.distance(o,e),n=0,l=SuperMap.Plot.PlottingUtil.radian(e,t.components[0]),a=1;as&&(l=s,n=a)}return i=0;a--)e.push(t[i][a]);t.splice(i,1);var s=n(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 l=0;l2&&L.push(M)}return L},SuperMapAlgoPlot.PlottingUtil.isRight=function(t,e,o){var i=e,n=o,l=e,a=t;return(n.x-i.x)*(a.y-l.y)-(a.x-l.x)*(n.y-i.y)<0},SuperMapAlgoPlot.PlottingUtil.radian=function(t,e){var o,i,n=0;return o=e.x-t.x,i=e.y-t.y,(n=Math.atan2(i,o))<0&&(n+=2*Math.PI),n},SuperMapAlgoPlot.PlottingUtil.findBisectorPoint=function(t,e,o,i){var n=SuperMapAlgoPlot.PlottingUtil.radian(e,t),l=(n+SuperMapAlgoPlot.PlottingUtil.radian(e,o))/2,a=Math.cos(l-n+Math.PI/2),s=i;SuperMapAlgoPlot.PlottingUtil.isNear(a,.15)||(s=i/a);var r=e.x+s*Math.cos(l),u=e.y+s*Math.sin(l);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 n=SuperMapAlgoPlot.PlottingUtil.radian(t,e)+i*Math.PI/180,l=t.x+o*Math.cos(n),a=t.y+o*Math.sin(n);return new SuperMapAlgoPlot.Point(l,a)},SuperMapAlgoPlot.PlottingUtil.isSameQuadrant=function(t,e,o,i){var n=(e.x-t.x)*(i.x-o.x),l=(e.y-t.y)*(i.y-o.y);return!(Math.abs(n)<1e-18&&Math.abs(l)<1e-18)&&((n>0||Math.abs(n)<1e-18)&&(l>0||Math.abs(l)<1e-18))},SuperMapAlgoPlot.PlottingUtil.isCross=function(t,e,o,i){var n=new SuperMapAlgoPlot.Point(0,0);return!(!SuperMapAlgoPlot.PlottingUtil.intersectLineSegs(t,e,o,i,n)||n==t||n===e||n===o||n==i)},SuperMapAlgoPlot.PlottingUtil.intersectLineSegs=function(t,e,o,i,n){if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t.x,e.x)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(t.y,e.y))return n.x=t.x,n.y=t.y,!1;if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(o.x,i.x)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(o.y,i.y))return n.x=o.x,n.y=o.y,!1;var l=0,a=0;if(l=t.x>e.x?t.x:e.x,a=t.x1e-16&&i.x-l>1e-16||o.x-a<-1e-16&&i.x-a<-1e-16)return!1;if(l=t.y>e.y?t.y:e.y,a=t.y1e-16&&i.y-l>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,y=s*p-u*r,g=y;if(Math.abs(s)>1e-18&&Math.abs(u)>1e-18&&(g/=s*u),Math.abs(g)<1e-18)return t===o?(n.x=t.x,n.y=t.y,!SuperMapAlgoPlot.PlottingUtil.isSameQuadrant(t,e,o,i)):e===i?(n.x=e.x,n.y=e.y,!SuperMapAlgoPlot.PlottingUtil.isSameQuadrant(t,e,o,i)):t===i?(n.x=t.x,n.y=t.y,SuperMapAlgoPlot.PlottingUtil.isSameQuadrant(t,e,o,i)):e===o&&(n.x=e.x,n.y=e.y,SuperMapAlgoPlot.PlottingUtil.isSameQuadrant(t,e,o,i));var f=(s*c-r*h)/y,P=(u*c-p*h)/y;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?(n.x=o.x,n.y=o.y,!0):Math.abs(f-1)<1e-18?(n.x=i.x,n.y=i.y,!0):Math.abs(P)<1e-18?(n.x=t.x,n.y=t.y,!0):Math.abs(P-1)<1e-18?(n.x=e.x,n.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))&&(n.x=f*u+o.x,n.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 n=!1;t.length>3&&t[0].x===t[t.length-1].x&&t[0].y===t[t.length-1].y&&(n=!0),n?(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 l=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;o1e-10},SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt=function(t,e){var o=t.slice();!0===e&&o.push(o[0]);for(var i=[],n=[],l=0;l-360&&o[l+1].x-o[0].x<-180&&i.push(l+1),o[l+1].x-o[0].x<360&&o[l+1].x-o[0].x>180&&n.push(l+1);if(n.length>i.length)for(var a=0;a180?u[p].x=u[p].x-360:u[p].x<-180&&(u[p].x=u[p].x+360);return u},SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsWithCtrlPt=function(t){var e=t.length,o=[];if(t.length<3)for(var i=0;i=e)){var l=t[n].x,a=t[n].y,s=t[n+2].x,r=t[n+2].y,u=t[n+4].x,p=t[n+4].y,h=t[n+3].x,c=t[n+3].y;if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(l,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(l,a)),o.push(new SuperMapAlgoPlot.Point(u,p));else for(var y=0;y<=1;y+=.03125){var g,f,P,d,S=y*y,m=S*y;g=1-3*y+3*S-m,f=3*(y-2*S+m),P=3*(S-m),d=m;var b=new SuperMapAlgoPlot.Point(g*l+f*s+P*u+d*h,g*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),n=[],l=[],a=[];if(t){l.push(e[0]);var s=o[0],r=o[1],u=e[0].x+i*s,p=e[0].y+i*r;l.push(new SuperMapAlgoPlot.Point(u,p)),n.push(new SuperMapAlgoPlot.Point(u,p));for(var h=1;h0?(p=e+(i-e)*f/g,h=o+(n-o)*f/g):(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,n=t.y-e.y,l=t.x-o.x,a=t.y-o.y,s=(i*l+n*a)/(Math.sqrt(i*i+n*n)*Math.sqrt(l*l+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,n=0;nr&&(o=r,i=n)}}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,n=e.y-t.y,l=o/Math.sqrt(i*i+n*n),a=t.x+i*l,s=t.y+n*l;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 n=e[0];e[0]=e[1],e[1]=n}if(!SuperMapAlgoPlot.PlottingUtil.pointIsRightToVerticle(e[0],e[1],e[2])){var l=e[2];e[2]=e[3],e[3]=l}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)),n=new SuperMapAlgoPlot.Point(e.x-t.x,e.y-t.y),l=new SuperMapAlgoPlot.Point(o.x-i.x,o.y-i.y);return n.x*l.x+n.y*l.y>0},SuperMapAlgoPlot.PlottingUtil.linePnt=function(t,e,o){var i=SuperMapAlgoPlot.PlottingUtil.distance(t,e);if(0==i)return t;var n=o/i;return SuperMapAlgoPlot.PlottingUtil.findPointOnLineByRatio(n,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,n=Math.cos(i),l=Math.sin(i),a=o.x-t.x,s=o.y-t.y;return o.x=a*n-s*l+t.x,o.y=a*l+s*n+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 n=o-e,l=t[i+1],a=t[i],s=n/SuperMapAlgoPlot.PlottingUtil.distance(l,a),r=new SuperMapAlgoPlot.Point(0,0);return r.x=l.x+(a.x-l.x)*s,r.y=l.y+(a.y-l.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)==(n=o.x>t.x&&o.y>t.y?1:o.xt.y?2:o.xl&&s>l)&&(r=0);else switch(i){case 1:(4==n&&al)&&(r=0);break;case 2:(1==n&&al)&&(r=0);break;case 3:(2==n&&al)&&(r=0);break;case 4:(3==n&&al)&&(r=0)}var u=new SuperMapAlgoPlot.Point(0,0);return SuperMapAlgoPlot.PlottingUtil.equalFuzzy(l-1.7976931348623157e308,0)?(u.x=t.x,u.y=e.y):SuperMapAlgoPlot.PlottingUtil.equalFuzzy(l,0)?(u.x=e.x,u.y=t.y):(u.x=(l*(e.y-t.y)+l*l*t.x+e.x)/(l*l+1),u.y=t.y+l*(u.x-t.x)),{isOnline:1===r,projectPoint:u}},SuperMapAlgoPlot.PlottingUtil.coordinateTrans=function(t,e,o){var i=SuperMapAlgoPlot.PlottingUtil.distance(new SuperMapAlgoPlot.Point(0,0),e),n=SuperMapAlgoPlot.PlottingUtil.radian(new SuperMapAlgoPlot.Point(0,0),e)+o*Math.PI/180,l=i*Math.cos(n)+t.x,a=i*Math.sin(n)+t.y;return new SuperMapAlgoPlot.Point(l,a)},SuperMapAlgoPlot.PlottingUtil.triangleHeightAndPartBottomLen=function(t,e,o){var i,n,l=(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,n=0;else if(0==l)i=a,n=0;else{var r=(a*a+s*s-l)/2/a/s,u=0;r>=1?(r=1,u=0):u=Math.sqrt(1-r*r),i=s*r,n=s*u}return{dLen1:i,dLen2:n}},SuperMapAlgoPlot.PlottingUtil.paraLine=function(t,e,o){var i=[];if(2>t.length)return i;if(o){var n=t[1].clone();n=SuperMapAlgoPlot.PlottingUtil.rotateAngle(t[0],Math.PI/2,n),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(t[0],n,e));for(var l=1;lMath.PI/2?r-Math.PI/2:Math.PI/2-r;var p=e/Math.cos(u);n=t[l+1].clone(),n=SuperMapAlgoPlot.PlottingUtil.rotateAngle(t[l],r,n),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(t[l],n,p))}n=t[t.length-2].clone(),n=SuperMapAlgoPlot.PlottingUtil.rotateAngle(t[t.length-1],-1*Math.PI/2,n),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(t[t.length-1],n,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 n=t.x+e*Math.cos(i),l=t.y+o*Math.sin(i);return new SuperMapAlgoPlot.Point(n,l)},SuperMapAlgoPlot.PlottingUtil.getPolygonCenterPt=function(t){if(!t||0===t.length)return null;for(var e=0,o=0,i=0;ia.y?l.y:a.y;if(!(e.yr))(e.y-l.y)*(a.x-l.x)/(a.y-l.y)+l.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),n=SuperMapAlgoPlot.PlottingUtil.distance(t,o),l=SuperMapAlgoPlot.PlottingUtil.distance(e,o),a=(i*i+n*n-l*l)/(2*i*n);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=[],n=SuperMapAlgoPlot.PlottingUtil.clonePoints(t),l=n.length;if(l<2)return i;var a=new SuperMapAlgoPlot.Point(0,0);if(o){if(l<3)a=n[1].clone(),SuperMapAlgoPlot.PlottingUtil.rotateAngle(n[0],Math.PI,a),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(n[0],a,e));else{for(var s=SuperMapAlgoPlot.PlottingUtil.radian(n[0],n[1]),r=SuperMapAlgoPlot.PlottingUtil.radian(n[0],n[n.length-1])-s;r<0;)r+=2*Math.PI;var u,p=r/2;u=p>Math.PI/2?p-Math.PI/2:Math.PI/2-p;var h=e/Math.cos(u);a=n[1].clone(),a=SuperMapAlgoPlot.PlottingUtil.rotateAngle(n[0],p,a),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(n[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=n[c+1].clone(),a=SuperMapAlgoPlot.PlottingUtil.rotateAngle(n[c],f,a),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(n[c],a,d))}if(l<3)a=n[l-2].clone(),SuperMapAlgoPlot.PlottingUtil.rotateAngle(n[l-1],0,a),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(n[l-1],a,e));else{for(var S=SuperMapAlgoPlot.PlottingUtil.radian(n[l-1],n[0]),m=SuperMapAlgoPlot.PlottingUtil.radian(n[l-1],n[l-2])-S;m<0;)m+=2*Math.PI;var b,L=m/2;b=L>Math.PI/2?L-Math.PI/2:Math.PI/2-L;var M=e/Math.cos(b);a=n[0].clone(),a=SuperMapAlgoPlot.PlottingUtil.rotateAngle(n[l-1],L,a),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(n[l-1],a,M))}}else{if(l<3){var v=n[1].clone();SuperMapAlgoPlot.PlottingUtil.rotateAngle(n[0],0,v),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(n[0],v,e))}else{for(var A=SuperMapAlgoPlot.PlottingUtil.radian(n[0],n[1]),T=SuperMapAlgoPlot.PlottingUtil.radian(n[0],n[l-1])-A;T<0;)T+=2*Math.PI;var _,O=Math.PI-T/2;_=O>Math.PI/2?O-Math.PI/2:Math.PI/2-O;var x=e/Math.cos(_);a=n[l-1].clone(),a=SuperMapAlgoPlot.PlottingUtil.rotateAngle(n[0],O,a),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(n[0],a,x))}for(var w=1;wMath.PI/2?I-Math.PI/2:Math.PI/2-I;var D=e/Math.cos(R);a=n[w-1].clone(),a=SuperMapAlgoPlot.PlottingUtil.rotateAngle(n[w],I,a),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(n[w],a,D))}if(l<3)a=n[l-2].clone(),SuperMapAlgoPlot.PlottingUtil.rotateAngle(n[l-1],Math.PI,a),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(n[l-1],a,e));else{for(var U=SuperMapAlgoPlot.PlottingUtil.radian(n[l-1],n[0]),N=SuperMapAlgoPlot.PlottingUtil.radian(n[l-1],n[l-2])-U;N<0;)N+=2*Math.PI;var B,k=Math.PI-N/2;B=k>Math.PI/2?k-Math.PI/2:Math.PI/2-k;var F=e/Math.cos(B);a=n[l-2].clone(),a=SuperMapAlgoPlot.PlottingUtil.rotateAngle(n[l-1],k,a),i.push(SuperMapAlgoPlot.PlottingUtil.linePnt(n[l-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,n=t[0].y,l=1;lt[l].x&&(o=t[l].x),it[l].y&&(n=t[l].y);return SuperMapAlgoPlot.PlottingUtil.distance(new SuperMapAlgoPlot.Point(e,i),new SuperMapAlgoPlot.Point(o,n))},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(y),d=Math.cos(y),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),M=Math.asin(p*c*P/S),v=Math.cos(M)*Math.cos(M),A=m-2*u*h/v,T=r/16*v*(4+r*(4-3*v));g=y,y=o+(1-T)*r*Math.sin(M)*(b+T*S*(A+T*m*(2*A*A-1)))}if(0==f)return NaN;var _=v*(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,n,l=SuperMapAlgoPlot.PlottingUtil,a=l.VincentyConstants,s=a.a,r=a.b,u=a.f;"undefined"!=typeof L&&void 0!==L.LatLng&&t instanceof L.LatLng?(i=t.lng,n=t.lat):(i=t.lon,n=t.lat);for(var p=o,h=l.rad(e),c=Math.sin(h),y=Math.cos(h),g=(1-u)*Math.tan(l.rad(n)),f=1/Math.sqrt(1+g*g),P=g*f,d=Math.atan2(g,y),S=f*c,m=1-S*S,b=m*(s*s-r*r)/(r*r),M=1+b/16384*(4096+b*(b*(320-175*b)-768)),v=b/1024*(256+b*(b*(74-47*b)-128)),A=p/(r*M),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*M)+v*O*(_+v/4*(x*(2*_*_-1)-v/6*_*(4*O*O-3)*(4*_*_-3)))}var w=P*O-f*x*y,E=Math.atan2(P*x+f*O*y,(1-u)*Math.sqrt(S*S+w*w)),C=u/16*m*(4+u*(4-3*m)),I=Math.atan2(O*c,f*x-P*O*y)-(1-C)*u*S*(A+C*O*(_+C*x*(2*_*_-1)));return"undefined"!=typeof L&&void 0!==L.LatLng&&t instanceof L.LatLng?L.latLng(l.deg(E),i+l.deg(I)):new SuperMap.LonLat(i+l.deg(I),l.deg(E))},SuperMapAlgoPlot.PlottingUtil.midPoint=function(t,e){var o=new SuperMapAlgoPlot.Point(0,0);return o.x=.5*(t.x+e.x),o.y=.5*(t.y+e.y),o},SuperMapAlgoPlot.PlottingUtil.makeDottedLine=function(t,e){for(var o,i,n=[],l=e,a=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t),s=e,r=t[0].clone(),u=1,p=0,h=!0,c=!0;p=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),n=[];return n.push.apply(n,t),n.push(i),n.push(n[0]),n}},polygon:function(t){if(t&&t.length>2)return t},circle:function(t){if(t&&2===t.length){for(var e=t[0],o=t[1],i=[],n=Math.sqrt((o.x-e.x)*(o.x-e.x)+(o.y-e.y)*(o.y-e.y)),l=360/this.nSegmentCount,a=0;a=3){var e=this.getArcInfo(t[0],t[1],t[2]);e.dStartAngle*=Math.PI/180,e.dEndAngle*=Math.PI/180;var 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,n){if(!0===o){if((!i||null==i)&&t&&t.length>=3&&(i=SuperMapAlgoPlot.PlottingUtil.distance(t[0],t[1])),(!n||null==n)&&t&&t.length>=3){var l=SuperMapAlgoPlot.PlottingUtil.projectPoint(t[2],t[0],t[1]);n=SuperMapAlgoPlot.PlottingUtil.distance(l,t[2])}}else n=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,n,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-n*u,t[2].y=t[0].y+n*p):(t[2].x=t[0].x+n*u,t[2].y=t[0].y-n*p)}return r}},getArcSpatialData:function(t,e,o,i,n,l,a){var s=[];if(Math.abs(a)<1e-9)return s;for(;ln+2*Math.PI;)n+=2*Math.PI;var r=Math.cos(i)*e,u=Math.sin(i)*e,p=Math.cos(i)*o,h=Math.sin(i)*o,c=this.calcEllipseRadian(n,e,o),y=this.calcEllipseRadian(l,e,o);y-c<1e-5&&(y+=2*Math.PI);var g=Math.round(Math.abs((y-c)/a)+1);if(g<2)return s;for(var f=0;fs.length&&(s[s.length-1].x=t.x+r*Math.cos(y)-h*Math.sin(y),s[s.length-1].y=t.y+u*Math.cos(y)+p*Math.sin(y)),s},getArcCircleSpatialData:function(t,e,o,i){for(var n=[];io+2*Math.PI;)o+=2*Math.PI;i-o<1e-10&&(i+=2*Math.PI);for(var l=(i-o)/50,a=o;a=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=l/n,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 y=Math.atan2(t.y-i.pntCenter.y,t.x-i.pntCenter.x),g=Math.atan2(o.y-i.pntCenter.y,o.x-i.pntCenter.x);if(SuperMapAlgoPlot.PlottingUtil.isCounterClockwise(t,e,o)){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(;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(;g>y;)y+=2*Math.PI;var f=y;y=g,g=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*g/Math.PI,i.dStartAngle=180*y/Math.PI,i},calcEllipseRadian:function(t,e,o){var i=t,n=e*Math.sin(t),l=o*Math.cos(t),a=Math.atan2(n,l);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&&n>=l){var u=a.clone();a=r.clone(),r=u.clone()}else if(l>=i&&l>=n){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,n){var l=new SuperMapAlgoPlot.Point(0,0),a=0,s=0;return a=SuperMapAlgoPlot.PlottingUtil.distance(n,o),s=SuperMapAlgoPlot.PlottingUtil.distance(i,n),1==e&&(a*=2),2==e&&(s*=2),l.x=(a*i.x+s*o.x)/(a+s),l.y=(a*i.y+s*o.y)/(a+s),{pl:this.GetWhichPtOfNormal(t,o,l,n),pr:this.GetWhichPtOfNormal(t,i,l,n)}},GetWhichPtOfNormal:function(t,e,o,i){var n=0;n=SuperMapAlgoPlot.PlottingUtil.distance(i,e)/t;var l=this.GetPointsOfNormal(n,o,i);return SuperMapAlgoPlot.PlottingUtil.distance(e,l.pt4)>=(n=SuperMapAlgoPlot.PlottingUtil.distance(e,l.pt3))?l.pt3:l.pt4},getBezierPtsWithScalePts:function(t,e,o,i){var n=[],l=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(l,s,1e-10)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(a,r,1e-10)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(u,h,1e-10)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(p,c,1e-10))n.push(new SuperMapAlgoPlot.Point(l,a)),n.push(new SuperMapAlgoPlot.Point(u,p));else for(var y=0;y<=1;y+=.03125){var g,f,P,d,S=y*y,m=S*y;g=1-3*y+3*S-m,f=3*(y-2*S+m),P=3*(S-m),d=m;var b=new SuperMapAlgoPlot.Point(g*l+f*s+P*u+d*h,g*a+f*r+P*p+d*c);n.push(b)}return n},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}}};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),n=new SuperMapAlgoPlot.Point(0,30);t||(t=90);var l=new Object;l.type=SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,l.positionPoints=[];for(var a=t+10;a<170+t;a+=10){var s=SuperMapAlgoPlot.PlottingUtil.findPoint(i,n,30,a);l.positionPoints.push(s)}l.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},o.push(l);var r=l.positionPoints[l.positionPoints.length-1],u=l.positionPoints[l.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 y=new Object;y.type=SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,y.positionPoints=[];for(var g=190+t;g<350+t;g+=10){var f=SuperMapAlgoPlot.PlottingUtil.findPoint(i,n,30,g);y.positionPoints.push(f)}y.style={surroundLineFlag:!1,fillLimit:!0,fill:!1},o.push(y);var P=y.positionPoints[y.positionPoints.length-1],d=y.positionPoints[y.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;L1&&t.push(n),n=[],e=s.GetX(),o=s.GetY(),n.push(new SuperMapAlgoPlot.Point(e,o));break;case 1:e=s.GetX(),o=s.GetY(),n.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(),y=i.elements[a+1].GetY(),g=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),M=S;n.push(new SuperMapAlgoPlot.Point(m*r+b*p+L*c+M*g,m*u+b*h+L*y+M*f))}a+=2}}return n.length>1&&t.push(n),!0}},{key:"ensureData",value:function(){null==this.m_pData&&this.ensureData_helper()}},{key:"ensureData_helper",value:function(){var t=new 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}}])&&te(e.prototype,o),i&&te(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function oe(t,e){for(var o=0;o2){var r=t.length;t.splice(2,r-2)}var u=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t);i.arrowTouLen=u*n;for(var p=SuperMapAlgoPlot.PlottingUtil.findPointInPolyLine(t,u-i.arrowTouLen).pt,h=[],c=i.arrowTouLen*a,y=i.arrowTouLen*l,g=t.length-1,f=0;f-360&&a[u+1].x-a[0].x<-180&&s.push(u+1),a[u+1].x-a[0].x<360&&a[u+1].x-a[0].x>180&&r.push(u+1);if(r.length>s.length){for(var p=0;p180?l[a].x=l[a].x-360:l[a].x<-180&&(l[a].x=l[a].x+360);return l},SuperMapAlgoPlot.ArrowToolkit.eastCrossZone=function(t){var e=!1;if(void 0!==t[0].z&&(e=!0),!e)return t;for(var o=SuperMapAlgoPlot.PlottingUtil.clonePoints(t),i=0;i-180&&(o[i].x=o[i].x+360);return o},SuperMapAlgoPlot.ArrowToolkit.westCrossZone=function(t){var e=!1;if(void 0!==t[0].z&&(e=!0),!e)return t;for(var o=SuperMapAlgoPlot.PlottingUtil.clonePoints(t),i=0;i0&&o[i].x<180&&(o[i].x=o[i].x-360);return o},SuperMapAlgoPlot.ArrowToolkit.generateArrowHeadShapePts=function(t,e,o,i,n){var l=[];switch(t=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(t).pts,e=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(e).pts,n){case SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_WITH_EAR:case SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_WITHOUT_EAR:var a=o[0],s=o[1],r=0,u=0;3==o.length&&(r=o[2]),4==o.length&&(r=o[2],u=o[3]);var p=0;if(!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(r,0)&&!SuperMapAlgoPlot.PlottingUtil.equalFuzzy(u,0)){var h=SuperMapAlgoPlot.PlottingUtil.clonePoints(t);h.splice(h.length-1,1),p=SuperMapAlgoPlot.PlottingUtil.polylineDistance(h)*r*u}var c=new SuperMapAlgoPlot.Point((e[0].x+e[1].x)/2,(e[0].y+e[1].y)/2);if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(s,0)){var y=i*a,g=t[t.length-1];return g=SuperMapAlgoPlot.PlottingUtil.rotate(c,0,1,g),l.push(SuperMapAlgoPlot.PlottingUtil.findPointInLine(c,g,y)),l.push(t[t.length-1]),g=t[t.length-1],g=SuperMapAlgoPlot.PlottingUtil.rotate(c,0,-1,g),l.push(SuperMapAlgoPlot.PlottingUtil.findPointInLine(c,g,y)),t=SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(t),l=SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(l)}var f=i*s,P=SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale(f,c,t[t.length-1]);f=i*a,f+=p;var d=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(f,t[t.length-1],P),S=d.pntLeft,m=d.pntRight,b=t[t.length-1];return l.push(m),l.push(b),l.push(S),t=SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(t),l=SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(l)}},SuperMapAlgoPlot.ArrowToolkit.generateArrowBodyShapePtsBySingleLine=function(t,e,o,i){var n=[];if(2>t.length)return n;t=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(t).pts;var l,a=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t),s=SuperMapAlgoPlot.PlottingUtil.equalFuzzy(e,0);switch(o){case SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_POLYLINE:n=n.concat(t),i&&!s&&SuperMapAlgoPlot.PlottingUtil.distance(t[t.length-1],t[t.length-2])>e&&(l=SuperMapAlgoPlot.PlottingUtil.findPointInPolyLine(t,a-e),n.splice(n.length-1,1),n.push(l.pt));break;case SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_POLYBEZIER:if(2==t.length)n=n.concat(t),i&&!s&&SuperMapAlgoPlot.PlottingUtil.distance(t[t.length-1],t[t.length-2])>e&&(l=SuperMapAlgoPlot.PlottingUtil.findPointInPolyLine(t,a-e),n.splice(n.length-1,1),n.push(l.pt));else{var r=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(t),u=SuperMapAlgoPlot.PlottingUtil.polylineDistance(r);if(s)n=n.concat(r);else{var p=r[r.length-1];if(!s&&(e1;h--){if(!(e>SuperMapAlgoPlot.PlottingUtil.distance(p,r[h]))){var c=SuperMapAlgoPlot.PlottingUtil.findPoint(p,r[h],e,0);r.push(c),n=r;break}r.splice(h,1)}i||n.push(p)}else n=n.concat(r)}}break;case SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_COATTAIL:var y=e;if(y>a)return n;for(var g,f,P=Math.ceil(a/(1.4*y)),d=0,S=[],m=0;mt.length)return i;switch(t=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(t).pts,o){case SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_POLYLINE:var n=t[0],l=t[1],a=SuperMapAlgoPlot.PlottingUtil.distance(n,l);if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(a,e,1e-7)||a>e){var s=SuperMapAlgoPlot.PlottingUtil.findPoint(n,l,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)}else{l=t[2];var p=SuperMapAlgoPlot.PlottingUtil.findPoint(n,l,e,0),h=e*Math.tan(.125*Math.PI),c=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(h,t[0],p);i.push(c.pntLeft),i.push(t[0]),i.push(c.pntRight)}break;case SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_TRIANGLE:break;case SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_TRIANGLE_SOLID:var y=t[0],g=t[1],f=SuperMapAlgoPlot.PlottingUtil.distance(y,g);if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(f,e,1e-7)||f>e){var P=e*Math.tan(.125*Math.PI),d=SuperMapAlgoPlot.PlottingUtil.findPoint(y,g,e,0),S=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(P,t[0],d);i.push(S.pntLeft),i.push(y),i.push(S.pntRight),i.push(S.pntLeft)}else{g=t[2];var m=e*Math.tan(.125*Math.PI),b=SuperMapAlgoPlot.PlottingUtil.findPoint(y,g,e,0),L=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(m,t[0],b);i.push(L.pntLeft),i.push(y),i.push(L.pntRight),i.push(L.pntLeft)}break;case SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_COATTAIL:var M=t[0],v=2*Math.sqrt(e*e/3),A=SuperMapAlgoPlot.PlottingUtil.distance(t[0],t[1]);if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(v/2,A,1e-7)||A>v/2){var T=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],v,20),_=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],v,-20),O=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],v/2,0);i.push(M),i.push(T),i.push(O),i.push(_),i.push(M)}else{M=t[2];var x=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],v,20),w=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],v,-20),E=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],v/2,0);i.push(M),i.push(x),i.push(E),i.push(w),i.push(M)}break;case SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_COATTAIL_HOLLOW:var C=[],I=t[0],R=2*Math.sqrt(e*e/3),D=SuperMapAlgoPlot.PlottingUtil.distance(t[0],t[1]);if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(R/1.4,D,1e-7)||D>R/1.4){var U=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],R,20),N=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],R,-20),B=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],R/1.4,0);C.push(I),C.push(U),C.push(B),C.push(N),C.push(I);var k=new SuperMapAlgoPlot.Point((C[0].x+C[1].x)/2,(C[0].y+C[1].y)/2),F=new SuperMapAlgoPlot.Point((C[3].x+C[4].x)/2,(C[3].y+C[4].y)/2),V=new SuperMapAlgoPlot.Point((k.x+F.x)/2,(k.y+F.y)/2),j=.75*SuperMapAlgoPlot.PlottingUtil.distance(k,F)/2,Y=SuperMapAlgoPlot.PlottingUtil.findPointInLine(V,k,j),z=SuperMapAlgoPlot.PlottingUtil.findPointInLine(V,F,j);i.push(C[0]),i.push(Y),i.push(C[1]),i.push(C[2]),i.push(C[3]),i.push(z),i.push(C[4])}else{I=t[0];var G=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],R,20),W=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],R,-20),X=SuperMapAlgoPlot.PlottingUtil.findPoint(t[0],t[1],R/1.4,0);C.push(I),C.push(G),C.push(X),C.push(W),C.push(I);k=new SuperMapAlgoPlot.Point((C[0].x+C[1].x)/2,(C[0].y+C[1].y)/2),F=new SuperMapAlgoPlot.Point((C[3].x+C[4].x)/2,(C[3].y+C[4].y)/2),V=new SuperMapAlgoPlot.Point((k.x+F.x)/2,(k.y+F.y)/2),j=.75*SuperMapAlgoPlot.PlottingUtil.distance(k,F)/2,Y=SuperMapAlgoPlot.PlottingUtil.findPointInLine(V,k,j),z=SuperMapAlgoPlot.PlottingUtil.findPointInLine(V,F,j);i.push(C[0]),i.push(Y),i.push(C[1]),i.push(C[2]),i.push(C[3]),i.push(z),i.push(C[4])}}return i=SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(i)},SuperMapAlgoPlot.ArrowToolkit.generateArrowTailShapePts=function(t,e,o,i){var n=e.length,l=[],a=0;t=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(t).pts;for(var s=0;s0&&P>0){var S=1/(y-t[2].x),m=-1/(g-t[2].y),b=1*t[2].y/(g-t[2].y)-1*t[2].x/(y-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(g-t[1].y):f<=1e-4&&(d=Math.abs(y-t[1].x));var L=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(d,t[2],new SuperMapAlgoPlot.Point(y,g)),M=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(t[1],t[2],t[0]);M?(l[1]=t[1],a[1]=t[0]):(l[1]=t[0],a[1]=t[1]),t[1]=new SuperMapAlgoPlot.Point((t[0].x+t[1].x)/2,(t[0].y+t[1].y)/2);var v=Math.sqrt((L.pntLeft.x-L.pntRight.x)*(L.pntLeft.x-L.pntRight.x)+(L.pntLeft.y-L.pntRight.y)*(L.pntLeft.y-L.pntRight.y))*SuperMapAlgoPlot.ArrowToolkit.ConstValue.sv_AtWidthDivAwWidth,A=(n=v*SuperMapAlgoPlot.ArrowToolkit.ConstValue.sv_AtLenDivAtWidth)*c;SuperMapAlgoPlot.PlottingUtil.equalFuzzy(h,0)||(A=(n=i*h)*c);var T,_,O=SuperMapAlgoPlot.PlottingUtil.distance(t[e],t[e-1]),x=2*n;O0&&(t[e]=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(n,t[e],R)),C=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(A,t[e+1],t[e]),(M=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(t[e],t[e+1],C.pntLeft))?(a[e]=new SuperMapAlgoPlot.Point(C.pntLeft.x,C.pntLeft.y),l[e]=new SuperMapAlgoPlot.Point(C.pntRight.x,C.pntRight.y)):(a[e]=new SuperMapAlgoPlot.Point(C.pntRight.x,C.pntRight.y),l[e]=new SuperMapAlgoPlot.Point(C.pntLeft.x,C.pntLeft.y)),w=2;w=2&&this.controlPoints.length=this.minEditPts){var e={textContent:this.textContent,type:this.symbolType,surroundLineFlag:!1,positionPoints:t,style:{}};if(e.type===SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL&&e.positionPoints.push(e.positionPoints[0]),this.symbolType===SuperMapAlgoPlot.SymbolType.PARALLELLINE){if(this.controlPoints&&this.controlPoints.length>=3){var o=!1;void 0!==this.controlPoints[0].z&&(o=!0);var i=SuperMapAlgoPlot.PlottingUtil.distance(this.controlPoints[0],this.controlPoints[1]);SuperMapAlgoPlot.PlottingUtil.isRight(this.controlPoints[0],this.controlPoints[1],this.controlPoints[2])&&(i=-i);for(var n=[],l=1;lg)break;if(p>=y){var P=u.split("");u="";for(var d="",S=P.length,m=0;m=y){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 n=SuperMapAlgoPlot.PlottingUtil.polylineDistance(t),l=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(n*(o-e),t),a=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(n*(o+e),t);return i.startIndex=l.index,i.startPt=l.pts,i.endIndex=a.index,i.endPt=a.pts,i}},{key:"computeDashLine",value:function(t,e,o){var i=[],n=SuperMapAlgoPlot.PlottingUtil.polylineDistance(o);if(n<=0)return[];for(var l,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&&(l=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(s,[t[t.length-1],t[t.length-2]])).bfind&&(t.splice(t.length-1,1),t.push(l.pts)),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,t);var p=t[t.length-1],h=a,c=o;if(void 0===p)return t;var y=SuperMapAlgoPlot.PlottingUtil.radian(p,h)*SuperMapAlgoPlot.PlottingUtil.RTOD,g=SuperMapAlgoPlot.PlottingUtil.circlePoint(h,c,c,y+157.5),f=SuperMapAlgoPlot.PlottingUtil.circlePoint(h,c,c,y+202.5),P={surroundLineFlag:!1,fillLimit:!0,fillColorLimit:!1,fill:!0,lineTypeLimit:!0,surroundLineLimit:!0,surroundLineType:SuperMapAlgoPlot.AlgoSurroundLineType.NONE};this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,[g,a,f],P)}else this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,n)}},{key:"addArrowWithOutLine",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()));var n=t.slice();o=i*e;var l,a=t[t.length-1],s=o*Math.cos(.125*Math.PI);if(t.length>2){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&&(l=SuperMapAlgoPlot.PlottingUtil.getPtsIndexByDistance(s,[t[t.length-1],t[t.length-2]])).bfind&&(t.splice(t.length-1,1),t.push(l.pts));var p=t[t.length-1],h=a,c=o;if(void 0===p)return t;var y=SuperMapAlgoPlot.PlottingUtil.radian(p,h)*SuperMapAlgoPlot.PlottingUtil.RTOD,g=SuperMapAlgoPlot.PlottingUtil.circlePoint(h,c,c,y+157.5),f=SuperMapAlgoPlot.PlottingUtil.circlePoint(h,c,c,y+202.5),P={surroundLineFlag:!1,fillLimit:!0,fillColorLimit:!1,fill:!0,lineTypeLimit:!0,surroundLineLimit:!0,surroundLineType:SuperMapAlgoPlot.AlgoSurroundLineType.NONE};this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,[g,a,f],P)}else this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,n)}},{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 n=t[t.length-1];if(t.length>2){for(var l=-1,a=t.length-2;a>=0;a--)if(oe||i<=0)&&(i=e),i}},{key:"computeSubSymbol",value:function(t,e,o,i,n,l){if(null==t.symbolData||null==t.symbolData.innerCells)return null;void 0===n&&(n=0),void 0===l&&(l=0);for(var a=SuperMapAlgoPlot.AnalysisSymbol.analysisSymbolCells(t.symbolData,!0),s=0,r=0,u=0,p=0,h=0;hc[y].x&&(u=c[y].x),p>c[y].y&&(p=c[y].y)}var 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+=n*(f.x-P.x),b.y+=l*(f.y-P.y);for(var L=0,M=a.length;L=l)return o.z;if(s>=l)return e.z}return n.x!=e.x&&e.x!=o.x?e.z+(n.x-e.x)/(e.x-o.x)*(e.z-o.z):n.y!=e.y&&e.y!=o.y?e.z+(n.y-e.y)/(e.y-o.y)*(e.z-o.z):0==(a=SuperMapAlgoPlot.PlottingUtil.distance(e,n))?e.z:e.z-(e.z-o.z)*(a/l)}},{key:"ComputeBeizerZValueByDis",value:function(t,e,o){if(t.length<2)return!1;for(var i=[],n=0;n2?SuperMapAlgoPlot.PlottingUtil.radian(e[e.length-1],e[e.length-2]):SuperMapAlgoPlot.PlottingUtil.radian(e[1],e[0]))-l,s=e[e.length-1].x+n*Math.cos(a),r=e[e.length-1].y+n*Math.sin(a),u=new SuperMapAlgoPlot.Point(s,r),p=i+l,h=e[e.length-1].x+n*Math.cos(p),c=e[e.length-1].y+n*Math.sin(p),y=new SuperMapAlgoPlot.Point(h,c),g=[];g.push(u),g.push(e[e.length-1].clone()),g.push(y);var f={surroundLineFlag:!1,fillLimit:!0,lineTypeLimit:!0},P=SuperMapAlgoPlot.PlottingUtil.radian(e[0],e[1]);a=P-l,s=e[0].x+n*Math.cos(a),r=e[0].y+n*Math.sin(a),u=new SuperMapAlgoPlot.Point(s,r),p=P+l,h=e[0].x+n*Math.cos(p),c=e[0].y+n*Math.sin(p),y=new SuperMapAlgoPlot.Point(h,c);var d=[];d.push(u),d.push(e[0].clone()),d.push(y);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,g,f):this.scaleValues[2]===SuperMapAlgoPlot.ArrowLineType.TRIANGLESOLID&&this.addCell(m,g,f),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,e),this.finish()}}}])&&ue(e.prototype,o),i&&ue(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function ge(t){"@babel/helpers - typeof";return(ge="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})(t)}function fe(t,e){for(var o=0;o0&&n<.4&&(this.scaleValues[0]=n)}else if(1==t){var l=new SuperMapAlgoPlot.Point((o[0].x+o[1].x)/2,(o[0].y+o[1].y)/2),a=SuperMapAlgoPlot.PlottingUtil.distance(e,l)/i;0a&&(this.scaleValues[1]=a)}}this.calculateParts()}}])&&Le(e.prototype,o),i&&Le(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function _e(t){"@babel/helpers - typeof";return(_e="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})(t)}function Oe(t,e){for(var o=0;o=2&&t.lengtho.x&&s.xo.y&&s.yi.x||s.yi.y)&&(e[0]=l,e[3]=o),4==e.length&&this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,e)}}},{key:"GetPointsByTrapezoid",value:function(t,e,o,i,n){var l=e.x,a=e.y,s=o.x,r=o.y,u=i.x,p=i.y,h=0,c=0,y=0,g=0;if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(Math.abs(a-r),0))h=l+s-u,c=p;else if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(Math.abs(l-s),0))h=u,c=a+r-p;else{var f=1*(a-r)/(l-s),P=p-f*u;c=f*(h=((r+a)/2+(l+s)/(2*f)-P)/(f+1/f))+P,h=2*h-u,c=2*c-p}var d=Math.sqrt(1*(l-s)*(l-s)+1*(a-r)*(a-r)),S=Math.sqrt(1*(l-h)*(l-h)+1*(a-c)*(a-c));d>0?(y=l+(s-l)*S/d,g=a+(r-a)*S/d):(y=l,g=a);var m=y+(h-y)*t,b=g+(c-g)*t;n.x=m,n.y=b}}])&&Oe(e.prototype,o),i&&Oe(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function Ie(t){"@babel/helpers - typeof";return(Ie="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})(t)}function Re(t,e){for(var o=0;o1)){if(t=(1-t)/2,this.controlPoints.length>=this.minEditPts){var e,o,i,n,l,a;this.controlPoints[2]&&(this.controlPoints[2].isFixedPos=!0),this.controlPoints[0].xo?Math.abs((a-o)/(l-e))>r?2:1:ar?4:1:l>i?a>o?Math.abs((a-o)/(l-i))>r?2:3:ar?4:3:a>o?2:ai?Math.abs((s-i)/(a-o))>u?2:1:su?4:1:a>n?s>i?Math.abs((s-i)/(a-n))>u?2:3:su?4:3:s>i?2:si&&(h=i),h<(i+l)/2&&(h=(i+l)/2),p=1-2*(i-h)/(i-l);break;case 2:case 4:var c=r.x+(e.x-r.x);c>n&&(c=n),c<(o+n)/2&&(c=(o+n)/2),p=1-2*(n-c)/(n-o)}p<0&&(p=0),p>1&&(p=1),this.scaleValues[0]=p}this.calculateParts()}}])&&Re(e.prototype,o),i&&Re(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function Fe(t){"@babel/helpers - typeof";return(Fe="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})(t)}function Ve(t,e){for(var o=0;o=this.minEditPts){var e,o,i,n;t[0].xi?Math.abs((e-i)/(t-o))>a?2:1:ea?4:1:t>n?e>i?Math.abs((e-i)/(t-n))>a?2:3:ea?4:3:e>i?2:e1)){if(t=(1-t)/2,this.controlPoints.length>=this.minEditPts){var e,o,i,n;this.scalePoints=[];var l=[];this.controlPoints[0].x=2&&this.controlPoints.lengthi?Math.abs((s-i)/(a-o))>u?2:1:su?4:1:a>n?s>i?Math.abs((s-i)/(a-n))>u?2:3:su?4:3:s>i?2:si&&(h=i),h<(i+l)/2&&(h=(i+l)/2),p=1-2*(i-h)/(i-l);break;case 2:case 4:var c=r.x+(e.x-r.x);c>n&&(c=n),c<(o+n)/2&&(c=(o+n)/2),p=1-2*(n-c)/(n-o)}p<0&&(p=0),p>1&&(p=1),this.scaleValues[0]=p}this.calculateParts()}},{key:"calculateArc",value:function(t,e,o,i,n,l){(!n||1!=n&&-1!=n)&&(n=-1),l||(l=360);for(var a=Math.PI/l/2,s=a*n,r=Math.abs(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,n,l){var a=(i-l)/(n-o);return ti?Math.abs((e-i)/(t-o))>a?2:1:ea?4:1:t>n?e>i?Math.abs((e-i)/(t-n))>a?2:3:ea?4:3:e>i?2:e360;)this.scaleValues[0]-=360;for(;this.scaleValues[0]<0;)this.scaleValues[0]+=360;for(;this.scaleValues[1]>360;)this.scaleValues[1]-=360;for(;this.scaleValues[1]<0;)this.scaleValues[1]+=360;for(;this.scaleValues[1]<=this.scaleValues[0];)this.scaleValues[1]+=360;SuperMapAlgoPlot.PlottingUtil.equalFuzzy(this.scaleValues[1],this.scaleValues[0])&&(this.scaleValues[1]+=360);for(var e=[],o=0;o0){for(var p=[],h=0;h=0;c--)p.push(n[c]);this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,p,{surroundLineFlag:!1,lineWidthLimit:!0,weight:0,strokeWidth:0})}e.length=0;for(var y=0;y360;)i-=360;for(;i<0;)i+=360;t%2==0?this.scaleValues[0]=i:t%2==1&&(this.scaleValues[1]=i)}this.calculateParts()}}])&&to(e.prototype,o),i&&to(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function lo(t){"@babel/helpers - typeof";return(lo="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})(t)}function ao(t,e){for(var o=0;oMath.abs(this.scaleValues[i]-this.scaleValues[n]))for(var a=0;a<2;a++){var s,r,u;0==a?(u=i,s=SuperMapAlgoPlot.PlottingUtil.radian(o[i],o[n])*SuperMapAlgoPlot.PlottingUtil.RTOD,r=Math.acos((l*l+this.scaleValues[i]*this.scaleValues[i]-this.scaleValues[n]*this.scaleValues[n])/(2*l*this.scaleValues[i]))*SuperMapAlgoPlot.PlottingUtil.RTOD):(u=n,s=SuperMapAlgoPlot.PlottingUtil.radian(o[n],o[i])*SuperMapAlgoPlot.PlottingUtil.RTOD,r=Math.acos((l*l+this.scaleValues[n]*this.scaleValues[n]-this.scaleValues[i]*this.scaleValues[i])/(2*l*this.scaleValues[n]))*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 y=this.angleRange[u].length-1;y>=0;y--)if(c){if(h>this.angleRange[u][y].End||SuperMapAlgoPlot.PlottingUtil.equalFuzzy(h,this.angleRange[u][y].End)){this.angleRange[u].splice(y,1);continue}if(h>this.angleRange[u][y].Start&&(this.angleRange[u][y].Start=h),pthis.angleRange[u][y].End)this.angleRange[u].splice(y,1);else if(p>this.angleRange[u][y].Start&&hthis.angleRange[u][y].End)continue;if(p>this.angleRange[u][y].Start&&(this.angleRange[u][y].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=0;l--)e.push(t[n][l]);if(t.splice(n,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}}])&&ao(e.prototype,o),i&&ao(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function ho(t){"@babel/helpers - typeof";return(ho="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})(t)}function co(t,e){for(var o=0;o2*this.controlPoints.length-1)return;var o=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if(2>o.length)return;var i=SuperMapAlgoPlot.PlottingUtil.polylineDistance(o),n=-1;n=t%2==0?Math.floor(t/2):Math.floor((t+1)/2);var l=(e.x-o[n].x)/i,a=(e.y-o[n].y)/i;this.scaleValues[2*t]=l,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 n=new SuperMapAlgoPlot.Point(0,0),l=0,a=0,s=0,r=2*Math.PI;n=t[0],o.push(n);for(var u=!1,p=!1,h=!1,c=1;c0||SuperMapAlgoPlot.PlottingUtil.equalFuzzy(0,g)?Math.acos(y):2*Math.PI-Math.acos(y),r>2*Math.PI&&l+2*Math.PIs&&(l-=2*Math.PI,r>2*Math.PI&&(r-=2*Math.PI)),l>s&&ll+f&&(r=l+f):(h=!0,r=l+f),u=!0}else n=t[c-1],c--,o.push(n),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 n=t,l=i,a=!1;SuperMapAlgoPlot.PlottingUtil.equalFuzzy(n[0].x,n[l-1].x)&&SuperMapAlgoPlot.PlottingUtil.equalFuzzy(n[0].y,n[l-1].y);){if((l-=1)<=0)return o;a=!0}var s,r,u=[];for(s=0;s1e-10&&SuperMapAlgoPlot.PlottingUtil.distance(n[r],n[s+1])>1e-10){var p=180*SuperMapAlgoPlot.PlottingUtil.InnerAngle(n[s],n[r],n[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;s0)for(var n=0;n=this.minEditPts){for(var t=this.controlPoints[0],e=this.controlPoints[1],o=SuperMapAlgoPlot.PlottingUtil.distance(t,e),i=this.scaleValues[0]*o,n=SuperMapAlgoPlot.PlottingUtil.parallel(this.controlPoints,i/2),l=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 y=[];(y=(y=(y=(y=y.concat(s)).concat(l)).concat(p)).concat(n)).push(y[0]),this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,y);var g=new SuperMapAlgoPlot.Point(s[0].x,s[0].y);this.addScalePoint(g)}}},{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()}}])&&_o(e.prototype,o),i&&_o(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function Io(t){"@babel/helpers - typeof";return(Io="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})(t)}function Ro(t,e){for(var o=0;othis.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,n=new SuperMapAlgoPlot.Point((t.x+e.x)/2,(t.y+e.y)/2),l=SuperMapAlgoPlot.PlottingUtil.circlePoint(n,o,o,i+90),a=SuperMapAlgoPlot.PlottingUtil.circlePoint(n,3*o,3*o,i+90);this.addCell(SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL,[l,new SuperMapAlgoPlot.Point(l.x+o,l.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),y=SuperMapAlgoPlot.PlottingUtil.circlePoint(c,h,h,p),g=SuperMapAlgoPlot.PlottingUtil.plumbLineLen(u,s,r);if(g<=4*h){var f=SuperMapAlgoPlot.PlottingUtil.circlePoint(c,3*h,3*h,p);this.addCell(SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL,[y,new SuperMapAlgoPlot.Point(y.x+h,y.y)]),this.addCell(SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL,[f,new SuperMapAlgoPlot.Point(f.x+h,f.y)])}else{for(var P=SuperMapAlgoPlot.PlottingUtil.circlePoint(c,g-h,g-h,p),d=180*Math.acos(h/(g-2*h))/Math.PI,S=p-d,m=p-180+d,b=p-180-d+360,L=[],M=p+d-360;M<=S;M+=4){var v=SuperMapAlgoPlot.PlottingUtil.circlePoint(y,h,h,M);L.push(v)}var A=SuperMapAlgoPlot.PlottingUtil.circlePoint(y,h,h,S);L.push(A);for(var T=[],_=m;_=0;E--)w.push(T[E]);this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,w)}}}}])&&Ro(e.prototype,o),i&&Ro(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function Fo(t){"@babel/helpers - typeof";return(Fo="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})(t)}function Vo(t,e){for(var o=0;o1?this.computeText(this.textPathPts,this.textContent[1],t):this.computeText(this.textPathPts,this.textContent[0],t),this.relLineText=SuperMapAlgoPlot.RelLineText.ONBOTHLINE,this.showPathLine=e}else this.relLineText===SuperMapAlgoPlot.RelLineText.ONRIGHTLINE?this.textPathPts=this.getTextPathPts(t,!1):this.relLineText===SuperMapAlgoPlot.RelLineText.ONLEFTLINE?this.textPathPts=this.getTextPathPts(t,!0):this.textPathPts=t,this.computeText(this.textPathPts,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,n=t,l=n.length,a=0,s=0;s180&&(T-=360),T<-180&&(T+=360),T>90&&T<=180?(L=-180,S=!0,m=!0):T>-180&&T<-90&&(L=180,S=!0,m=!0),b=!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);_++){0===_&&(this.oldDNowPassedDistance=this.dNowPassedDistance);var O=_;for(m&&(O=i-_-1),d=g[O],M=b?d.getWidth():d.getHeight(),S&&(this.dNowPassedDistance+=M);u<=this.dNowPassedDistance&&p=0){for(var D=[],U=0;U<=A.index;U++)D.push(o[U]);D.push(A.pt),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,D)}if(R.index>=0){var N=[];N.push(R.pt);for(var B=R.index+1;B2){for(var i=-1,n=t.length-2;n>=0;n--)if(e1)){if(t=(1-t)/2,this.controlPoints.length>=this.minEditPts){var e,o,i,n;this.scalePoints=[];var l=[];this.controlPoints[0].x=2&&this.controlPoints.lengthi?Math.abs((e-i)/(t-o))>a?2:1:ea?4:1:t>n?e>i?Math.abs((e-i)/(t-n))>a?2:3:ea?4:3:e>i?2:e=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 n=0;n=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,n=null;this.scaleValues[1]===t.length?(i=t[t.length-1],n=t[0]):(i=t[this.scaleValues[1]-1],n=t[this.scaleValues[1]]),o.labelRotation=-SuperMapAlgoPlot.PlottingUtil.radian(i,n)/Math.PI*180;var l=this.scaleValues[0]*SuperMapAlgoPlot.PlottingUtil.distance(i,n);e=[SuperMapAlgoPlot.PlottingUtil.findPoint(i,n,l,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.lengtho);s++){var r=SuperMapAlgoPlot.PlottingUtil.findPointInPolyLine(l,n+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()}}}])&&yi(e.prototype,o),i&&yi(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function Si(t){"@babel/helpers - typeof";return(Si="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})(t)}function mi(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 M=SuperMapAlgoPlot.PlottingUtil.distance(e,P.projectPoint),v=this.getPixelDistanceFromLonLat(M);this.scaleValues[4]=v/(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()}}])&&mi(e.prototype,o),i&&mi(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function Ai(t){"@babel/helpers - typeof";return(Ai="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})(t)}function Ti(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 n=SuperMapAlgoPlot.PlottingUtil.polylineDistance(o),l=SuperMapAlgoPlot.PlottingUtil.polylineDistance(i);if(SuperMapAlgoPlot.PlottingUtil.equalFuzzy(n,0)||SuperMapAlgoPlot.PlottingUtil.equalFuzzy(l,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)/n,r=(e.y-o[a].y)/n;this.scaleValues[2*t]=s,this.scaleValues[2*t+1]=r}}}])&&Ti(e.prototype,o),i&&Ti(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function Ei(t){"@babel/helpers - typeof";return(Ei="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})(t)}function Ci(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[2]),i=SuperMapAlgoPlot.PlottingUtil.radian(t[0],t[1]),n=[];n.push(t[0]),(n=n.concat(SuperMapAlgoPlot.Primitives.getArcCircleSpatialData(t[0],e,o,i))).push(t[0]),0!==n.length&&this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,n)}}}])&&Ci(e.prototype,o),i&&Ci(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function Bi(t){"@babel/helpers - typeof";return(Bi="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})(t)}function ki(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[2]),i=SuperMapAlgoPlot.PlottingUtil.radian(t[0],t[1]),n=SuperMapAlgoPlot.Primitives.getArcCircleSpatialData(t[0],e,o,i);0!==n.length&&this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,n)}}}])&&ki(e.prototype,o),i&&ki(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function Gi(t){"@babel/helpers - typeof";return(Gi="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})(t)}function Wi(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[2]),i=SuperMapAlgoPlot.PlottingUtil.radian(t[0],t[1]),n=[];n.push(t[1]),(n=n.concat(SuperMapAlgoPlot.Primitives.getArcCircleSpatialData(t[0],e,o,i))).push(t[1]),0!==n.length&&this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,n)}}}])&&Wi(e.prototype,o),i&&Wi(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function Ki(t){"@babel/helpers - typeof";return(Ki="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})(t)}function Qi(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 n=SuperMapAlgoPlot.ArrowToolkit.generateArrowBodyShapePts(t,this.scaleValues,SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_PARALLEL),l=n.arrowTouLen,a=n.leftBodyPts,s=n.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,l,SuperMapAlgoPlot.ArrowToolkit.ArrowHeadType.ARROWHEAD_WITHOUT_EAR),h=[];if(i){for(var c=[],y=[],g=[],f=0;f=0;M--)h.push(g[M]);var v=new SuperMapAlgoPlot.Point((r[0].x+r[1].x)/2,(r[0].y+r[1].y)/2),A=new SuperMapAlgoPlot.Point(v.x,v.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),C=new SuperMapAlgoPlot.Point(E.x,E.y);C.isScalePoint=!0,C.tag=0,this.addScalePoint(C);var I=new SuperMapAlgoPlot.Point(a[a.length-1].x,a[a.length-1].y);I.isScalePoint=!0,I.tag=1,this.addScalePoint(I);var R=new SuperMapAlgoPlot.Point(p[0].x,p[0].y);R.isScalePoint=!0,R.tag=2,this.addScalePoint(R)}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),n=new SuperMapAlgoPlot.Point(this.scalePoints[2].x,this.scalePoints[2].y),l=this.scaleValues[0],a=SuperMapAlgoPlot.PlottingUtil.polylineDistance(this.controlPoints),s=a*l;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,n).projectPoint,c=SuperMapAlgoPlot.PlottingUtil.distance(h,o);this.scaleValues[1]=c/s}else if(2==t){var y=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,this.controlPoints[1],n).projectPoint,g=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(y,o,this.controlPoints[1]),f=g.projectPoint,P=SuperMapAlgoPlot.PlottingUtil.distance(f,o);!0===g.inOnline?this.scaleValues[4]=-P/s:this.scaleValues[4]=P/s}}this.calculateParts()}}])&&Qi(e.prototype,o),i&&Qi(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function nn(t){"@babel/helpers - typeof";return(nn="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})(t)}function ln(t,e){for(var o=0;o=2&&t.length2*i-1){for(var s=0;sf[M].length)){for(var v=c[M][c[M].length-1],A=y[M][0],T=new SuperMapAlgoPlot.Point(.5*(v.x+A.x),.5*(v.y+A.y)),_=f[M][f[M].length-1],O=f[M][f[M].length-2],x=this.ComputeZValue(T,_,O),w={x:T.x,y:T.y,z:x},E=[],C=[],I=0;I=0;U--)if(M==i-1)D.push(f[M][U]);else{var N={x:f[M][U].x,y:f[M][U].y,z:.5*(f[M][U].z+f[M+1][U].z)};D.push(N)}this.ComputeBeizerZValueByDis(D,y[M],E),b.push(E),E=[];for(var B=g[M],k=0;k0&&this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,V,{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 Y=0;Ythis.MAX_SCALEVALUE?l=this.MAX_SCALEVALUE:l3)for(var a=i-1,s=0,r=a;s3)for(var l=i-1,a=0,s=l;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 n=1,l=this.MIN_PTCOUNT_PERARROW;nb&&(m=.5*b);var L=m*c;f.push(f[p].clone());var M,v=0;M=P-m;var A=[],T=0;for(T=2;T<=p;T++)v+=SuperMapAlgoPlot.PlottingUtil.distance(f[T-1],f[T-2]),SuperMapAlgoPlot.PlottingUtil.equalFuzzy(M,0,1e-14)?A[T]=0:SuperMapAlgoPlot.PlottingUtil.equalFuzzy(M-v,0,1e-14)?A[T]=L:A[T]=L+(d-L)*Math.pow((M-v)/M,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]);l[T]=w.pntLeft,n[T]=w.pntRight}var E,C,I=_.clone();if(SuperMapAlgoPlot.PlottingUtil.distance(f[p],I)>0){var R=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(m,f[p],_);f[p]=R.clone()}for(S=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(L,f[p+1],f[p]),n[p+1]=S.pntLeft,l[p+1]=S.pntRight,T=2;T<=p;T++)SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(this.AB_CTRLPT_RATE2,this.AB_CTRLPT_RATE2,n[T-1],n[T],n[T+1],O,x),a[T]=O.clone(),s[T]=x.clone(),SuperMapAlgoPlot.PlottingUtil.getTrianglePoints(this.AB_CTRLPT_RATE2,this.AB_CTRLPT_RATE2,l[T-1],l[T],l[T+1],O,x),r[T]=O.clone(),u[T]=x.clone();SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(this.AB_CTRLPT_RATE3,n[1],n[2],a[2],_),s[1]=_.clone(),SuperMapAlgoPlot.PlottingUtil.getTrapezoidPoints(this.AB_CTRLPT_RATE3,l[1],l[2],r[2],_),u[1]=_.clone();C=SuperMapAlgoPlot.PlottingUtil.distance(n[p+1],n[p])*(1/3),(E=SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale(C,f[p],f[p+1])).x+=n[p+1].x-f[p].x,E.y+=n[p+1].y-f[p].y,C=(d-L)*Math.pow(C/M,this.SV_ATScaleParameter+.3),S=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(C,n[p+1],E),a[p+1]=S.pntLeft.clone(),C=SuperMapAlgoPlot.PlottingUtil.distance(l[p+1],l[p])*(1/3),(E=SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale(C,f[p],f[p+1])).x+=l[p+1].x-f[p].x,E.y+=l[p+1].y-f[p].y,C=(d-L)*Math.pow(C/M,this.SV_ATScaleParameter+.3),S=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(C,l[p+1],E),r[p+1]=S.pntRight.clone();var D=[],U=m*g,N=SuperMapAlgoPlot.PlottingUtil.getExcentrePointOnSegmentByScale(U,f[p],f[p+1]);this.m_scalePoints.push(N.clone()),U=m*y,S=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(U,f[p+1],N),D.push(S.pntRight),D.push(f[p+1]),D.push(S.pntLeft);var B=[];for(B.push(n[p+1]),T=p;T>=1;T--)B.push(a[T+1]),B.push(s[T]),B.push(n[T]);var k=[];for(T=1;T<=p;T++)k.push(l[T]),k.push(u[T]),k.push(r[T+1]);k.push(l[p+1]),i.push.apply(i,k),i.push.apply(i,D),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,n){var l=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(l,a),u=SuperMapAlgoPlot.PlottingUtil.distance(s,a),p=n*(r+u),h=new SuperMapAlgoPlot.Point(0,0),c=new SuperMapAlgoPlot.Point(0,0),y=new SuperMapAlgoPlot.Point(0,0);if(p>r){p=r+u-p,h=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(p,s,a);var g=SuperMapAlgoPlot.PlottingUtil.distance(t[1],t[0]),f=SuperMapAlgoPlot.PlottingUtil.distance(o[1],o[0]);g=g*p/u,c=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(g,t[0],t[1]),f=f*p/u,y=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(f,o[0],o[1])}else{h=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(p,l,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,y=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,y),b=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(S,h,c),L=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(m,h,y),M=e[11].clone(),v=e[10].clone(),A=i[5].clone(),T=i[6].clone(),_=SuperMapAlgoPlot.PlottingUtil.intersectLines(v,M,h,c),O=SuperMapAlgoPlot.PlottingUtil.distance(_.intersectPoint,v),x=SuperMapAlgoPlot.PlottingUtil.distance(v,h);O=O>x?this.SV_AJCtrl*x:this.SV_AJCtrl*O;var w=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(O,v,M);M=w.clone(),e[11]=w.clone(),_=SuperMapAlgoPlot.PlottingUtil.intersectLines(T,A,h,y),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(v),E.push(M),E.push(b),E.push(h);var C=[];return C.push(h),C.push(L),C.push(A),C.push(T),{arrowLeftYaoPts:E,arrowRightYaoPts:C}}}])&&ln(e.prototype,o),i&&ln(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function pn(t){"@babel/helpers - typeof";return(pn="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})(t)}function hn(t,e){for(var o=0;o=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 n=SuperMapAlgoPlot.ArrowToolkit.generateArrowBodyShapePts(t,this.scaleValues,SuperMapAlgoPlot.ArrowToolkit.ArrowBodyType.ARROWBODY_TRAPEZOID),l=n.arrowTouLen,a=n.leftBodyPts,s=n.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,l,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 y=[],g={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.length=2;b--)c.push(o[b]);c.push({x:y.x,y:y.y,z:d});var L=[];this.ComputeBeizerZValueByDis(c,a,L);for(var M=[],v=0;v0&&L.length>0&&M.length>0){u=(u=(u=(u=[]).concat(m)).concat(M)).concat(L),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,u,{surroundLineFlag:!1});for(var T=[],_=0;_=0;f--)e.push(u[f]),i.push(u[f])}return{shapePts:e,leftBodyPts:o,rightBodyPts:i,arrowHeadPts:n}}},{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 n=this.operateCtrlPts(t);e=n.length,e--;for(var l=[],a=0;a0&&S>0){var b=1/(f-g[2].x),L=-1/(P-g[2].y),M=1*g[2].y/(P-g[2].y)-1*g[2].x/(f-g[2].x);m=Math.abs(b*g[0].x+L*g[0].y+M)/Math.sqrt(b*b+L*L)}else S<=1e-4?m=Math.abs(P-g[1].y):d<=1e-4&&(m=Math.abs(f-g[1].x));var v=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(m,g[2],new SuperMapAlgoPlot.Point(f,P)),A=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(g[1],g[2],g[0]);A?(a[1]=g[1],s[1]=g[0]):(a[1]=g[0],s[1]=g[1]),g[1]=new SuperMapAlgoPlot.Point((g[0].x+g[1].x)/2,(g[0].y+g[1].y)/2);var T=Math.sqrt((v.pntLeft.x-v.pntRight.x)*(v.pntLeft.x-v.pntRight.x)+(v.pntLeft.y-v.pntRight.y)*(v.pntLeft.y-v.pntRight.y))*this.sv_AtWidthDivAwWidth,_=(i=T*this.sv_AtLenDivAtWidth)*l;SuperMapAlgoPlot.PlottingUtil.equalFuzzy(n,0)||(_=(i=t*n)*l);var O,x,w=SuperMapAlgoPlot.PlottingUtil.distance(g[c],g[c-1]),E=2*i;w0&&(g[c]=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(i,g[c],U)),R=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(_,g[c+1],g[c]),(A=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(g[c],g[c+1],R.pntLeft))?(s[c]=new SuperMapAlgoPlot.Point(R.pntLeft.x,R.pntLeft.y),a[c]=new SuperMapAlgoPlot.Point(R.pntRight.x,R.pntRight.y)):(s[c]=new SuperMapAlgoPlot.Point(R.pntRight.x,R.pntRight.y),a[c]=new SuperMapAlgoPlot.Point(R.pntLeft.x,R.pntLeft.y)),C=2;C2)for(var n=0;n0&&this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,u,{surroundLineLimit:!0,lineTypeLimit:!0})}}}])&&vn(e.prototype,o),i&&vn(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function xn(t){"@babel/helpers - typeof";return(xn="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})(t)}function wn(t,e){for(var o=0;o=2&&t.length0&&this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,y,{surroundLineFlag:!1}),this.m_scalePoints.length>0&&(this.m_scalePoints[0]={x:this.m_scalePoints[0].x,y:this.m_scalePoints[0].y,z:M});for(var E=0;E0&&(this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,C,{surroundLineFlag:!1,lineWidthLimit:!0,strokeWidth:0,weight:0}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,C,{surroundLineFlag:!1})),this.scalePoints=[];for(var I=0;Ithis.SV1_MaxValue&&(o=this.SV1_MaxValue)}else o=SuperMapAlgoPlot.PlottingUtil.distance(s.projectPoint,l)0&&this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,r,{surroundLineFlag:!1,fillLimit:!0,fillColorLimit:!1,fill:!0,surroundLineLimit:!0,lineTypeLimit:!0})}else{this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,i);l.length>0&&this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,l,{surroundLineFlag:!1,fillLimit:!0,fillColorLimit:!1,fill:!0,lineTypeLimit:!0,surroundLineLimit:!0})}}}}])&&Un(e.prototype,o),i&&Un(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function Vn(t){"@babel/helpers - typeof";return(Vn="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})(t)}function jn(t,e){for(var o=0;o0&&this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,l,{surroundLineFlag:!1,fillLimit:!0,fill:!0,lineTypeLimit:!0,surroundLineLimit:!0})}}}])&&jn(e.prototype,o),i&&jn(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function Xn(t){"@babel/helpers - typeof";return(Xn="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})(t)}function Hn(t,e){for(var o=0;o=2&&t.length=0;b--)e.push(h[b]),i.push(h[b]);for(var L=1;L=0;f--)e.push(u[f]),i.push(u[f])}return{shapePts:e,leftBodyPts:o,rightBodyPts:i,arrowHeadPts:n}}},{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 n=this.operateCtrlPts(t);e=n.length,e--;for(var l=[],a=0;a0&&S>0){var b=1/(f-g[2].x),L=-1/(P-g[2].y),M=1*g[2].y/(P-g[2].y)-1*g[2].x/(f-g[2].x);m=Math.abs(b*g[0].x+L*g[0].y+M)/Math.sqrt(b*b+L*L)}else S<=1e-4?m=Math.abs(P-g[1].y):d<=1e-4&&(m=Math.abs(f-g[1].x));var v=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(m,g[2],new SuperMapAlgoPlot.Point(f,P)),A=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(g[1],g[2],g[0]);A?(a[1]=g[1],s[1]=g[0]):(a[1]=g[0],s[1]=g[1]),g[1]=new SuperMapAlgoPlot.Point((g[0].x+g[1].x)/2,(g[0].y+g[1].y)/2);var T=Math.sqrt((v.pntLeft.x-v.pntRight.x)*(v.pntLeft.x-v.pntRight.x)+(v.pntLeft.y-v.pntRight.y)*(v.pntLeft.y-v.pntRight.y))*this.sv_AtWidthDivAwWidth,_=(i=T*this.sv_AtLenDivAtWidth)*l;SuperMapAlgoPlot.PlottingUtil.equalFuzzy(n,0)||(_=(i=t*n)*l);var O,x,w=SuperMapAlgoPlot.PlottingUtil.distance(g[c],g[c-1]),E=2*i;w0&&(g[c]=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(i,g[c],U)),R=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(_,g[c+1],g[c]),(A=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(g[c],g[c+1],R.pntLeft))?(s[c]=new SuperMapAlgoPlot.Point(R.pntLeft.x,R.pntLeft.y),a[c]=new SuperMapAlgoPlot.Point(R.pntRight.x,R.pntRight.y)):(s[c]=new SuperMapAlgoPlot.Point(R.pntRight.x,R.pntRight.y),a[c]=new SuperMapAlgoPlot.Point(R.pntLeft.x,R.pntLeft.y)),C=2;C1)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)}}}])&&Ul(e.prototype,o),i&&Ul(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function Vl(t){"@babel/helpers - typeof";return(Vl="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})(t)}function jl(t,e){for(var o=0;o=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,n=o.leftBodyPts,l=o.rightBodyPts,a=[];a.push(n[n.length-1]),a.push(l[l.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(n)).concat(r);for(var p=l.length-1;p>=0;p--)u.push(l[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(n),c=[],y=l.length-1;y>=0;y--)c.push(l[y]);c=c.concat(h),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,c);var g=SuperMapAlgoPlot.PlottingUtil.clonePoints(r);g.push(l[l.length-1]),g.splice(0,0,n[n.length-1]),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,g,{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(n[n.length-1].x,n[n.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),n=new SuperMapAlgoPlot.Point(this.scalePoints[2].x,this.scalePoints[2].y),l=this.scaleValues[0],a=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);a=SuperMapAlgoPlot.PlottingUtil.clearSamePts(a);var s=SuperMapAlgoPlot.PlottingUtil.polylineDistance(a),r=s*l;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,n).projectPoint,y=SuperMapAlgoPlot.PlottingUtil.distance(c,o);this.scaleValues[1]=y/r}else if(2==t){var g=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(e,a[1],n).projectPoint,f=SuperMapAlgoPlot.PlottingUtil.pointProjectToSegment(g,o,a[1]),P=f.projectPoint,d=SuperMapAlgoPlot.PlottingUtil.distance(P,o);!1===f.isOnline&&(this.scaleValues[4]=d/r)}}this.calculateParts()}}])&&jl(e.prototype,o),i&&jl(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function Xl(t){"@babel/helpers - typeof";return(Xl="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})(t)}function Hl(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:n}}},{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 n=this.operateCtrlPts(t);e=n.length,e--;for(var l=[],a=0;a0&&S>0){var b=1/(f-g[2].x),L=-1/(P-g[2].y),M=1*g[2].y/(P-g[2].y)-1*g[2].x/(f-g[2].x);m=Math.abs(b*g[0].x+L*g[0].y+M)/Math.sqrt(b*b+L*L)}else S<=1e-4?m=Math.abs(P-g[1].y):d<=1e-4&&(m=Math.abs(f-g[1].x));var v=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(m,g[2],new SuperMapAlgoPlot.Point(f,P)),A=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(g[1],g[2],g[0]);A?(a[1]=g[1],s[1]=g[0]):(a[1]=g[0],s[1]=g[1]),g[1]=new SuperMapAlgoPlot.Point((g[0].x+g[1].x)/2,(g[0].y+g[1].y)/2);var T=Math.sqrt((v.pntLeft.x-v.pntRight.x)*(v.pntLeft.x-v.pntRight.x)+(v.pntLeft.y-v.pntRight.y)*(v.pntLeft.y-v.pntRight.y))*this.sv_AtWidthDivAwWidth,_=(i=T*this.sv_AtLenDivAtWidth)*l;SuperMapAlgoPlot.PlottingUtil.equalFuzzy(n,0)||(_=(i=t*n)*l);var O,x,w=SuperMapAlgoPlot.PlottingUtil.distance(g[c],g[c-1]),E=2*i;w0&&(g[c]=SuperMapAlgoPlot.PlottingUtil.getIncentrePointOnSegmentByScale(i,g[c],U)),R=SuperMapAlgoPlot.PlottingUtil.getSidePointsOfLine(_,g[c+1],g[c]),(A=SuperMapAlgoPlot.PlottingUtil.pointIsRightToLine(g[c],g[c+1],R.pntLeft))?(s[c]=new SuperMapAlgoPlot.Point(R.pntLeft.x,R.pntLeft.y),a[c]=new SuperMapAlgoPlot.Point(R.pntRight.x,R.pntRight.y)):(s[c]=new SuperMapAlgoPlot.Point(R.pntRight.x,R.pntRight.y),a[c]=new SuperMapAlgoPlot.Point(R.pntLeft.x,R.pntLeft.y)),C=2;C=0;--M)L.push(S[M]);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 v=S[0].clone();v.isScalePoint=!0,v.tag=0,this.scalePoints.push(v);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.scalePoints=SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(this.scalePoints),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),o=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(o).pts;var i=SuperMapAlgoPlot.PlottingUtil.distance(o[0],o[1]),n=o[0].clone(),l=o[1].clone(),a=e.clone();if(0==t){var s=SuperMapAlgoPlot.PlottingUtil.distance(a,n)/i;this.scaleValues[0]=s}else if(1==t){var r=SuperMapAlgoPlot.PlottingUtil.projectPoint(a,n,l),u=SuperMapAlgoPlot.PlottingUtil.distance(r,a)/i;this.scaleValues[1]=u;var p=SuperMapAlgoPlot.PlottingUtil.distance(r,l)/i;this.scaleValues[3]=p}else if(2==t){var h=SuperMapAlgoPlot.PlottingUtil.projectPoint(a,n,l),c=SuperMapAlgoPlot.PlottingUtil.distance(h,a)/i;this.scaleValues[2]=c;var y=SuperMapAlgoPlot.PlottingUtil.distance(h,l)/i;this.scaleValues[4]=y}}this.calculateParts()}}])&&$l(e.prototype,o),i&&$l(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function na(t){"@babel/helpers - typeof";return(na="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})(t)}function la(t,e){for(var o=0;o=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 C=A[3].clone();C.isScalePoint=!0,C.tag=1,this.scalePoints.push(C);var I=A[4].clone();I.isScalePoint=!0,I.tag=2,this.scalePoints.push(I),this.scalePoints=SuperMapAlgoPlot.ArrowToolkit.afterPtsCrossZone(this.scalePoints),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),o=SuperMapAlgoPlot.ArrowToolkit.beforePtsCrossZone(o).pts;var i=SuperMapAlgoPlot.PlottingUtil.distance(o[0],o[1]),n=o[0].clone(),l=o[1].clone(),a=e.clone();if(0==t){var s=SuperMapAlgoPlot.PlottingUtil.distance(a,n)/i;this.scaleValues[0]=s}else if(1==t){var r=SuperMapAlgoPlot.PlottingUtil.projectPoint(a,n,l),u=SuperMapAlgoPlot.PlottingUtil.distance(r,a)/i;this.scaleValues[1]=u;var p=SuperMapAlgoPlot.PlottingUtil.distance(r,l)/i;this.scaleValues[3]=p}else if(2==t){var h=SuperMapAlgoPlot.PlottingUtil.projectPoint(a,n,l),c=SuperMapAlgoPlot.PlottingUtil.distance(h,a)/i;this.scaleValues[2]=c;var y=SuperMapAlgoPlot.PlottingUtil.distance(h,l)/i;this.scaleValues[4]=y}}this.calculateParts()}}])&&la(e.prototype,o),i&&la(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function pa(t){"@babel/helpers - typeof";return(pa="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})(t)}function ha(t,e){for(var o=0;o=2&&t.length0&&(this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,o.shapePts,{strokeWidth:0,weight:0,lineWidthLimit:!0}),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,l),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,y),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,l)=2&&t.length.7&&(L=.7),this.scaleValues[2]=L}}}}])&&Ea(e.prototype,o),i&&Ea(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function Ua(t){"@babel/helpers - typeof";return(Ua="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})(t)}function Na(t,e){for(var o=0;ot[n].x&&(o=t[n].x),i0&&(u=!0),d=[];for(var v=new SuperMapAlgoPlot.Point(h,a.y),A=SuperMapAlgoPlot.PlottingUtil.circlePoint(v,5,5,45),T=0;T0&&(u=!0),p-=r,h+=r}this.finish()}}},{key:"sortPts2D",value:function(t){for(var e=new SuperMapAlgoPlot.Point(0,0),o=0;ot[i+1].y&&(e=t[i],t[i]=t[i+1],t[i+1]=e):t[i].x>t[i+1].x&&(e=t[i],t[i]=t[i+1],t[i+1]=e);return t}}])&&Na(e.prototype,o),i&&Na(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function ja(t){"@babel/helpers - typeof";return(ja="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})(t)}function Ya(t,e){for(var o=0;o.3&&(d=.3),this.scaleValues[1]=d}}}}])&&ts(e.prototype,o),i&&ts(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function ls(t){"@babel/helpers - typeof";return(ls="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})(t)}function as(t,e){for(var o=0;o.3||i<=0)&&(i=.3),this.scaleValues[0]=i,this.scaleValues[1]=.5*this.getSubSymbolScaleValue()}var n=this.getLinePts(e,this.scaleValues[0]),l=new SuperMapAlgoPlot.Point((n.startPt.x+n.endPt.x)/2,(n.startPt.y+n.endPt.y)/2),a=SuperMapAlgoPlot.PlottingUtil.radian(n.startPt,n.endPt)*SuperMapAlgoPlot.PlottingUtil.RTOD,s=SuperMapAlgoPlot.PlottingUtil.distance(n.startPt,n.endPt);this.addSubSymbols(l,s,a);for(var r=[],u=[],p=0;p<=n.startIndex;p++)r.push(e[p]);if(r.push(n.startPt),this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,r),n.endIndex<=e.length){u.push(n.endPt);for(var h=n.endIndex+1;h<=e.length-1;h++)u.push(e[h]);this.addArrow(u,this.scaleValues[1])}var c=o*this.scaleValues[0]*.5,y=SuperMapAlgoPlot.PlottingUtil.circlePoint(l,c,c,a+90);this.addScalePoint(y,0),this.finish()}}},{key:"addSubSymbols",value:function(t,e,o){this.subSymbols.length>0&&this.computeSubSymbol(this.subSymbols[0],t,e,o-180)}},{key:"computeScaleValues",value:function(t,e){if(0===t&&!0===e.isScalePoint){var o=SuperMapAlgoPlot.PlottingUtil.clonePoints(this.controlPoints);if((o=SuperMapAlgoPlot.PlottingUtil.clearSamePts(o)).length2&&this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,c)}y.push(l.endPt);for(var P=l.endIndex+1;P=t.length?SuperMapAlgoPlot.Primitives.getSpatialData(SuperMapAlgoPlot.SymbolType.KIDNEY,t):SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(t,!0),o=SuperMapAlgoPlot.PlottingUtil.clearSamePts(o),this.addCell(SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL,o);for(var i=0;i<4;i++){var n=Math.floor(i*o.length/4),l=new SuperMapAlgoPlot.Point(o[n].x,o[n].y),a=new SuperMapAlgoPlot.Point(o[n+1].x,o[n+1].y),s=new SuperMapAlgoPlot.Point((l.x+a.x)/2,(l.y+a.y)/2),r=SuperMapAlgoPlot.PlottingUtil.radian(a,s)*SuperMapAlgoPlot.PlottingUtil.RTOD,u=this.scaleValues[0]*e/2,p=SuperMapAlgoPlot.PlottingUtil.circlePoint(s,u,u,r),h=SuperMapAlgoPlot.PlottingUtil.circlePoint(s,4*u,4*u,r+270),c=SuperMapAlgoPlot.PlottingUtil.circlePoint(s,u,u,r+180);this.addCell(SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL,[p,h,c])}this.finish()}}}])&&Ns(e.prototype,o),i&&Ns(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();function js(t){"@babel/helpers - typeof";return(js="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})(t)}function Ys(t,e){for(var o=0;o=t.length?SuperMapAlgoPlot.Primitives.getSpatialData(SuperMapAlgoPlot.SymbolType.KIDNEY,t):SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(t,!0),e=SuperMapAlgoPlot.PlottingUtil.clearSamePts(e);var o=20*this.getSubSymbolScaleValue(),i=.1*this.getSubSymbolScaleValue(),n=SuperMapAlgoPlot.PlottingUtil.polylineDistance(e);o>.05*n?i=.01*(o=.05*n):o<.005*n&&(o=.005*n);for(var l=SuperMapAlgoPlot.PlottingUtil.makeDottedLine(e,o),a=0;a0){var s=l[a-1][l[a-1].length-1],r=l[a][0],u=SuperMapAlgoPlot.PlottingUtil.midPoint(s,r);this.addCell(SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL,[u,new SuperMapAlgoPlot.Point(u.x+i,u.y)],{lineTypeLimit:!0,surroundLineLimit:!0,fillLimit:!0,fillColorLimit:!1,fill:!0})}this.finish()}}}])&&Ys(e.prototype,o),i&&Ys(e,i),Object.defineProperty(e,"prototype",{writable:!1}),l}();SuperMapAlgoPlot.AlgoSymbol329=Xs;SuperMapAlgoPlot.BasicAlgoSymbolFactory=SuperMapAlgoPlot.BasicAlgoSymbolFactory||{};SuperMapAlgoPlot.BasicAlgoSymbolFactory.getAlgoSymbol=function(t,e,o){if(0===t)switch(e){case SuperMapAlgoPlot.SymbolType.ANNOFRAMESYMBOL:return new SuperMapAlgoPlot.GeoTooltipBox(o);case SuperMapAlgoPlot.SymbolType.ANNOFRAMESYMBOLM:return new SuperMapAlgoPlot.GeoTooltipBoxM(o);case SuperMapAlgoPlot.SymbolType.PATHTEXT:return new SuperMapAlgoPlot.PathText(o);case SuperMapAlgoPlot.SymbolType.ARROWLINE:return new SuperMapAlgoPlot.ArrowLine(o);case SuperMapAlgoPlot.SymbolType.CURVEEIGHT:return new SuperMapAlgoPlot.CurveEight(o);case SuperMapAlgoPlot.SymbolType.RUNWAY:return new SuperMapAlgoPlot.Runway(o);case SuperMapAlgoPlot.SymbolType.CONCENTRICCIRCLE:return new SuperMapAlgoPlot.ConcentricCircle(o);case SuperMapAlgoPlot.SymbolType.COMBINATIONALCIRCLE:return new SuperMapAlgoPlot.CombinationalCircle(o);case SuperMapAlgoPlot.SymbolType.FREECURVE:return new SuperMapAlgoPlot.FreeCurve(o);case SuperMapAlgoPlot.SymbolType.REGULARPOLYGON:return new SuperMapAlgoPlot.RegularPolygon(o);case SuperMapAlgoPlot.SymbolType.BRACESYMBOL:return new SuperMapAlgoPlot.Brace(o);case SuperMapAlgoPlot.SymbolType.TRAPEZOIDSYMBOL:return new SuperMapAlgoPlot.Trapezoid(o);case SuperMapAlgoPlot.SymbolType.SYMBOLTEXTBOX:return new SuperMapAlgoPlot.SymbolTextBox(o);case SuperMapAlgoPlot.SymbolType.NODECHAIN:return new SuperMapAlgoPlot.NodeChain(o);case SuperMapAlgoPlot.SymbolType.LINERELATION:return new SuperMapAlgoPlot.LineRelation(o);case SuperMapAlgoPlot.SymbolType.LINEMARKING:return new SuperMapAlgoPlot.LineMarking(o);case SuperMapAlgoPlot.SymbolType.POLYGONREGION:return new SuperMapAlgoPlot.PolygonRegion(o);case SuperMapAlgoPlot.SymbolType.WIRE:return new SuperMapAlgoPlot.Wire(o);case SuperMapAlgoPlot.SymbolType.LINEARARROW:return new SuperMapAlgoPlot.LinearArrow(o);case SuperMapAlgoPlot.SymbolType.POLYBEZIERSYMBOL:return new SuperMapAlgoPlot.Polybezier(o);case SuperMapAlgoPlot.SymbolType.NEWPIESYMBOL:return new SuperMapAlgoPlot.NewPie(o);case SuperMapAlgoPlot.SymbolType.NEWARCSYMBOL:return new SuperMapAlgoPlot.NewArc(o);case SuperMapAlgoPlot.SymbolType.NEWCHORDSYMBOL:return new SuperMapAlgoPlot.NewChord(o);default:return new SuperMapAlgoPlot.AlgoSymbol(o)}else if(22===t)switch(e){case 1001:return new SuperMapAlgoPlot.AlgoSymbol1001(o);case 1002:return new SuperMapAlgoPlot.AlgoSymbol1002(o);case 1003:return new SuperMapAlgoPlot.AlgoSymbol1003(o);case 1004:return new SuperMapAlgoPlot.AlgoSymbol1004(o);case 1005:return new SuperMapAlgoPlot.AlgoSymbol1005(o);case 1006:return new SuperMapAlgoPlot.AlgoSymbol1006(o);case 1007:return new SuperMapAlgoPlot.AlgoSymbol1007(o);case 1008:return new SuperMapAlgoPlot.AlgoSymbol1008(o);case 1009:return new SuperMapAlgoPlot.AlgoSymbol1009(o);case 1010:return new SuperMapAlgoPlot.AlgoSymbol1010(o);case 1011:return new SuperMapAlgoPlot.AlgoSymbol1011(o);case 1012:return new SuperMapAlgoPlot.AlgoSymbol1012(o);case 1013:return new SuperMapAlgoPlot.AlgoSymbol1013(o);case 1014:return new SuperMapAlgoPlot.AlgoSymbol1014(o);case 1015:return new SuperMapAlgoPlot.AlgoSymbol1015(o);case 1016:return new SuperMapAlgoPlot.AlgoSymbol1016(o);case 1017:return new SuperMapAlgoPlot.AlgoSymbol1017(o);case 1018:return new SuperMapAlgoPlot.AlgoSymbol1018(o);case 1019:return new SuperMapAlgoPlot.AlgoSymbol1019(o);case 1020:return new SuperMapAlgoPlot.AlgoSymbol1020(o);case 1021:return new SuperMapAlgoPlot.AlgoSymbol1021(o);case 1022:return new SuperMapAlgoPlot.AlgoSymbol1022(o);default:return null}else{if(421!==t)return null;switch(e){case 311:return new SuperMapAlgoPlot.AlgoSymbol1004(o);case 315:return new SuperMapAlgoPlot.AlgoSymbol315(o);case 317:return new SuperMapAlgoPlot.AlgoSymbol1006(o);case 318:return new SuperMapAlgoPlot.AlgoSymbol1002(o);case 319:return new SuperMapAlgoPlot.AlgoSymbol15200(o);case 320:return new SuperMapAlgoPlot.AlgoSymbol320(o);case 321:return new SuperMapAlgoPlot.AlgoSymbol321(o);case 322:return new SuperMapAlgoPlot.AlgoSymbol322(o);case 323:return new SuperMapAlgoPlot.AlgoSymbol25701(o);case 324:return new SuperMapAlgoPlot.AlgoSymbol3010106(o);case 325:return new SuperMapAlgoPlot.AlgoSymbol15200(o);case 326:return new SuperMapAlgoPlot.AlgoSymbol326(o);case 327:return new SuperMapAlgoPlot.AlgoSymbol327(o);case 328:return new SuperMapAlgoPlot.AlgoSymbol328(o);case 329:return new SuperMapAlgoPlot.AlgoSymbol329(o);case 330:return new SuperMapAlgoPlot.AlgoSymbol330(o);case 331:return new SuperMapAlgoPlot.AlgoSymbol29101(o);default:return null}}},SuperMapAlgoPlot.BasicAlgoSymbolFactory.getSymbolWayType=function(t,e){if(0===t)switch(e){case SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL:case SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL:return SuperMapAlgoPlot.AddPoint_WayType.POLYLINE;case SuperMapAlgoPlot.SymbolType.POLYBEZIERSYMBOL:case SuperMapAlgoPlot.SymbolType.POLYBEZIERCLOSESYMBOL:return SuperMapAlgoPlot.AddPoint_WayType.CURVE;default:return SuperMapAlgoPlot.AddPoint_WayType.UNKNOWN}else if(22===t)switch(e){case 1005:case 1008:case 1012:case 1014:return SuperMapAlgoPlot.AddPoint_WayType.CURVE;case 1007:case 1009:case 1013:case 1015:case 1017:return SuperMapAlgoPlot.AddPoint_WayType.POLYLINE;default:return SuperMapAlgoPlot.AddPoint_WayType.UNKNOWN}},SuperMapAlgoPlot.BasicAlgoSymbolFactory.isAccessServer=function(t,e){if(0===t||22===t)return!1;if(421!==t)return!0;switch(e){case 311:case 317:case 318:case 315:case 319:case 320:case 321:case 322:case 323:case 324:case 325:case 326:case 327:case 328:case 329:case 330:case 331:return!1;default:return!0}},SuperMapAlgoPlot.BasicAlgoSymbolFactory.getDefaultSubSymbols=function(){return[]},SuperMapAlgoPlot.BasicAlgoSymbolFactory.getMinEditPts=function(t,e){if(0===t)switch(e){case SuperMapAlgoPlot.SymbolType.TEXTSYMBOL:case SuperMapAlgoPlot.SymbolType.COMBINATIONALCIRCLE:return 1;case SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL:case SuperMapAlgoPlot.SymbolType.RECTANGLESYMBOL:case SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL:case SuperMapAlgoPlot.SymbolType.POLYBEZIERSYMBOL:case SuperMapAlgoPlot.SymbolType.KIDNEY:case SuperMapAlgoPlot.SymbolType.ARROWLINE:case SuperMapAlgoPlot.SymbolType.BRACESYMBOL:case SuperMapAlgoPlot.SymbolType.CURVEEIGHT:case SuperMapAlgoPlot.SymbolType.FREECURVE:case SuperMapAlgoPlot.SymbolType.LINEMARKING:case SuperMapAlgoPlot.SymbolType.LINERELATION:case SuperMapAlgoPlot.SymbolType.NODECHAIN:case SuperMapAlgoPlot.SymbolType.PATHTEXT:case SuperMapAlgoPlot.SymbolType.REGULARPOLYGON:case SuperMapAlgoPlot.SymbolType.RUNWAY:case SuperMapAlgoPlot.SymbolType.SYMBOLTEXTBOX:case SuperMapAlgoPlot.SymbolType.ANNOFRAMESYMBOLM:case SuperMapAlgoPlot.SymbolType.CONCENTRICCIRCLE:case SuperMapAlgoPlot.SymbolType.WIRE:case SuperMapAlgoPlot.SymbolType.LINEARARROW:return 2;case SuperMapAlgoPlot.SymbolType.ARCSYMBOL:case SuperMapAlgoPlot.SymbolType.CHORDSYMBOL:case SuperMapAlgoPlot.SymbolType.PIESYMBOL:case SuperMapAlgoPlot.SymbolType.ELLIPSESYMBOL:case SuperMapAlgoPlot.SymbolType.PARALLELOGRAM:case SuperMapAlgoPlot.SymbolType.PARALLELLINE:case SuperMapAlgoPlot.SymbolType.POLYBEZIERCLOSESYMBOL:case SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL:case SuperMapAlgoPlot.SymbolType.POLYGONREGION:case SuperMapAlgoPlot.SymbolType.TRAPEZOIDSYMBOL:case SuperMapAlgoPlot.SymbolType.ANNOFRAMESYMBOL:case SuperMapAlgoPlot.SymbolType.NEWARCSYMBOL:case SuperMapAlgoPlot.SymbolType.NEWPIESYMBOL:case SuperMapAlgoPlot.SymbolType.NEWCHORDSYMBOL:return 3}else if(22===t)switch(e){case 1001:case 1003:case 1005:case 1007:case 1008:case 1009:case 1011:case 1012:case 1013:case 1014:case 1015:case 1016:case 1017:case 1019:case 1020:case 1022:return 2;case 1002:case 1004:case 1006:case 1010:case 1018:case 1021:return 3}else if(421===t)switch(e){case 319:case 320:case 321:case 324:case 325:case 326:case 327:case 328:case 329:case 330:case 331:return 2;case 311:case 315:case 317:case 318:case 322:case 323:return 3}},SuperMapAlgoPlot.BasicAlgoSymbolFactory.getMaxEditPts=function(t,e){if(0===t)switch(e){case SuperMapAlgoPlot.SymbolType.TEXTSYMBOL:return 1;case SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL:case SuperMapAlgoPlot.SymbolType.RECTANGLESYMBOL:case SuperMapAlgoPlot.SymbolType.BRACESYMBOL:case SuperMapAlgoPlot.SymbolType.LINEMARKING:case SuperMapAlgoPlot.SymbolType.LINERELATION:case SuperMapAlgoPlot.SymbolType.RUNWAY:case SuperMapAlgoPlot.SymbolType.SYMBOLTEXTBOX:case SuperMapAlgoPlot.SymbolType.ANNOFRAMESYMBOLM:case SuperMapAlgoPlot.SymbolType.LINEARARROW:return 2;case SuperMapAlgoPlot.SymbolType.ARCSYMBOL:case SuperMapAlgoPlot.SymbolType.CHORDSYMBOL:case SuperMapAlgoPlot.SymbolType.PIESYMBOL:case SuperMapAlgoPlot.SymbolType.ELLIPSESYMBOL:case SuperMapAlgoPlot.SymbolType.PARALLELOGRAM:case SuperMapAlgoPlot.SymbolType.KIDNEY:case SuperMapAlgoPlot.SymbolType.CURVEEIGHT:case SuperMapAlgoPlot.SymbolType.ANNOFRAMESYMBOL:case SuperMapAlgoPlot.SymbolType.TRAPEZOIDSYMBOL:case SuperMapAlgoPlot.SymbolType.NEWARCSYMBOL:case SuperMapAlgoPlot.SymbolType.NEWPIESYMBOL:case SuperMapAlgoPlot.SymbolType.NEWCHORDSYMBOL:return 3;case SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL:case SuperMapAlgoPlot.SymbolType.POLYBEZIERSYMBOL:case SuperMapAlgoPlot.SymbolType.PARALLELLINE:case SuperMapAlgoPlot.SymbolType.POLYBEZIERCLOSESYMBOL:case SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL:case SuperMapAlgoPlot.SymbolType.ARROWLINE:case SuperMapAlgoPlot.SymbolType.COMBINATIONALCIRCLE:case SuperMapAlgoPlot.SymbolType.FREECURVE:case SuperMapAlgoPlot.SymbolType.NODECHAIN:case SuperMapAlgoPlot.SymbolType.PATHTEXT:case SuperMapAlgoPlot.SymbolType.POLYGONREGION:case SuperMapAlgoPlot.SymbolType.REGULARPOLYGON:case SuperMapAlgoPlot.SymbolType.WIRE:case SuperMapAlgoPlot.SymbolType.CONCENTRICCIRCLE:return 9999}else if(22===t)switch(e){case 1003:case 1019:case 1020:case 1022:return 2;case 1006:case 1021:return 4;case 1001:case 1002:case 1004:case 1005:case 1007:case 1008:case 1009:case 1010:case 1011:case 1012:case 1013:case 1014:case 1015:case 1016:case 1017:case 1018:return 99999}else if(421===t)switch(e){case 320:return 2;case 329:case 330:case 331:return 3;case 317:return 4;case 323:return 1e3;case 311:case 315:case 318:case 319:case 321:case 322:case 324:case 325:case 326:case 327:case 328:return 99999}},SuperMapAlgoPlot.BasicAlgoSymbolFactory.getDefaultStyle=function(t,e){var o={};if(421===t)switch(e){case 320:case 321:o.color=o.strokeColor="#000000";break;case 322:o.color=o.strokeColor="#bc744d"}return o},SuperMapAlgoPlot.BasicAlgoSymbolFactory.zoomInCalSymbol=function(){if(22!==libID)return!1;switch(code){case 1012:case 1013:case 1014:case 1015:return!0;default:return!1}},SuperMapAlgoPlot.BasicAlgoSymbolFactory.zoomCalSymbol=function(){return!1},SuperMapAlgoPlot.BasicAlgoSymbolFactory.getSymbolName=function(t,e){var o="";if(0===t)switch(e){case SuperMapAlgoPlot.SymbolType.TEXTSYMBOL:o="文本";break;case SuperMapAlgoPlot.SymbolType.CIRCLESYMBOL:o="圆";break;case SuperMapAlgoPlot.SymbolType.RECTANGLESYMBOL:o="矩形";break;case SuperMapAlgoPlot.SymbolType.ARCSYMBOL:o="弧线";break;case SuperMapAlgoPlot.SymbolType.CHORDSYMBOL:o="弓形";break;case SuperMapAlgoPlot.SymbolType.PIESYMBOL:o="扇形";break;case SuperMapAlgoPlot.SymbolType.ELLIPSESYMBOL:o="椭圆";break;case SuperMapAlgoPlot.SymbolType.PARALLELOGRAM:o="平行四边形";break;case SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL:o="多边形";break;case SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL:o="折线";break;case SuperMapAlgoPlot.SymbolType.POLYBEZIERSYMBOL:o="贝赛尔曲线";break;case SuperMapAlgoPlot.SymbolType.POLYBEZIERCLOSESYMBOL:o="闭合贝塞尔曲线";break;case SuperMapAlgoPlot.SymbolType.PARALLELLINE:o="平行线";break;case SuperMapAlgoPlot.SymbolType.KIDNEY:o="集结地";break;case SuperMapAlgoPlot.SymbolType.ANNOFRAMESYMBOL:o="注记指示框";break;case SuperMapAlgoPlot.SymbolType.ARROWLINE:o="箭头线";break;case SuperMapAlgoPlot.SymbolType.COMBINATIONALCIRCLE:o="组合圆";break;case SuperMapAlgoPlot.SymbolType.CONCENTRICCIRCLE:o="同心圆";break;case SuperMapAlgoPlot.SymbolType.CURVEEIGHT:o="八字形";break;case SuperMapAlgoPlot.SymbolType.FREECURVE:o="自由线";break;case SuperMapAlgoPlot.SymbolType.ANNOFRAMESYMBOLM:o="多角标注框";break;case SuperMapAlgoPlot.SymbolType.LINEMARKING:o="线型标注";break;case SuperMapAlgoPlot.SymbolType.LINERELATION:o="对象间连线";break;case SuperMapAlgoPlot.SymbolType.NODECHAIN:o="节点链";break;case SuperMapAlgoPlot.SymbolType.PATHTEXT:o="沿线注记";break;case SuperMapAlgoPlot.SymbolType.POLYGONREGION:o="多边形区域管理";break;case SuperMapAlgoPlot.SymbolType.RUNWAY:o="跑道线";break;case SuperMapAlgoPlot.SymbolType.SYMBOLTEXTBOX:o="标注框";break;case SuperMapAlgoPlot.SymbolType.REGULARPOLYGON:o="正多边形";break;case SuperMapAlgoPlot.SymbolType.BRACESYMBOL:o="大括号";break;case SuperMapAlgoPlot.SymbolType.TRAPEZOIDSYMBOL:o="梯形";break;case SuperMapAlgoPlot.SymbolType.WIRE:o="铁丝网";break;case SuperMapAlgoPlot.SymbolType.LINEARARROW:o="直线箭头";break;case SuperMapAlgoPlot.SymbolType.NEWPIESYMBOL:o="扇形";break;case SuperMapAlgoPlot.SymbolType.NEWARCSYMBOL:o="弧线";break;case SuperMapAlgoPlot.SymbolType.NEWCHORDSYMBOL:o="弓形"}return o};SuperMapAlgoPlot.AlgoSymbolFactory=SuperMapAlgoPlot.AlgoSymbolFactory||{};SuperMapAlgoPlot.AlgoSymbolFactory.getAlgoSymbol=function(t){var e=t.libID,o=t.code;return 0!==e&&22!==e&&421!==e||void 0===SuperMapAlgoPlot.BasicAlgoSymbolFactory?100===e&&void 0!==SuperMapAlgoPlot.JBAlgoSymbolFactory?SuperMapAlgoPlot.JBAlgoSymbolFactory.getAlgoSymbol(e,o,t):123===e&&void 0!==SuperMapAlgoPlot.WJAlgoSymbolFactory?SuperMapAlgoPlot.WJAlgoSymbolFactory.getAlgoSymbol(e,o,t):999===e&&void 0!==SuperMapAlgoPlot.YJAlgoSymbolFactory?SuperMapAlgoPlot.YJAlgoSymbolFactory.getAlgoSymbol(e,o,t):null:SuperMapAlgoPlot.BasicAlgoSymbolFactory.getAlgoSymbol(e,o,t)},SuperMapAlgoPlot.AlgoSymbolFactory.getSymbolWayType=function(t,e){if(0===t)switch(e){case SuperMapAlgoPlot.SymbolType.POLYLINESYMBOL:case SuperMapAlgoPlot.SymbolType.ARBITRARYPOLYGONSYMBOL:return SuperMapAlgoPlot.AddPoint_WayType.POLYLINE;case SuperMapAlgoPlot.SymbolType.POLYBEZIERSYMBOL:case SuperMapAlgoPlot.SymbolType.POLYBEZIERCLOSESYMBOL:return SuperMapAlgoPlot.AddPoint_WayType.CURVE;default:return SuperMapAlgoPlot.AddPoint_WayType.UNKNOWN}if(22===t)switch(e){case 1005:case 1008:case 1012:case 1014:return SuperMapAlgoPlot.AddPoint_WayType.CURVE;case 1007:case 1009:case 1013:case 1015:return SuperMapAlgoPlot.AddPoint_WayType.POLYLINE;default:return SuperMapAlgoPlot.AddPoint_WayType.UNKNOWN}if(100===t)switch(e){case 15200:case 15201:case 16203:case 17703:case 17704:case 21400:case 21401:case 21500:case 21501:case 21502:case 21503:case 21504:case 21600:case 21900:case 22e3:case 22103:case 23800:case 24700:case 25201:case 25400:case 25601:case 25801:case 25901:case 26500:case 26501:case 26502:case 26503:case 26600:case 28900:case 29e3:case 29003:case 29903:case 3e4:case 30001:case 30002:case 30100:case 30102:case 30200:case 30201:case 30800:case 31803:case 33400:case 34900:case 34901:case 34902:case 35e3:case 36400:case 44200:case 3010102:case 3010103:case 3010104:case 3010105:case 3010106:case 3010107:case 3010108:case 3010301:case 3010302:case 3010303:case 3010304:case 16500:case 17400:case 17401:case 17500:case 17501:case 23400:case 23500:case 23600:case 23700:case 27300:case 28200:case 28300:case 28400:case 37600:case 37601:case 37700:case 39e3:case 40100:case 40101:case 42400:case 2350001:case 3032e3:case 4010800:case 4010801:case 4011100:case 4011101:case 4022100:case 4022101:case 4022102:case 39101:case 44300:case 22200:case 27701:return SuperMapAlgoPlot.AddPoint_WayType.CURVE;case 12500:case 12502:case 16100:case 20300:case 25501:case 25502:case 25503:case 32900:case 34700:case 35200:case 36401:case 41200:case 41201:case 41202:case 42700:case 44400:return SuperMapAlgoPlot.AddPoint_WayType.POLYLINE;default:return SuperMapAlgoPlot.AddPoint_WayType.UNKNOWN}if(123===t)switch(e){case 21003:case 21207:case 2120701:case 2121503:case 21218:case 30008:case 3000801:case 3000802:case 3000803:case 3000804:case 3000805:case 3000806:case 3000807:case 3000808:case 3000809:case 30009:case 5021803:case 5022001:case 5022002:case 40301:case 4030101:case 4030102:case 4030103:case 4030104:case 40303:case 4030301:case 4030302:case 4030303:case 50101:case 5010101:case 50102:case 5010201:case 5010202:case 5010203:case 5010204:case 50103:case 5010301:case 5010302:case 5010303:case 5010304:case 50107:case 5010701:case 50210:case 50220:case 50221:case 50225:case 5030102:case 50303:case 5030301:case 50309:case 50320:case 5032001:case 5032002:case 5032003:case 50321:case 5032101:case 5032102:case 50322:case 5032201:case 50330:case 5033001:case 5034203:case 5035201:case 5035204:case 60205:case 90105:return SuperMapAlgoPlot.AddPoint_WayType.CURVE;case 20915:case 2091502:case 2092101:case 2120702:case 21216:case 2121601:case 2121602:case 21605:case 30010:case 30011:case 3001101:case 3001102:case 3001103:case 3001104:case 3001105:case 30012:case 30020:case 3002001:case 3002002:case 3002005:case 30025:case 3002501:case 30026:case 40104:case 40302:case 4030201:case 4030202:case 4030203:case 4030204:case 50227:case 5035205:case 60301:case 6030101:case 6030102:case 6030103:case 6030104:case 6030105:case 6030106:case 6030107:case 70202:case 7020201:case 7020202:case 90107:return SuperMapAlgoPlot.AddPoint_WayType.POLYLINE;default:return SuperMapAlgoPlot.AddPoint_WayType.UNKNOWN}},SuperMapAlgoPlot.AlgoSymbolFactory.isAccessServer=function(t,e){return 0!==t&&22!==t&&421!==t||void 0===SuperMapAlgoPlot.BasicAlgoSymbolFactory?100===t&&void 0!==SuperMapAlgoPlot.JBAlgoSymbolFactory?SuperMapAlgoPlot.JBAlgoSymbolFactory.isAccessServer(t,e):123===t&&void 0!==SuperMapAlgoPlot.WJAlgoSymbolFactory?SuperMapAlgoPlot.WJAlgoSymbolFactory.isAccessServer(t,e):999!==t||void 0===SuperMapAlgoPlot.YJAlgoSymbolFactory||SuperMapAlgoPlot.YJAlgoSymbolFactory.isAccessServer(t,e):SuperMapAlgoPlot.BasicAlgoSymbolFactory.isAccessServer(t,e)},SuperMapAlgoPlot.AlgoSymbolFactory.getDefaultSubSymbols=function(t,e){return 100===t&&void 0!==SuperMapAlgoPlot.JBAlgoSymbolFactory?SuperMapAlgoPlot.JBAlgoSymbolFactory.getDefaultSubSymbols(t,e):123===t&&void 0!==SuperMapAlgoPlot.WJAlgoSymbolFactory?SuperMapAlgoPlot.WJAlgoSymbolFactory.getDefaultSubSymbols(t,e):999===t&&void 0!==SuperMapAlgoPlot.YJAlgoSymbolFactory?SuperMapAlgoPlot.YJAlgoSymbolFactory.getDefaultSubSymbols(t,e):[]},SuperMapAlgoPlot.AlgoSymbolFactory.getMinEditPts=function(t,e){return 0!==t&&22!==t&&421!==t||void 0===SuperMapAlgoPlot.BasicAlgoSymbolFactory?100===t&&void 0!==SuperMapAlgoPlot.JBAlgoSymbolFactory?SuperMapAlgoPlot.JBAlgoSymbolFactory.getMinEditPts(t,e):123===t&&void 0!==SuperMapAlgoPlot.WJAlgoSymbolFactory?SuperMapAlgoPlot.WJAlgoSymbolFactory.getMinEditPts(t,e):999===t&&void 0!==SuperMapAlgoPlot.YJAlgoSymbolFactory?SuperMapAlgoPlot.YJAlgoSymbolFactory.getMinEditPts(t,e):0:SuperMapAlgoPlot.BasicAlgoSymbolFactory.getMinEditPts(t,e)},SuperMapAlgoPlot.AlgoSymbolFactory.getMaxEditPts=function(t,e){return 0!==t&&22!==t&&421!==t||void 0===SuperMapAlgoPlot.BasicAlgoSymbolFactory?100===t&&void 0!==SuperMapAlgoPlot.JBAlgoSymbolFactory?SuperMapAlgoPlot.JBAlgoSymbolFactory.getMaxEditPts(t,e):123===t&&void 0!==SuperMapAlgoPlot.WJAlgoSymbolFactory?SuperMapAlgoPlot.WJAlgoSymbolFactory.getMaxEditPts(t,e):999===t&&void 0!==SuperMapAlgoPlot.YJAlgoSymbolFactory?SuperMapAlgoPlot.YJAlgoSymbolFactory.getMaxEditPts(t,e):0:SuperMapAlgoPlot.BasicAlgoSymbolFactory.getMaxEditPts(t,e)},SuperMapAlgoPlot.AlgoSymbolFactory.getDefaultStyle=function(t,e){return 0!==t&&22!==t&&421!==t||void 0===SuperMapAlgoPlot.BasicAlgoSymbolFactory?100===t&&void 0!==SuperMapAlgoPlot.JBAlgoSymbolFactory?SuperMapAlgoPlot.JBAlgoSymbolFactory.getDefaultStyle(t,e):123===t&&void 0!==SuperMapAlgoPlot.WJAlgoSymbolFactory?SuperMapAlgoPlot.WJAlgoSymbolFactory.getDefaultStyle(t,e):999===t&&void 0!==SuperMapAlgoPlot.YJAlgoSymbolFactory?SuperMapAlgoPlot.YJAlgoSymbolFactory.getDefaultStyle(t,e):{}:SuperMapAlgoPlot.BasicAlgoSymbolFactory.getDefaultStyle(t,e)},SuperMapAlgoPlot.AlgoSymbolFactory.getSymbolName=function(t,e){return 0!==t&&22!==t&&421!==t||void 0===SuperMapAlgoPlot.BasicAlgoSymbolFactory?"":SuperMapAlgoPlot.BasicAlgoSymbolFactory.getSymbolName(t,e)},SuperMapAlgoPlot.AlgoSymbolFactory.canPolylineConnect=function(t,e){if(100!==t)return!1;switch(e){case 16500:case 17400:case 17401:case 17500:case 17501:case 23400:case 23500:case 23600:case 23700:case 27300:case 28200:case 28300:case 28400:case 37600:case 37601:case 37700:case 39e3:case 40100:case 40101:case 42200:case 42400:case 2350001:case 2730101:case 3032e3:case 4010800:case 4010801:case 4011100:case 4011101:case 4022100:case 4022101:case 4022102:return!0;default:return!1}},SuperMapAlgoPlot.AlgoSymbolFactory.zoomInCalSymbol=function(t,e){return 0!==t&&22!==t&&421!==t||void 0===SuperMapAlgoPlot.BasicAlgoSymbolFactory?100===t&&void 0!==SuperMapAlgoPlot.JBAlgoSymbolFactory?SuperMapAlgoPlot.JBAlgoSymbolFactory.zoomInCalSymbol(t,e):123===t&&void 0!==SuperMapAlgoPlot.WJAlgoSymbolFactory?SuperMapAlgoPlot.WJAlgoSymbolFactory.zoomInCalSymbol(t,e):999===t&&void 0!==SuperMapAlgoPlot.YJAlgoSymbolFactory?SuperMapAlgoPlot.YJAlgoSymbolFactory.zoomInCalSymbol(t,e):0:SuperMapAlgoPlot.BasicAlgoSymbolFactory.zoomInCalSymbol(t,e)},SuperMapAlgoPlot.AlgoSymbolFactory.zoomCalSymbol=function(t,e){if((0===t||22===t||421===t)&&void 0!==SuperMapAlgoPlot.BasicAlgoSymbolFactory)return SuperMapAlgoPlot.BasicAlgoSymbolFactory.zoomCalSymbol(t,e);if(100===t)switch(e){case 28e3:case 28100:case 28200:case 28201:case 32300:return!0;default:return!1}else{if(123!==t||void 0===SuperMapAlgoPlot.WJAlgoSymbolFactory)return!1;switch(e){case 50312:case 50313:case 50314:case 50348:return!0;default:return!1}}},SuperMapAlgoPlot.AlgoSymbolFactory.calSurroundLineDir=function(t,e){if(22===t)switch(e){case 1018:case 1020:case 1021:return!1}return SuperMapAlgoPlot.AlgoSymbolFactory.getAlgoWayType(t,e)===SuperMapAlgoPlot.AddPoint_WayType.POLYLINE_CLOSE||SuperMapAlgoPlot.AlgoSymbolFactory.getAlgoWayType(t,e)===SuperMapAlgoPlot.AddPoint_WayType.CURVE_CLOSE},SuperMapAlgoPlot.AlgoSymbolFactory.getAlgoWayType=function(t,e){if(100===t)switch(e){case 24:case 40304:case 1e3:case 1007:case 1009:case 1016:case 12502:case 20300:case 26400:case 41100:case 50308:case 2092101:case 60301:case 6030101:case 6030102:case 6030103:case 6030104:case 6030105:case 6030106:case 6030107:case 1013:case 1015:case 520100:case 520200:case 21216:case 2121601:case 2121602:case 30020:case 3002001:case 3002002:case 3002005:case 30025:case 3002501:case 30026:case 3002601:case 30027:case 3002701:case 3002702:case 3002703:case 3002704:case 3002705:case 40104:case 36401:case 34700:case 32900:case 6020404:case 30013:case 3001302:case 30014:case 1001:case 1017:case 16e3:case 16001:case 25202:return SuperMapAlgoPlot.AddPoint_WayType.POLYLINE;case 32:case 3020901:case 25501:case 25502:case 25503:case 25601:case 25701:case 2570201:case 2570301:case 2570401:case 2570501:case 25801:case 25901:case 44400:case 41200:case 41201:case 41202:case 30010:case 30011:case 30012:case 3001101:case 3001102:case 3001103:case 3001104:case 3001105:case 5035205:case 16100:case 35304:case 35200:case 50225:case 5020801:case 42700:case 25500:case 25600:case 25700:case 25800:case 25900:return SuperMapAlgoPlot.AddPoint_WayType.POLYLINE_CLOSE;case 40301:case 4030301:case 4030302:case 4030303:case 5010301:case 5010303:case 5010304:case 1005:case 1008:case 15200:case 15201:case 21400:case 21401:case 21500:case 21501:case 21502:case 21503:case 21504:case 21900:case 21600:case 26500:case 26501:case 26502:case 26503:case 26600:case 3000801:case 3000802:case 3000803:case 3000804:case 3000805:case 3000806:case 3000807:case 3000808:case 3000809:case 5034203:case 50355:case 5035501:case 60205:case 1012:case 1014:case 3010102:case 3010103:case 3010104:case 3010105:case 3010106:case 3010107:case 3010108:case 3010301:case 3010302:case 3010303:case 3010304:case 50102:case 4021101:case 510100:case 520300:case 530100:case 530200:case 16203:case 22e3:case 22103:case 25201:case 24700:case 25400:case 44200:case 31803:case 30800:case 30201:case 30200:case 5022002:case 3002004:case 5030301:case 50328:case 5033001:case 5022001:case 4021102:case 29003:case 30009:case 5035201:case 520500:case 23800:case 36400:case 35e3:case 33400:case 30100:case 30102:case 30002:case 30001:case 3e4:case 29903:case 5021803:case 50321:case 5032003:case 4020303:case 4020400:case 4020401:case 4020402:case 34902:case 34901:case 34900:case 12501:case 15800:case 15801:case 15802:case 15803:case 15804:case 15805:case 15806:case 15900:case 2091503:case 28900:case 16201:case 39600:case 38600:case 36700:case 26601:case 16200:case 17700:case 90213:return SuperMapAlgoPlot.AddPoint_WayType.CURVE;case 50342:case 5034201:case 5034202:case 610100:case 29103:case 28300:case 28200:case 17400:case 17401:case 17402:case 17500:case 17501:case 22200:case 23400:case 23500:case 2350001:case 23600:case 23700:case 27300:case 2730101:case 27701:case 28400:case 44300:case 42400:case 42200:case 40100:case 40101:case 39101:case 39e3:case 37700:case 37601:case 37600:case 5020802:case 50223:case 5022301:case 50226:case 21221:case 2122101:case 50108:case 3032e3:case 4011100:case 4011101:case 4022101:case 4022102:case 4022100:case 16500:case 80203:case 8020301:return SuperMapAlgoPlot.AddPoint_WayType.CURVE_CLOSE;case 17703:case 17704:case 39801:case 39802:case 39800:case 40900:case 4e4:return SuperMapAlgoPlot.AddPoint_WayType.CURVE_WITHCONTROLPT;default:return SuperMapAlgoPlot.AddPoint_WayType.UNKNOWN}return SuperMapAlgoPlot.AddPoint_WayType.UNKNOWN};SuperMap.MD5=SuperMap.MD5||{};SuperMap.MD5.md5=function(t){function e(t,e){return t<>>32-e}function o(t,e){var o,i,n,l,a;return n=2147483648&t,l=2147483648&e,a=(1073741823&t)+(1073741823&e),(o=1073741824&t)&(i=1073741824&e)?2147483648^a^n^l:o|i?1073741824&a?3221225472^a^n^l:1073741824^a^n^l:a^n^l}function i(t,i,n,l,a,s,r){return o(e(t=o(t,o(o(function(t,e,o){return t&e|~t&o}(i,n,l),a),r)),s),i)}function n(t,i,n,l,a,s,r){return o(e(t=o(t,o(o(function(t,e,o){return t&o|e&~o}(i,n,l),a),r)),s),i)}function l(t,i,n,l,a,s,r){return o(e(t=o(t,o(o(function(t,e,o){return t^e^o}(i,n,l),a),r)),s),i)}function a(t,i,n,l,a,s,r){return o(e(t=o(t,o(o(function(t,e,o){return e^(t|~o)}(i,n,l),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,y,g,f,P,d=Array();for(d=function(t){for(var e,o=t.length,i=o+8,n=16*((i-i%64)/64+1),l=Array(n-1),a=0,s=0;s>>29,l}(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)),y=1732584193,g=4023233417,f=2562383102,P=271733878,r=0;r0?M+=this.options.fontShadowOffsetX:m+=this.options.fontShadowOffsetX,this.options.fontShadowOffsetY>0?v+=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 _=M-m,O=(_+this.options.fontSpace*(this.options.text.length-1))*this.options.fontPercent/100-_;switch(A){case"lt":case"lm":case"lb":M+=O;break;case"rt":case"rm":case"rb":m-=O;break;case"ct":case"cm":case"cb":m-=O/2,M+=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,v)),w.push(L.point(M,b)),w.push(L.point(M,v));for(var E=this.options.labelRotation*(Math.PI/180),C=0;C0){if(o.components[0]instanceof Qs&&o.components[0].components.length>0){o=o.components[0];break}if(!(o.components[0]instanceof Qs))break;o=null}null!=o&&o.components.length>0?o.components[0]instanceof Qs&&o.components[0].components.length>0?t.onBefore(o.components[0].components[0]):t.onBefore(o.components[0]):t.onAdd()}}this.components.push(t)}},_project:function(){var t=this;t._pxBounds=new L.Bounds,t.components.map(function(e){return e instanceof Qs&&e._project(),e._pxBounds&&e._pxBounds.isValid()&&(t._pxBounds.extend(e._pxBounds.min),t._pxBounds.extend(e._pxBounds.max)),e})},getBounds:function(){var t=this;return t._bounds=new L.LatLngBounds,t.components.map(function(e){return t._bounds.extend(e.getBounds()),e}),t._bounds},clone:function(){this.symbolData=this.getSymbolData();var t=SuperMap.Plot.PlottingUtil.toJSON(this.symbolData),e=JSON.parse(t);e.uuid=SuperMap.Plot.PlottingUtil.generateUuid();var o=SuperMap.Plot.PlottingUtil.cloneObject(this.style);return L.supermap.plotting.PlottingObject.createSymbol(this.libID,this.code,null,{symbolData:e,serverUrl:this.serverUrl},o)},setStyle:function(t){if(SuperMap.Util.extend(this.style,t),this.redraw(),this.symbolType===SuperMap.Plot.SymbolType.ANNOFRAMESYMBOL&&this.ownerGroup&&(this.ownerGroup.symbolType===SuperMap.Plot.SymbolType.NAVYDEPLOYMENT||this.ownerGroup.symbolType===SuperMap.Plot.SymbolType.AIRDEPLOYMENT))for(var e in this.ownerGroup.subObjects)this.ownerGroup.subObjects[e].redraw();this.symbolType===SuperMap.Plot.SymbolType.TEXTSYMBOL&&this.isSelected&&"none"!==this.style.display&&this.fire(SuperMap.Plot.Event.reseteditmarkersvalues),this.layer.fire("propertychanged",{feature:this,property:t})},setScale:function(){},setRotate:function(){},setTextPosition:function(){},convertGraphicObjects:function(){},setTextContent:function(t){this.textContent=t,this.redraw(),this.symbolType===SuperMap.Plot.SymbolType.TEXTSYMBOL&&this.isSelected&&(this.fire(SuperMap.Plot.Event.reseteditmarkersvalues),this.layer.fire("propertychanged",{feature:this,property:t}))},getLocked:function(){return this.isLocked},setLocked:function(t){if(this.isLocked!==t){if(this.isLocked=t,this.symbolType===SuperMap.Plot.SymbolType.GROUPOBJECT)for(var e=0;e=this.layer.getMinVisibleScale()||0===this.layer.getMinVisibleScale())||"function"!=typeof this.layer.getMinVisibleScale&&"function"==typeof this.layer.getMaxVisibleScale&&(0===this.layer.getMaxVisibleScale()||t<=this.layer.getMaxVisibleScale())||"function"==typeof this.layer.getMinVisibleScale&&"function"==typeof this.layer.getMaxVisibleScale&&0===this.layer.getMaxVisibleScale()&&t>=this.layer.getMinVisibleScale()||"function"==typeof this.layer.getMinVisibleScale&&"function"==typeof this.layer.getMaxVisibleScale&&0===this.layer.getMinVisibleScale()&&t<=this.layer.getMaxVisibleScale()||"function"==typeof this.layer.getMinVisibleScale&&"function"==typeof this.layer.getMaxVisibleScale&&(0===this.layer.getMinVisibleScale()&&0===this.layer.getMaxVisibleScale()||t>=this.layer.getMinVisibleScale()&&t<=this.layer.getMaxVisibleScale()))&&(this._redrawComponents(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)))},_redrawComponents:function(){"none"===this.style.display||null!=this.layer&&"function"==typeof this.layer.getVisibility&&!1===this.layer.getVisibility()?this.symbolType!==SuperMap.Plot.SymbolType.DOTSYMBOL&&this.symbolType!==SuperMap.Plot.SymbolType.AlgoSymbol&&0!==this.libID||this._updateSymbolTexts():(this._calculateParts(),this._calculateAvoidRegions())},_calculateAvoidRegions:function(){if(0!==this.avoidRegions.length){for(var t=this.components.slice(),e=0;e9){if(this.symbolType===SuperMap.Plot.SymbolType.REGULARPOLYGON)t.handlePoints.push(this.getLatLngs()[0].clone()),t.handlePoints.push(this.getLatLngs()[this.getLatLngs().length-1].clone());else if(t.handlePoints=L.Util.cloneLatLngs(this.getLatLngs()),3801===this.code||4401===this.code||3701===this.code){var o=this.components[0]._latlngs;o.length>1?t.handlePoints[2]=o[1]:t.handlePoints[2]=o[0][1]}}else t.handlePoints=this._getHandlePointsByBounds(e);for(var i=0;ithis.symbolSizeInLib.w&&(e=this.symbolSizeInLib.h),0===e||0===t.dotSymbolSize)0!==this.symbolSize.w&&0!==this.symbolSize.h||(this.symbolSize.w=this.symbolSizeInLib.w,this.symbolSize.h=this.symbolSizeInLib.h);else{var 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&&(null!=t.maxScale&&(this.maxScale=t.maxScale),null!=t.minScale&&(this.minScale=t.minScale)),-1!==t.scaleByMap&&(this.scaleByMap=t.scaleByMap)}},_removeRedundancySymbolData:function(t){null!==t&&(Object.prototype.hasOwnProperty.call(t,"center")&&delete t.center,Object.prototype.hasOwnProperty.call(t,"id")&&delete t.id,Object.prototype.hasOwnProperty.call(t,"parts")&&delete t.parts,Object.prototype.hasOwnProperty.call(t,"points")&&delete t.points,Object.prototype.hasOwnProperty.call(t,"position")&&delete t.position,Object.prototype.hasOwnProperty.call(t,"prjCoordSys")&&delete t.prjCoordSys,Object.prototype.hasOwnProperty.call(t,"rotationX")&&delete t.rotationX,Object.prototype.hasOwnProperty.call(t,"rotationY")&&delete t.rotationY,Object.prototype.hasOwnProperty.call(t,"rotationZ")&&delete t.rotationZ,Object.prototype.hasOwnProperty.call(t,"scaleX")&&delete t.scaleX,Object.prototype.hasOwnProperty.call(t,"scaleY")&&delete t.scaleY,Object.prototype.hasOwnProperty.call(t,"scaleZ")&&delete t.scaleZ)},destroy:function(){this.layer.removeFeatures(this)},updateByGeoJson:function(t){t.isEdit=!0,SuperMap.Plot.AnalysisSymbol.parseSymbolData(this,t,!0),this.redraw(),this.isSelected&&"none"!==this.style.display&&(this.fire(SuperMap.Plot.Event.reseteditmarkersvalues),this._map.getPlotEditControl().fire(SuperMap.Plot.Event.updateFeature,{feature:this}))},toGeoJsonStr:function(){return this.getSymbolData(),SuperMap.Plot.PlottingUtil.toJSON(this.symbolData)}});L.supermap.plotting.PlottingObject=Qs,Qs.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,n,l){i||(i={}),i.custom=l;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.FREECURVE:a=L.supermap.plotting.freeCurve(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),n&&SuperMap.Util.extend(a.style,n),null!=o&&o.length>0&&(o.length>a.maxEditPts&&(o=o.slice(0,a.maxEditPts)),a.latLngs=L.Util.cloneLatLngs(o)),a};var $s=Qs.extend({subObjects:[],initialize:function(t,e,o,i){this.subObjects=[],this.symbolName="组合对象",this.libID=0,this.code=SuperMap.Plot.SymbolType.GROUPOBJECT,this.symbolType=SuperMap.Plot.SymbolType.GROUPOBJECT,Qs.prototype.initialize.call(this,t,e,o,i)},_addComponents:function(t){Qs.prototype._addComponents.call(this,t),t.layer=this.layer,t.isEdit=!0,ir&&(t.dragging||(t.dragging=new ir(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),Qs.prototype._clearComponents.call(this)},_reView:function(){for(var t in this.components)this.components[t]._reView();this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)},move:function(t,e){for(var o in this.subObjects)this.subObjects[o].move(t,e);this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)},redraw:function(){if("none"===this.style.display||null!=this.layer&&"function"==typeof this.layer.getVisibility&&!1===this.layer.getVisibility())this._clearComponents();else if(0!==this.subObjects.length&&0===this.components.length)for(var t=0,e=this.subObjects.length;t=1?t.touches[0]:t,o=this._plottingObject._map.mouseEventToLatLng(e);if("touchmove"===t.type&&!this._plottingObject._dragMoved){var i=this._plottingObject._map.latLngToLayerPoint(this._dragStartPoint),n=this._plottingObject._map.mouseEventToContainerPoint(e);if(i.distanceTo(n)<=this._plottingObject._map.options.tapTolerance)return}var l=o.lat,a=o.lng,s=l-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=l,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:or(this._dragStartPoint,e)});var i=this._plottingObject._containsPoint;this._plottingObject._containsPoint=L.Util.falseFn,L.Util.requestAnimFrame(function(){this._plottingObject._containsPoint=i},this)}this._startPoint=null,this._dragStartPoint=null,this._plottingObject._dragMoved=!1,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,n=o-this._startPoint.lat,l=i-this._startPoint.lng;(n||l)&&(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=n,t.dLng=l,this._plottingObject.fire("drag",t))},_dragEnd:function(t){var e=t.target._latlng,o=this.moved();if(o){this._plottingObject.fire("dragend",{distance:or(this._dragStartPoint,e)});var i=this._plottingObject._containsPoint;this._plottingObject._containsPoint=L.Util.falseFn,L.Util.requestAnimFrame(function(){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){null!=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()}}),nr=Qs.extend({surroundLineType:null,scaleByMap:null,latLngs:[],initialize:function(t,e,o,i){this.geoSymbolTexts=[],this.subAssociatedUuids=[],this.latLngs=o||[],Qs.prototype.initialize.call(this,t,e,o,i),null===this.surroundLineType&&(this.surroundLineType=SuperMap.Plot.AlgoSurroundLineType.NONE)},destroy:function(){Qs.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,this.redraw()},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 n=this._resizeBounds(t,e,o);if(!(SuperMap.Plot.PlottingUtil.equalFuzzy(n.getWest(),n.getEast())&&SuperMap.Plot.PlottingUtil.equalFuzzy(n.getNorth(),n.getSouth())||SuperMap.Plot.PlottingUtil.equalFuzzy(o.getWest(),o.getEast())&&SuperMap.Plot.PlottingUtil.equalFuzzy(o.getNorth(),o.getSouth()))){var l=SuperMap.Plot.PlottingUtil.equalFuzzy(o.getWest(),o.getEast())?0:(n.getEast()-n.getWest())/(o.getEast()-o.getWest()),a=SuperMap.Plot.PlottingUtil.equalFuzzy(o.getNorth(),o.getSouth())?0:(n.getNorth()-n.getSouth())/(o.getNorth()-o.getSouth()),s=L.latLng((o.getNorth()+o.getSouth())/2,(o.getWest()+o.getEast())/2),r=L.latLng((n.getNorth()+n.getSouth())/2,(n.getWest()+n.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)*l,this.latLngs[0].lat=r.lat+(i[0].lat-s.lat)*a,this.latLngs[1].lng=r.lng+(i[1].lng-s.lng)*l,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===l&&(l=0),1===a&&(a=0);for(var u=Math.sqrt(l*l+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(Qs.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;tthis.maxScale&&(u=this.maxScale),null!=a.fontSize&&(a.fontSize=a.fontSize*u),null!=a.fontSpace&&(a.fontSpace=a.fontSpace*u),null!=a.weight&&(a.weight=a.weight*u),null!=a.dashArray){for(var p=a.dashArray.split(","),h=0;hthis.maxScale&&(r=this.maxScale));for(var u=0,p=t.length;u=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 nr?this.components[o]._rotate(t,e):(this.components[o]instanceof Zs&&(this.components[o].options.rotation+=-t),this.components[o]instanceof Hs&&(this.components[o].options.labelRotation?(this.components[o].options.labelRotation+=-t,this.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL&&0===this.components[o].options.labelRotation&&(this.components[o].options.labelRotation=360)):this.components[o].options.labelRotation=-t),L.Util.rotateLatLngs(this.components[o].getLatLngs(),e,t),this.components[o].setLatLngs(this.components[o].getLatLngs()));L.Util.rotateLatLngs(this.getLatLngs(),e,t)},_move:function(t,e){if(null!=this.graphic&&null!=this.graphic.layer&&!0===this.graphic.layer.getVisibility())L.Util.moveLatLngs(this.getLatLngs(),t,e),this.graphic.update();else if(null!=this.layer&&(null==this.layer.getVisibility||!0===this.layer.getVisibility())){for(var o=0,i=this.components.length;o0){for(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),100===this.libID&&26400===this.code&&(this.arrowHeadType=this.superMapAlgoSymbol.arrowHeadType),delete this.controlPoints),this._setBasicSymbolName(),!0===this._isSupportAddAnnotation()&&(this.style.sizeFixed=!1)},onAdd:function(t){this.superMapAlgoSymbol&&(this.superMapAlgoSymbol.map=t._map),nr.prototype.onAdd.call(this,t)},getTextContent:function(){return this.textContent},getArrowHeadType:function(){return this.arrowHeadType},setArrowHeadType:function(t){1016!==this.code&&26400!==this.code||this.arrowHeadType===t||(this.arrowHeadType=t,this.redraw()),this.layer.fire("propertychanged",{feature:this,property:t})},getArrowTailType:function(){return this.arrowTailType},setArrowTailType:function(t){1016===this.code&&this.arrowTailType!==t&&(this.arrowTailType=t,this.redraw()),this.layer.fire("propertychanged",{feature:this,property:t})},getArrowBodyType:function(){return this.arrowBodyType},setArrowBodyType:function(t){1016===this.code&&this.arrowBodyType!==t&&(this.arrowBodyType=t,this.redraw()),this.layer.fire("propertychanged",{feature:this,property:t})},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()),"function"==typeof this.layer.getSymZoomScale&&(this.prevScale=this.layer.getSymZoomScale()))},_calAccessServerSymbol:function(){for(var t=SuperMap.Plot.AnalysisSymbol.analysisSymbolCells(this.symbolData,!0),e=0;e=1&&this.redraw(),this.layer._map.getRenderer(this.layer)instanceof L.Canvas&&this._updateCanvasFills(),this._updateSymbolTexts(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues),this.prevScale=e}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){nr.prototype._resize.call(this,t,e);var o=new SuperMapAlgoPlot.Point(e.lng,e.lat);if(this.superMapAlgoSymbol){for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:void 0;if(0!==this.goAnimations.length){void 0!==t&&(this.curPlayGroup=this.getAnimationGroupByName(t).index),this.isPlay()&&this.curPlayGroup--;var e=this.getAllGroups();this.curPlayGroup>e.length-1&&(this.curPlayGroup=0);for(var o=e[this.curPlayGroup],i=0;i0&&this.curPlayGroup--}}},{key:"reset",value:function(){if(0!==this.goAnimations.length){for(var t=0;t=0;a--){var s=e[a],r=s.startTime+s.duration;if(r>l&&(l=r),s.animationPlayType===i.PLAYAFTERLASTONE){o=!0;for(var u=a-1;u>=0;u--){var p=e[u],h=p.startTime+p.duration;h>n&&(n=h)}}}return{isExist:o,length1:n,length2:l}}},{key:"getAllGroups",value:function(){for(var t=[],e=0;ethis.goAnimations.length)){var o=this.goAnimations.indexOf(t);if(o!==e){this.goAnimations=this.move(o,e);for(var i=0;i=0;s--){if(o[s].animationPlayType===i.PLAYAFTERLASTONE){a=s;break}}if(-1===a)e=t.startTime;else{l=this.getAnimationTimeLength(a,o);e=t.startTime-l.length2}}return e}}])&&rr(o.prototype,n),l&&rr(o,l),Object.defineProperty(o,"prototype",{writable:!1}),s}();SuperMapAlgoPlot.GOAnimationManagerBase=cr;var yr=L.Evented.extend({startTime:0,duration:5,repeat:!1,name:null,animationState:SuperMap.Plot.GOAnimationState.UNKNOWN,goFeature:null,animationGOFeature:null,innerStartTime:0,lastExecute:!1,pauseTime:0,ratio:0,symbolTexts:[],animationPlayType:SuperMap.Plot.AnimationPlayType.UNKNOWN,groupName:null,delayTime:0,playSpeed:1,playPastRatio:0,initialize:function(t){SuperMap.Util.extend(this,t)},destroy:function(){this.showAnimationFeature(!1),this.removeAnimationFeature(),this.goFeature=null,this.animationGOFeature=null,this.name=null,this.animationState=SuperMap.Plot.GOAnimationState.UNKNOWN;for(var t=0;tt)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=L.supermap.plotting.getControl().getGOAnimationManager(),e=this.computePlayRatio();return e>=1&&!this.lastExecute&&(this.repeat?(e=0,this.lastExecute=!1,this.animationState=SuperMap.Plot.GOAnimationState.PLAYING,t.fire(SuperMap.Plot.Event.animationbegin,{result:this.name}),this.innerStartTime=(new Date).getTime()/1e3,this.playTime=(new Date).getTime()/1e3):(e=1,this.lastExecute=!0,this.animationState=SuperMap.Plot.GOAnimationState.STOP,t.fire(SuperMap.Plot.Event.animationend,{result:this.name})),this.playSpeedTime=(new Date).getTime()/1e3,this.playPastRatio=0),e<0&&(e=0,this.playSpeedTime=(new Date).getTime()/1e3,this.playPastRatio=0),this.ratio=e,e},getPlaySpeed:function(){return this.playSpeed},setPlaySpeed:function(t){t!==this.playSpeed&&(this.setPlayRatioState(),this.playSpeed=t,L.supermap.plotting.getControl().getGOAnimationManager().fire(SuperMap.Plot.Event.animationmodify,{result:this.getJSONData()}))},setFastForWardTime:function(t){if(!(t<0)){var e=t/this.duration;e>1&&(e=1),this.playPastRatio+=e,L.supermap.plotting.getControl().getGOAnimationManager().fire(SuperMap.Plot.Event.animationmodify,{result:this.getJSONData()})}},setRewindTime:function(t){if(!(t<0)){var e=-t/this.duration;e>0&&(e=0),this.playPastRatio+=e,L.supermap.plotting.getControl().getGOAnimationManager().fire(SuperMap.Plot.Event.animationmodify,{result:this.getJSONData()})}},setPlayRatioState:function(){this.playSpeedTime=(new Date).getTime()/1e3,this.playPastRatio=this.ratio},computePlayRatio:function(){var t=0,e=(new Date).getTime()/1e3,o=this.duration/this.playSpeed;return t=this.playTime===this.playSpeedTime?(e-this.innerStartTime-this.startTime)/o:(e-this.playSpeedTime)/o,t+=this.playPastRatio,this.innerStartTime+this.startTime>=e||t<0?0:t},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;ee.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),n=0;n<=i.pos;n++)e.push(o[n]);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,n=new SuperMap.Geometry.Point(e.x-o,e.y+i),l=new SuperMap.Geometry.Point(e.x+o,e.y-i);return this.animationGOFeature.setLatLngs(L.Util.superMapPointsToLatLngs([n,l])),!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 n=0;nl)return!1;var s=SuperMap.Plot.PlottingUtil.linePnt(i,this.controlPoints[n],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),n=2*Math.PI/(e+1),l=Math.PI/2+this.animationGOFeature.dRotate,a=i;SuperMap.Plot.PlottingUtil.rotateAngle(this.controlPoints[0],l,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 lr))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+=n;var l,a=new Object;return l=o1?1:parseFloat(t),this.animationGOFeature.style.display="display",this.animationGOFeature.style.opacity=e,this.animationGOFeature.style.fontOpacity=e,this.animationGOFeature.style.surroundLineColorOpacity=this.goFeature.style.surroundLineColorOpacity*t,this.animationGOFeature.style.fill&&(this.animationGOFeature.style.fillOpacity=this.goFeature.style.fillOpacity*t,this.animationGOFeature.style.fillBackOpacity=this.goFeature.style.fillBackOpacity*t),this.animationGOFeature.redraw()},getJSONData:function(){var t=yr.prototype.getJSONData.call(this);return t.showEffect=this.showEffect,t.finalDisplay=this.finalDisplay,t},fromJSONData:function(t){yr.prototype.fromJSONData.call(this,t),this.showEffect=t.showEffect,this.finalDisplay=t.finalDisplay,L.supermap.plotting.getControl().getGOAnimationManager().fire(SuperMap.Plot.Event.animatitonpropertyconfig,{jsonData:t})}});L.supermap.plotting.GOAnimationShow=mr;var br=yr.extend({showPath:!1,tangentDirection:!1,pathWidth:1,pathColor:"#FF0000",currentPt:null,pathType:SuperMap.Plot.WayPathType.POLYLINE,wayPoints:null,shapePoints:null,pathFeature:null,pathLength:0,path:null,destroy:function(){null!==this.pathFeature&&(L.supermap.plotting.getControl().getGOAnimationManager().map.removeLayer(this.pathFeature),this.pathFeature=null);yr.prototype.destroy.call(this)},getGOAnimationType:function(){return SuperMap.Plot.GOAnimationType.ANIMATION_WAY},setShowPath:function(t){this.showPath=t,L.supermap.plotting.getControl().getGOAnimationManager().fire(SuperMap.Plot.Event.animationmodify,{result:this.getJSONData()})},setPath:function(t){this.path=t},setTangentDirection:function(t){this.tangentDirection=t,L.supermap.plotting.getControl().getGOAnimationManager().fire(SuperMap.Plot.Event.animationmodify,{result:this.getJSONData()})},resetAnimationFeature:function(t){yr.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 n=this.animationGOFeature.getLatLngs()[0],l=i.y-n.lat,a=i.x-n.lng;if(this.animationGOFeature.move(l,a),this.tangentDirection){null==this.prevAngle&&(this.prevAngle=0);var s=o.angle;1===t&&(s=0),this.animationGOFeature._rotate(s-this.prevAngle,this.animationGOFeature.getLatLngs()[0]),this.prevAngle=s}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);var e=L.supermap.plotting.getControl().getGOAnimationManager();null!==this.pathFeature&&(e.map.removeLayer(this.pathFeature),this.pathFeature=null),e.fire(SuperMap.Plot.Event.animationmodify,{result:this.getJSONData()})},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),L.supermap.plotting.getControl().getGOAnimationManager().fire(SuperMap.Plot.Event.animationmodify,{result:this.getJSONData()})))},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),L.supermap.plotting.getControl().getGOAnimationManager().fire(SuperMap.Plot.Event.animationmodify,{result:this.getJSONData()})))},getPathWidth:function(){return this.pathWidth},setPathType:function(t){if(void 0!==t&&null!==t&&this.pathType!==t){this.pathType=t;var e=L.supermap.plotting.getControl().getGOAnimationManager();null!==this.pathFeature&&(e.map.removeLayer(this.pathFeature),this.pathFeature.destroy(),this.pathFeature=null),e.fire(SuperMap.Plot.Event.animationmodify,{result:this.getJSONData()})}},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++)n+=l;var a=SuperMap.Plot.PlottingUtil.findPoint(e[i-1],e[i],t-n,0);return this.tangentDirection&&(o.angle=SuperMap.Plot.PlottingUtil.radian(a,e[i])/Math.PI*180),a},getJSONData:function(){var t=yr.prototype.getJSONData.call(this);t.showPath=this.showPath,t.tangentDirection=this.tangentDirection,t.pathType=this.pathType,t.pathWidth=this.pathWidth,this.pathColor&&(t.pathColor=SuperMapAlgoPlot.PlottingUtil.colorStringToRGB(this.pathColor)),t.wayPoints=[];for(var e=0;e3&&void 0!==arguments[3])||arguments[3],l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:SuperMap.Plot.AnimationPlayType.UNKNOWN,a=this.createGOAnimationByType(t,e);if(null===a)return null;if(o._eventParents)for(var s in o._eventParents)i=o._eventParents[s];return o instanceof L.supermap.plotting.Route||i instanceof L.supermap.plotting.Route?null:a.setGOFeature(o)?(this.goAnimations.push(a),l!==SuperMap.Plot.AnimationPlayType.UNKNOWN&&a.setAnimationPlayType(l),n&&this.fire(SuperMap.Plot.Event.animationcreated,{goAnimation:a}),a):null}},{key:"findGOAnimationByName",value:function(t){if(null===this.goAnimations||null===t||""===t)return null;for(var e=null,o=0;o=this.libIDs.length?-1:this.libIDs[t]},getSymbolLibJSONInfo:function(t){return t>=this.libIDs.length?null:this.symbolLibJsons[t]},getSymbolLibByIndex:function(t){return t>=this.libIDs.length?null:this.symbolLibs[t]},getSymbolLibByLibId:function(t){for(var e=0;ethis.maxCount-1&&this.undoTransactions.splice(0,this.undoTransactions.length-this.maxCount+1),this.undoTransactions.push(t)},undo:function(){var t=this.undoTransactions.length;if(t>0){var e=this.undoTransactions[t-1];this.doTransaction(e,!0),this.redoTransactions.push(e),this.undoTransactions.splice(t-1,1)}},redo:function(){var t=this.redoTransactions.length;if(t>0){var e=this.redoTransactions[t-1];this.doTransaction(e),this.undoTransactions.push(e),this.redoTransactions.splice(t-1,1)}},doTransaction:function(t,e){var o=t.transInfos;if(t.transType===SuperMap.Plot.TransactionType.CREATE)for(var i=0,n=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 y=o[a].undoValue;e||(y=o[a].redoValue),Object.prototype.hasOwnProperty.call(r,o[a].propertyName)?r[o[a].propertyName]=y:null!==r&&(r.style[o[a].propertyName]=y)}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 g=0;g0;)this.map.removeLayer(this.plottingLayers[0]);this.plottingLayers.length=0},getLayerScale:function(t){var e=0;if(null===this.map)return 0;var o=this.map._layers;for(var i in o)if(o[i]instanceof L.TileLayer){e=o[i].getScale(t);break}return e},_savePlotLayers:function(t){for(var e=0;ea.lat?l.lat:a.lat;if(!(e.latr))(e.lat-l.lat)*(a.lng-l.lng)/(a.lat-l.lat)+l.lng>e.lng&&o++}}return o%2==1},getGObjectsInCircle:function(t,e){if(t&&e){for(var o=[],i=this.map.getPlottingLayers(),n=0;nMath.sqrt(Math.pow(t.lng-r.lng,2)+Math.pow(t.lat-r.lat,2))&&o.push(s)}}}return o}},getGObjectsInRect:function(t,e){if(t&&e){for(var o=[],i=this.map.getPlottingLayers(),n=0;ne.lat?r.lng>t.lng&&r.lnge.lat&&o.push(s):r.lnge.lng&&r.late.lat&&o.push(s)}}}return o}}});L.supermap.plotting.query=function(t){return new Xr(t)};var Hr=nr.extend({symbolSizeInLib:null,dRotate:0,initialScale:null,symbolSize:null,positionOffset:!1,positionOffsetType:null,positionOffsetX:null,positionOffsetY:null,symbolRank:null,negativeImage:null,horizontalMirror:null,verticalMirror:null,middleMarkBounds:null,flagTextSize:60,space:7,deployments:null,joinLines:null,trajectory:null,detectionRange:null,limitWidthHeight:!0,symbolTexts:null,symbolTextComponents:null,bloodVolumes:null,bloodVolumeComponents:null,pictureFrames:null,pictureFrameComponents:null,antoRotation:null,initialize:function(t,e,o,i){if(this.autoRotation=!1,this.symbolType=SuperMap.Plot.SymbolType.DOTSYMBOL,this.minEditPts=1,this.maxEditPts=1,this.joinLines=[],this.deployments=[],this.symbolTexts=[],this.bloodVolumes=[],this.pictureFrames=[],this.symbolTextComponents=[],this.bloodVolumeComponents=[],this.pictureFrameComponents=[],this.minScale=1,this.maxScale=5,this.symbolSizeInLib=new SuperMap.Size(0,0),this.symbolSizeInLib=new SuperMap.Size(0,0),this.symbolSize=new SuperMap.Size(0,0),null===this.initialScale&&(this.initialScale={}),nr.prototype.initialize.call(this,t,e,o,i),null===this.positionOffsetType&&(this.positionOffsetType=SuperMap.Plot.PositionOffsetType.LINE),null===this.positionOffsetX&&(this.positionOffsetX=0),null===this.positionOffsetY&&(this.positionOffsetY=0),void 0===this.actualScale&&(this.actualScale=this.dScale),null!=this.maxScale&&this.dScale>this.maxScale?this.dScale=this.maxScale:null!=this.minScale&&this.dScalethis.maxScale&&(t=this.maxScale),null!=this.minScale&&tthis.maxScale&&(t=this.maxScale);var e=SuperMap.Plot.AnalysisSymbol.analysisSymbolCells(this.symbolData,!0),o=this._map.latLngToLayerPoint(this.getLatLngs()[0]);if(!0===this.positionOffset&&(o.x+=this.positionOffsetX,o.y+=this.positionOffsetY),!0===this.limitWidthHeight)var i=this.initialScale.x*t;for(var n=0,l=e.length;nthis.maxScale&&(n=this.maxScale);for(var l=0;l45&&h<135||h>225&&h<315){var c=L.point(s.x-this.style.weight/2,s.y),y=L.point(s.x+this.style.weight/2,s.y);n=this._map.layerPointToLatLng(c),l=this._map.layerPointToLatLng(y)}else{var g=L.point(s.x,s.y-this.style.weight/2),f=L.point(s.x,s.y+this.style.weight/2);n=this._map.layerPointToLatLng(g),l=this._map.layerPointToLatLng(f)}var P=[this.getLatLngs()[0],n,l];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=1;this.scaleByMap&&"function"==typeof this.layer.getSymZoomScale&&(o=this.layer.getSymZoomScale(),null!=this.minScale&&othis.maxScale&&(o=this.maxScale));var i=this.space*o,n=null;if(0===this.annotationPosition){e.labelAlign="rb";var l=L.latLng(t.getNorth(),t.getWest()),a=this._map.latLngToLayerPoint(l);a.x-=i,n=this._map.layerPointToLatLng(a)}else if(1===this.annotationPosition){e.labelAlign="rt";var s=L.latLng(t.getSouth(),t.getWest()),r=this._map.latLngToLayerPoint(s);r.x-=i,n=this._map.layerPointToLatLng(r)}else if(2===this.annotationPosition){e.labelAlign="lb";var u=L.latLng(t.getNorth(),t.getEast()),p=this._map.latLngToLayerPoint(u);p.x+=i,n=this._map.layerPointToLatLng(p)}else if(3===this.annotationPosition){e.labelAlign="lt";var h=L.latLng(t.getSouth(),t.getEast()),c=this._map.latLngToLayerPoint(h);c.x+=i,n=this._map.layerPointToLatLng(c)}else if(4===this.annotationPosition){e.labelAlign="cb";var y=L.latLng(t.getNorth(),(t.getWest()+t.getEast())/2),g=this._map.latLngToLayerPoint(y);g.y-=i,n=this._map.layerPointToLatLng(g)}else if(5===this.annotationPosition){e.labelAlign="ct";var f=L.latLng(t.getSouth(),(t.getWest()+t.getEast())/2),P=this._map.latLngToLayerPoint(f);P.y+=i,n=this._map.layerPointToLatLng(P)}else if(6===this.annotationPosition){e.labelAlign="rm";var d=L.latLng((t.getSouth()+t.getNorth())/2,t.getWest()),S=this._map.latLngToLayerPoint(d);S.x-=i,n=this._map.layerPointToLatLng(S)}else if(7===this.annotationPosition){e.labelAlign="lm";var m=L.latLng((t.getSouth()+t.getNorth())/2,t.getEast()),b=this._map.latLngToLayerPoint(m);b.x+=i,n=this._map.layerPointToLatLng(b)}else if(8===this.annotationPosition&&this.symbolData.middleMarkExist){var M;M=!0===this.limitWidthHeight?this.middleMarkBounds.scale(this.initialScale.x*o,this.anchorPoint):this._widthHeightLimitScale();var v=new SuperMap.Geometry.Point((M.left+M.right)/2,(M.top+M.bottom)/2);if(this.negativeImage||this.horizontalMirror){var A=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(A,Math.PI,v)}if(this.verticalMirror){A=SuperMap.Plot.PlottingUtil.projectPoint(v,new SuperMap.Geometry.Point(this.anchorPoint.x,this.anchorPoint.y),new SuperMap.Geometry.Point(100,this.anchorPoint.y));SuperMap.Plot.PlottingUtil.rotateAngle(A,Math.PI,v)}v.x-=this.anchorPoint.x,v.y-=this.anchorPoint.y;var T=this.dRotate*(Math.PI/180);SuperMap.Plot.PlottingUtil.rotateAngle(new SuperMap.Geometry.Point(0,0),T,v);var _=this._map.latLngToLayerPoint(this.getLatLngs()[0]);!0===this.positionOffset&&(_.x+=this.positionOffsetX,_.y+=this.positionOffsetY);var O=96*M.getWidth()/25.4/10,x=96*M.getHeight()/25.4/10;e.graphicWidth=O,e.graphicHeight=x,n=this._transitionPoint(v,_)}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 w={externalGraphic:e.externalGraphic,graphicWidth:e.graphicWidth,graphicHeight:e.graphicHeight,rotation:-this.dRotate},E=L.supermap.plotting.pointImage([n],w);this._annotationId=this.components.length,E.fromZoom=this._map.getZoom(),this._addComponents(E)}else if(8!==this.annotationPosition){e.fontSize=this.style.fontSize*o,e.fontSizeLimit=!1,e.labelRotation=0,this._annotationId=this.components.length;var C=this._createAndDrawLayer(34,[n],e,this.textContent);C.isAnnotation=!0,C.fromZoom=this._map.getZoom()}}},_calculateLabel:function(t,e){for(var o=0;othis.maxScale&&(n=this.maxScale);for(var l=0;lp&&(p=g)}h=parseInt(s.style.fontSize*n*u)+s.paddingY*n*2}var f=void 0,P=void 0,d=L.point(0,0),S=L.point(0,0);switch(s.textPosition){case SuperMap.Plot.AnnoPosition.LEFTTOP:s.style.labelAlign="rb",f=L.latLng(t.getNorth(),t.getWest()),(P=this._map.latLngToLayerPoint(f)).x+=s.offsetX*n,P.y+=s.offsetY*n,!0===s.border&&(d.x=P.x,d.y=P.y,S.x=P.x-p,S.y=P.y-h);break;case SuperMap.Plot.AnnoPosition.LEFTBOTTOM:s.style.labelAlign="rt",f=L.latLng(t.getSouth(),t.getWest()),(P=this._map.latLngToLayerPoint(f)).x+=s.offsetX*n,P.y+=s.offsetY*n,!0===s.border&&(d.x=P.x,d.y=P.y,S.x=P.x-p,S.y=P.y+h);break;case SuperMap.Plot.AnnoPosition.RIGHTTOP:s.style.labelAlign="lb",f=L.latLng(t.getNorth(),t.getEast()),(P=this._map.latLngToLayerPoint(f)).x+=s.offsetX*n,P.y+=s.offsetY*n,!0===s.border&&(d.x=P.x,d.y=P.y,S.x=P.x+p,S.y=P.y-h);break;case SuperMap.Plot.AnnoPosition.RIGHTBOTTOM:s.style.labelAlign="lt",f=L.latLng(t.getSouth(),t.getEast()),(P=this._map.latLngToLayerPoint(f)).x+=s.offsetX*n,P.y+=s.offsetY*n,!0===s.border&&(d.x=P.x,d.y=P.y,S.x=P.x+p,S.y=P.y+h);break;case SuperMap.Plot.AnnoPosition.TOP:s.style.labelAlign="cb",f=L.latLng(t.getNorth(),(t.getWest()+t.getEast())/2),(P=this._map.latLngToLayerPoint(f)).x+=s.offsetX*n,P.y+=s.offsetY*n,!0===s.border&&(d.x=P.x-p/2,d.y=P.y,S.x=P.x+p/2,S.y=P.y-h);break;case SuperMap.Plot.AnnoPosition.BOTTOM:s.style.labelAlign="ct",f=L.latLng(t.getSouth(),(t.getWest()+t.getEast())/2),(P=this._map.latLngToLayerPoint(f)).x+=s.offsetX*n,P.y+=s.offsetY*n,!0===s.border&&(d.x=P.x-p/2,d.y=P.y,S.x=P.x+p/2,S.y=P.y+h);break;case SuperMap.Plot.AnnoPosition.LEFT:s.style.labelAlign="rm",f=L.latLng((t.getSouth()+t.getNorth())/2,t.getWest()),(P=this._map.latLngToLayerPoint(f)).x+=s.offsetX*n,P.y+=s.offsetY*n,!0===s.border&&(d.x=P.x,d.y=P.y+h/2,S.x=P.x-p,S.y=P.y-h/2);break;case SuperMap.Plot.AnnoPosition.RIGHT:s.style.labelAlign="lm",f=L.latLng((t.getSouth()+t.getNorth())/2,t.getEast()),(P=this._map.latLngToLayerPoint(f)).x+=s.offsetX*n,P.y+=s.offsetY*n,!0===s.border&&(d.x=P.x,d.y=P.y+h/2,S.x=P.x+p,S.y=P.y-h/2);break;case SuperMap.Plot.AnnoPosition.ANCHOR:s.style.labelAlign="lm",f=L.latLng(e.lat,e.lng),(P=this._map.latLngToLayerPoint(f)).x+=s.offsetX*n,P.y+=s.offsetY*n,s.offsetX>0?(s.style.labelAlign="lm",!0===s.border&&(d.x=P.x,d.y=P.y+h/2,S.x=P.x+p,S.y=P.y-h/2)):(s.style.labelAlign="rm",!0===s.border&&(d.x=P.x,d.y=P.y+h/2,S.x=P.x-p,S.y=P.y-h/2))}var m=this._map.layerPointToLatLng(P);if(!0===s.showRelationLine&&(0!==s.offsetX||0!==s.offsetY)){var b=s.lineStyle;null==s.lineStyle&&(b=SuperMap.Util.copyAttributes(b,this.style)),b.lineColorLimit=!0,b.lineTypeLimit=!0,b.lineWidthLimit=!0;var M=this._createAndDrawLayer(SuperMap.Plot.SymbolType.POLYLINESYMBOL,[m,f],b);M.isSymbolText=!0,M.fromZoom=this._map.getZoom(),a.push(M)}var v=SuperMap.Util.copyAttributes(i,s.style);if(s.border){var A=this._map.layerPointToLatLng(d),T=this._map.layerPointToLatLng(S),_=this._createAndDrawLayer(SuperMap.Plot.SymbolType.RECTANGLESYMBOL,[A,T],SuperMap.Util.cloneObject(v));_.isSymbolText=!0,_.fromZoom=this._map.getZoom(),a.push(_);var O=d.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,n=this.symbolSize.h/this.dScale/this.symbolSizeInLib.h;this.initialScale!==i?this.initialScale=i:this.initialScale!==n&&(this.initialScale=n),this.symbolSize.w=this.initialScale*this.dScale*this.symbolSizeInLib.w,this.symbolSize.h=this.initialScale*this.dScale*this.symbolSizeInLib.h}}var l=this.symbolSizeInLib.w,a=this.symbolSize.w;this.symbolSizeInLib.w0){var t=this._map.latLngToLayerPoint(this.getLatLngs()[0]),e=.5*this.style.graphicWidth-this.style.graphicXOffset,o=.5*this.style.graphicHeight-this.style.graphicYOffset,i=L.point(t.x-e,t.y-o),n=L.point(i.x+this.style.graphicWidth,i.y+this.style.graphicHeight),l=this._map.layerPointToLatLng(i),a=this._map.layerPointToLatLng(n),s=new L.latLngBounds;if(0!==this.dRotate){var r=[];r.push(new SuperMap.Geometry.Point(l.lng,l.lat)),r.push(new SuperMap.Geometry.Point(a.lng,l.lat)),r.push(new SuperMap.Geometry.Point(a.lng,a.lat)),r.push(new SuperMap.Geometry.Point(l.lng,a.lat));for(var u=null,p=null,h=null,c=null,y=this.dRotate*(Math.PI/180),g=0;gr[g].x&&(u=r[g].x),null==p?p=r[g].x:pr[g].y&&(h=r[g].y),null==c?c=r[g].y:cu&&(u=c)}p=parseInt(a.style.fontSize*r)+2*a.paddingY}var y=void 0,g=void 0,f=L.point(0,0),P=L.point(0,0);switch(a.textPosition){case SuperMap.Plot.AnnoPosition.LEFTTOP:a.style.labelAlign="rb",y=L.latLng(t.getNorth(),t.getWest()),(g=this._map.latLngToLayerPoint(y)).x+=a.offsetX,g.y+=a.offsetY,!0===a.border&&(f.x=g.x,f.y=g.y,P.x=g.x-u,P.y=g.y-p);break;case SuperMap.Plot.AnnoPosition.LEFTBOTTOM:a.style.labelAlign="rt",y=L.latLng(t.getSouth(),t.getWest()),(g=this._map.latLngToLayerPoint(y)).x+=a.offsetX,g.y+=a.offsetY,!0===a.border&&(f.x=g.x,f.y=g.y,P.x=g.x-u,P.y=g.y+p);break;case SuperMap.Plot.AnnoPosition.RIGHTTOP:a.style.labelAlign="lb",y=L.latLng(t.getNorth(),t.getEast()),(g=this._map.latLngToLayerPoint(y)).x+=a.offsetX,g.y+=a.offsetY,!0===a.border&&(f.x=g.x,f.y=g.y,P.x=g.x+u,P.y=g.y-p);break;case SuperMap.Plot.AnnoPosition.RIGHTBOTTOM:a.style.labelAlign="lt",y=L.latLng(t.getSouth(),t.getEast()),(g=this._map.latLngToLayerPoint(y)).x+=a.offsetX,g.y+=a.offsetY,!0===a.border&&(f.x=g.x,f.y=g.y,P.x=g.x+u,P.y=g.y+p);break;case SuperMap.Plot.AnnoPosition.TOP:a.style.labelAlign="cb",y=L.latLng(t.getNorth(),(t.getWest()+t.getEast())/2),(g=this._map.latLngToLayerPoint(y)).x+=a.offsetX,g.y+=a.offsetY,!0===a.border&&(f.x=g.x-u/2,f.y=g.y,P.x=g.x+u/2,P.y=g.y-p);break;case SuperMap.Plot.AnnoPosition.BOTTOM:a.style.labelAlign="ct",y=L.latLng(t.getSouth(),(t.getWest()+t.getEast())/2),(g=this._map.latLngToLayerPoint(y)).x+=a.offsetX,g.y+=a.offsetY,!0===a.border&&(f.x=g.x-u/2,f.y=g.y,P.x=g.x+u/2,P.y=g.y+p);break;case SuperMap.Plot.AnnoPosition.LEFT:a.style.labelAlign="rm",y=L.latLng((t.getSouth()+t.getNorth())/2,t.getWest()),(g=this._map.latLngToLayerPoint(y)).x+=a.offsetX,g.y+=a.offsetY,!0===a.border&&(f.x=g.x,f.y=g.y+p/2,P.x=g.x-u,P.y=g.y-p/2);break;case SuperMap.Plot.AnnoPosition.RIGHT:a.style.labelAlign="lm",y=L.latLng((t.getSouth()+t.getNorth())/2,t.getEast()),(g=this._map.latLngToLayerPoint(y)).x+=a.offsetX,g.y+=a.offsetY,!0===a.border&&(f.x=g.x,f.y=g.y+p/2,P.x=g.x+u,P.y=g.y-p/2);break;case SuperMap.Plot.AnnoPosition.ANCHOR:a.style.labelAlign="lm",y=L.latLng(e.lat,e.lng),(g=this._map.latLngToLayerPoint(y)).x+=a.offsetX,g.y+=a.offsetY,a.offsetX>0?(a.style.labelAlign="lm",!0===a.border&&(f.x=g.x,f.y=g.y+p/2,P.x=g.x+u,P.y=g.y-p/2)):(a.style.labelAlign="rm",!0===a.border&&(f.x=g.x,f.y=g.y+p/2,P.x=g.x-u,P.y=g.y-p/2))}var d=this._map.layerPointToLatLng(g);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,y],S);m.isSymbolText=!0,m.fromZoom=this._map.getZoom(),l.push(m)}var b=SuperMap.Util.copyAttributes(i,a.style);if(a.border){var M=this._map.layerPointToLatLng(f),v=this._map.layerPointToLatLng(P),A=this._createAndDrawLayer(SuperMap.Plot.SymbolType.RECTANGLESYMBOL,[M,v],SuperMap.Util.cloneObject(b));A.isSymbolText=!0,A.fromZoom=this._map.getZoom(),l.push(A);var T=f.x1&&(e=1),e<0&&(e=0),this.radiusText[e]!==t&&(this.radiusText[e]=t,this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues))},getRadiusText:function(t){return t>1&&(t=1),t<0&&(t=0),this.radiusText[t]},setRadiusTextPos:function(t){this.radiusPosAngle!==t&&(this.radiusPosAngle=t,0!==this.radiusText.length&&(this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)))},getRadiusTextPos:function(){return this.radiusPosAngle},setRadiusLineType:function(t){this.radiusLineType!==t&&(this.radiusLineType=t,0!==this.radiusText.length&&(this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)))},getRadiusLineType:function(){return this.radiusLineType},initialize:function(t,e,o,i){this.scalePoints=[],this.scaleValues=[],nr.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,lr.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[0][0].clone();o.isScalePoint=!0,o.tag=0;var i=e[e.length-1][e[e.length-1].length-1].clone();i.isScalePoint=!0,i.tag=1,this.scalePoints.push(o),this.scalePoints.push(i),e[0].splice(0,0,this.centerPoint.clone()),e[e.length-1].push(this.centerPoint.clone()),this.latLngs.length>2&&this.latLngs.splice(1,this.latLngs.length-1)}for(var n=0;nthis.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.scaleByMap=!1,this._addComponents(L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.PATHTEXT,u,{textContent:this.textContent,showPathLine:!1,isCurve:!1,relLineText:s,scaleByMap:!1},this.style)),o=a[0][Math.ceil(a[0].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),n=[];if(n.push(this.centerPoint),n.push(L.latLng(e.y,e.x)),SuperMap.Plot.RadiusLineType.NONE!==this.radiusLineType&&this._createAndDrawLayer(SuperMap.Plot.SymbolType.POLYLINESYMBOL,n,{surroundLineFlag:!1}),this.radiusLineType===SuperMap.Plot.RadiusLineType.ARROW){var l;if(null===this.map)l=0;else{var a=this._map.layerPointToLatLng(L.point(0,0)),s=this._map.layerPointToLatLng(L.point(this.subSymbolDefaultPixelSize,0));l=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,l,12.5),u=SuperMap.Plot.PlottingUtil.findPoint(e,o,l,-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.scaleByMap=!1,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),y=SuperMap.Plot.PlottingUtil.findPoint(h,e,.02*i,90),g=SuperMap.Plot.PlottingUtil.findPoint(c,e,.02*i,90),f=L.latLng(y.y,y.x),P=L.latLng(g.y,g.x),d=SuperMap.Plot.RelLineText.ONLEFTLINE,S=[];y.xthis.startAngle&&othis.startAngle&&o+360this.startAngle&&ithis.startAngle&&i+3600&&(this.centerPoint=this.latLngs[0].clone()),2===this.latLngs.length&&(this.radius=SuperMap.Plot.PlottingUtil.distVincenty(this.latLngs[0],this.latLngs[1]));this.redraw()},_resizeLatLngs:function(t,e,o,i){var n=!1;1===this.latLngs.length&&(n=!0,this.latLngs.push(this.scalePoints[0])),lr.prototype._resizeLatLngs.call(this,t,e,o,i),this.centerPoint.lng=this.latLngs[0].lng,this.centerPoint.lat=this.latLngs[0].lat,this.radius=SuperMap.Plot.PlottingUtil.distVincenty(this.latLngs[0],this.latLngs[1]),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;e2&&Math.abs(l.lng-i[i.length-1].lng)>180&&(o.push(i.slice()),i.length=0),i.push(l)}if(n-e>0&&n-e<5){var a=SuperMap.Plot.PlottingUtil.destinationVincenty(this.centerPoint,360-e+90,1e3*this.radius);i.push(a)}return o.push(i.slice()),o}});L.supermap.plotting.arcRegion=function(t,e,o,i){return new Jr(t,e,o,i)};var qr=$s.extend({ratio:null,scalePoints:null,scaleValues:null,initialize:function(t,e,o,i){$s.prototype.initialize.call(this,t,e,o,i),this.libID=0,this.code=SuperMap.Plot.SymbolType.FLAGGROUP,this.symbolType=SuperMap.Plot.SymbolType.FLAGGROUP,this.symbolName="多旗",i.subObjects&&(this.subObjects=i.subObjects),null===this.ratio&&(this.ratio=.8),this.scaleByMap=!0,this.minScale=1,this.maxScale=5},destroy:function(){$s.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),n=o.lng-e.lng,l=e.lat-o.lat,a=n*n,s=l*l,r=n*l,u=n*n+l*l;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 n=Math.sqrt(Math.pow(o.lng-i.lng,2)+Math.pow(o.lat-i.lat,2)),l=this._projectPoint(e,o,i),a=Math.sqrt(Math.pow(o.lng-l.lng,2)+Math.pow(o.lat-l.lat,2));this.ratio[t-1]=a/n}this.redraw()},_reView:function(){for(var t in this.components)this.components[t].scaleByMap=this.scaleByMap,this.components[t].minScale=this.minScale,this.components[t].maxScale=this.maxScale,this.components[t]._reView();this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)},_parseSymbolData:function(){$s.prototype._parseSymbolData.call(this),this.symbolData&&(this.ratio=this.symbolData.ratio)},_setSymbolData:function(){$s.prototype._setSymbolData.call(this),this.symbolData&&(this.symbolData.ratio=this.ratio)}});L.supermap.plotting.flagGroup=function(t,e,o,i){return new qr(t,e,o,i)},L.supermap.plotting.FlagGroup=qr;var Kr=$s.extend({colNum:null,space:null,initialize:function(t,e,o,i){$s.prototype.initialize.call(this,t,e,o,i),this.libID=0,this.code=SuperMap.Plot.SymbolType.NAVYDEPLOYMENT,this.symbolType=SuperMap.Plot.SymbolType.NAVYDEPLOYMENT,this.symbolName="海军兵力部署",null===this.colNum&&(this.colNum=1),null===this.space&&(this.space=10),this.scaleByMap=!0},destroy:function(){this.space=null,this.colNum=null,$s.prototype.destroy.call(this)},redraw:function(){"none"===this.style.display||null!=this.layer&&"function"==typeof this.layer.getVisibility&&!1===this.layer.getVisibility()?this._clearComponents():this._redrawComponents()},_calculateParts:function(){var t=this._map.getFeatureByUuid(this.associatedUuid);if(null!==t&&t.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL&&0!==t.latLngs.length){for(var e=!1,o=0;othis.maxScale&&(i=this.maxScale),0!==this.subObjects.length&&0===this.components.length)for(var n=0,l=this.subObjects.length;n=this.subSymbols[S].symbolData.innerCells[C].positionPoints[I].x*i&&(x=this.subSymbols[S].symbolData.innerCells[C].positionPoints[I].x*i),w<=this.subSymbols[S].symbolData.innerCells[C].positionPoints[I].y*i&&(w=this.subSymbols[S].symbolData.innerCells[C].positionPoints[I].y*i),E>=this.subSymbols[S].symbolData.innerCells[C].positionPoints[I].y*i&&(E=this.subSymbols[S].symbolData.innerCells[C].positionPoints[I].y*i);var R=L.latLng(_,T),D=this._map.latLngToLayerPoint(L.latLng(_,T)),U=new SuperMap.Geometry.Point(O,(w+E)/2),N=new SuperMap.Geometry.Point(U.x,U.y),B=new SuperMap.Geometry.Point(this.subSymbols[S].symbolData.anchorPoint.x,this.subSymbols[S].symbolData.anchorPoint.y),k=this._transitionPoint(N,D),F=this._transitionPoint(B,D);R.lat+=F.lat-k.lat,R.lng+=F.lng-k.lng;var V=this.subSymbols[S].symbolData.libID,j=this.subSymbols[S].symbolData.code;this.subSymbols[S].symbolData.annotationPosition=6;var Y=SuperMap.Util.cloneObject(this.subSymbols[S].symbolData),z=L.supermap.plotting.PlottingObject.createSymbol(V,j,R,{serverUrl:this.serverUrl,symbolData:Y,scaleByMap:this.scaleByMap,minScale:this.minScale,maxScale:this.maxScale,space:0});z.enableEdit=!0,z.ownerGroup=this,this._addComponents(z),this.bounds=new L.LatLngBounds,this.bounds.extend(z.getBoundsWithText()),this.subObjects.push(z)}if(this.bounds=new L.LatLngBounds,this.bounds=this._calculateBounds(),null!==this.textContent&&0!==this.textContent.length){var G=L.latLng(a[0].lat+P/2+u,a[0].lng-5*u),W=L.supermap.plotting.PlottingObject.createSymbol(0,34,[G],{textContent:this.textContent,serverUrl:this.serverUrl,scaleByMap:this.scaleByMap,minScale:this.minScale,maxScale:this.maxScale});W.style.labelAlign="rb",W.style.scaleByMap=!0,W.enableEdit=!0,W.ownerGroup=this,this._addComponents(W),this.bounds.extend(W.getBounds()),this.subObjects.push(W)}var X=new L.LatLngBounds(L.latLng(this.bounds.getSouth()-u,this.bounds.getWest()-u),L.latLng(this.bounds.getNorth()+u,this.bounds.getEast()+u)),H=[];H.push(L.latLng(X.getNorth(),X.getWest())),H.push(L.latLng(X.getSouth(),X.getEast()));var Z=L.latLng(a[0].lat,a[0].lng);Z.isFixedPos=!0,H.push(Z);var J=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.ANNOFRAMESYMBOL,H,{serverUrl:this.serverUrl,scaleByMap:this.scaleByMap,minScale:this.minScale,maxScale:this.maxScale});for(var q in J.enableEdit=!0,J.ownerGroup=this,this.subObjects.splice(0,0,J),this._addComponents(J),this.subObjects)this.subObjects[q].ownerGroup=this,this.subObjects[q].enableEdit=!0,this._addComponents(this.subObjects[q])}},_reView:function(){this.redraw(),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)0!==t&&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&&(i=this.maxScale),0!==this.subObjects.length&&0===this.components.length)for(var n=0,l=this.subObjects.length;n=S.length);b++){var A=S[M];if(void 0!==A.symbolData&&null!==A.symbolData){for(var T=A.symbolData.libID,_=A.symbolData.code,O=d.lng+b*(u+Math.abs(g.getEast()-g.getWest())),x=d.lat-(2*u+Math.abs(g.getNorth()-g.getSouth())/2),w=0,E=0,C=0,I=0,R=0;R=A.symbolData.innerCells[R].positionPoints[D].x*i&&(E=A.symbolData.innerCells[R].positionPoints[D].x*i),C<=A.symbolData.innerCells[R].positionPoints[D].y*i&&(C=A.symbolData.innerCells[R].positionPoints[D].y*i),I>=A.symbolData.innerCells[R].positionPoints[D].y*i&&(I=A.symbolData.innerCells[R].positionPoints[D].y*i);var U=L.latLng(x,O),N=this._map.latLngToLayerPoint(L.latLng(x,O)),B=new SuperMap.Geometry.Point((w+E)/2,C),k=new SuperMap.Geometry.Point(B.x,B.y),F=new SuperMap.Geometry.Point(S[M].symbolData.anchorPoint.x,S[M].symbolData.anchorPoint.y),V=this._transitionPoint(k,N),j=this._transitionPoint(F,N);U.lat+=j.lat-V.lat,U.lng+=j.lng-V.lng,A.symbolData.annotationPosition=5;var Y=SuperMap.Util.cloneObject(A.symbolData),z=L.supermap.plotting.PlottingObject.createSymbol(T,_,U,{symbolData:Y,scaleByMap:this.scaleByMap,minScale:this.minScale,maxScale:this.maxScale,space:0});z.enableEdit=!0,z.ownerGroup=this,this._addComponents(z),this.subObjects.push(z),M++}}this.bounds=this._calculateBounds(),d.lat=this.bounds.getSouth()}if(this.isShowTooltip){this.bounds=new L.LatLngBounds,this.bounds=this._calculateBounds();var G=new L.LatLngBounds(L.latLng(this.bounds.getSouth()-u,this.bounds.getWest()-u),L.latLng(this.bounds.getNorth()+5*u,this.bounds.getEast()+u)),W=[];W.push(L.latLng(G.getNorth(),G.getWest())),W.push(L.latLng(G.getSouth(),G.getEast()));var X=L.latLng(a[0].lat,a[0].lng);X.isFixedPos=!0,W.push(X);var H=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.ANNOFRAMESYMBOL,W,{serverUrl:this.serverUrl,scaleByMap:this.scaleByMap,minScale:this.minScale,maxScale:this.maxScale});for(var Z in H.enableEdit=!0,H.ownerGroup=this,this.subObjects.splice(0,0,H),this._addComponents(H),this._clearComponents(),this.subObjects)this.subObjects[Z].enableEdit=!0,this.subObjects[Z].ownerGroup=this,this._addComponents(this.subObjects[Z])}}},_setSubSymbolText:function(){for(var t=0;t0&&(this.latLngs=L.Util.isArray(o)?o:[o]),SuperMap.Util.extend(this,i),void 0!==this.uuid&&null!==this.uuid||(this.uuid=SuperMap.Plot.PlottingUtil.generateUuid())},destroy:function(){this.libID=null,this.code=null,this.symbolType=null,this.symbolName=null,this.uuid=null,this.associatedUuid=null,this.minEditPts=null,this.maxEditPts=null,this.latLngs=null,this.components=null},onAdd:function(t){this.layer=t,this._renderer=t._renderer,this._map=t._map,this.redraw(),ir&&(this.dragging||(this.dragging=new ir(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&&n<=h||u>h&&n<=u&&n>=h)){g=-1;break}c<=i||r!==p&&(cMath.max(r,p))||(u=u&&nh&&n=h)&&++g}else if(n===u&&(r<=p&&i>=r&&i<=p||r>=p&&i<=r&&i>=p)){g=-1;break}return-1===g?1:!!(1&g)},_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 Hs){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 l=1;l1&&(i.push(n),n=[]);0!==n.length&&i.push(n);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;u5?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)),n=this._map.layerPointToLatLng(L.point(o,0)),l=SuperMap.Plot.PlottingUtil.distance({x:i.lng,y:i.lat},{x:n.lng,y:n.lat}),a=l,s=l*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 y=new Object;y.type=SuperMap.Plot.SymbolType.POLYLINESYMBOL,y.positionPoints=[],y.positionPoints.push(new SuperMap.Geometry.Point(-(c+1)*a+p,.5*s)),y.positionPoints.push(new SuperMap.Geometry.Point(-(c+1)*a+p,-.5*s)),y.style={surroundLineFlag:!1,fontSize:12},u.push(y);var g=new Object;g.type=SuperMap.Plot.SymbolType.TEXTSYMBOL,g.positionPoints=[],g.positionPoints.push(new SuperMap.Geometry.Point(-(.5+c+1)*a+p,0)),g.textContent=e[c-1],g.style={surroundLineFlag:!1,fontSize:12,fontFamily:"Microsoft YaHei"},g.style.labelAlign="cm",u.push(g)}var 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}});L.supermap.plotting.literateSign=function(t,e,o,i){return new tu(t,e,o,i)},L.supermap.plotting.LiterateSign=tu;var eu=lr.extend({relLineText:0,showPathLine:!0,showPathLineArrow:!1,isCurve:!1,isAvoid:!1,textToLineDistance:0,fontSpace:0,getRelLineText:function(){return this.relLineText},setRelLineText:function(t){this.relLineText!==t&&(this.relLineText=t,this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues))},setFontSpace:function(t){this.fontSpace!==t&&(this.fontSpace=t,this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues))},getShowPathLine:function(){return this.showPathLine},setShowPathLine:function(t){this.showPathLine!==t&&(this.showPathLine=t,this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues))},getShowPathLineArrow:function(){return this.showPathLineArrow},setShowPathLineArrow:function(t){this.showPathLineArrow!==t&&(this.showPathLineArrow=t,this.showPathLine&&(this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)))},getIsCurveLine:function(){return this.isCurve},setCurveLine:function(t){this.isCurve!==t&&(this.isCurve=t,this.showPathLine&&(this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)))},getIsAvoidLine:function(){return this.isAvoid},setAvoidLine:function(t){this.isAvoid!==t&&(this.isAvoid=t,this.relLineText===SuperMap.Plot.RelLineText.ONLINE&&this.showPathLine&&(this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)))},getSpace:function(){return this.textToLineDistance},setSpace:function(t){this.textToLineDistance!==t&&(this.textToLineDistance=t,this.relLineText!==SuperMap.Plot.RelLineText.ONLINE&&(this.redraw(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)))},initialize:function(t,e,o,i){this.code=SuperMap.Plot.SymbolType.PATHTEXT,this.libID=0,this.symbolType=SuperMap.Plot.SymbolType.PATHTEXT,this.symbolName="沿线注记",this.minEditPts=2,this.maxEditPts=9999,i.scaleByMap=!1,lr.prototype.initialize.call(this,t,e,o,i)},_reView:function(){this.fromZoom!==this._map.getZoom()&&(this.redraw(),this.fromZoom=this._map.getZoom())},toSuperMapAlgorithms:function(){lr.prototype.toSuperMapAlgorithms.call(this),this.superMapAlgoSymbol.relLineText=this.relLineText,this.superMapAlgoSymbol.showPathLine=this.showPathLine,this.superMapAlgoSymbol.showPathLineArrow=this.showPathLineArrow,this.superMapAlgoSymbol.isCurve=this.isCurve,this.superMapAlgoSymbol.isAvoid=this.isAvoid,this.superMapAlgoSymbol.textToLineDistance=this.textToLineDistance}});L.supermap.plotting.pathText=function(t,e,o,i){return new eu(t,e,o,i)},L.supermap.plotting.PathText=eu;var ou=nr.extend({route:null,routeNode:null,_isFirstNode:function(){for(var t=0;t=this.minEditPts){if(this.routeNode.type===SuperMap.Plot.RouteNodeType.STANDBY){var t=SuperMap.Plot.RouteNodePrimitives.getRouteNodeCells(this.routeNode.type,!1,this.routeNode.rotate);this._transformSymbolCellsToGeometrys(t);var e=SuperMap.Plot.RouteNodePrimitives.getRouteNodeCells(this.routeNode.type,!0);this._transformSymbolCellsToGeometrys(e)}else{var o=SuperMap.Plot.RouteNodePrimitives.getRouteNodeCells(this.routeNode.type);this._transformSymbolCellsToGeometrys(o)}if(this.routeNode.style=this.style,null!==this.routeNode.name&&""!==this.routeNode.name){var i=this.getBounds(),n=L.latLng(i.getNorth(),i.getEast()),l=this.routeNode.style;l.labelAlign="lb",this._createAndDrawLayer(SuperMap.Plot.SymbolType.TEXTSYMBOL,[n],l,this.routeNode.name).isNameLayer=!0}}},_transformSymbolCellsToGeometrys:function(t){for(var e=this._map.latLngToLayerPoint(this.latLngs[0]),o=0;o5?this.dScale=5:this.dScale<1&&(this.dScale=1),this.redraw()):this.redraw(),this.fromZoom=this._map.getZoom(),this.fire(SuperMap.Plot.Event.reseteditmarkersvalues))}});L.supermap.plotting.routeNode=function(t,e,o,i){return new ou(t,e,o,i)},L.supermap.plotting.RouteNode=ou;var iu=Qs.extend({routeNodes:[],nextRouteNodeType:SuperMap.Plot.RouteNodeType.TURNING,arrRoutePts:[],initialize:function(t,e,o,i){this.scaleByMap=!1,this.minEditPts=1,this.maxEditPts=9999,this.routeNodes=[],this.arrRoutePts=[],this.prevRouteNode=[],this.prevLiterateSign=[],Qs.prototype.initialize.call(this,t,e,o,i)},destroy:function(){this.routeNodes=null,this.arrRoutePts=null,Qs.prototype.destroy.apply(this,arguments)},highlight:function(t){for(var e in this.highlightFlag=!0,this.highlightStyle=t,this.components)if(this.components[e]instanceof lr){var o=SuperMap.Util.copyAttributes(this.components[e].style,t);this.components[e].setStyle(o)}},unhighlight:function(){for(var t in this.components)if(this.components[t]instanceof lr){var e=SuperMap.Util.copyAttributes(this.components[t].style,this.style);this.components[t].setStyle(e)}this.highlightFlag=!1,this.highlightStyle=null},blinkRoute:function(t,e,o,i){void 0===o&&(o=2),void 0===t&&(t={color:"#ff0000"}),void 0===e&&(e={color:"#0000ff"}),void 0===i&&(i=300);for(var n=[],l=0;l=this.minEditPts&&this._createAndDrawLayer(24,this.latLngs,this.style,"")},move:function(t,e){L.Util.moveLatLngs(this.getLatLngs(),t,e);for(var o=0,i=this.avoidRegions.length;o=this.minEditPts&&(this.scaleByMap=!0,this._createAndDrawLayer(32,this.latLngs,this.style,""))},move:function(t,e){L.Util.moveLatLngs(this.getLatLngs(),t,e);for(var o=0,i=this.avoidRegions.length;oSuperMap.Plot.PlottingUtil.distance(l[u],i[0])&&(r=SuperMap.Plot.PlottingUtil.distance(l[u],i[0]),a=u);var p=0;0===a&&(a=1);for(var h=0;h1&&(this.scaleByMap=!0,this._createAndDrawLayer(24,h,{surroundLineFlag:!1,lineWidthLimit:!0,weight:4*t.style.weight+this.style.weight}),h[0].isScalePoint=!0,h[0].tag=2*l,this.scalePoints.push(h[0]),h[h.length-1].isScalePoint=!0,h[h.length-1].tag=2*l+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(l[0],a[p])&&(r=SuperMap.Plot.PlottingUtil.distance(l[0],a[p]),u=p);for(var h=0;h=SuperMap.Plot.PlottingUtil.distance(l[0],a[y])&&(c=SuperMap.Plot.PlottingUtil.distance(l[0],a[y]),u=y);for(var g=0;ge&&(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;othis.maxScale&&(s=this.maxScale);var r={surroundLineFlag:!1,lineColorLimit:!0,fillColorLimit:!0,lineWidthLimit:!0,lineTypeLimit:!0,fontColorLimit:!0,fontSizeLimit:!0,fillLimit:!0},u=t.getBounds();if((null==u||!u.isValid())&&null!=t.graphic&&null!=t.graphic.layer&&null!=t.graphic.getImage()){t.graphic._project();var p=t.graphic._pxBounds;null!=p&&p.isValid()&&(u.extend(this._map.layerPointToLatLng(p.min)),u.extend(this._map.layerPointToLatLng(p.max)))}if(u&&u.isValid()){for(var h=0,c=o.length;h0?(o[h].style.labelAlign="lm",!0===g&&(b.x=P.x,b.y=P.y+m/2,M.x=P.x+S,M.y=P.y-m/2)):(o[h].style.labelAlign="rm",!0===g&&(b.x=P.x,b.y=P.y+m/2,M.x=P.x-S,M.y=P.y-m/2))}var v=this._map.layerPointToLatLng(P);if(0!==o[h].offsetX||0!==o[h].offsetY){var A={};A.positionPoints=[v,f],A.style={},A.type=SuperMap.Plot.SymbolType.POLYLINESYMBOL,e.push(A)}var T=SuperMap.Util.copyAttributes(r,this.symbolTexts[h].style);if(g){var _=this._map.layerPointToLatLng(b),O=this._map.layerPointToLatLng(M),x={};x.positionPoints=[_,O],x.style=SuperMap.Util.cloneObject(T),x.type=SuperMap.Plot.SymbolType.RECTANGLESYMBOL,e.push(x),d=L.latLng((O.lat-_.lat)/2+_.lat,(_.lng-O.lng)/2+O.lng)}else d=v;var w={};w.positionPoints=d,w.type=SuperMap.Plot.SymbolType.TEXTSYMBOL,w.style=SuperMap.Util.cloneObject(T),w.textContent=o[h].textContent,g&&(w.style.labelAlign="cm"),e.push(w),this.latLngs.push(v)}}for(var E,C=0;C0){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 n=0,l=t.length;nthis.maxScale&&(u=this.maxScale),0===o?(s=L.latLng(l.getNorth(),l.getWest()),r=this._map.latLngToLayerPoint(s),this.symbolTexts[t].offsetX=(i.x-r.x)/u,this.symbolTexts[t].offsetY=(i.y-r.y)/u):1===o?(s=L.latLng(l.getSouth(),l.getWest()),r=this._map.latLngToLayerPoint(s),this.symbolTexts[t].offsetX=(i.x-r.x)/u,this.symbolTexts[t].offsetY=(i.y-r.y)/u):2===o?(s=L.latLng(l.getNorth(),l.getEast()),r=this._map.latLngToLayerPoint(s),this.symbolTexts[t].offsetX=(i.x-r.x)/u,this.symbolTexts[t].offsetY=(i.y-r.y)/u):3===o?(s=L.latLng(l.getSouth(),l.getEast()),r=this._map.latLngToLayerPoint(s),this.symbolTexts[t].offsetX=(i.x-r.x)/u,this.symbolTexts[t].offsetY=(i.y-r.y)/u):4===o?(s=L.latLng(l.getNorth(),(l.getWest()+l.getEast())/2),r=this._map.latLngToLayerPoint(s),this.symbolTexts[t].offsetX=(i.x-r.x)/u,this.symbolTexts[t].offsetY=(i.y-r.y)/u):5===o?(s=L.latLng(l.getSouth(),(l.getWest()+l.getEast())/2),r=this._map.latLngToLayerPoint(s),this.symbolTexts[t].offsetX=(i.x-r.x)/u,this.symbolTexts[t].offsetY=(i.y-r.y)/u):6===o?(s=L.latLng((l.getNorth()+l.getSouth())/2,l.getWest()),r=this._map.latLngToLayerPoint(s),this.symbolTexts[t].offsetX=(i.x-r.x)/u,this.symbolTexts[t].offsetY=(i.y-r.y)/u):7===o?(s=L.latLng((l.getNorth()+l.getSouth())/2,l.getEast()),r=this._map.latLngToLayerPoint(s),this.symbolTexts[t].offsetX=(i.x-r.x)/u,this.symbolTexts[t].offsetY=(i.y-r.y)/u):o===SuperMap.Plot.AnnoPosition.ANCHOR&&(s=n.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL?n.latLngs[0]:l.getCenter(),r=this._map.latLngToLayerPoint(s),this.symbolTexts[t].offsetX=(i.x-r.x)/u,this.symbolTexts[t].offsetY=(i.y-r.y)/u)}},_reView:function(){this.fire(SuperMap.Plot.Event.reseteditmarkersvalues)},move:function(){},_parseSymbolData:function(){if(nr.prototype._parseSymbolData.call(this),this.symbolData){this.addFrame=this.symbolData.addFrame,this.symbolTexts=[];for(var t=0,e=this.symbolData.symbolTexts.length;tthis.maxScale&&(n=this.maxScale);var l=t.latLngs[0],a=this._map.latLngToLayerPoint(l),s=new SuperMap.Pixel(a.x+this.offsetX*n,a.y+this.offsetY*n),r=this._map.layerPointToLatLng(s);0===this.latLngs.length?this.latLngs.push(r):(this.latLngs[0].lng=r.lng,this.latLngs[0].lat=r.lat);var u=L.Util.cloneLatLngs(this.latLngs[0]);u.push(l);var p={style:{surroundLineFlag:!1}};p.style=SuperMap.Util.copyAttributes(p.style,this.style),p.positionPoints=u,p.type=24,e.push(p),SuperMap.Util.isArray(this.textContent)||(this.textContent=[this.textContent]);var h=this.textContent.length,c=this.style.fontSize*h*n+h+1,y=this._map.latLngToLayerPoint(L.latLng(this.latLngs[0].lat,this.latLngs[0].lng)),g=L.point(y.x,y.y-c/2),f=L.point(y.x,y.y+c/2),P=[this._map.layerPointToLatLng(g),this._map.layerPointToLatLng(f)],d={};d.positionPoints=P,d.style={surroundLineFlag:!1},d.style=SuperMap.Util.copyAttributes(d.style,this.style),d.type=24,e.push(d);var S,m=new SuperMap.Geometry.Point(this.latLngs[0].lng,this.latLngs[0].lat);if(0!==this.textContent.length){for(var b=t.getBounds(),M=new SuperMap.Geometry.Point((b.getWest()+b.getEast())/2,b.getNorth()),v=new SuperMap.Geometry.Point((b.getWest()+b.getEast())/2,b.getSouth()),A=SuperMap.Plot.PlottingUtil.pointIsRightToLine(M,v,m),T="",_=0;_this.maxScale&&(i=this.maxScale),this.offsetX=(o.x-e.x)/i,this.offsetY=(o.y-e.y)/i,this.redraw()}},_parseSymbolData:function(){nr.prototype._parseSymbolData.call(this),this.symbolData&&(void 0!==this.symbolData.space&&(this.space=this.symbolData.space),void 0!==this.symbolData.offsetX&&(this.offsetX=this.symbolData.offsetX),void 0!==this.symbolData.offsetY&&(this.offsetY=this.symbolData.offsetY),void 0!==this.symbolData.scaleBeforeOffsetX&&(this.scaleBeforeOffsetX=this.symbolData.scaleBeforeOffsetX),void 0!==this.symbolData.scaleBeforeOffsetY&&(this.scaleBeforeOffsetY=this.symbolData.scaleBeforeOffsetY))},_setSymbolData:function(){nr.prototype._setSymbolData.call(this),this.symbolData&&(this.symbolData.space=this.space,this.symbolData.offsetX=this.offsetX,this.symbolData.offsetY=this.offsetY,void 0!==this.scaleBeforeOffsetX&&(this.symbolData.scaleBeforeOffsetX=this.scaleBeforeOffsetX),void 0!==this.scaleBeforeOffsetY&&(this.symbolData.scaleBeforeOffsetY=this.scaleBeforeOffsetY))}});L.supermap.plotting.symbolText1=function(t,e,o,i){return new cu(t,e,o,i)},L.supermap.plotting.SymbolText1=cu;var yu=L.Path.extend({name:"图元层",serverUrl:null,features:null,visibility:!0,symScaleDefinition:null,enableSymScale:null,options:{serviceParams:{proxy:null,withCredentials:!1,crossOrigin:null,headers:null,serverType:null}},getVisibility:function(){return this.visibility},setVisibility:function(t){if(this.visibility!==t){this.visibility=t;for(var e=0;ethis.features[i].maxScale&&(n=this.features[i].maxScale);var l=this.features[i].getSymbolSize().w*n,a=this.features[i].getSymbolSize().h*n;this.features[i].setSymbolSize(l,a)}}},initialize:function(t,e,o){o=o||{},L.setOptions(this,o),this.name=t,this.serverUrl=e,this.features=[],this.enableSymScale=!0},destroy:function(){this.name="",this.serverUrl=null,this.features=null},beforeAdd:function(t){L.Path.prototype.beforeAdd.call(this,t)},onAdd:function(t){L.Path.prototype.onAdd.call(this,t),this._map=t;var e=this;null==zr.prototype.map&&(zr.prototype.map=t),e instanceof bu&&(L.supermap.plotting.getControl().getPlotMapManager().addPlottingLayer(e),e.getSymScaleDefinition()),this._map.on("zoomend",function(){var t=zr.prototype.getLayerScale();if("function"==typeof e.getMinVisibleScale&&e.getMinVisibleScale()>0&&t0&&t>e.getMaxVisibleScale())for(var o=0;o0&&(e.features[o].redraw(),e.features[o].fromZoom=e._map.getZoom());else for(var i=0;i0&&this.removeFeatures(i.geoSymbolTexts));var n=SuperMap.Util.indexOf(this.features,i);-1!==n&&this.features.splice(n,1),i.layer=null}}this._update()},getFeatures:function(){return this.features.slice()},removeAllFeatures:function(){this.removeFeatures(this.features.slice()),this.features=[]},getSymZoomScale:function(t){return null==this.getSymScaleDefinition()||!0!==this.enableSymScale?1:L.supermap.plotting.getControl().getPlotMapManager().getLayerScale(t)/this.getSymScaleDefinition()},_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)},_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 n=0;n0&&(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))},getMinVisibleScale:function(){return null==this.minVisibleScale&&(this.minVisibleScale=0),this.minVisibleScale},setMinVisibleScale:function(t){this.minVisibleScale=t,this.maxVisibleScale>1e-7&&this.maxVisibleScale1e-7&&this.maxVisibleScale0){for(e=0;e1e-7&&this.markerMaxVisibleScale1e-7&&this.markerMinVisibleScale>t&&(this.markerMaxVisibleScale=this.markerMinVisibleScale)},clearMarkerVisibleScale:function(){this.markerMinVisibleScale=0,this.markerMaxVisibleScale=0},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 gu(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=[]},getSymZoomScale:function(t){return 1},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 Pu&&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(),null!=e._pxBounds&&(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})},_updateDetectionRange:function(t){var e=this;Object.keys(e._detectionRangeCombinations).forEach(function(o){for(var i=e._detectionRangeCombinations[o],n=[],l=0;l0){for(l=0;l0&&(o.feature.layer.getMarkerMinVisibleScale()>0||o.feature.layer.getMarkerMaxVisibleScale()>0)&&(t=!0),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===e.isEditable&&!1===e.isLocked&&e._map&&e._map.getPlotEditControl()&&(e._editLayer.removeFeatures(e.selectedFeatures),e.addFeatures(e.selectedFeatures)),e._map.getPlotEditControl().disableEditFeatures(e.selectedFeatures),e.selectedFeatures.length=0);for(var i=e.getFeaturesInBounds(),n=0,l=i.length;n0)for(var s in i[n].components)if(i[n].components[s]._containsPoint(e._map.latLngToLayerPoint(t.latlng))){a=!0;break}if(a){if(!0===t.originalEvent.altKey&&!0!==t.originalEvent.ctrlKey&&-1!==SuperMap.Util.indexOf(o,i[n]))continue;e._map.getPlotEditControl().unselectFeatures();var r=[];if(!0===L.supermap.plotting.getControl().getTouchMode()&&e._map&&e._map.getPlotEditControl()&&!0===e._map.getPlotEditControl()._isMultiSelect&&(r=r.concat(o.slice())),r.push(i[n]),!0===e.isEditable&&!1===e.isLocked&&e._map&&e._map.getPlotEditControl()&&(e.removeFeatures(r),e._editLayer.addFeatures(r)),e._map.getPlotEditControl().enableEditFeatures(r),e._map.getPlotEditControl().selectFeatures(r),e.selectedFeatures=e.selectedFeatures.concat(r),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:e.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 l in e[o].components)if(e[o].components[l]._containsPoint(this._map.latLngToLayerPoint(t.latlng))){n=!0;break}if(n){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 n=0;n=this.feature.layer.getMarkerMinVisibleScale()||0===this.feature.layer.getMarkerMinVisibleScale())||"function"!=typeof this.feature.layer.getMarkerMinVisibleScale&&"function"==typeof this.feature.layer.getMarkerMaxVisibleScale&&(0===this.feature.layer.getMarkerMaxVisibleScale()||i<=this.feature.layer.getMarkerMaxVisibleScale())||"function"==typeof this.feature.layer.getMarkerMinVisibleScale&&"function"==typeof this.feature.layer.getMarkerMaxVisibleScale&&0===this.feature.layer.getMarkerMaxVisibleScale()&&i>=this.feature.layer.getMarkerMinVisibleScale()||"function"==typeof this.feature.layer.getMarkerMinVisibleScale&&"function"==typeof this.feature.layer.getMarkerMaxVisibleScale&&0===this.feature.layer.getMarkerMinVisibleScale()&&i<=this.feature.layer.getMarkerMaxVisibleScale()||"function"==typeof this.feature.layer.getMarkerMinVisibleScale&&"function"==typeof this.feature.layer.getMarkerMaxVisibleScale&&(0===this.feature.layer.getMarkerMinVisibleScale()&&0===this.feature.layer.getMarkerMaxVisibleScale()||i>=this.feature.layer.getMarkerMinVisibleScale()&&i<=this.feature.layer.getMarkerMaxVisibleScale()))&&this._updateSymbolTexts()}else this._updateSymbolTexts();this._updateJoinLines(),null==this._lastPos?this._lastPos=L.latLng(this._latlng.lat,this._latlng.lng):(this._lastPos.lat=this._latlng.lat,this._lastPos.lng=this._latlng.lng),null==this._lastImage&&null!=this._image?this._lastImage=[this._image.size[0],this._image.size[1]]:null!=this._image&&(this._lastImage[0]=this._image.size[0],this._lastImage[1]=this._image.size[1])}}},getAssociatedGraphics:function(){for(var t=[],e=0;e=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),n=SuperMap.Plot.PlottingUtil.radian(o,i)*SuperMap.Plot.PlottingUtil.RTOD;this._rotation=n-90}var l=this.feature.trajectory.getDisplayLatLngs(this._map.getBounds());if(!0===this.feature.trajectory.showTrackingLine?l.length<=1&&null!=this._trajectoryLine?(this.layer._removeTrajectory(this._trajectoryLine),delete this._trajectoryLine,this._trajectoryLine=null):l.length>1&&null===this._trajectoryLine?(this._trajectoryLine=L.polyline(l,{color:this.feature.trajectory.style.color,weight:this.feature.trajectory.style.weight,opacity:this.feature.trajectory.style.opacity}),this.layer._addTrajectory(this._trajectoryLine)):l.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(l)):null!=this._trajectoryLine&&(this.layer._removeTrajectory(this._trajectoryLine),this._trajectoryLine=null),!0===this.feature.trajectory.showTrackingPoint){if(0===l.length&&this._trajectoryPoints.length>0){for(var a=0;a0){var s=this.feature.trajectory.generateUuidKey(),r=[];if(Object.prototype.hasOwnProperty.call(this._trajectoryPointGraphic,s))for(var u=0;u0||null!=this.feature.detectionRange.pixelRadius&&this.feature.detectionRange.pixelRadius>0||null!=this.feature.detectionRange.points&&this.feature.detectionRange.points.length>0){if(this._detectionRangePoints=[],null!=this.feature.detectionRange.radius&&this.feature.detectionRange.radius>0)for(var P=0;P<=360;P+=5){var d=SuperMap.Plot.PlottingUtil.destinationVincenty(L.latLng(this._latlng.lat,this._latlng.lng),360-P+90,1e3*this.feature.detectionRange.radius);this._detectionRangePoints.push(d)}else if(null!=this.feature.detectionRange.pixelRadius&&this.feature.detectionRange.pixelRadius>0){for(var S=new SuperMap.Geometry.Point(this._latlng.lng,this._latlng.lat),m=[],b=0;b<72;b++){var M=(5*b+1)*Math.PI/180,v=new SuperMap.Geometry.Point(Math.cos(M)*this.feature.detectionRange.pixelRadius+S.x,Math.sin(M)*this.feature.detectionRange.pixelRadius+S.y);m.push(v)}this._detectionRangePoints=detectionLatlngs.concat(L.Util.superMapPointsToLatLngs(m))}else null!=this.feature.detectionRange.points&&this.feature.detectionRange.points.length>0&&(this._detectionRangePoints=detectionLatlngs.concat(L.Util.superMapPointsToLatLngs(this.feature.detectionRange.points)));null==this.feature.composeDetectionRange?null==this._detectionRange?(this._detectionRange=L.polygon(this._detectionRangePoints,{color:this.feature.detectionRange.style.color,weight:this.feature.detectionRange.style.weight,opacity:this.feature.detectionRange.style.opacity,fill:this.feature.detectionRange.style.fill,fillColor:this.feature.detectionRange.style.fillColor,fillOpacity:this.feature.detectionRange.style.fillOpacity,smoothFactor:0}),this.layer._addDetectionRange(this._detectionRange)):(this._detectionRange.options.color===this.feature.detectionRange.style.color&&this._detectionRange.options.weight===this.feature.detectionRange.style.weight&&this._detectionRange.options.opacity===this.feature.detectionRange.style.opacity&&this._detectionRange.options.fill===this.feature.detectionRange.style.fill&&this._detectionRange.options.fillColor===this.feature.detectionRange.style.fillColor&&this._detectionRange.options.fillOpacity===this.feature.detectionRange.style.fillOpacity||this._detectionRange.setStyle({color:this.feature.detectionRange.style.color,weight:this.feature.detectionRange.style.weight,opacity:this.feature.detectionRange.style.opacity,fill:this.feature.detectionRange.style.fill,fillColor:this.feature.detectionRange.style.fillColor,fillOpacity:this.feature.detectionRange.style.fillOpacity}),this._detectionRange.setLatLngs(this._detectionRangePoints)):null!=this._detectionRange&&(this.layer._removeDetectionRange(this._detectionRange),delete this._detectionRange,this._detectionRange=null)}}else null!=this._detectionRange&&(this.layer._removeDetectionRange(this._detectionRange),delete this._detectionRange,this._detectionRange=null)}},setImage:function(t){this._image=t},setUuid:function(t){this._uuid=t},getLatLng:function(){return this._latlng},getImage:function(){return this._image},getUuid:function(){return this._uuid},_cloneImage:function(t){if(this.layer.cacheImages[t]){this.layer.cacheImages[t].imgCount++,null==this._image&&(this._image=new Lu(this.feature)),this._image._ctx.clearRect(0,0,this._image._ctx.width,this._image._ctx.height),this._image.anchor=L.point(this.layer.cacheImages[t].img.anchor.x,this.layer.cacheImages[t].img.anchor.y),this._image.size=[this.layer.cacheImages[t].img.size[0],this.layer.cacheImages[t].img.size[1]],this._image.redrawSize=[this.layer.cacheImages[t].img.redrawSize[0],this.layer.cacheImages[t].img.redrawSize[1]],this._image.redrawAnchor=L.point(this.layer.cacheImages[t].img.redrawAnchor.x,this.layer.cacheImages[t].img.redrawAnchor.y),this._image.bounds=L.latLngBounds(this.layer.cacheImages[t].img.bounds.getSouthEast(),this.layer.cacheImages[t].img.bounds.getNorthWest()),this._image.latLng=L.latLng(this.layer.cacheImages[t].img.latLng.lat,this.layer.cacheImages[t].img.latLng.lng),this._image.fromZoom=this.layer.cacheImages[t].img.fromZoom,null!=this._image.componentLatLngs&&this._image.componentLatLngs.length>0&&(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;ni&&(l=n),l+=10;var a=L.point(o.x-l/2,o.y+l/2),s=L.point(o.x-l/2,o.y-l/2),r=L.point(o.x+l/2,o.y-l/2),u=L.point(o.x+l/2,o.y+l/2),p=this._map.layerPointToLatLng(a),h=this._map.layerPointToLatLng(s),c=this._map.layerPointToLatLng(r),y=this._map.layerPointToLatLng(u);t.handlePoints=[p.clone(),h.clone(),c.clone(),y.clone()];for(var g=1,f=0;f0&&setTimeout(function(){for(var t=0;t=t.feature.layer.getMarkerMinVisibleScale()||0===t.feature.layer.getMarkerMinVisibleScale())||"function"!=typeof t.feature.layer.getMarkerMinVisibleScale&&"function"==typeof t.feature.layer.getMarkerMaxVisibleScale&&(0===t.feature.layer.getMarkerMaxVisibleScale()||N<=t.feature.layer.getMarkerMaxVisibleScale())||"function"==typeof t.feature.layer.getMarkerMinVisibleScale&&"function"==typeof t.feature.layer.getMarkerMaxVisibleScale&&0===t.feature.layer.getMarkerMaxVisibleScale()&&N>=t.feature.layer.getMarkerMinVisibleScale()||"function"==typeof t.feature.layer.getMarkerMinVisibleScale&&"function"==typeof t.feature.layer.getMarkerMaxVisibleScale&&0===t.feature.layer.getMarkerMinVisibleScale()&&N<=t.feature.layer.getMarkerMaxVisibleScale()||"function"==typeof t.feature.layer.getMarkerMinVisibleScale&&"function"==typeof t.feature.layer.getMarkerMaxVisibleScale&&(0===t.feature.layer.getMarkerMinVisibleScale()&&0===t.feature.layer.getMarkerMaxVisibleScale()||N>=t.feature.layer.getMarkerMinVisibleScale()&&N<=t.feature.layer.getMarkerMaxVisibleScale())))for(var B=0;B400&&(t.options.fontPercent=400),void 0===t.options.fontSpace&&(t.options.fontSpace=0),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,n=isNaN(t.options.labelYOffset)?0:t.options.labelYOffset;o.x+=i,o.y-=n}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 l=t.options.labelRotation;t.options.labelRotation=0;var a=t.getPxBounds();t.options.labelRotation=l;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,y=o.y,g=t.options.labelRotation*Math.PI/180,f=Math.sqrt(Math.pow(h.x-c,2)+Math.pow(h.y-y,2)),P=g+Math.atan2(h.y-y,h.x-c);h.x=c+f*Math.cos(P),h.y=y+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(Object.prototype.hasOwnProperty.call(t,"_eventParents"))for(var m in t._eventParents)Object.prototype.hasOwnProperty.call(t._eventParents[m],"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 n=-.5*o+t.graphicXOffset,l=-.5*i+t.graphicYOffset,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(n,l),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,n=(t._radiusY||i)/i,l=(360-t.options.endAngle)*(Math.PI/180),a=(360-t.options.startAngle)*(Math.PI/180);this._drawnLayers[t._leaflet_id]=t,1!==n&&(o.save(),o.scale(1,n)),o.beginPath(),o.arc(e.x,e.y/n,i,l,a,!1),1!==n&&o.restore(),this._fillStroke(o,t)}},_afterTo:function(t,e){var o=t._order;if(o){var i=o.next,n=o.prev;if(n)n.next=i;else if(i)return;i?i.prev=n:n&&(this._drawLast=n);var l=e._order,a=l.next;l.next=o,o.prev=l,a?(a.prev=o,o.next=a):(o.next=null,this._drawLast=o),this._requestRedraw(t)}},_beforePath:function(t,e){this._updateDashArray(t),this._layers[L.Util.stamp(t)]=t;var o=e._order,i=o.prev,n=t._order={layer:t,prev:i,next:o};null==n.prev?this._drawFirst=n:i.next=n,o.prev=n},_onClick:function(t){var e,o=this._map.mouseEventToLayerPoint(t),i=[],n=[],l=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,Object.prototype.hasOwnProperty.call(e,"_eventParents")&&null!==e._eventParents))for(var r in e._eventParents)n.push(e),i.push(e._eventParents[r]);if(e&&n.length>1&&i.length>0){for(var u=!1,p=[],h=[],c=0,y=i.length;c1){this._fireEvent([h[f]],t);break}if(!u){this._fireEvent([h[h.length-1]],t);break}}}this._fireEvent(!!e&&[e],t)}}),L.Polyline.prototype._containsPoint=function(t,e){var o,i,n,l,a,s,r=this._clickTolerance()+10;if(this._pxBounds&&!this._pxBounds.contains(t))return!1;for(o=0,l=this._parts.length;ot.y!=i.y>t.y&&t.x<(i.x-o.x)*(t.y-o.y)/(i.y-o.y)+o.x&&(u=!u);return u||L.Polyline.prototype._containsPoint.call(this,t,!0)},L.supermap.plotting.Text.prototype._containsPoint=function(t){return this._pxBounds.contains(t)},L.supermap.plotting.PointImage.prototype._containsPoint=function(t){return this._pxBounds.contains(t)},L.Canvas.LABEL_ALIGN={l:"left",r:"right",t:"hanging",b:"alphabetic"},L.Canvas.LABEL_FACTOR={l:0,r:-1,t:0,b:-1},L.Canvas.drawImageScaleFactor=null;var Su=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 yu("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&&L.supermap.plotting.getControl().getPlotMapManager().fire("featuresremoved",{features:e,parent:this,layername:this.name})},removeAllFeatures:function(){this.removeFeatures(this.features.slice()),this.features=[]},getFeatures:function(){return this.features.slice()}}));L.supermap.plotting.childPlotLayer=function(t,e){return new mu(t,e)};var bu=yu.extend({caption:"图元层",tolerancePixel:5,isLocked:!1,isEditable:!0,isSelected:!0,childPlotLayers:null,minVisibleScale:0,maxVisibleScale:0,addChildPlotLayer:function(t){for(var e=!0;e;){e=!1;for(var o=0;o1e-7&&this.maxVisibleScale1e-7&&this.maxVisibleScale=0&&n0&&this.getChildPlotLayers()[0].addFeatures(t),this.fire(SuperMap.Plot.Event.beforefeaturesadded,{features:t}),yu.prototype.addFeatures.call(this,t),this.fire(SuperMap.Plot.Event.featuresadded,{features:t,layername:this.name}),this._map.getPlotEditControl()&&this.isSelected&&this._map.getPlotEditControl().enableEditFeatures(t)}},removeFeatures:function(t){SuperMap.Util.isArray(t)||(t=[t]);for(var e=0;e1){var n=new $s(0,SuperMap.Plot.SymbolType.GROUPOBJECT,[],{subObjects:o,uuid:e});return this.addFeatures(n),n}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,n,l,a){l||(l={}),l.startAssociatedUuid=t,l.endAssociatedUuid=e,l.lineRelationType=o,l.uuid=i,l.custom=a;var s=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.LINERELATION,null,l,n,a);return this.addFeatures(s),s},createInterferenceBeam:function(t,e,o,i,n,l){n||(n={}),n.associatedUuid=t,n.uuid=o,n.custom=l;var a=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.INTERFERENCEBEAM,e,n,i,l);return this.addFeatures(a),a},createSatellite:function(t,e,o,i,n,l,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=n,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,l,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=n,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,l,r);this.addFeatures(h),"function"==typeof s&&s({feature:h})}},createSatelliteTimeWindows:function(t,e,o,i,n,l){n||(n={}),n.associatedUuid=t,n.timeWindows=e,n.custom=l,n.uuid=o;var a=L.supermap.plotting.PlottingObject.createSymbol(0,SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS,[],n,i,l);return this.addFeatures(a),a},createSatelliteTimeWindows1:function(t,e,o,i,n,l){n||(n={}),n.associatedUuid=t;for(var a=0;a=2800&&t[n].code<=2900&&i.push(t[n]);var l=null;return i.length>1&&(l=new qr(0,SuperMap.Plot.SymbolType.FLAGGROUP,[],{subObjects:i,ratio:e,uuid:o}),this.addFeatures(l)),l},createArcRegion:function(t,e,o,i,n,l,a,s,r,u,p){r||(r={}),r.centerPoint=t,r.radius=e,r.startAngle=o,r.endAngle=i,r.textContent=n,r.textPosition=l,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){this.geoJsonToFeature1(t,null,e)},geoJsonToFeature1:function(t,e,o){var i=JSON.parse(t),n=parseInt(i.libID),l=parseInt(i.code);if(i.isEdit=!0,!this._map.getFeatureByUuid(i.id))if(SuperMap.Plot.AlgoSymbolFactory.isAccessServer(n,l)){var a={};a.symbolRank=parseInt(i.symbolRank),a.surroundLineType=parseInt(i.surroundLineType);var s=!1;0===a.surroundLineType&&0===a.symbolRank||(s=!0);var r=this._getSymbolDataFromCache(n,l);if(s||null===r){var u=new SuperMap.GetSymbolInfoParameters({libID:n,code:l,symbolRank:a.symbolRank,surroundLineType:a.surroundLineType,inputPoints:i.localePoints,subSymbols:i.subSymbols}),p=this._map;L.supermap.symbolInfoService(this.serverUrl,this.options.serviceParams).getSymbolInfo(u,function(t){if(t.result.libID&&t.result.code){t.result.symbolType!==SuperMap.Plot.SymbolType.DOTSYMBOL||s||this._cacheSymbolData(t.result),r=SuperMap.Util.cloneObject(t.result),SuperMap.Plot.AnalysisSymbol.mergeSymbolDataAndServerData(i,r);var a={symbolData:i,serverUrl:this.serverUrl,serviceParams:this.options.serviceParams,isGeoJSONData:!0},u=L.supermap.plotting.PlottingObject.createSymbol(n,l,null,a);if(this.addFeatures(u,e),null!=i.lineRelations)for(var h=0;h0&&(i.subSymbols[g].symbolData=this._getSymbolDataFromCache(i.subSymbols[g].libID,i.subSymbols[g].code),null===i.subSymbols[g].symbolData&&-1===SuperMap.Util.indexOf(y,i.subSymbols[g])&&y.push(i.subSymbols[g]))}for(var d=y.slice(),S=0;S=0&&null===(e=this._selectFeature(this.features[s],t.latlng,a));s--);return e},_isAvoidRegion:function(){for(var t=arguments.length,e=new Array(t),o=0;o=a.getWest()&&e.lng<=a.getEast()&&e.lat>=a.getSouth()&&e.lat<=a.getNorth())return t}else for(var s=this._map.latLngToLayerPoint(e),r=0,u=t.components.length;r0&&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,n){var l=e+i+" "+e+n;t[i+n]=L.DomUtil.create("div",l,o)}i("top","left"),i("top","right"),i("bottom","left"),i("bottom","right")},_clearControlPos:function(){L.DomUtil.remove(this._controlContainer)}});var Au=vu.extend({_mouseTolerance:10,_polyline:null,_currentpolyline:null,_editMarkers:null,wayAnimation:null,wayPath:[],_able:null,options:{wayAnimationStyle:{fill:!1,color:"#ff0000",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){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,t),L.setOptions(this,t),this._editMarkers={},this._polyline=null,this._lineType=null},onAdd:function(t){return this.controlDiv=L.DomUtil.create("div","supermap-iclient-wayanmation"),this._map=t,this._markers=[],this._latlngs=[],this._markerGroup=new L.LayerGroup,this._map.addLayer(this._markerGroup),this._map.on("mousemove",this._onMouseMove,this).on("click",this._onMapClick,this),this.controlDiv},onRemove:function(){this._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers,delete this._latlngs,this._polyline&&(delete this._polyline,this._polyline=null),this._map.off("mousemove",this._onMouseMove,this).off("click",this._onMapClick,this)},setWayAnimation:function(t){this.wayAnimation=t,this._lineType=this.wayAnimation.getGOAnimationType();try{if(this._lineType!=SuperMap.Plot.GOAnimationType.ANIMATION_BROKENLINE_EXP&&this._lineType!=SuperMap.Plot.GOAnimationType.ANIMATION_CURVE_EXP)throw new Error("The type of animation is error!");null!=this.wayAnimation.path&&(this._currentpolyline=this.wayAnimation.path)}catch(t){console.log(t.message)}},setSelected:function(){if(null==this._currentpolyline)return!1;var t=this._currentpolyline._leaflet_id,e=this._map.getLayer(t);this._collectEditMarkers(e)},unSelected:function(){if(null==this._currentpolyline)return!1;var t=this._currentpolyline._leaflet_id,e=this._map.getLayer(t);this._removeMarkers(e)},setVisiable:function(t){var e=null;if(e=t?1:0,null!=this._currentpolyline){var o=this._map.getLayer(this._currentpolyline._leaflet_id).options.weight,i=this._map.getLayer(this._currentpolyline._leaflet_id).options.color;this._map.getLayer(this._currentpolyline._leaflet_id).setStyle({color:i,weight:o,opacity:e})}},getVisibale:function(){if(null!=this._currentpolyline){var t=this._currentpolyline.options.opacity;if(1==t)return!0;if(0==t)return!1}},enable:function(){this._able=!0},disable:function(){this._able=!1},_onMouseOut:function(t){t.target.layer._renderer._container.style.cursor=""},_onMapClick:function(t){if(this._able){if(this.moveend)return void(this.moveend=!1);var e=this._map.mouseEventToLayerPoint(t.originalEvent),o=this._map.layerPointToLatLng(e);this._polyline?this._addVertex(o):(this._polyline=L.polyline([],{color:"red",weight:1}),this._polyline.options.color="red",this._polyline.redraw(),this._polyline.type="polyline",this._polyline.addLatLng(o),this._polyline.addTo(this._map),this._addVertex(o)),L.DomEvent.preventDefault(t.originalEvent)}},_collectEditMarkers:function(t){var e=[];for(var o in t._featureControlPoints){var i=new L.LatLng(t._featureControlPoints[o].lat,t._featureControlPoints[o].lng),n=L.supermap.plotting.editMarker(i,{icon:this.options.avoidIcon,nHandle:-1,tag:o});this._addToMapAndBindMarker(n),e.push(n),n.owner=t}this._editMarkers[t._leaflet_id]=e},_removeMarkers:function(t){var e=this._editMarkers[t._leaflet_id];for(var o in e)this._unbindMarkerEvents(e[o]),this._map.removeLayer(e[o]);delete this._editMarkers[t._leaflet_id]},_unbindMarkerEvents:function(t){t.off("mousemove",this._moveMove,this),t.off("mouseout",this._moveOut,this),t.off("drag",this.redraw,this),t.dragging.disable()},_addToMapAndBindMarker:function(t){t.addTo(this._map),t.on("mousemove",this._moveMove,this),t.on("mouseout",this._moveOut,this),t.on("drag",this._dragPoint,this),t.dragging.enable()},_removePoint:function(t){if(t.target.owner.isSelected){var e=this._editMarkers[t.target.owner._leaflet_id],o=e.indexOf(t.target);this._map.removeLayer(e[o]),e.splice(o,1),t.target.owner.latLngs.splice(o,1),t.target.owner.redraw()}},_dragPoint:function(t){var e=t.target.owner,o=this._editMarkers[e._leaflet_id],i=SuperMap.Util.indexOf(o,t.target);e._featureControlPoints[i]=t.latlng,this._changeAnimationPath(e),this.fire(SuperMap.Plot.Event.wayfeaturemodifyfinished,{result:e._featureControlPoints,animation:this.wayAnimation}),this.moveend=!0},_changeAnimationPath:function(t){var e=t._featureControlPoints,o=t._leaflet_id;if(this._lineType==SuperMap.Plot.GOAnimationType.ANIMATION_BROKENLINE_EXP)this._map.getLayer(o).setLatLngs(e),this._map.getLayer(o)._featureControlPoints=e,this.wayAnimation.setPath(this._map.getLayer(o)),this.wayAnimation.setWayPoints(e);else{var i=this._latLng2AlgoPlot(e);i=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(i),i=this._algoPlot2LatLng(i),this._map.getLayer(o).setLatLngs(i),this._map.getLayer(o)._featureControlPoints=e,this.wayAnimation.setPath(this._map.getLayer(o)),this.wayAnimation.setWayPoints(e)}},_moveMove:function(t){t.target._icon.style.cursor="pointer"},_moveOut:function(t){t.target._icon.style.cursor=""},_addVertex:function(t){var e=new L.Marker(t,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset});if(this._markerGroup.addLayer(e),this._markers.push(e),this._latlngs.push(t),this._lineType==SuperMap.Plot.GOAnimationType.ANIMATION_BROKENLINE_EXP)this._polyline.setLatLngs(this._latlngs);else{var o=this._latLng2AlgoPlot(this._latlngs);o=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(o),o=this._algoPlot2LatLng(o),this._polyline.setLatLngs(o)}var i=this._markers.length;i>1&&this._markers[i-1].on("click",this._finishShape,this),i>2&&this._markers[i-2].off("click",this._finishShape,this)},_finishShape:function(){if(this._markers.length>1&&this._markers[this._markers.length-1].off("click",this._finishShape,this),L.Browser.touch&&L.supermap.plotting.getControl().getTouchMode())if(this._lineType==SuperMap.Plot.GOAnimationType.ANIMATION_BROKENLINE_EXP)this._polyline.setLatLngs(this._latlngs);else{var t=this._latLng2AlgoPlot(this._latlngs);t=SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(t),t=this._algoPlot2LatLng(t),this._polyline.setLatLngs(t)}this._markerGroup.clearLayers(),this._markers=[],this._polyline._featureControlPoints=this._latlngs,this.disable(),this.wayAnimation.setPath(this._polyline),this._currentpolyline=this._polyline,this.wayAnimation.setWayPoints(this._polyline._featureControlPoints),this._polyline.setStyle({opacity:0}),this.fire(SuperMap.Plot.Event.wayfeaturedrawfinished,{feature:this._polyline,animation:this.wayAnimation}),this._latlngs=[],delete this._polyline,this._lineType=null,this._polyline=null},_onMouseMove:function(t){if(this._able){var e=this._map.mouseEventToLayerPoint(t.originalEvent),o=this._map.layerPointToLatLng(e);if(this._polyline){var i=L.Util.cloneLatLngs(this._latlngs);if(0===i.length?i.push(o):i[i.length-1].lat===o.lat&&i[i.length-1].lng===o.lng||i.push(o),this._lineType==SuperMap.Plot.GOAnimationType.ANIMATION_BROKENLINE_EXP)this._polyline.setLatLngs(i);else{var n,l;n=this._latLng2AlgoPlot(i);var a=this._calBeizer(n);l=this._algoPlot2LatLng(a),this._polyline.setLatLngs(l)}}L.DomEvent.preventDefault(t.originalEvent)}},_calBeizer:function(t){return SuperMapAlgoPlot.PlottingUtil.generateBeizerPointsNoCtrlPt(t)},_latLng2AlgoPlot:function(t){for(var e=[],o=0;o1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2?arguments[2]:void 0;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,o),L.setOptions(this,o),this.drawType=t,this._editMarkers={},this._polyline=null,this._polygon=null,this._drawObject=[],this._positionMarkers=[],this._measureService=e},onAdd:function(t){return this.controlDiv=L.DomUtil.create("div","supermap-iclient"),this._map=t,this._markers=[],this._latlngs=[],this._markerGroup=new L.LayerGroup,this._map.addLayer(this._markerGroup),this._map.on("mousemove",this._onMouseMove,this).on("click",this._onMapClick,this),this.controlDiv},onRemove:function(){this._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers,delete this._latlngs,this._polyline&&(delete this._polyline,this._polyline=null),this._polygon&&(delete this._polygon,this.polygon=null),this._map.off("mousemove",this._onMouseMove,this).off("click",this._onMapClick,this)},setMeasureType:function(t){this.drawType=t},enable:function(){this._active=!0,this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("click",this._onClick,this).addTo(this._map),this._mouseMarker.on("dblclick",this._finishShape,this).addTo(this._map)},disable:function(){this._active=!1,this._mouseMarker&&(this._mouseMarker.off("click",this._onClick,this),this._mouseMarker.off("dblclick",this._finishShape,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker)},clear:function(){this._active=!1,this._latlngs=[],this._polyline=null,this._polygon=null;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),1!=this.drawType?(this._polyline.setLatLngs(this._latlngs),0===this.drawType?this._measureDistance(this._latlngs):2===this.drawType&&this._measureAzimuth(this._latlngs),this._drawObject.push(this._polyline)):1===this.drawType&&(this._polygon.setLatLngs(this._latlngs),this._measureArea(this._latlngs),this._drawObject.push(this._polygon)),this._polyline?(this._polyline._featureControlPoints=this._latlngs,delete this._polyline,this._polyline=null):this._polygon&&(this._polygon._featureControlPoints=this._latlngs,delete this._polygon,this._polygon=null),this._latlngs=[]},_onMouseMove:function(t){if(this._active){var e=this._map.mouseEventToLayerPoint(t.originalEvent),o=this._map.layerPointToLatLng(e);if(this._polyline||this._polygon){var i=L.Util.cloneLatLngs(this._latlngs);0===i.length?i.push(o):i[i.length-1].lat===o.lat&&i[i.length-1].lng===o.lng||i.push(o),1!=this.drawType?(this._polyline.setLatLngs(i),0===this.drawType?this._measureDistance(this._latlngs):2===this.drawType&&this._measureAzimuth(this._latlngs)):(this._polygon.setLatLngs(i),this._measureArea(this._latlngs)),this._mouseMarker.setLatLng(o)}L.DomEvent.preventDefault(t.originalEvent)}}});L.supermap.plotting.measureControl=function(t,e){return new Tu(t,e)};var _u=L.Handler.extend({symbolData:null,plotting:null,_isDrawing:!1,libID:0,code:24,serverUrl:"",path:null,isFreeCure:!1,_drawingLayer:null,_tempDrawingLayer:null,_control:null,options:{tolerancePixel:6,allowIntersection:!0,repeatMode:!0,icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),touchIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-touch-icon"}),guidelineDistance:20,maxGuideLineLength:4e3,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!1,clickable:!0},metric:!0,feet:!0,nautic:!1,showLength:!0,zIndexOffset:2e3},initialize:function(t,e,o){L.Browser.touch&&L.supermap.plotting.getControl().getTouchMode()&&(this.options.icon=this.options.touchIcon),this._map=t,this._drawingLayer=e,this._tempDrawingLayer=new yu("drawControl-temportary"),this._container=t._container,this._overlayPane=t._panes.overlayPane,L.setOptions(this,o)},addHooks:function(){this._map&&(this._isDrawing=!1,this._markers=[],this._latlngs=[],this._markerGroup=new L.LayerGroup,this._map.addLayer(this._markerGroup),this._map.addLayer(this._tempDrawingLayer),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("mousedown",this._onMouseDown,this).on("mouseup",this._onMouseUp,this).addTo(this._map),this._map.on("mouseup",this._onMouseUp,this).on("mousemove",this._onMouseMove,this).on("zoomlevelschange",this._onZoomEnd,this).on("zoomend",this._onZoomEnd,this),this._map.getPlotEditControl()&&this._map.getPlotEditControl()._avoidEditing&&this._map.getPlotEditControl().avoidEdit(!1),null!=this._map.doubleClickZoom&&this._map.doubleClickZoom.enabled()&&(this.doubleClickZoomEnabled=!0,this._map.doubleClickZoom.disable()))},removeHooks:function(){this._isDrawing=!1,this._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers,delete this._latlngs,delete this.isFreeCure,this.plotting&&(this._tempDrawingLayer.removeFeatures(this.plotting),delete this.plotting,this.plotting=null),this._map.removeLayer(this._tempDrawingLayer),this._mouseMarker.off("mousedown",this._onMouseDown,this).off("mouseup",this._onMouseUp,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._map.off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this).off("zoomlevelschange",this._onZoomEnd,this).off("zoomend",this._onZoomEnd,this),null!=this._map.doubleClickZoom&&!0===this.doubleClickZoomEnabled&&this._map.doubleClickZoom.enable()},deleteLastVertex:function(){if(!(this._markers.length<=1)){this._latlngs.pop();var t=this._markers.pop(),e=this.plotting.getLatLngs(),o=e.splice(-1,1)[0];this.plotting.setLatLngs(e),this._markerGroup.removeLayer(t),this.plotting.getLatLngs().length<2&&this._tempDrawingLayer.removeFeatures(this.plotting),this._vertexChanged(o,!1)}},addVertex:function(t){if(this._markers.push(this._createMarker(t)),this._latlngs.push(t),this.plotting&&0===this.libID&&1023===this.code&&!0===this.isFreeCure)this.plotting.setLatLngs(this._freeCurveResample(this._latlngs));else if(this.plotting&&SuperMap.Plot.AlgoSymbolFactory.isAccessServer(this.plotting.libID,this.plotting.code)&&this._latlngs.length>=this.plotting.minEditPts){var e=new SuperMap.GetSymbolInfoParameters({libID:this.libID,code:this.code});e.inputPoints=L.Util.latLngsToSuperMapPoints(this._latlngs),L.supermap.symbolInfoService(this._drawingLayer.serverUrl,this._drawingLayer.options.serviceParams).getSymbolInfo(e,function(t){this.plotting.symbolData=t.result,this.plotting.setLatLngs(this._latlngs)},this)}else if(this.plotting&&this.plotting instanceof iu){var o=this._map.layerPointToLatLng(L.point(0,0)),i=this._map.layerPointToLatLng(L.point(this.options.tolerancePixel,0)),n=SuperMap.Plot.PlottingUtil.distance({x:o.lng,y:o.lat},{x:i.lng,y:i.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 l=new SuperMap.GetSymbolInfoParameters({libID:this.libID,code:this.code});l.inputPoints=L.Util.latLngsToSuperMapPoints(i),L.supermap.symbolInfoService(this._drawingLayer.serverUrl,this._drawingLayer.options.serviceParams).getSymbolInfo(l,function(t){this.plotting.symbolData=t.result,this.plotting.setLatLngs(i)},this)}else this.plotting.setLatLngs(i)}this._mouseMarker.setLatLng(o),L.DomEvent.preventDefault(t.originalEvent)},_createFeature:function(t){if(this._tempDrawingLayer.setSymScaleDefinition(this._drawingLayer.getSymScaleDefinition()),0===this.libID&&this.code===SuperMap.Plot.SymbolType.PICTURE)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,path:this.path}),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(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=[],n=0,l=this.plotting.subSymbols.length;n1&&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 l=this;this._createFeature(function(){l._latlngs.push(o.latlng),l.plotting.setLatLngs(l._latlngs),(l.plotting instanceof nr||l.plotting instanceof L.supermap.plotting.Route)&&(l._latlngs.length+1>=l.plotting.maxEditPts||n<20&&L.Browser.touch&&L.supermap.plotting.getControl().getTouchMode())?l._finishShape():Math.abs(i)<9*(window.devicePixelRatio||1)&&l.addVertex(o.latlng),l._enableNewMarkers()})}else(this.plotting instanceof nr||this.plotting instanceof L.supermap.plotting.Route)&&(this._latlngs.length+1>=this.plotting.maxEditPts||n<20&&L.Browser.touch&&L.supermap.plotting.getControl().getTouchMode())?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()),n=new L.Marker(t,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset}),l=this._map.latLngToContainerPoint(n.getLatLng());e=i.distanceTo(l)}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)},_freeCurveResample:function(t){var e=t.slice(),o=[];if(e.length<3)o=e.slice();else{if(!this.plotting.isEdit){var i=this._map.layerPointToLatLng(L.point(0,0)),n=this._map.layerPointToLatLng(L.point(100,100)),l=Math.abs(i.lng-n.lng),a=this._reSample(L.Util.latLngsToSuperMapPoints(e),l/50);(a=L.Util.superMapPointsToLatLngs(a)).length<3&&(a=e),e=(e=[]).concat(a)}var s=SuperMap.Plot.PlottingUtil.computeBeizerPoints(this.plotting.isEdit,L.Util.latLngsToSuperMapPoints(e),[]);o=SuperMap.Plot.PlottingUtil.clonePoints(L.Util.superMapPointsToLatLngs(s.beizerPoints))}return o},_reSample:function(t,e){var o=[];if(null==t||e<0)return o;var i=t.length;if(i>2){var n=new SuperMapAlgoPlot.Point(0,0),l=0,a=0,s=0,r=2*Math.PI;n=t[0],o.push(n);for(var u=!1,p=!1,h=!1,c=1;c0||SuperMapAlgoPlot.PlottingUtil.equalFuzzy(0,g)?Math.acos(y):2*Math.PI-Math.acos(y),r>2*Math.PI&&l+2*Math.PIs&&(l-=2*Math.PI,r>2*Math.PI&&(r-=2*Math.PI)),l>s&&ll+f&&(r=l+f):(h=!0,r=l+f),u=!0}else n=t[c-1],c--,o.push(n),s=0,r=2*Math.PI,u=!1,p=!1,h=!1}return o.push(t[i-1]),o}return o}}),Ou=vu.extend({drawingLayer:null,initialize:function(t,e){if(L.version<"0.7")throw new Error("Leaflet.draw 0.2.3+ requires Leaflet 0.7.0+. Download latest from https://github.com/Leaflet/Leaflet/");this.drawingLayer=t,null!=this.drawingLayer&&this.drawingLayer instanceof bu&&(L.supermap.plotting.getControl().plotMapManager.activePlottingLayer=this.drawingLayer,L.supermap.plotting.getControl().plotMapManager.activeChildPlotLayer=this.drawingLayer.getChildPlotLayers()[0]),L.Control.prototype.initialize.call(this,e)},onAdd:function(t){var e=L.DomUtil.create("div","supermap-iclient");return this._map=t,this.handler=new _u(this._map,this.drawingLayer),this.handler._control=this,this._map._plotDrawControl=this,e},onRemove:function(){this._map._plotDrawControl=null,this._map=null,this.handler=null},setDrawingLayer:function(t,e){this.drawingLayer=t,this.handler._drawingLayer=t,this.handler._tempDrawingLayer.serverUrl=t.serverUrl,this.handler._tempDrawingLayer.symScaleDefinition=t.symScaleDefinition,this.handler._tempDrawingLayer.enableSymScale=t.enableSymScale,this.handler._drawingLayer.serviceParams=t.serviceParams,this.drawingLayer instanceof bu&&(L.supermap.plotting.getControl().plotMapManager.activePlottingLayer=this.drawingLayer,null!=e&&-1!=SuperMap.Util.indexOf(this.drawingLayer.getChildPlotLayers(),e)?L.supermap.plotting.getControl().plotMapManager.activeChildPlotLayer=e:L.supermap.plotting.getControl().plotMapManager.activeChildPlotLayer=this.drawingLayer.getChildPlotLayers()[0])}});L.Map.include({getPlotDrawControl:function(){return this._plotDrawControl?this._plotDrawControl:null}});L.supermap.plotting.drawControl=function(t,e){return new Ou(t,e)};var xu=vu.extend({_dragStartScale:null,_dragStartRotate:null,_dragStartBounds:null,_dragStartLatLngs:null,_dragStartScaleValues:null,_dragStartPositionOffset:null,_dragStartScalePoints:null,_editMarkers:null,_disEditBox:null,_editFeatures:null,_mouseTolerance:10,touchTolerance:20,_editMode:SuperMap.Plot.EditMode.EDITCIRCUMRECTANGLE,_avoidEditing:!1,_isMultiSelect:!1,selectedFeatures:[],options:{highlightFlag:!0,highlightStyle:{color:"#ffffff",opacity:1,weight:1},unEditIconClassName:"icon iconfont icon-xuanzhong1",draggable:!0,editIcon:L.divIcon({className:"leaflet-supermap-plot-control-icon-path",iconSize:[10,10]}),scaleIcon:L.divIcon({className:"leaflet-supermap-plot-scale-icon-path",iconSize:[10,10]}),rotateIcon:L.divIcon({className:"leaflet-supermap-plot-rotate-icon-path",iconSize:[15,15]}),lockedIcon:L.divIcon({className:"leaflet-supermap-plot-locked-icon-path",iconSize:[10,10]}),avoidIcon:L.divIcon({className:"leaflet-supermap-plot-avoid-icon-path",iconSize:[8,8]}),leftTopIcon:L.divIcon({className:"leaflet-supermap-plot-left-top-icon-path",iconSize:[15,15]}),rightTopIcon:L.divIcon({className:"leaflet-supermap-plot-right-top-icon-path",iconSize:[15,15]}),leftBottomIcon:L.divIcon({className:"leaflet-supermap-plot-left-bottom-icon-path",iconSize:[15,15]}),rightBottomIcon:L.divIcon({className:"leaflet-supermap-plot-right-bottom-icon-path",iconSize:[15,15]}),centerCrossIcon:L.divIcon({className:"leaflet-supermap-plot-center-icon-path",iconSize:[24,24]})},initialize:function(t,e){if(L.Browser.touch&&L.supermap.plotting.getControl().getTouchMode()&&(this.options.editIcon=L.divIcon({className:"leaflet-supermap-plot-control-icon-path",iconSize:[20,20]}),this.options.scaleIcon=L.divIcon({className:"leaflet-supermap-plot-scale-icon-path",iconSize:[20,20]}),this.options.rotateIcon=L.divIcon({className:"leaflet-supermap-plot-rotate-icon-path",iconSize:[25,25]}),this.options.lockedIcon=L.divIcon({className:"leaflet-supermap-plot-locked-icon-path",iconSize:[20,20]}),this.options.avoidIcon=L.divIcon({className:"leaflet-supermap-plot-avoid-icon-path",iconSize:[15,15]})),L.version<"0.7")throw new Error("Leaflet.draw 0.2.3+ requires Leaflet 0.7.0+. Download latest from https://github.com/Leaflet/Leaflet/");L.Control.prototype.initialize.call(this,e),L.setOptions(this,e),this._editMarkers={},this._disEditBox={},this._dragStartScale={},this._dragStartRotate={},this._dragStartBounds={},this._dragStartLatLngs={},this._dragStartPositionOffset={},this._dragStartScaleValues={},this._dragStartScalePoints={},this._editFeatures={}},onAdd:function(t){this.controlDiv=L.DomUtil.create("div","supermap-iclient"),this._map=t,this._map.on("click",this._onMapClick,this),this._map._plotEditControl=this;for(var e=0;e0},canCut:function(){return this.getSelectedFeatures().length>0},canPaste:function(){return!!(this.pasteGeoAry&&this.pasteGeoAry.length>0)},copy:function(){this.pasteGeoAry=[],this.pasteGeoSel=[];for(var t=0,e=this._map.getPlottingLayers().length;t1&&void 0!==arguments[1])||arguments[1];SuperMap.Util.isArray(t)||(t=[t]);for(var o=0;o0){var n=i.layer._getFeatureFromEvent(t);n.symbolType===SuperMap.Plot.SymbolType.SATELLITETIMEWINDOWS&&(i=n)}if(this.transaction||(this.transaction=new SuperMap.Plot.Transaction,this.transaction.transType=SuperMap.Plot.TransactionType.EDIT,this.isAddTransInfo=!0),i instanceof Qs)if(i instanceof $s&&i.moveend)i.moveend=!1;else if(null!==i.ownerGroup&&i.ownerGroup.moveend)i.ownerGroup.moveend=!1;else if(this._editMode!==SuperMap.Plot.EditMode.ADDCONTROLPOINT)i instanceof $s&&!i.isSelected?(!1===t.originalEvent.ctrlKey&&this.unselectFeatures(),this.selectFeatures(i)):i instanceof iu||i.isSelected||null!==i.ownerGroup&&!0!==i.ownerGroup.isSelected||(!1===t.originalEvent.ctrlKey&&this.unselectFeatures(),this.selectFeatures(i));else if(i instanceof iu||i.isSelected){if(!1===i.isLocked&&i.isSelected)if(i instanceof iu){var l=this._getAddPointTolerance();if(null===(c=i._selectNodeLayer(t.latlng,l))){var a=this._getAddPointTolerance(),s=i._addRouteNodeByPosWithoutLast(t.latlng,a);null!==s&&(this.unselectFeatures(),this.selectFeatures(s))}}else if(i instanceof ou&&i.route.isSelected){var r=i._isFirstNode(),u=i._isLastNode();if(!0===r||!0===u){var p=i.route._addRouteNodeByNode(i.routeNode,r,u);if(null!==p){this.unselectFeatures(),this.selectFeatures(p);var h=new SuperMap.Plot.TransactionInfo;h.layerId=p.layer._leaflet_id,h.uuid=p.uuid,h.functionName="setLatLngs",h.undoParams=[L.Util.cloneLatLngs(p.getLatLngs())],h.redoParams=[L.Util.cloneLatLngs(p.getLatLngs())],this.transaction.transInfos.push(h),this.transaction&&(L.supermap.plotting.getControl().getTransManager().add(this.transaction),this.transaction=new SuperMap.Plot.Transaction,this.isAddTransInfo=!0)}}else this.unselectFeatures(),this.selectFeatures(i)}else this._addPoint(i,t.latlng)}else if(!1===t.originalEvent.ctrlKey&&this.unselectFeatures(),this.selectFeatures(i),i instanceof ou&&((e=i._isFirstNode())||(o=i._isLastNode()))){var c=i.route._addRouteNodeByNode(i.routeNode,e,o);null!==c&&(this.unselectFeatures(),this.selectFeatures(c))}},_addPoint:function(t,e){if(null!==t&&void 0!==t){var o=t.scaleValues.slice(),i=L.Util.cloneLatLngs(t.getLatLngs()),n=L.Util.latLngsToSuperMapPoints(t.getLatLngs());if(t.symbolType===SuperMap.Plot.SymbolType.ANNOFRAMESYMBOLM){var l=L.supermap.plotting.editMarker(e,{icon:this.options.scaleIcon,nHandle:-2,tag:t.scalePoints.length});l.owner=t,this._addToMapAndBindMarker(l),this._editMarkers[t.uuid].push(l),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)),n=L.Util.latLngsToSuperMapPoints(t.getLatLngs()),u>0&&ui.length)return-1;for(var n=[],l=0,a=1,s=o.length;ag&&(c=g,h=y+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},_addPointByPolybezier:function(t,e,o){var i=L.Util.latLngsToSuperMapPoints(t.getLatLngs()),n=[];if(t.scaleValues.length==4*(i.length-1)){var l=SuperMapAlgoPlot.PlottingUtil.polylineDistance(i);n.push(new SuperMap.Geometry.Point(i[0].x,i[0].y)),n.push(new SuperMap.Geometry.Point(i[0].x,i[0].y));var a=t.scaleValues[0],s=t.scaleValues[1],r=i[0].x+l*a,u=i[0].y+l*s;n.push(new SuperMap.Geometry.Point(r,u));for(var p=1;po&&(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 fu){for(var i=t.graphic._getHandleAndCenterPoints(),n=0,l=i.handlePoints.length;n9&&(k=-1):k=-3;var F=new L.LatLng(U.handlePoints[N].lat,U.handlePoints[N].lng),V=L.supermap.plotting.editMarker(F,{icon:this.options.editIcon,nHandle:k,tag:N});this._addToMapAndBindMarker(V),V.owner=t,o.push(V)}for(var j=0,Y=U.rotatePoints.length;j1?new L.LatLng(nt[1].lat,nt[1].lng):new L.LatLng(nt[0][1].lat,nt[0][1].lng)}else it=new L.LatLng(t.latLngs[ot].lat,t.latLngs[ot].lng);var lt=L.supermap.plotting.editMarker(it,{icon:this.options.editIcon,nHandle:t.enableEdit?-1:-3,tag:ot});this._addToMapAndBindMarker(lt),o.push(lt),lt.owner=t}for(var at in t.scalePoints){var st=new L.LatLng(t.scalePoints[at].lat,t.scalePoints[at].lng),rt=t.scalePoints[at].tag?t.scalePoints[at].tag:at,ut=L.supermap.plotting.editMarker(st,{icon:this.options.scaleIcon,nHandle:t.enableEdit?-2:-3,tag:rt});this._addToMapAndBindMarker(ut),o.push(ut),ut.owner=t}}else if(t.symbolType!==SuperMap.Plot.SymbolType.SATELLITE){for(var pt in t.latLngs){var ht=new L.LatLng(t.latLngs[pt].lat,t.latLngs[pt].lng),ct=L.supermap.plotting.editMarker(ht,{icon:this.options.editIcon,nHandle:t.enableEdit?-1:-3,tag:pt});this._addToMapAndBindMarker(ct),o.push(ct),ct.owner=t}for(var yt in t.scalePoints){var gt=new L.LatLng(t.scalePoints[yt].lat,t.scalePoints[yt].lng),ft=t.scalePoints[yt].tag?t.scalePoints[yt].tag:yt,Pt=L.supermap.plotting.editMarker(gt,{icon:this.options.scaleIcon,nHandle:t.enableEdit?-2:-3,tag:ft});this._addToMapAndBindMarker(Pt),o.push(Pt),Pt.owner=t}}else if(t.symbolType===SuperMap.Plot.SymbolType.SATELLITE||t.timeWindows.length>1)for(var dt in t.scalePoints){var St=new L.LatLng(t.scalePoints[dt].lat,t.scalePoints[dt].lng),mt=t.scalePoints[dt].tag?t.scalePoints[dt].tag:dt,bt=L.supermap.plotting.editMarker(St,{icon:this.options.scaleIcon,nHandle:t.enableEdit?-2:-3,tag:mt});this._addToMapAndBindMarker(bt),o.push(bt),bt.owner=t}this._editMarkers[t.uuid]=o,this._disEditBox[t.uuid]=e},_resetEditMarkersValue:function(t){if(Object.prototype.hasOwnProperty.call(this._editMarkers,t.uuid)){var e=this._editMarkers[t.uuid],o=this._disEditBox[t.uuid];if(t.layer instanceof fu&&null!=t.graphic){var i=t.graphic._getHandleAndCenterPoints();for(var n in i.handlePoints)e[n]._latlng=i.handlePoints[n],e[n].update();!0===t.locked&&(e[4]._latlng=i.centerPoints[0],e[4].update())}else if(null==o||!t.layer.getLocked()&&t.layer.getEditable())if(t instanceof $s||t instanceof ou)if(t instanceof qr&&this._editMode!==SuperMap.Plot.EditMode.EDITCIRCUMRECTANGLE)for(var l in t.scalePoints)e[l]._latlng=t.scalePoints[l],e[l].update();else{var a=t._getHandleAndRotatePoints();for(var s in a.handlePoints)e[s]._latlng=a.handlePoints[s],e[s].update();if(this._editMode===SuperMap.Plot.EditMode.EDITCIRCUMRECTANGLE){var r=a.handlePoints.length;for(var u in a.rotatePoints)e[r+parseInt(u)]._latlng=a.rotatePoints[u],e[r+parseInt(u)].update()}}else if(this._editMode===SuperMap.Plot.EditMode.EDITCIRCUMRECTANGLE){var p=t._getHandleAndRotatePoints();for(var h in p.handlePoints)e[h]._latlng=p.handlePoints[h],e[h].update();var c=p.handlePoints.length;for(var y in p.rotatePoints)e[c+parseInt(y)]._latlng=p.rotatePoints[y],e[c+parseInt(y)].update()}else if(void 0!==t.scalePoints&&null!==t.scalePoints||(t.scalePoints=[]),t.symbolType===SuperMap.Plot.SymbolType.REGULARPOLYGON){var g=[t.getLatLngs()[0],t.components[0].getLatLngs()[0][0]];for(var f in g)e[f]._latlng=g[f],e[f].update()}else if(t.symbolType===SuperMap.Plot.SymbolType.PARALLELLINE){var P=L.Util.superMapPointsToLatLngs(t.superMapAlgoSymbol.controlPoints[0]);for(var d in t.getLatLngs()[0]=L.latLng(P[0].lat,P[0].lng),t.getLatLngs())e[d]._latlng=t.getLatLngs()[d],e[d].update()}else if(t.symbolType===SuperMap.Plot.SymbolType.SATELLITE||t.timeWindows&&t.timeWindows.length>1)for(var S in t.scalePoints){var m=parseInt(S);e[m]._latlng=t.scalePoints[S],e[m].update()}else if(t.getLatLngs().length+t.scalePoints.length===e.length){for(var b in t.getLatLngs())e[b]._latlng=t.getLatLngs()[b],e[b].update();var M=t.getLatLngs().length;for(var v in t.scalePoints){var A=M+parseInt(v);e[A]._latlng=t.scalePoints[v],e[A].update()}}else this._collectEditMarkers(t);else{var T=t.getBounds();if(null!==T&&T.isValid()){var _=L.latLng(T.getNorth(),T.getEast()),O=L.latLng(T.getNorth(),T.getWest()),x=L.latLng(T.getSouth(),T.getEast()),w=L.latLng(T.getSouth(),T.getWest());o.setLatLngs([_,O,w,x])}}}},_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){null!=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._dragPoint,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 n=new SuperMap.Plot.Transaction;L.supermap.plotting.getControl().getTransManager().add(n);var l=new SuperMap.Plot.TransactionInfo;l.layerId=t.target.owner.layer._leaflet_id,l.uuid=t.target.owner.layer.uuid,l.functionName="setLatLngs",l.undoParams=[e],l.redoParams=[L.Util.cloneLatLngs(t.target.owner.getLatLngs())],n.transInfos.push(l)}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=[L.Util.cloneLatLngs(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.symbolType===SuperMap.Plot.SymbolType.PICTURE?o.getLatLngs()[0]:o.anchorPoint;var n=this._map.latLngToLayerPoint(i);o.symbolType===SuperMap.Plot.SymbolType.DOTSYMBOL&&!0===o.positionOffset&&(n.x+=o.positionOffsetX*o.dScale,n.y+=o.positionOffsetY*o.dScale);var l=this._map.latLngToLayerPoint(t.latlng),a=this._map.latLngToLayerPoint(t.oldLatLng),s=l.x-n.x-(a.x-n.x),r=l.y-n.y-(a.y-n.y);if(0!==s&&0!==r){var u=180*(Math.atan2(a.y-n.y,a.x-n.x)-Math.atan2(l.y-n.y,l.x-n.x))/Math.PI,p=u;if(void 0!==this._lastPixel)p=180*(Math.atan2(this._lastPixel.y-n.y,this._lastPixel.x-n.x)-Math.atan2(l.y-n.y,l.x-n.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],y=o.selectedFeatures[s]._getLatLng(e,h,l);o.selectedFeatures[s]._resizeLatLngs(y,e,h,c)}if(SuperMap.Plot.AlgoSymbolFactory.isAccessServer(o.selectedFeatures[s].libID,o.selectedFeatures[s].code)){var g=new SuperMap.GetSymbolInfoParameters;g.libID=o.selectedFeatures[s].libID,g.code=o.selectedFeatures[s].code,g.inputPoints=L.Util.latLngsToSuperMapPoints(o.selectedFeatures[s].getLatLngs()),g.scaleValues=o.selectedFeatures[s].scaleValues,g.subSymbols=o.selectedFeatures[s].subSymbols,a.push(o.selectedFeatures[s]),L.supermap.symbolInfoService(n.serverUrl,n.serviceParams).getSymbolInfo(g,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=n._resizeBounds(t.latlng,e,l),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)&&l-this.lastDownTime>100))return;var s=new SuperMap.GetSymbolInfoParameters;s.libID=e.libID,s.code=e.code,n?(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;hh&&!0===this.pasteGeoSel[h])if(c instanceof iu){var g=y._getNodeFeature(y._getNodeByUuid(c.routeNode.id));this.selectedFeatures(g)}else this.selectFeatures(y);if(l[h]&&l[h].geoSymbolTexts)for(var f=0;fi[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;m