diff --git a/debug.log b/debug.log index 01ed5e8..6b8da21 100644 --- a/debug.log +++ b/debug.log @@ -1,2 +1,3 @@ [1221/213419.680:ERROR:registration_protocol_win.cc(102)] CreateFile: ϵͳ�Ҳ���ָ�����ļ��� (0x2) [1221/213430.049:ERROR:registration_protocol_win.cc(102)] CreateFile: ϵͳ�Ҳ���ָ�����ļ��� (0x2) +[1223/151944.799:ERROR:registration_protocol_win.cc(102)] CreateFile: ϵͳ�Ҳ���ָ�����ļ��� (0x2) diff --git a/debug.log b/debug.log index 01ed5e8..6b8da21 100644 --- a/debug.log +++ b/debug.log @@ -1,2 +1,3 @@ [1221/213419.680:ERROR:registration_protocol_win.cc(102)] CreateFile: ϵͳ�Ҳ���ָ�����ļ��� (0x2) [1221/213430.049:ERROR:registration_protocol_win.cc(102)] CreateFile: ϵͳ�Ҳ���ָ�����ļ��� (0x2) +[1223/151944.799:ERROR:registration_protocol_win.cc(102)] CreateFile: ϵͳ�Ҳ���ָ�����ļ��� (0x2) diff --git a/dist.zip b/dist.zip index 6426f0a..007cf2a 100644 --- a/dist.zip +++ b/dist.zip Binary files differ diff --git a/debug.log b/debug.log index 01ed5e8..6b8da21 100644 --- a/debug.log +++ b/debug.log @@ -1,2 +1,3 @@ [1221/213419.680:ERROR:registration_protocol_win.cc(102)] CreateFile: ϵͳ�Ҳ���ָ�����ļ��� (0x2) [1221/213430.049:ERROR:registration_protocol_win.cc(102)] CreateFile: ϵͳ�Ҳ���ָ�����ļ��� (0x2) +[1223/151944.799:ERROR:registration_protocol_win.cc(102)] CreateFile: ϵͳ�Ҳ���ָ�����ļ��� (0x2) diff --git a/dist.zip b/dist.zip index 6426f0a..007cf2a 100644 --- a/dist.zip +++ b/dist.zip Binary files differ diff --git a/src/views/CesiumCom/swqj3Dmap.vue b/src/views/CesiumCom/swqj3Dmap.vue index be26ce8..2e26d9e 100644 --- a/src/views/CesiumCom/swqj3Dmap.vue +++ b/src/views/CesiumCom/swqj3Dmap.vue @@ -686,7 +686,7 @@ //高德影像 window.provider_imgLayer = new Cesium.TileMapServiceImageryProvider({ - // url: '/imgUrl/xinyangimg', + //url: '/imgUrl/xinyangimg', url: "http://webst02.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}", //url:"https://192.168.100.18:10001/webstUrl/appmaptile?style=6&x={x}&y={y}&z={z}", fileExtension: "png", @@ -740,7 +740,7 @@ this.peoplename = data.userName; var keyid = "系统管理员"; - //var keyid = data.userName; + // var keyid = data.userName; var lon = 114.0805319404991; var lat = 32.10399069614823; @@ -1928,9 +1928,8 @@ pixelOffset: new Cesium.Cartesian2(0, -40), //heightReference:Cesium.CLAMP_TO_GROUND //闪烁 - // show: new Cesium.CallbackProperty(function () { - // if(this.currentMark=="张小明") - // { + // show: new Cesium.CallbackProperty(()=> { + // if (flog) { // x = x - 0.05; // if (x <= 0) { @@ -1943,7 +1942,7 @@ // } // } // return x >= 0.5; - // } + // }, false), }, label: { @@ -2674,17 +2673,46 @@ //杨工新方法 //定制已走过的橙色线 + + + if(this.redLine) { - //改为空的坐标 + + + // this.isEndRoam = true + // this.finishedArray=[] + + // window.earth.entities.remove(this.redLine) + + + + // this.redLine = window.earth.entities.add({ + // type:"redline", + // polyline : { + // // This callback updates positions each frame. + // // positions : new Cesium.CallbackProperty(function(time, result) { + // // //endLongitude = startLongitude + 0.001 * Cesium.JulianDate.secondsDifference(time, startTime); + // // return Cesium.Cartesian3.fromDegreesArrayHeights([], Cesium.Ellipsoid.WGS84, result); + // // }, false), + // width : 10, + // material : Cesium.Color.RED + // } + + // }); + + //改为空的坐标 this.redLine.polyline.positions=new Cesium.CallbackProperty((time, result)=> { //endLongitude = startLongitude + 0.001 * Cesium.JulianDate.secondsDifference(time, startTime); return Cesium.Cartesian3.fromDegreesArrayHeights([114.08776071508423, 32.09554632853193, -4.0000002853217715, 114.08775831828851, 32.09554847106537, -4.000000519596626], Cesium.Ellipsoid.WGS84, result); }, false) + + } else { + this.redLine = window.earth.entities.add({ type:"redline", polyline : { @@ -2698,6 +2726,18 @@ } }); + + + + //改为空的坐标 + this.redLine.polyline.positions=new Cesium.CallbackProperty((time, result)=> { + //endLongitude = startLongitude + 0.001 * Cesium.JulianDate.secondsDifference(time, startTime); + return Cesium.Cartesian3.fromDegreesArrayHeights([114.08776071508423, 32.09554632853193, -4.0000002853217715, 114.08775831828851, 32.09554847106537, -4.000000519596626], Cesium.Ellipsoid.WGS84, result); + }, false) + + + + } @@ -2714,12 +2754,12 @@ // 计算朝向 //设置视野距离 - viewFrom: new Cesium.Cartesian3(-25.0, -25.0, 25.0), + viewFrom: new Cesium.Cartesian3(-45.0, -45.0, 45.0), orientation: new Cesium.VelocityOrientationProperty(position), model: { - //uri: "/gltfUrl/gongren.gltf", + //uri: "/gltfUrl/gongren.gltf", uri: "/gltfUrl/gltf/gongren.gltf", // minimumPixelSize:6400, // maximumSize:128, @@ -2756,15 +2796,7 @@ }); }, - //世界坐标系转经纬度 -Cartesian3_to_WGS84(point) { - var cartesian33 = new Cesium.Cartesian3(point.x, point.y, point.z); - var cartographic = Cesium.Cartographic.fromCartesian(cartesian33); - var lat = Cesium.Math.toDegrees(cartographic.latitude); - var lng = Cesium.Math.toDegrees(cartographic.longitude); - var alt = cartographic.height; - return {lng: lng, lat: lat, alt: alt}; -}, + //第一视角漫游方法 OneSeeFunc(position) { @@ -2773,7 +2805,7 @@ window.earth.clock.currentTime, window.earth.clock.stopTime ); - console.log(judgeTime); + // console.log(judgeTime); if (judgeTime < 0) { //设置第一视角 @@ -2795,14 +2827,24 @@ this.finishedArray.push(lonlatcell.alt) } - console.log("this.finishedArray",this.finishedArray) - console.log("this.redLine",this.redLine) + console.log("this.finishedArray",this.finishedArray) + // console.log("this.redLine",this.redLine) - this.redLine.polyline.positions=new Cesium.CallbackProperty((time, result)=> { + // this.redLine.polyline.positions=new Cesium.CallbackProperty((time, result)=> { + // // console.log("this.finishedArray",this.finishedArray) + // console.log("result",result) + // //endLongitude = startLongitude + 0.001 * Cesium.JulianDate.secondsDifference(time, startTime); + // return Cesium.Cartesian3.fromDegreesArrayHeights(this.finishedArray, Cesium.Ellipsoid.WGS84, result); + // }, false) + + this.redLine.polyline.positions=new Cesium.CallbackProperty((result)=> { + // console.log("this.finishedArray",this.finishedArray) + console.log("result",result) + //endLongitude = startLongitude + 0.001 * Cesium.JulianDate.secondsDifference(time, startTime); - return Cesium.Cartesian3.fromDegreesArrayHeights(this.finishedArray, Cesium.Ellipsoid.WGS84, result); - }, false) + return Cesium.Cartesian3.fromDegreesArrayHeights(this.finishedArray); + }, false) this.redLine.polyline.width = 10 this.redLine.polyline.material = Cesium.Color.RED @@ -2917,6 +2959,17 @@ } }, + + //世界坐标系转经纬度 +Cartesian3_to_WGS84(point) { + var cartesian33 = new Cesium.Cartesian3(point.x, point.y, point.z); + var cartographic = Cesium.Cartographic.fromCartesian(cartesian33); + var lat = Cesium.Math.toDegrees(cartographic.latitude); + var lng = Cesium.Math.toDegrees(cartographic.longitude); + var alt = cartographic.height; + return {lng: lng, lat: lat, alt: alt}; +}, + //三维笛卡尔坐标转屏幕坐标 transPosition(position) { return Cesium.SceneTransforms.wgs84ToWindowCoordinates( @@ -2963,8 +3016,24 @@ this.finishedArray=[] if(this.redLine) + { window.earth.entities.remove(this.redLine) + this.redLine = window.earth.entities.add({ + type:"redline", + polyline : { + // This callback updates positions each frame. + // positions : new Cesium.CallbackProperty(function(time, result) { + // //endLongitude = startLongitude + 0.001 * Cesium.JulianDate.secondsDifference(time, startTime); + // return Cesium.Cartesian3.fromDegreesArrayHeights([], Cesium.Ellipsoid.WGS84, result); + // }, false), + width : 10, + material : Cesium.Color.RED + } + + }); + } + this.isEndRoam = true; if (this.entity !== undefined) { @@ -3059,10 +3128,26 @@ endMY() { this.isEndRoam = true - this.finishedArray=[] - if(this.redLine) + { window.earth.entities.remove(this.redLine) + + this.redLine = window.earth.entities.add({ + type:"redline", + polyline : { + // This callback updates positions each frame. + // positions : new Cesium.CallbackProperty(function(time, result) { + // //endLongitude = startLongitude + 0.001 * Cesium.JulianDate.secondsDifference(time, startTime); + // return Cesium.Cartesian3.fromDegreesArrayHeights([], Cesium.Ellipsoid.WGS84, result); + // }, false), + width : 10, + material : Cesium.Color.RED + } + + }); + } + // window.earth.entities.remove(this.redLine) + // this.redLine.polyline.positions=null // this.redLine.polyline.positions=new Cesium.CallbackProperty((time, result)=> { // //endLongitude = startLongitude + 0.001 * Cesium.JulianDate.secondsDifference(time, startTime);