This commit is contained in:
liqi 2025-04-24 20:55:18 +08:00
parent cc057efa91
commit 5de70d6b3e
4 changed files with 21 additions and 17 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

View File

@ -173,7 +173,6 @@ export default {
} }
}); });
} else { } else {
console.log("无告警");
this.iswarning = false; this.iswarning = false;
if (media) { if (media) {
media.pause(); // media.pause(); //
@ -270,9 +269,7 @@ export default {
this.isContracted = !this.isContracted; // this.isContracted = !this.isContracted; //
}, },
handleDroneClick(value) { handleDroneClick(value) {
console.log(value, "value");
if (value.drone_lon == 0 || value.drone_lat == 0) { if (value.drone_lon == 0 || value.drone_lat == 0) {
console.log("经纬度为0");
} else { } else {
window.marsMap.setCameraView({ window.marsMap.setCameraView({
lat: value.drone_lat, lat: value.drone_lat,
@ -287,7 +284,6 @@ export default {
// //
if (value.BatchId === car.id) { if (value.BatchId === car.id) {
// car.openPopup(); // car.openPopup();
console.log(car, "car.polyline");
car.polyline.show = !car.polyline.show; // 线 car.polyline.show = !car.polyline.show; // 线
} }
}); });

View File

@ -161,13 +161,15 @@ export function allDevices(options, type, show) {
graphicLayer.addGraphic(graphic); graphicLayer.addGraphic(graphic);
} else { } else {
graphic.show = show; graphic.show = show;
graphic.setOptions({ if (deviceItem.icon === "9") {
position: new mars3d.LngLatPoint( graphic.setOptions({
deviceItem.lon, position: new mars3d.LngLatPoint(
deviceItem.lat, deviceItem.lon,
0 deviceItem.lat,
) 0
}); )
});
}
} }
}); });
} }
@ -201,9 +203,11 @@ export function allDevices(options, type, show) {
graphicLayer.addGraphic(graphic); graphicLayer.addGraphic(graphic);
} else { } else {
graphic.show = show; graphic.show = show;
graphic.setOptions({ if (deviceItem.icon === "9") {
position: new mars3d.LngLatPoint(deviceItem.lon, deviceItem.lat, 0) graphic.setOptions({
}); position: new mars3d.LngLatPoint(deviceItem.lon, deviceItem.lat, 0)
});
}
} }
}); });
} }

View File

@ -3,7 +3,7 @@
<div class="zoom-level">当前缩放等级: {{ zoomLevel }}</div> <div class="zoom-level">当前缩放等级: {{ zoomLevel }}</div>
<div id="mars3dContainer" ref="MarsMap" class="mars3d-container"></div> <div id="mars3dContainer" ref="MarsMap" class="mars3d-container"></div>
<div class="pointingNorth" @click="mapNorth"> <div class="pointingNorth" @click="mapNorth">
<img src="@/assets/img/menu/shebei.png" alt="" /> <img src="@/assets/img/menu/zhibeizhen.png" alt="" />
</div> </div>
</div> </div>
</template> </template>
@ -108,9 +108,9 @@ export default {
window.marsMap.setCameraView({ window.marsMap.setCameraView({
lat: currentView.lat, lat: currentView.lat,
lng: currentView.lng, lng: currentView.lng,
alt: currentView.alt, alt: currentView.alt <= 100 ? 8000 : currentView.alt,
heading: 0, // heading: 0, //
pitch: currentView.pitch, pitch: -90,
roll: currentView.roll roll: currentView.roll
}); });
} }
@ -138,6 +138,10 @@ export default {
bottom: 5%; bottom: 5%;
right: 25%; right: 25%;
cursor: pointer; cursor: pointer;
img {
width: 35px;
height: 35px;
}
} }
} }
</style> </style>