|
@@ -66,6 +66,9 @@ import { getToken } from "@/utils";
|
|
|
import axios from "axios";
|
|
|
import Model from "@/views/situation/Model.vue";
|
|
|
import satelliteModel from '@/assets/model/satelite.glb';
|
|
|
+import missileModel from '@/assets/model/basic_missle.glb';
|
|
|
+import thaadModel from '@/assets/model/anti-aircraft_gun_fire_control_radar_vehicle.glb';
|
|
|
+import centerModel from '@/assets/model/himars_animated.glb';
|
|
|
import { mapGetters } from "vuex";
|
|
|
export default {
|
|
|
components: {
|
|
@@ -371,14 +374,14 @@ export default {
|
|
|
});
|
|
|
|
|
|
for(let i =0;i<blueunit.length;i++){
|
|
|
- this.markLocationbyJson(parseFloat(blueunit[i].pos.lat),parseFloat(blueunit[i].pos.lon),blueunit[i].name,"blue")
|
|
|
+ this.markLocationbyJson(parseFloat(blueunit[i].pos.lat),parseFloat(blueunit[i].pos.lon),parseFloat(blueunit[i].pos.height),blueunit[i].name,"blue")
|
|
|
}
|
|
|
for(let i = 0;i<center.length;i++){
|
|
|
let item = center[i]
|
|
|
- this.markLocationbyJson(parseFloat(item[center[i].name].properties.lat),parseFloat(item[center[i].name].properties.lon),item.name,"center")
|
|
|
+ this.markLocationbyJson(parseFloat(item[center[i].name].properties.lat),parseFloat(item[center[i].name].properties.lon),parseFloat(item[center[i].name].properties.h),item.name,"center")
|
|
|
}
|
|
|
for(let i = 0;i<redunit.length;i++){
|
|
|
- this.markLocationbyJson(parseFloat(redunit[i].component_movementjson.properties.launch_lat),parseFloat(redunit[i].component_movementjson.properties.launch_lon),redunit[i].name,"red")
|
|
|
+ this.markLocationbyJson(parseFloat(redunit[i].component_movementjson.properties.launch_lat),parseFloat(redunit[i].component_movementjson.properties.launch_lon),parseFloat(redunit[i].component_movementjson.properties.launch_h),redunit[i].name,"red")
|
|
|
let point1 = {
|
|
|
longitude : parseFloat(redunit[i].component_movementjson.properties.launch_lon),
|
|
|
latitude : parseFloat(redunit[i].component_movementjson.properties.launch_lat),
|
|
@@ -718,6 +721,7 @@ export default {
|
|
|
// 同时在2D和3D地图上标记坐标
|
|
|
markLocation(latitude, longitude) {
|
|
|
const position = this.Cesium.Cartesian3.fromDegrees(longitude, latitude);
|
|
|
+ console.log('position :>> ', position);
|
|
|
this.viewer2D.entities.add({
|
|
|
id: this.id,
|
|
|
position: position,
|
|
@@ -758,14 +762,22 @@ export default {
|
|
|
});
|
|
|
this.id++;
|
|
|
},
|
|
|
- markLocationbyJson(latitude, longitude,name,type) {
|
|
|
- const position = this.Cesium.Cartesian3.fromDegrees(longitude, latitude);
|
|
|
+ markLocationbyJson(latitude, longitude,height,name,type) {
|
|
|
+ const position = this.Cesium.Cartesian3.fromDegrees(longitude, latitude,height);
|
|
|
+ console.log('position :>> ', position);
|
|
|
let color = ''
|
|
|
+ let modelUrl = ''
|
|
|
if(type=='red'){
|
|
|
color = 'Red'
|
|
|
+ modelUrl= missileModel
|
|
|
}
|
|
|
- else{
|
|
|
+ else if(type=='blue'){
|
|
|
+ color = 'Blue'
|
|
|
+ modelUrl = thaadModel
|
|
|
+ }
|
|
|
+ else if(type=='center'){
|
|
|
color = 'Blue'
|
|
|
+ modelUrl = centerModel
|
|
|
}
|
|
|
this.viewer2D.entities.add({
|
|
|
id: this.id,
|
|
@@ -775,7 +787,7 @@ export default {
|
|
|
// color: this.Cesium.Color.fromCssColorString(color)
|
|
|
// },
|
|
|
model: {
|
|
|
- uri: satelliteModel, // 替换为你的3D模型文件路径
|
|
|
+ uri: modelUrl, // 替换为你的3D模型文件路径
|
|
|
scale: 1.0, // 调整3D模型的缩放大小
|
|
|
minimumPixelSize: 64 // 设置3D模型的最小像素大小,确保在视图中可见
|
|
|
},
|
|
@@ -794,7 +806,7 @@ export default {
|
|
|
color: this.Cesium.Color.fromCssColorString(color)
|
|
|
},
|
|
|
model: {
|
|
|
- uri: satelliteModel, // 替换为你的3D模型文件路径
|
|
|
+ uri: modelUrl, // 替换为你的3D模型文件路径
|
|
|
scale: 1.0, // 调整3D模型的缩放大小
|
|
|
minimumPixelSize: 64 // 设置3D模型的最小像素大小,确保在视图中可见
|
|
|
},
|