/** * * SmartEarthSDK 基于Cesium的三维web开发 * author: 张丹钊、金磊、薛鹏、张恒 * */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).SmartEarth={})}(this,function(o){"use strict";function f(e,t,i,o){var r=Math.PI;function n(e){return e*r/180}var a=n((e+i)/2),e=n((e-i)/2),i=n((t-o)/2),t=Math.sin(e),o=Math.sin(i),e=Math.sin(a),i=(t*=t)*(1-(o*=o))+(1-(e*=e))*o,a=(1-t)*(1-o)+e*o;return 2*(o=Math.atan(Math.sqrt(i/a)))*6378137*(1+1/298.257*((3*(o=Math.sqrt(i*a)/o)-1)/2/a*e*(1-t)-(3*o+1)/2/i*(1-e)*t))}function m(e,t){this._viewer=e,this._cesium=t}function y(e,t){this._viewer=e,this._cesium=t}function v(e,t){var i=Math.PI/180,o=180/Math.PI,r=e.y*i,n=e.x*i,e=t.y*i,i=t.x*i,i=-Math.atan2(Math.sin(n-i)*Math.cos(e),Math.cos(r)*Math.sin(e)-Math.sin(r)*Math.cos(e)*Math.cos(n-i));return i<0&&(i+=2*Math.PI),i*=o}function C(e,t,i){i=v(t,e)-v(t,i);return i<0&&(i+=360),i}function w(e){if(!e||e.length<3)return 0;for(var t=Math.PI/180,i=0,o=0;oCesium.Math.toRadians(80))return!1;e=t.cartesianToCanvasCoordinates(e);return e?[e.x-this._mapOffset[0],e.y-this._mapOffset[1]]:[]}return[]}},{key:"pointToData",value:function(e){var t=this._mapOffset,i=c.scene.globe.ellipsoid,t=new Cesium.cartesian3(e[1]+t,e[2]+t[2],0),t=i.cartesianToCartographic(t);return[t.lng,t.lat]}},{key:"getViewRect",value:function(){var e=this._api;return new echarts.graphic.BoundingRect(0,0,e.getWidth(),e.getHeight())}},{key:"getRoamTransform",value:function(){return echarts.matrix.create()}}]),o(r,n),s);function s(e,t){!function(e){if(!(e instanceof s))throw new TypeError("Cannot call a class as a function")}(this),this._viewer=e,this.dimensions=["lng","lat"],this._mapOffset=[0,0],this._api=t}function l(){echarts.registerCoordinateSystem("GLMap",a),echarts.registerAction({type:"GLMapRoam",event:"GLMapRoam",update:"updateLayout"},function(e,t){})}echarts.extendComponentModel({type:"GLMap",getViewer:function(){return c},defaultOption:{roam:!1}}),echarts.extendComponentView({type:"GLMap",init:function(e,t){this.api=t,this.dispose(),c.scene.postRender.addEventListener(this.moveHandler,this)},moveHandler:function(e,t){this.api.dispatchAction({type:"GLMapRoam"})},render:function(e,t,i){},dispose:function(e){c.scene.postRender.removeEventListener(this.moveHandler,this)}}),i.d(t,"load",function(){return l})}],o={},r.m=i,r.c=o,r.d=function(e,t,i){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(i,o,function(e){return t[e]}.bind(null,o));return i},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)},I.prototype.getSceneList=function(t){$.ajax({url:this.serverUrl+"/scene/sceneList",type:"get",success:function(e){t&&"function"==typeof t&&e&&t(JSON.parse(e))}})},I.prototype.query=function(e,t){var i=e.database,e={type:P(e.type,"building"),id:e.id,returnGeometry:P(e.returnGeometry,!0),returnChildren:P(e.returnChildren,!0)};$.ajax({url:this.serverUrl+"/"+i+"/query?version=v2.1",type:"post",async:!0,data:e,success:function(e){t&&"function"==typeof t&&e&&t(JSON.parse(e))},error:function(e,t,i){alert("error:"+e.status)}})},L.prototype.startRecord=function(){navigator.mediaDevices.getDisplayMedia({video:!0,audio:!0}).then(e=>{this.createRecorder(e)}).catch(e=>{this.getUserMediaError(e)})},L.prototype.getUserMediaError=function(e){console.log("mediaError",e)},L.prototype.createRecorder=function(e){console.log("start record");var t={videoBitsPerSecond:this.videoBPS};this.recorder=new MediaRecorder(e,t),this.recorder.start();var i=[];this.recorder.onstop=e=>{var t=new Blob(i,{type:"video/mp4"});this.saveMedia(t)},this.recorder.ondataavailable=e=>{i.push(e.data)}},L.prototype.saveMedia=function(e){var t=window.URL.createObjectURL(e),e=document.createElement("a");e.innerHTML="test",e.download=this.mediaOutputPath,e.href=t,e.click()},L.prototype.stopRecord=function(){this.recorder.stop()},M.prototype.defaultValue=P,M.prototype.mouse=function(e,t,i){e.style.cursor=1==t?"url("+i+"),auto":"default"},M.prototype.CreateTooltip=function(e={},t,i){var o,r,n;(o="object"==typeof e?e:o)&&o.origin?("center"===o.origin&&(r=15,n=-12),"top"===o.origin&&(r=15,n=-44),"bottom"===o.origin&&(r=15,n=20)):(r=15,n=20),o&&o.color?("white"===o.color&&(s="background: rgba(255, 255, 255, 0.8);color: black;"),"black"===o.color&&(s="background: rgba(0, 0, 0, 0.5);color: white;"),"yellow"===o.color&&(s="color: black;background-color: #ffcc33;border: 1px solid white;")):s="background: rgba(0, 0, 0, 0.5);color: white;";var a,s,l=o&&o.id?"toolTip"+o.id:"toolTip",c=document.getElementById(l);return c||(a=document.createElement("div"),$(".cesium-viewer").append(a),s='',$(".cesium-viewer").append(s),c=document.getElementById(l)),i?(c.innerHTML=e,c.style.left=t.x+r+"px",c.style.top=t.y+n+"px",c.style.display="block"):c.style.display="none",{tooltip:c,style:o,showAt:function(e,t){this.tooltip.innerHTML=t,this.style&&this.style.origin?("center"===this.style.origin&&(r=15,n=-this.tooltip.offsetHeight/2),"top"===this.style.origin&&(r=15,n=-this.tooltip.offsetHeight-20),"bottom"===this.style.origin&&(r=15,n=20)):(r=15,n=-this.tooltip.offsetHeight/2),this.tooltip.style.left=e.x+r+"px",this.tooltip.style.top=e.y+n+"px",this.tooltip.style.display="block"},show:function(e){this.tooltip.style.display=e?"block":"none"}}},M.prototype.getPointToCameraDistance=function(e,t){let i;var o;return i=2===e.scene.mode?(o=e.camera.positionCartographic.clone(),Cesium.Cartesian3.distance(t,Cesium.Cartesian3.fromRadians(o.longitude,o.latitude,o.height))):Cesium.Cartesian3.distance(t,e.camera.position),i},M.prototype.CreateResultTooltip=function(i,t={}){var o,r,e,n=t.id?"resultToolTip"+t.id:"resultToolTip",a=document.getElementById(n);t.color?("white"===t.color&&(e="background: rgba(255, 255, 255, 0.8);color: black;"),"black"===t.color&&(e="background: rgba(0, 0, 0, 0.5);color: white;"),"blue"===t.color&&(e="background: rgba(48, 119, 221);color: white;"),"yellow"===t.color&&(e="color: black;background-color: #ffcc33;border: 1px solid white;")):e="color: black;background-color: #ffcc33;border: 1px solid white;",a||(e='',$(i.container).append(e),a=document.getElementById(n));var s,l=t.addX||0,c=t.addY||0,u=this;function h(){if(s){if(void 0!==t.far||void 0!==t.near){var e=u.getPointToCameraDistance(i,s);if(e>t.far)return void(a.style.display="none");if(e{let r;r=1===n.length?e.substring(1,e.length-1):0===t?e.substring(1,e.length)+")":t===n.length-1?"("+e.substring(0,e.length-1):"("+e+")",r=r.split("),("),r.forEach((e,t)=>{let i;1===r.length?i=e.substring(1,e.length-1):0===t?i=e.substring(1,e.length):t===r.length-1&&(i=e.substring(0,e.length-1)),i=i.split(",");let o=[];i.forEach(e=>{e=e.split(" ");o.push(Cesium.Cartesian3.fromDegrees(e[0],e[1]))}),a.push(o)})})):-1{let i;1===n.length?i=e.substring(1,e.length-1):0===t?i=e.substring(1,e.length):t===n.length-1&&(i=e.substring(0,e.length-1)),i=i.split(",");let o=[];i.forEach(e=>{e=e.split(" ");o.push(Cesium.Cartesian3.fromDegrees(e[0],e[1]))}),a.push(o)})),a},M.prototype.VectorSlice=function(e){var t="EPSG:4490";return e.port&&(t=e.port),{url:e.url,urlParams:{REQUEST:"GetTile",SERVICE:"WMTS",VERSION:"1.0.0",LAYER:e.layer,STYLE:"",TILEMATRIX:t+":{z}",TILEMATRIXSET:t,FORMAT:"application/json;type=geojson",TILECOL:"{x}",TILEROW:"{y}"},upperLevelLimit:e.upperLevelLimit,lowerLevelLimit:e.lowerLevelLimit,rectangle:Cesium.Rectangle.fromDegrees(e.minx,e.miny,e.maxx,e.maxy)}},M.prototype.arge=function(e,t,i,o="180",r=!1){var n=Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)),a=Math.sqrt(Math.pow(e.x-i.x,2)+Math.pow(e.y-i.y,2)),s=Math.sqrt(Math.pow(t.x-i.x,2)+Math.pow(t.y-i.y,2)),a=(Math.pow(n,2)+Math.pow(a,2)-Math.pow(s,2))/(2*n*a);let l=Math.round(180*Math.acos(a)/Math.PI);return"360"!==o&&"+-"!==o||(this.isClockwise([[t.x,(r=r?-1:1)*t.y],[e.x,r*e.y],[i.x,r*i.y],[t.x,r*t.y]])||(l="+-"===o?-l:360-l)),l},M.prototype.isClockwise=function(e){e=Cesium.turf.lineString(e);return Cesium.turf.booleanClockwise(e)},M.prototype.saveAs=function(e,t){if(!window.saveAs){let e=new E(!1);e.addJs(document.body,window.SmartEarthRootUrl+"Workers/FileSaver.js")}saveAs(e,t)},M.prototype.setheight=function(e,t){e=Cesium.Cartographic.fromCartesian(e);return Cesium.Cartesian3.fromRadians(e.longitude,e.latitude,t)},M.prototype.setpolylineheight=function(e,t){var i=[];return e.forEach(function(e){e=Cesium.Cartographic.fromCartesian(e);i.push(Cesium.Cartesian3.fromRadians(e.longitude,e.latitude,t))}),i},M.prototype.StyleContrastGeoJson=function(e,t){var i={color:t.Color.WHITE,pixelSize:1,outlineColor:t.Color.BLACK,outlineWidth:0,show:!0,distanceDisplayCondition:new t.DistanceDisplayCondition(0,999999999)},o={id:"my label",text:"",font:"30px sans-serif",fillColor:t.Color.WHITE,outlineColor:t.Color.WHITE,outlineWidth:"10",scale:1,distanceDisplayCondition:new t.DistanceDisplayCondition(0,999999999)},r={show:!0,scale:1,width:void 0,height:void 0,pixelOffset:void 0,color:t.Color.WHITE,image:"",distanceDisplayCondition:new t.DistanceDisplayCondition(0,999999999)},n={positions:[],arcType:t.ArcType.GEODESIC,clampToGround:!0,width:1,show:!0,material:t.Color.RED,height:30},a={height:0,heightReference:t.HeightReference.NONE,show:!0,fill:!0,material:t.Color.WHITE,outline:!1,outlineColor:t.Color.BLACK,outlineWidth:1,stRotation:0,granularity:t.Math.RADIANS_PER_DEGREE,perPositionHeight:!1,closeTop:!0,closeBottom:!0,shadows:t.ShadowMode.ENABLED,clampToGround:!0};this.isnull(e.near)&&(e.near=0),this.isnull(e.far)&&(e.far=999999999);var s=parseFloat(e.near),l=parseFloat(e.far);return delete e.near,delete e.far,null!=e.point&&(e.point=this.extend(i,e.point,!0),e.point.distanceDisplayCondition=new t.DistanceDisplayCondition(s,l)),null!=e.label&&(e.label=this.extend(o,e.label,!0),e.label.distanceDisplayCondition=new t.DistanceDisplayCondition(s,l)),null!=e.billboard&&(e.billboard=this.extend(r,e.billboard,!0),e.billboard.distanceDisplayCondition=new t.DistanceDisplayCondition(s,l)),null!=e.polyline&&(e.polyline=this.extend(n,e.polyline,!0),e.polyline.distanceDisplayCondition=new t.DistanceDisplayCondition(s,l)),null!=e.polygon&&(e.polygon=this.extend(a,e.polygon,!0),e.polygon.distanceDisplayCondition=new t.DistanceDisplayCondition(s,l)),e},M.prototype.getCatesian3FromPX=function(e,t,i,o){var r,n=t.scene.pick(e),a=t.scene.drillPick(e),s=null;if(o){for(var l=0;lparseFloat(a.max)&&(a.max=parseFloat(t)),a.gcs.push(t)}e&&(r.scene.globe.depthTestAgainstTerrain=!1),""!=n&&null!=n&&"function"==typeof n&&n(a)}})},M.prototype.getPmfxPro=function(m,t,i,d,o,r){let n=this,a={gcs:[],min:99999,max:0,juli:0,cys:0},p=[],s=[];for(let e=0;e{s.forEach((e,t)=>{var i=m[t],o=m[t+1],r=d.Cartographic.fromCartesian(i),n=d.Math.toDegrees(r.longitude),a=d.Math.toDegrees(r.latitude),i=d.Cartographic.fromCartesian(o),o=d.Math.toDegrees(i.longitude),i=d.Math.toDegrees(i.latitude),s=e,l=d.Math.lerp(n,o,1/s)-n,c=d.Math.lerp(a,i,1/s)-a;0===t&&p.push(r);for(let e=0;eparseFloat(a.max)&&(a.max=parseFloat(t)),a.gcs.push(t)}o.scene.globe.depthTestAgainstTerrain=e,r&&"function"==typeof r&&r(a)}})};1e3{layuiLayer.close(e),setTimeout(()=>{c()},10)},btn2:()=>{r&&"function"==typeof r&&r(a)}}):setTimeout(()=>{c()},10)},M.prototype.get3DTileOrPrimitivesHeights=function(e,t){return t.scene.sampleHeight(e)},M.prototype.getHeightsFromLonLat=function(e,t,i,o){var r,n=i.camera,a=[];i.scene&&i.scene.terrainProvider&&i.scene.terrainProvider._layers?(r=t.sampleTerrainMostDetailed(i.terrainProvider,e),n.positionCartographic.height,t.when(r,function(e){e.forEach(function(e){a.push(e.height)}),"function"==typeof o&&o(a)})):(e.forEach(function(e){a.push(i.scene.globe.getHeight(e))}),"function"==typeof o&&o(a))},M.prototype.getColorRamp=function(e,i,t,o){var r=[],n=document.createElement("canvas");n.width=100,n.height=1;var a,s=n.getContext("2d");"elevation"===e?a=[0,.05,.2,.35,.5,.65,.8,.95,1]:"slope"===e?a=r:"aspect"===e&&(a=[0,0,.2,.4,.6,.8,.9,1,1]),i=i||["#0b0b88","#2747E0","#D33B7D","#D33038","#FF9742","#ffd700","#bbff00"];var l=s.createLinearGradient(0,0,100,0);if("slope"===e){void 0===t&&(t=0),0==(t=void 0===o?90:t)?r.push(0):(r.push(t/90),l.addColorStop(0,"#000000"));var c=(o-t)/6;if(90==o){for(var u=1;u<=5;u++)r.push((t+u*c)/90);r.push(1),r.forEach(function(e,t){l.addColorStop(e,i[t])})}else{for(u=1;u<=5;u++)r.push((t+u*c)/90);r.push(o/90),r.forEach(function(e,t){l.addColorStop(e,i[t])}),l.addColorStop(1,"#000000")}}else l.addColorStop(a[0],"#000000"),l.addColorStop(a[1],i[0]),l.addColorStop(a[2],i[1]),l.addColorStop(a[3],i[2]),l.addColorStop(a[4],i[3]),l.addColorStop(a[5],i[4]),l.addColorStop(a[6],i[5]),l.addColorStop(a[7],i[6]),l.addColorStop(a[8],"#000000");return s.fillStyle=l,s.fillRect(0,0,100,1),n},M.prototype.Gauss_to_XY=function(e,t,i,o){var r,n,a=6356752.3142,s=Math.sqrt(272331606681.9453)/a,l=0,c=this.to_Radian(i);t=this.to_Radian(t);var u=(e=this.to_Radian(e))-c,h=Math.cos(t),m=(l=this.to_N(t))*Math.cos(t);r=Math.tan(t),n=s*h;var d=Math.pow(r,2),a=Math.pow(r,4),i=Math.pow(n,2),e=Math.pow(n,4),c=Math.pow(h,3),s=Math.pow(h,5),m=this.to_Sm(t)+Math.pow(u,2)/2*m*h*r+Math.pow(u,4)/24*r*m*c*(5-d+9*i+4*e)+Math.pow(u,6)/720*r*m*s*(61-58*r*r+a+270*i-330*r*r*i),d=u*l*h+Math.pow(u,3)/6*l*c*(1-r*r+n*n)+Math.pow(u,5)/120*l*s*(5-18*r*r+a+14*i-58*i*d);return new o.Cartesian2(d,m)},M.prototype.to_Radian=function(e){return e*Math.PI/180},M.prototype.to_N=function(e){var t=6378137,i=6356752.3142,i=Math.sqrt(t*t-i*i)/t;return t/Math.sqrt(1-i*i*Math.sin(e)*Math.sin(e))},M.prototype.to_Sm=function(e){var t=6378137,i=6356752.3142,o=Math.sqrt(t*t-i*i)/t,r=1+o*o*3/4+45*Math.pow(o,4)/64+175*Math.pow(o,6)/256+11025*Math.pow(o,8)/16384,n=3*Math.pow(o,2)/4+15*Math.pow(o,4)/16+525*Math.pow(o,6)/512+2205*Math.pow(o,8)/2048,a=15*Math.pow(o,4)/64+105*Math.pow(o,6)/256+2205*Math.pow(o,8)/4096,s=35*Math.pow(o,6)/512+315*Math.pow(o,8)/2048,i=315*Math.pow(o,8)/16384;return t*(1-o*o)*(r*e-n/2*Math.sin(2*e)+a/4*Math.sin(4*e)-s/6*Math.sin(6*e)+i/8*Math.sin(8*e))},M.prototype.ElevationAngle=function(e,t,i){var o=i.Cartographic.fromCartesian(e),r=i.Cartographic.fromCartesian(t);o.height,o.height,r.height;r=i.Cartesian3.fromDegrees(i.Math.toDegrees(r.longitude),i.Math.toDegrees(r.latitude),o.height),o=parseFloat(function(e,t){for(var i=0,o=0;o=1/3&&t.time<2/3&&0===this.u_radius1?(this.u_radius3=t.time,this.u_radius2=this.u_radius3-1/3):t.time>=2/3?(this.u_radius3=t.time,this.u_radius2=this.u_radius3-1/3,this.u_radius1=this.u_radius3-2/3):t.time<1/3&&0!==this.u_radius2&&0!==this.u_radius1?(this.u_radius1=t.time,this.u_radius2=t.time+1/3,this.u_radius3=t.time+2/3):t.time>=1/3&&t.time<2/3&&0!==this.u_radius1&&(this.u_radius1=t.time-1/3,this.u_radius2=t.time,this.u_radius3=t.time+1/3),t.u_radius1=this.u_radius1,t.u_radius2=this.u_radius2,t.u_radius3=this.u_radius3,t},i.prototype.equals=function(e){return this===e||e instanceof i&&Cesium.Property.equals(this._color,e._color)},Cesium.CircleScanMultiMaterialProperty=i,Cesium.Material.CircleScanMultiType="CircleScanMulti",Cesium.Material.CircleScanMultiSource="czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n material.diffuse = color.rgb;\n vec2 st = materialInput.st;\n float dis = distance(st, vec2(0.5, 0.5));\n dis = dis * 2.0;\n if(dis < u_radius1)\n\n {\n float f = dis / u_radius1;\n material.alpha = pow(f, 9.0);\n }else if(dis < u_radius2){\n float f = dis / u_radius2;\n material.alpha = pow(f, 9.0);\n }else if(dis < u_radius3){\n float f = dis / u_radius3;\n material.alpha = pow(f, 9.0);\n }else{\n material.alpha = 0.0;\n }\n return material;\n }",Cesium.Material._materialCache.addMaterial(Cesium.Material.CircleScanMultiType,{fabric:{type:Cesium.Material.CircleScanMultiType,uniforms:{color:new Cesium.Color(1,0,0,1),time:0,u_radius1:0,u_radius2:0,u_radius3:0},source:Cesium.Material.CircleScanMultiSource},translucent:function(e){return!0}})),new Cesium.CircleScanMultiMaterialProperty(Cesium.Color.fromCssColorString(this.defaultValue(e,"#ff0000")),this.defaultValue(t,3e3))},M.prototype.getSectorScanMaterial=function(e,t){function i(e,t,i){this._definitionChanged=new Cesium.Event,this._color=void 0,this._colorSubscription=void 0,this.color=e,this.duration=i,this._angle=t,this._time=(new Date).getTime()}return Cesium.EllipsoidFadeMaterialProperty||(Object.defineProperties(i.prototype,{isConstant:{get:function(){return!1}},definitionChanged:{get:function(){return this._definitionChanged}},color:Cesium.createPropertyDescriptor("color"),angle:Cesium.createPropertyDescriptor("angle")}),i.prototype.getType=function(e){return"EllipsoidFade"},i.prototype.getValue=function(e,t){return(t=!Cesium.defined(t)?{}:t).color=Cesium.Property.getValueOrClonedDefault(this._color,e,Cesium.ColorWHITE,t.color),t.angle=this._angle,t},i.prototype.equals=function(e){return this===e||e instanceof i&&Property.equals(this._color,e._color)},Cesium.EllipsoidFadeMaterialProperty=i,Cesium.Material.EllipsoidFadeType="EllipsoidFade",Cesium.Material.EllipsoidFadeSource="float getAngle(in vec2 dv)\n{\n if(dv.y == 0.0 && dv.x > 0.0)\n {\n return 90.0;\n }\n if(dv.y == 0.0 && dv.x < 0.0)\n {\n return 270.0;\n }\n float rAngle = atan(dv.x/dv.y) * 180.0 / 3.1415926;\n if(dv.x > 0.0)\n {\n if(dv.y < 0.0)\n {\n rAngle = 180.0 + rAngle;\n }\n }\n if(dv.x <= 0.0)\n {\n if(dv.y < 0.0)\n {\n rAngle = 180.0 + rAngle;\n }\n if(dv.y > 0.0)\n {\n rAngle = 360.0 + rAngle;\n }\n }\n return rAngle;\n}\nfloat ripple(float dist, float rippleIntensity, float rippleScale) {\n return rippleScale * ((sin(dist * rippleIntensity - czm_frameNumber/10.0)-0.9) / (dist * rippleIntensity));\n}\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n material.diffuse = 1.5 * color.rgb;\n vec2 st = materialInput.st;\n float dis = distance(st, vec2(0.5, 0.5));\n float nowAngle = getAngle(st.xy-vec2(0.5, 0.5));\n if(nowAngle < angle)\n {\n material.alpha = 1.0 - dis/0.5;\n float intensity =step(0.001,ripple(dis, 100.0, 15.0));\n if(intensity == 1.0)\n {\n material.alpha = material.alpha/2.0;\n }\n }\n else{\n material.alpha = 0.0;\n discard;\n }\n return material;\n}",Cesium.Material._materialCache.addMaterial(Cesium.Material.EllipsoidFadeType,{fabric:{type:Cesium.Material.EllipsoidFadeType,uniforms:{color:new Cesium.Color(1,0,0,1),angle:90},source:Cesium.Material.EllipsoidFadeSource},translucent:function(e){return!0}})),new Cesium.EllipsoidFadeMaterialProperty(Cesium.Color.fromCssColorString(this.defaultValue(e,"#ff0000")),this.defaultValue(t,45))},M.prototype.getCircleScanMaterial=function(e,t){function i(e,t){this._definitionChanged=new Cesium.Event,this._color=void 0,this._colorSubscription=void 0,this.color=e,this.duration=t,this._time=(new Date).getTime()}return Cesium.CircleScanMaterialProperty||(Object.defineProperties(i.prototype,{isConstant:{get:function(){return!1}},definitionChanged:{get:function(){return this._definitionChanged}},color:Cesium.createPropertyDescriptor("color")}),i.prototype.getType=function(e){return"CircleScan"},i.prototype.getValue=function(e,t){return(t=!Cesium.defined(t)?{}:t).color=Cesium.Property.getValueOrClonedDefault(this._color,e,Cesium.Color.WHITE,t.color),t.time=((new Date).getTime()-this._time)%this.duration/this.duration,t},i.prototype.equals=function(e){return this===e||e instanceof i&&Cesium.Property.equals(this._color,e._color)},Cesium.CircleScanMaterialProperty=i,Cesium.Material.CircleScanType="CircleScan",Cesium.Material.CircleScanSource="czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n material.diffuse = color.rgb;\n vec2 st = materialInput.st;\n float dis = distance(st, vec2(0.5, 0.5));\n if(dis 0.0)\n {\n return 90.0;\n }\n if(dv.y == 0.0 && dv.x < 0.0)\n {\n return 270.0;\n }\n float rAngle = atan(dv.x/dv.y) * 180.0 / 3.1415926;\n if(dv.x > 0.0)\n {\n if(dv.y < 0.0)\n {\n rAngle = 180.0 + rAngle;\n }\n }\n if(dv.x <= 0.0)\n {\n if(dv.y < 0.0)\n {\n rAngle = 180.0 + rAngle;\n }\n if(dv.y > 0.0)\n {\n rAngle = 360.0 + rAngle;\n }\n }\n return rAngle;\n }\n float ripple(float dist, float rippleIntensity, float rippleScale) {\n return rippleScale * ((sin(dist * rippleIntensity - czm_frameNumber/10.0)-0.9) / (dist * rippleIntensity));\n }\n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n material.diffuse = color.rgb;\n vec2 st = materialInput.st;\n float dis = distance(st, vec2(0.5, 0.5));\n float f = 0.0;\n float nowAngle = getAngle(st.xy-vec2(0.5, 0.5));\n if(nowAngle < angle2 && nowAngle > angle1)\n {\n f = (nowAngle - angle1) / 60.0;\n material.alpha = f;\n }else if(nowAngle < 360.0 && nowAngle > angle1 && angle2 < 60.0){\n f = (nowAngle - angle1) / 60.0;\n material.alpha = f;\n }else if(nowAngle < angle2 && nowAngle > 0.0 && angle2 < 60.0){\n f = (nowAngle + 360.0 - angle1) / 60.0;\n material.alpha = f;\n }else{\n material.alpha = 0.0;\n discard;\n }\n return material;\n }",Cesium.Material._materialCache.addMaterial(Cesium.Material.RadarScanType,{fabric:{type:Cesium.Material.RadarScanType,uniforms:{color:new Cesium.Color(1,0,0,1),time:0,angle2:0,angle1:0},source:Cesium.Material.RadarScanSource},translucent:function(e){return!0}})),new Cesium.RadarScanMaterialProperty(Cesium.Color.fromCssColorString(this.defaultValue(e,"#ff0000")),this.defaultValue(t,3e3))},M.prototype.gradientColor=function(e,t,i){return new R(e,t,i)},M.prototype.xhr=function(e){var t=new XMLHttpRequest,i=!0,i=null==e.async||(null==e.async||e.async);t.open(e.type,e.url,i),t.send(e.data||{}),t.onreadystatechange=function(){4===this.readyState&&200===this.status?e.success&&"function"==typeof e.success&&e.success(e.isXml?this.responseXML:JSON.parse(this.responseText)):e.error&&"function"==typeof e.error&&e.error(t),e.complete&&"function"==typeof e.complete&&e.complete()}};var zn,A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function R(e,t,i){if(e&&t){"#"!==e[0]&&(e=this.colorHex(e)),"#"!==t[0]&&(t=this.colorHex(t));for(var e=this.colorRgb(e),o=e[0],r=e[1],n=e[2],t=this.colorRgb(t),a=(t[0]-o)/i,s=(t[1]-r)/i,l=(t[2]-n)/i,c=[],u=0;u{var i=e.nodeType,o=h(e.localName||e.nodeName),r=e.text||e.nodeValue||"";8==i||(3!=i&&4!=i&&o?(s=s||{})[o]?(s[o].length||(s[o]=m(s[o])),s[o]=m(s[o]),s[o][s[o].length]=n(e,!0),s[o].length=s[o].length):s[o]=n(e):r.match(/^\s+$/)||(a+=r.replace(/^\s+/,"").replace(/\s+$/,"")))}),i.attributes&&0"']/g,La=RegExp(Ia.source),Ma=RegExp(Da.source),Aa=/<%-([\s\S]+?)%>/g,Ra=/<%([\s\S]+?)%>/g,Oa=/<%=([\s\S]+?)%>/g,Ha=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Va=/^\w*$/,ka=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Fa=/[\\^$.*+?()[\]{}|]/g,Ga=RegExp(Fa.source),Na=/^\s+/,k=/\s/,Ba=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ja=/\{\n\/\* \[wrapped with (.+)\] \*/,za=/,? & /,Ua=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Wa=/[()=,{}\[\]\/\s]/,Ya=/\\(\\)?/g,qa=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Qa=/\w*$/,Ja=/^[-+]0x[0-9a-f]+$/i,Xa=/^0b[01]+$/i,Ka=/^\[object .+?Constructor\]$/,$a=/^0o[0-7]+$/i,Za=/^(?:0|[1-9]\d*)$/,es=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ts=/($^)/,is=/['\n\r\u2028\u2029\\]/g,F="\\ud800-\\udfff",G="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",N="\\u2700-\\u27bf",B="a-z\\xdf-\\xf6\\xf8-\\xff",j="A-Z\\xc0-\\xd6\\xd8-\\xde",z="\\ufe0e\\ufe0f",U="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",W="['’]",Y="["+F+"]",q="["+U+"]",Q="["+G+"]",J="\\d+",X="["+N+"]",K="["+B+"]",Z="[^"+F+U+J+N+B+j+"]",ee="\\ud83c[\\udffb-\\udfff]",te="[^"+F+"]",ie="(?:\\ud83c[\\udde6-\\uddff]){2}",oe="[\\ud800-\\udbff][\\udc00-\\udfff]",re="["+j+"]",ne="\\u200d",ae="(?:"+K+"|"+Z+")",U="(?:"+re+"|"+Z+")",N="(?:['’](?:d|ll|m|re|s|t|ve))?",B="(?:['’](?:D|LL|M|RE|S|T|VE))?",j="(?:"+Q+"|"+ee+")"+"?",Z="["+z+"]?",j=Z+j+("(?:"+ne+"(?:"+[te,ie,oe].join("|")+")"+Z+j+")*"),X="(?:"+[X,ie,oe].join("|")+")"+j,Y="(?:"+[te+Q+"?",Q,ie,oe,Y].join("|")+")",os=RegExp(W,"g"),rs=RegExp(Q,"g"),se=RegExp(ee+"(?="+ee+")|"+Y+j,"g"),ns=RegExp([re+"?"+K+"+"+N+"(?="+[q,re,"$"].join("|")+")",U+"+"+B+"(?="+[q,re+ae,"$"].join("|")+")",re+"?"+ae+"+"+N,re+"+"+B,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",J,X].join("|"),"g"),le=RegExp("["+ne+F+G+z+"]"),as=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ss=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ls=-1,cs={};cs[_a]=cs[fa]=cs[ya]=cs[va]=cs[Ca]=cs[wa]=cs[ba]=cs[Sa]=cs[Ta]=!0,cs[$n]=cs[Zn]=cs[pa]=cs[ea]=cs[ga]=cs[ta]=cs[ia]=cs[oa]=cs[na]=cs[aa]=cs[sa]=cs[ca]=cs[ua]=cs[ha]=cs[da]=!1;var us={};us[$n]=us[Zn]=us[pa]=us[ga]=us[ea]=us[ta]=us[_a]=us[fa]=us[ya]=us[va]=us[Ca]=us[na]=us[aa]=us[sa]=us[ca]=us[ua]=us[ha]=us[ma]=us[wa]=us[ba]=us[Sa]=us[Ta]=!0,us[ia]=us[oa]=us[da]=!1;var ce={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},hs=parseFloat,ms=parseInt,G="object"==typeof global&&global&&global.Object===Object&&global,z="object"==typeof self&&self&&self.Object===Object&&self,ds=G||z||Function("return this")(),z="object"==typeof o&&o&&!o.nodeType&&o,ue=z&&"object"==typeof module&&module&&!module.nodeType&&module,gs=ue&&ue.exports===z,he=gs&&G.process,z=function(){try{var e=ue&&ue.require&&ue.require("util").types;return e?e:he&&he.binding&&he.binding("util")}catch(e){}}(),_s=z&&z.isArrayBuffer,fs=z&&z.isDate,ys=z&&z.isMap,vs=z&&z.isRegExp,Cs=z&&z.isSet,ws=z&&z.isTypedArray;function bs(e,t,i){switch(i.length){case 0:return e.call(t);case 1:return e.call(t,i[0]);case 2:return e.call(t,i[0],i[1]);case 3:return e.call(t,i[0],i[1],i[2])}return e.apply(t,i)}function Ss(e,t,i,o){for(var r=-1,n=null==e?0:e.length;++r":">",'"':""","'":"'"});function Zs(e){return"\\"+ce[e]}function el(e){return le.test(e)}function tl(e){var i=-1,o=Array(e.size);return e.forEach(function(e,t){o[++i]=[t,e]}),o}function il(t,i){return function(e){return t(i(e))}}function ol(e,t){for(var i=-1,o=e.length,r=0,n=[];++i",""":'"',"'":"'"});var pe,ge=function e(t){var S=(t=null==t?ds:_.defaults(ds.Object(),t,_.pick(ds,ss))).Array,i=t.Date,h=t.Error,m=t.Function,r=t.Math,g=t.Object,d=t.RegExp,u=t.String,y=t.TypeError,n=S.prototype,o=m.prototype,p=g.prototype,a=t["__core-js_shared__"],s=o.toString,v=p.hasOwnProperty,l=0,c=(On=/[^.]+$/.exec(a&&a.keys&&a.keys.IE_PROTO||""))?"Symbol(src)_1."+On:"",f=p.toString,C=s.call(g),w=ds._,b=d("^"+s.call(v).replace(Fa,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),T=gs?t.Buffer:zn,P=t.Symbol,E=t.Uint8Array,x=T?T.allocUnsafe:zn,I=il(g.getPrototypeOf,g),D=g.create,L=p.propertyIsEnumerable,M=n.splice,A=P?P.isConcatSpreadable:zn,R=P?P.iterator:zn,O=P?P.toStringTag:zn,H=function(){try{var e=ji(g,"defineProperty");return e({},"",{}),e}catch(e){}}(),V=t.clearTimeout!==ds.clearTimeout&&t.clearTimeout,k=i&&i.now!==ds.Date.now&&i.now,F=t.setTimeout!==ds.setTimeout&&t.setTimeout,G=r.ceil,N=r.floor,B=g.getOwnPropertySymbols,j=T?T.isBuffer:zn,z=t.isFinite,U=n.join,W=il(g.keys,g),Y=r.max,q=r.min,Q=i.now,J=t.parseInt,X=r.random,K=n.reverse,$=ji(t,"DataView"),Z=ji(t,"Map"),ee=ji(t,"Promise"),te=ji(t,"Set"),ie=ji(t,"WeakMap"),oe=ji(g,"create"),re=ie&&new ie,ne={},ae=fo($),se=fo(Z),le=fo(ee),ce=fo(te),ue=fo(ie),he=P?P.prototype:zn,me=he?he.valueOf:zn,de=he?he.toString:zn;function pe(e){if(Or(e)&&!Sr(e)&&!(e instanceof ve)){if(e instanceof ye)return e;if(v.call(e,"__wrapped__"))return yo(e)}return new ye(e)}var ge=function(e){if(!Rr(e))return{};if(D)return D(e);_e.prototype=e;e=new _e;return _e.prototype=zn,e};function _e(){}function fe(){}function ye(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=zn}function ve(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Xn,this.__views__=[]}function Ce(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t>>0,t>>>=0;for(var n=S(r);++o>>1,a=e[n];null!==a&&!Br(a)&&(i?a<=t:a>>0)?(e=Kr(e))&&("string"==typeof t||null!=t&&!Fr(t))&&!(t=Ft(t))&&el(e)?Xt(al(e),0,i):e.split(t,i):[]},pe.spread=function(i,o){if("function"!=typeof i)throw new y(Un);return o=null==o?0:Y(qr(o),0),Pt(function(e){var t=e[o],e=Xt(e,0,o);return t&&Ms(e,t),bs(i,this,e)})},pe.tail=function(e){var t=null==e?0:e.length;return t?At(e,1,t):[]},pe.take=function(e,t,i){return e&&e.length?At(e,0,(t=i||t===zn?1:qr(t))<0?0:t):[]},pe.takeRight=function(e,t,i){var o=null==e?0:e.length;return o?At(e,(t=o-(t=i||t===zn?1:qr(t)))<0?0:t,o):[]},pe.takeRightWhile=function(e,t){return e&&e.length?jt(e,Gi(t,3),!1,!0):[]},pe.takeWhile=function(e,t){return e&&e.length?jt(e,Gi(t,3)):[]},pe.tap=function(e,t){return t(e),e},pe.throttle=function(e,t,i){var o=!0,r=!0;if("function"!=typeof e)throw new y(Un);return Rr(i)&&(o="leading"in i?!!i.leading:o,r="trailing"in i?!!i.trailing:r),ur(e,t,{leading:o,maxWait:t,trailing:r})},pe.thru=Yo,pe.toArray=Wr,pe.toPairs=yn,pe.toPairsIn=vn,pe.toPath=function(e){return Sr(e)?Ls(e,_o):Br(e)?[e]:ri(go(Kr(e)))},pe.toPlainObject=Xr,pe.transform=function(e,o,r){var t,i=Sr(e),n=i||xr(e)||jr(e);return o=Gi(o,4),null==r&&(t=e&&e.constructor,r=n?i?new t:[]:Rr(e)&&Lr(t)?ge(I(e)):{}),(n?Ts:Je)(e,function(e,t,i){return o(r,e,t,i)}),r},pe.unary=function(e){return ar(e,1)},pe.union=Oo,pe.unionBy=Ho,pe.unionWith=Vo,pe.uniq=function(e){return e&&e.length?Gt(e):[]},pe.uniqBy=function(e,t){return e&&e.length?Gt(e,Gi(t,2)):[]},pe.uniqWith=function(e,t){return t="function"==typeof t?t:zn,e&&e.length?Gt(e,zn,t):[]},pe.unset=function(e,t){return null==e||Nt(e,t)},pe.unzip=ko,pe.unzipWith=Fo,pe.update=function(e,t,i){return null==e?e:Bt(e,t,qt(i))},pe.updateWith=function(e,t,i,o){return o="function"==typeof o?o:zn,null==e?e:Bt(e,t,qt(i),o)},pe.values=Cn,pe.valuesIn=function(e){return null==e?[]:qs(e,mn(e))},pe.without=Go,pe.words=Mn,pe.wrap=function(e,t){return _r(qt(t),e)},pe.xor=No,pe.xorBy=Bo,pe.xorWith=jo,pe.zip=zo,pe.zipObject=function(e,t){return Wt(e||[],t||[],Le)},pe.zipObjectDeep=function(e,t){return Wt(e||[],t||[],It)},pe.zipWith=Uo,pe.entries=yn,pe.entriesIn=vn,pe.extend=Zr,pe.extendWith=en,kn(pe,pe),pe.add=ie,pe.attempt=An,pe.camelCase=wn,pe.capitalize=bn,pe.ceil=a,pe.clamp=function(e,t,i){return i===zn&&(i=t,t=zn),i!==zn&&(i=(i=Jr(i))==i?i:0),t!==zn&&(t=(t=Jr(t))==t?t:0),Ve(Jr(e),t,i)},pe.clone=function(e){return ke(e,4)},pe.cloneDeep=function(e){return ke(e,5)},pe.cloneDeepWith=function(e,t){return ke(e,5,t="function"==typeof t?t:zn)},pe.cloneWith=function(e,t){return ke(e,4,t="function"==typeof t?t:zn)},pe.conformsTo=function(e,t){return null==t||Fe(e,t,hn(t))},pe.deburr=Sn,pe.defaultTo=function(e,t){return null==e||e!=e?t:e},pe.divide=F,pe.endsWith=function(e,t,i){e=Kr(e),t=Ft(t);var o=e.length,o=i=i===zn?o:Ve(qr(i),0,o);return 0<=(i-=t.length)&&e.slice(i,o)==t},pe.eq=vr,pe.escape=function(e){return(e=Kr(e))&&Ma.test(e)?e.replace(Da,$s):e},pe.escapeRegExp=function(e){return(e=Kr(e))&&Ga.test(e)?e.replace(Fa,"\\$&"):e},pe.every=function(e,t,i){return(Sr(e)?Es:ze)(e,Gi(t=i&&Xi(e,t,i)?zn:t,3))},pe.find=Jo,pe.findIndex=bo,pe.findKey=function(e,t){return Hs(e,Gi(t,3),Je)},pe.findLast=Xo,pe.findLastIndex=So,pe.findLastKey=function(e,t){return Hs(e,Gi(t,3),Xe)},pe.floor=Lt,pe.forEach=Ko,pe.forEachRight=$o,pe.forIn=function(e,t){return null==e?e:qe(e,Gi(t,3),mn)},pe.forInRight=function(e,t){return null==e?e:Qe(e,Gi(t,3),mn)},pe.forOwn=function(e,t){return e&&Je(e,Gi(t,3))},pe.forOwnRight=function(e,t){return e&&Xe(e,Gi(t,3))},pe.get=an,pe.gt=Cr,pe.gte=wr,pe.has=function(e,t){return null!=e&&Yi(e,t,it)},pe.hasIn=sn,pe.head=Po,pe.identity=Hn,pe.includes=function(e,t,i,o){return e=Pr(e)?e:Cn(e),i=i&&!o?qr(i):0,o=e.length,i<0&&(i=Y(o+i,0)),Nr(e)?i<=o&&-1=q(t=t,i=i)&&e=this.__values__.length;return{done:e,value:e?zn:this.__values__[this.__index__++]}},pe.prototype.plant=function(e){for(var t,i=this;i instanceof fe;){var o=yo(i);o.__index__=0,o.__values__=zn,t?r.__wrapped__=o:t=o;var r=o,i=i.__wrapped__}return r.__wrapped__=e,t},pe.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof ve){e=e;return(e=(e=this.__actions__.length?new ve(this):e).reverse()).__actions__.push({func:Yo,args:[Ro],thisArg:zn}),new ye(e,this.__chain__)}return this.thru(Ro)},pe.prototype.toJSON=pe.prototype.valueOf=pe.prototype.value=function(){return zt(this.__wrapped__,this.__actions__)},pe.prototype.first=pe.prototype.head,R&&(pe.prototype[R]=function(){return this}),pe}(),_e={Source:[],TempSource:[],entity:[],lastSelectEntity:null,pointsId:[],states:0,PointSelectSource:[],currentObj:null,selectedItem:null,setSource:function(e){this.Source=e},setTempSource:function(e){this.TempSource=e},setPointSelectSource:function(e){this.PointSelectSource=e},getSource:function(){return this.Source},getTempSource:function(){return this.TempSource},getPointSelectSource:function(){return this.PointSelectSource},push:function(e){this.Source.push(e)},pusTemSource:function(e){this.TempSource.push(e)},pusPointSelectSource:function(e){this.PointSelectSource.push(e)},insertGroupId:function(e,t){null!=e.checked&&"true"!=e.checked&&null!=e.checked||(e.checked=!0);try{0==e.item.item.show&&(e.checked=!1)}catch(e){}var i=this.getSourceById(_e.Source,t);if(i){for(var o=0,r=this.TempSource.length;o{if(u.show(!1),this.end=void 0,a._core.mouse(a._viewer.container,0),a._tree.endtemporaryItem(),a._tree.handler.destroy(),"cancel"!==e){for(var t,i=0;ie.id&&e.id.id===t.id);if(!(i<0)){var o=2*this._viewer.scene.primitives.get(i).boundingSphere.radius/3.63,i=Cesium.Transforms.eastNorthUpToFixedFrame(t.position.getValue());return(this.model=t).heading||(t.heading=0),t.pitch||(t.pitch=0),t.roll||(t.roll=0),this.axis=this._viewer.scene.primitives.add(Cesium.Model.fromGltf({id:"modeEditAxis",modelMatrix:i,url:window.SmartEarthRootUrl+D.modelAxis,scale:o,minimumPixelSize:e.minimumPixelSize})),this.initEvent(),this}}},ve.prototype.initEvent=function(){this.editHandler&&this.editHandler.destroy(),this.editHandler=new Cesium.ScreenSpaceEventHandler(this._viewer.scene.canvas);let i,o;this.editHandler.setInputAction(e=>{i?(o=e.position,this.originPosition=this.model.position.getValue(),this.originHeading=this.model.heading||0,this.originPitch=this.model.pitch||0,this.originRoll=this.model.roll||0,this.startPosition=this._viewer.scene.pickPosition(o),this.defaultEvent(!1),this.setMouseStyle("edit")):o=void 0},Cesium.ScreenSpaceEventType.LEFT_DOWN),this.editHandler.setInputAction(e=>{o=void 0,this.defaultEvent(!0),this.setMouseStyle("default")},Cesium.ScreenSpaceEventType.LEFT_UP),this.editHandler.setInputAction(e=>{if(o)return this.mouseTooltip(i,e),void this.edit(i,o,e.endPosition);var t=this._viewer.scene.pick(e.endPosition);i=t&&"modeEditAxis"===t.id?"XArrow_1"===t.mesh.name?"y":"YArrow_1"===t.mesh.name?"x":"ZArrow_1"===t.mesh.name?"z":"ZAxis_1"===t.mesh.name?"heading":"XAxis_1"===t.mesh.name?"pitch":"YAxis_1"===t.mesh.name?"roll":void 0:void 0,this.mouseTooltip(i,e)},Cesium.ScreenSpaceEventType.MOUSE_MOVE)},ve.prototype.defaultEvent=function(e){let t=this._viewer.scene;t.screenSpaceCameraController.enableRotate=e,t.screenSpaceCameraController.enableTranslate=e,t.screenSpaceCameraController.enableZoom=e,t.screenSpaceCameraController.enableTilt=e,t.screenSpaceCameraController.enableLook=e},ve.prototype.setMouseStyle=function(e){"edit"===e?(this.defaultMouseStyle=this._viewer.container.style.cursor,this._viewer.container.style.cursor="crosshair"):"default"===e&&(this._viewer.container.style.cursor=this.defaultMouseStyle||"default")},ve.prototype.edit=function(i,o,r){if(i){var n=this.originPosition,a=this.startPosition;let t=this._core.toDegrees(n);var s=this._core.toDegrees(a),l=this._viewer.scene.cartesianToCanvasCoordinates(n),c=r.x-o.x,a=r.y-o.y;let e;if("x"===i){n=c*(s.lon-t.lon)/(o.x-l.x);t.lon+=n,e=Cesium.Cartesian3.fromDegrees(t.lon,t.lat,t.height),this.model.position=e,this.axis.modelMatrix=Cesium.Transforms.eastNorthUpToFixedFrame(e)}else if("y"===i){var u=c*(s.lat-t.lat)/(o.x-l.x);t.lat+=u,e=Cesium.Cartesian3.fromDegrees(t.lon,t.lat,t.height),this.model.position=e,this.axis.modelMatrix=Cesium.Transforms.eastNorthUpToFixedFrame(e)}else if("z"===i){u=s.height-t.height,u=a*Math.abs(u/(o.y-l.y));t.height-=u,e=Cesium.Cartesian3.fromDegrees(t.lon,t.lat,t.height),this.model.position=e,this.axis.modelMatrix=Cesium.Transforms.eastNorthUpToFixedFrame(e),window.SmartEarthPopupData&&window.SmartEarthPopupData.window&&SmartEarthPopupData.window.document.querySelector('.model input[name="height"]')&&(SmartEarthPopupData.window.document.querySelector('.model input[name="height"]').value=t.height.toFixed(2))}else if("heading"===i){var h=this.originHeading,m=this._core.arge(l,o,r,"+-",!0);this.setRotate("heading",h-=m),window.SmartEarthPopupData&&window.SmartEarthPopupData.window&&SmartEarthPopupData.window.document.querySelector('.model input[name="heading"]')&&(SmartEarthPopupData.window.document.querySelector('.model input[name="heading"]').value=h)}else if("pitch"===i){m=(s.lon-t.lon)/(o.x-l.x);let e=this.originPitch;h=this._core.arge(l,o,r,"+-",!0);0{t+='
'+e+"
"}):t='
'+i.description+"
",e=`
${i.name}
${t}
`,$(this._viewer.container).append(e),o=document.getElementById(i.id),i.onclick&&(o.onclick=()=>{i.onclick(i)})}else e=`
${i.name}
`,$(this._viewer.container).append(e),o=document.getElementById(i.id),i.onclick&&(o.onclick=()=>{i.onclick(i)});else e=`
${i.description}
`,$(this._viewer.container).append(e),o=document.getElementById(i.id),i.onclick&&(o.onclick=()=>{i.onclick(i)})}let e=n.x,t=n.y-o.offsetHeight;"c"===i.offset?e-=o.offsetWidth/2:"r"===i.offset?e-=o.offsetWidth:Array.isArray(i.offset)&&("c"===i.offset[0]?e-=o.offsetWidth/2:"r"===i.offset[0]?e-=o.offsetWidth:"number"==typeof i.offset[0]&&(e-=i.offset[0]),"number"==typeof i.offset[1]&&(t-=i.offset[1])),o.style.transform=`matrix(1, 0, 0, 1, ${e}, ${t})`}i.update&&i.update()}},Ce.prototype.updateDivPoint=function(t,i={}){if(this.item){Object.assign(this.item,i),this.item.name=t;let e=document.getElementById(this.item.id);e&&e.remove()}},Ce.prototype.deleteObject=function(){this._viewer.clock.onTick.removeEventListener(this.updateDivPointEvent,this);let e=document.getElementById(this.item.id);e&&e.remove()},Ce.prototype.setVisibility=function(e){this.item&&(this.item.show=e)},Ce.prototype.getVisibility=function(){return this.item&&this.item.show},Ce.prototype.setTreeobj=function(e){this.treeobj=e},we.prototype.getPosition=function(){return this._viewer.camera.position},we.prototype.getDegrees=function(){var e=this._viewer.camera.positionCartographic;return{lon:this._cesium.Math.toDegrees(e.longitude),lat:this._cesium.Math.toDegrees(e.latitude),height:e.height}},we.prototype.getMousePosition=function(e,t,i,o,r){var n,a,s,l,c=e.endPosition||e.position||e;void 0===i&&(i=0),o=this._cesium.defaultValue(o,!1),void 0===this.defaultDepthTest&&(this.defaultDepthTest=!!this._viewer.scene.globe.depthTestAgainstTerrain);e=o?r||30:1;if(0!==i?(this._viewer.scene.globe.depthTestAgainstTerrain=!0,(n=this._viewer.camera.getPickRay(c))&&(a=this._viewer.scene.globe.pick(n,this._viewer.scene)),t&&0!==t.length?(l=this._viewer.scene.drillPick(c,t.length,e,e),l=this.getNotExcludedObj(l,t)):(l=this._viewer.scene.pick(c))&&l.id&&!this.id3DGraphic(l.id)&&(l=void 0),l&&!o?(this._viewer.scene.pick(c),(s=this._viewer.scene.pickPosition(c))&&(a=s)):(s=a&&o?this._getAdsorptionPosition(c,l,r):s)&&(a=s)):(t&&0!==t.length?(l=this._viewer.scene.drillPick(c,t&&t.length&&t.length+1||1,e,e),l=this.getNotExcludedObj(l,t)):(l=this._viewer.scene.pick(c))&&l.id&&!this.id3DGraphic(l.id)&&(l=void 0),l&&!o?(this._viewer.scene.pick(c),a=this._viewer.scene.pickPosition(c)):l&&o?(this._viewer.scene.pick(c),a=this._viewer.scene.pickPosition(c),(s=this._getAdsorptionPosition(c,l,r))&&(a=s)):(this._viewer.scene.globe.depthTestAgainstTerrain=!0,(n=this._viewer.camera.getPickRay(c))&&(a=this._viewer.scene.globe.pick(n,this._viewer.scene)))),this._viewer.scene.globe.depthTestAgainstTerrain=!!this.defaultDepthTest,this.defaultDepthTest=void 0,a)return a;console.log("未拾取到坐标!")},we.prototype.getMouseDegrees=function(e,t,i,o,r){var n,a,s,l=e.endPosition||e.position||e;void 0===i&&(i=0),o=this._cesium.defaultValue(o,!1),void 0===this.defaultDepthTest&&(this.defaultDepthTest=!!this._viewer.scene.globe.depthTestAgainstTerrain);e=o?r||30:1;if(0!==i?(this._viewer.scene.globe.depthTestAgainstTerrain=!0,(n=this._viewer.camera.getPickRay(l))&&(c=this._viewer.scene.globe.pick(n,this._viewer.scene)),t&&0!==t.length?(s=this._viewer.scene.drillPick(l,t&&t.length&&t.length+1||1,e,e),s=this.getNotExcludedObj(s,t)):(s=this._viewer.scene.pick(l))&&s.id&&!this.id3DGraphic(s.id)&&(s=void 0),s&&!o?(this._viewer.scene.pick(l),(a=this._viewer.scene.pickPosition(l))&&(c=a)):(a=c&&o?this._getAdsorptionPosition(l,s,r):a)&&(c=a)):(t&&0!==t.length?(s=this._viewer.scene.drillPick(l,t&&t.length&&t.length+1||1,e,e),s=this.getNotExcludedObj(s,t)):(s=this._viewer.scene.pick(l))&&s.id&&!this.id3DGraphic(s.id)&&(s=void 0),s&&!o?(this._viewer.scene.pick(l),c=this._viewer.scene.pickPosition(l)):s&&o?(this._viewer.scene.pick(l),c=this._viewer.scene.pickPosition(l),(a=this._getAdsorptionPosition(l,s,r))&&(c=a)):(this._viewer.scene.globe.depthTestAgainstTerrain=!0,(n=this._viewer.camera.getPickRay(l))&&(c=this._viewer.scene.globe.pick(n,this._viewer.scene)))),this._viewer.scene.globe.depthTestAgainstTerrain=!!this.defaultDepthTest,this.defaultDepthTest=void 0,c){var c=this._cesium.Cartographic.fromCartesian(c);return{lon:this._cesium.Math.toDegrees(c.longitude),lat:this._cesium.Math.toDegrees(c.latitude),height:c.height}}console.log("未拾取到坐标!")},we.prototype.id3DGraphic=function(e){let t=!0;return(e.polyline||e.point||e.label||e.billboard||e.polygon&&null==e.polygon.extrudedHeight||e.rectangle&&null==e.rectangle.extrudedHeight||e.ellipse&&null==e.ellipse.extrudedHeight||e.corridor&&null==e.corridor.extrudedHeight)&&(t=!1),t},we.prototype.getAdsorptionPosition=function(e,t){for(var i=this._viewer.scene.drillPick(e,t&&t.length&&t.length+1||3,8,8),o=!1,r=0;ro)u=l;else if(e.x-n[l].x<-o)c=l;else if(Math.abs(e.x-n[l].x)o){c=a;break}for(a=l;uo){u=a+1;break}for(a=u;a