|
|
@@ -1,5 +1,6 @@
|
|
|
<template>
|
|
|
<div class="mapBox">
|
|
|
+ <headerView />
|
|
|
<div id="cesiumContainer" style="width: 100%; height: 100vh"></div>
|
|
|
<div class="menuComC" v-if="0">
|
|
|
<!-- @handleWindspeed="switchWindLayer"
|
|
|
@@ -65,7 +66,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-drawer> -->
|
|
|
- <cesiumweatherView
|
|
|
+ <!-- <cesiumweatherView
|
|
|
:viewer="viewer"
|
|
|
:sidebarRightData="sidebarRightData"
|
|
|
:stationValue="stationValue"
|
|
|
@@ -77,8 +78,9 @@
|
|
|
v-if="showWindDetail"
|
|
|
@showDetail="menuComTSty"
|
|
|
@backStations="backStations"
|
|
|
- />
|
|
|
- <timeControl class="timeControl" :mode="controlMode" :viewer="viewer" />
|
|
|
+ /> -->
|
|
|
+ <weatherView />
|
|
|
+ <!-- <timeControl class="timeControl" :mode="controlMode" :viewer="viewer" /> -->
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -89,10 +91,12 @@ import * as Cesium from "cesium";
|
|
|
import "cesium/Build/Cesium/Widgets/widgets.css";
|
|
|
import { createWind } from "../assets/wind/Windy.js";
|
|
|
|
|
|
+// import headerView from "@/components/cesiumHeader/index.vue";
|
|
|
// import { parseGIF } from 'gifuct-js';
|
|
|
// import { decompressFrames } from 'gifuct-js';
|
|
|
|
|
|
import cesiumweatherView from "./weatherComponents/cesiumweatherView.vue";
|
|
|
+// import weatherView from "./weatherComponents/weatherView.vue";
|
|
|
import jsonData from "./weatherComponents/weatherBase.json";
|
|
|
import allStationJson from "./cesiumComponents/allStationJson.json";
|
|
|
// import fjLonLatJson from "./cesiumComponents/fjLonLat.json";
|
|
|
@@ -151,6 +155,8 @@ export default {
|
|
|
windPro,
|
|
|
cesiumwindView,
|
|
|
timeControl,
|
|
|
+ // headerView,
|
|
|
+ // weatherView,
|
|
|
},
|
|
|
|
|
|
data() {
|
|
|
@@ -238,7 +244,7 @@ export default {
|
|
|
|
|
|
created() {
|
|
|
this.getWeatherData();
|
|
|
- // console.log(1111, this.findLocation(109.6429758178942, 34.10868446715471));
|
|
|
+ console.log(1111, this.findLocation(109.6429758178942, 34.10868446715471));
|
|
|
},
|
|
|
|
|
|
mounted() {
|
|
|
@@ -460,9 +466,7 @@ export default {
|
|
|
|
|
|
// 隐藏 Cesium Logo
|
|
|
viewer.cesiumWidget.creditContainer.style.display = "none";
|
|
|
- viewer.scene.globe.baseColor = new Cesium.Color.fromCssColorString(
|
|
|
- "#1890ff"
|
|
|
- );
|
|
|
+ viewer.scene.globe.baseColor = Cesium.Color.BLACK;
|
|
|
// 禁用 Viewer 默认的双击缩放
|
|
|
viewer.cesiumWidget.screenSpaceEventHandler.removeInputAction(
|
|
|
Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK
|
|
|
@@ -474,7 +478,7 @@ export default {
|
|
|
|
|
|
// this.setMapImageryProvider();
|
|
|
// this.initCesiumTerrain();
|
|
|
- // this.initCesiumBaseMapImage();
|
|
|
+ this.initCesiumBaseMapImage();
|
|
|
// this.switchWindLayer();
|
|
|
this.showAllStation(viewer, allStationJson.station);
|
|
|
this.initGeoJsonData();
|
|
|
@@ -1051,7 +1055,7 @@ export default {
|
|
|
// this.resetViewport1();
|
|
|
},
|
|
|
// 城市视角重置视角
|
|
|
- resetViewport(height = 0, callback) {
|
|
|
+ resetViewport(height = 6000000, callback) {
|
|
|
// 设置初始视图为宁夏
|
|
|
const that = this;
|
|
|
const isFirstVisit = !sessionStorage.getItem("hasVisitedMap");
|
|
|
@@ -1059,8 +1063,10 @@ export default {
|
|
|
this.viewer.camera.flyTo({
|
|
|
destination: Cesium.Cartesian3.fromDegrees(
|
|
|
//北京
|
|
|
- 116.391586,
|
|
|
- 39.898832,
|
|
|
+ // 116.391586,
|
|
|
+ // 39.898832,
|
|
|
+ 108.923611,
|
|
|
+ 34.540833,
|
|
|
height || 500
|
|
|
),
|
|
|
duration: 3,
|
|
|
@@ -1077,8 +1083,8 @@ export default {
|
|
|
} else {
|
|
|
this.viewer.camera.setView({
|
|
|
destination: Cesium.Cartesian3.fromDegrees(
|
|
|
- 116.391586,
|
|
|
- 39.898832,
|
|
|
+ 108.923611,
|
|
|
+ 34.540833,
|
|
|
height || 500
|
|
|
),
|
|
|
duration: 3,
|
|
|
@@ -1690,7 +1696,7 @@ export default {
|
|
|
this.showStationFn(viewer, e, index, gf);
|
|
|
}
|
|
|
});
|
|
|
- this.resetViewport(6000000);
|
|
|
+ this.resetViewport(11000000);
|
|
|
},
|
|
|
// 根据状态展示不同颜色风机贴图
|
|
|
async showStationFn(viewer, e, index, images) {
|