| | |
| | | const newLayer = usetowpointfive(); |
| | | // 2.5D贴图↑ |
| | | let startPoint; |
| | | if (false) { |
| | | if (true) { |
| | | startPoint = () => { |
| | | viewer.flyTo(tileset); |
| | | // that.$store.dispatch("mapFlyTo", { |
| | | // //飞入 |
| | | // lntLat: [115.87988885, 28.72502592, 2100], |
| | | // // lntLat: [115.87186406, 28.74449337, 1200], |
| | | // // lntLat: [121.50492752204283, 31.21567802276832, 2530], |
| | | // heading: 0, |
| | | // pitch: -45, |
| | | // roll: 0, |
| | | // noOpen: true, |
| | | // }); |
| | | let doit2 = (int) => { |
| | | viewer.camera.setView({ |
| | | // Cesium的坐标是以地心为原点,一向指向南美洲,一向指向亚洲,一向指向北极州 |
| | | // fromDegrees()方法,将经纬度和高程转换为世界坐标 |
| | | destination: that.DC.Namespace.Cesium.Cartesian3.fromDegrees( |
| | | // 114.0351, |
| | | // 27.6314, |
| | | // 200.0 |
| | | int[0], |
| | | int[1], |
| | | int[2] |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | | heading: that.DC.Namespace.Cesium.Math.toRadians(108), |
| | | // 视角 |
| | | pitch: that.DC.Namespace.Cesium.Math.toRadians(-26.46), |
| | | roll: 0.0, |
| | | }, |
| | | }); |
| | | }; |
| | | that.dimension == "2.5D" |
| | | ? doit2([114.03928791, 27.62954732, 360.0]) |
| | | : // : doit([116.39038494750986, 39.902393222208644, 330.0]); |
| | | // doit("建模"); |
| | | doit2([114.0351, 27.6314, 300.0]); |
| | | }; |
| | | setTimeout((res) => { |
| | | //转圈 |
| | | that.$store.dispatch("mapFlyTo", { |
| | | lntLat: [111.25036579, 34.83767277, 11443175.85], |
| | | heading: 0, |
| | | pitch: -90, |
| | | roll: 0, |
| | | noOpen: true, |
| | | fn: function () { |
| | | // viewer.flyTo(tileset); |
| | | // viewer.flyTo(provider); |
| | | //飞入起始点 |
| | | // that.$store.dispatch("mapFlyTo", { |
| | | // lntLat: [115.87186406, 28.74449337, 1200], |
| | | // heading: 0, |
| | | // pitch: -45, |
| | | // roll: 0, |
| | | // noOpen: true, |
| | | // }); |
| | | |
| | | startPoint(); |
| | | }, |
| | | }); |
| | | // viewer.flyTo(tileset); |
| | | }, 2500); |
| | | } else { |
| | | startPoint = (val) => { |
| | | // viewer.zoomToPosition( |
| | |
| | | }, |
| | | }); |
| | | } else { |
| | | console.log(123456); |
| | | // console.log(123456); |
| | | that.$store.dispatch("mapFlyTo", { |
| | | lntLat: [+int[0] + 0.012, int[1], int[2]], |
| | | // 指向 |
| | |
| | | if (that.dimension == "2.5D") { |
| | | that.$store.commit("MSET_DIMENSION", "2.5D"); //切换2.5D设置 |
| | | } else if (that.dimension == "3D") { |
| | | setTimeout((res) => { |
| | | that.$store.dispatch("mapFlyTo", { |
| | | lntLat: [111.25036579, 34.83767277, 11443175.85], |
| | | heading: 0, |
| | | pitch: -90, |
| | | roll: 0, |
| | | noOpen: true, |
| | | fn: function () { |
| | | // viewer.flyTo(tileset); |
| | | // viewer.flyTo(provider); |
| | | //飞入起始点 |
| | | // that.$store.dispatch("mapFlyTo", { |
| | | // lntLat: [115.87186406, 28.74449337, 1200], |
| | | // heading: 0, |
| | | // pitch: -45, |
| | | // roll: 0, |
| | | // noOpen: true, |
| | | // }); |
| | | // setTimeout((res) => { |
| | | // that.$store.dispatch("mapFlyTo", { |
| | | // lntLat: [111.25036579, 34.83767277, 11443175.85], |
| | | // heading: 0, |
| | | // pitch: -90, |
| | | // roll: 0, |
| | | // noOpen: true, |
| | | // fn: function () { |
| | | // viewer.flyTo(tileset); |
| | | // viewer.flyTo(provider); |
| | | //飞入起始点 |
| | | // that.$store.dispatch("mapFlyTo", { |
| | | // lntLat: [115.87186406, 28.74449337, 1200], |
| | | // heading: 0, |
| | | // pitch: -45, |
| | | // roll: 0, |
| | | // noOpen: true, |
| | | // }); |
| | | |
| | | // startPoint(); |
| | | that.$store.commit("MSET_DIMENSION", "3D"); //切换3D设置 |
| | | }, |
| | | }); |
| | | }, 2000); |
| | | // startPoint(); |
| | | that.$store.commit("MSET_DIMENSION", "3D"); //切换3D设置 |
| | | // }, |
| | | // }); |
| | | // }, 2000); |
| | | } |
| | | if (false) { |
| | | //镜头改变示例 |
| | |
| | | position: fixed; |
| | | bottom: 6px; |
| | | left: 7px; |
| | | background-color: #000; |
| | | background-color: rgb(33, 150, 243); |
| | | color: #fff; |
| | | z-index: 1; |
| | | font-size: 13px; |
| | | border-radius: 5px; |
| | | padding: 3px 8px 4px; |
| | | padding: 4px 10px 5px; |
| | | } |