From 8464c92f4dac083c94aa53d10daebf6c475b7702 Mon Sep 17 00:00:00 2001 From: jihongshun <1151753686@qq.com> Date: 星期二, 23 九月 2025 22:20:37 +0800 Subject: [PATCH] bugfix --- src/views/system/flightRouteSimulation/index.vue | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/views/system/flightRouteSimulation/index.vue b/src/views/system/flightRouteSimulation/index.vue index 4f49562..b7eac18 100644 --- a/src/views/system/flightRouteSimulation/index.vue +++ b/src/views/system/flightRouteSimulation/index.vue @@ -258,7 +258,7 @@ const placemarks = result.kml.Document[0].Folder[0].Placemark || []; const points = []; - + var lastZoom =1 placemarks.forEach(placemark => { const coords = placemark.Point?.[0]?.coordinates?.[0]; const height = placemark["wpml:height"]?.[0]; @@ -269,7 +269,6 @@ let totalRoll = 0; let totalHeading = 0; let flyHeadingData = 0; - let currentzoom = 1 if (placemark["wpml:actionGroup"]?.[0]?.["wpml:action"]) { placemark["wpml:actionGroup"][0]["wpml:action"].forEach(action => { // 澶勭悊 gimbalRotate 鍜� rotateYaw 鍑芥暟 @@ -292,17 +291,18 @@ // 灏� aircraftHeading 绱姞鍒� totalHeading totalHeading += aircraftHeading; } + // 澶勭悊 rotateYaw 鍑芥暟 if (action['wpml:actionActuatorFunc'].includes("zoom")) { - const aircraftHeading = parseFloat(action['wpml:actionActuatorFuncParam'][0]["wpml:focalLength"][0]); - currentzoom = aircraftHeading - } + const aircraftZoom = parseFloat(action['wpml:actionActuatorFuncParam'][0]["wpml:focalLength"][0]); + lastZoom = aircraftZoom + } }); } if (coords) { coords.trim().split(" ").forEach(coord => { const [lng, lat] = coord.split(",").map(Number); - points.push({ lng, lat, alt: height,heading:totalHeading || 0,pitch:totalPitch || 0,roll:totalRoll|| 0 ,flyHeading:flyHeadingData,zoom : currentzoom || 1}); + points.push({ lng, lat, alt: height,heading:totalHeading || 0,pitch:totalPitch || 0,roll:totalRoll|| 0 ,flyHeading:flyHeadingData,zoom :lastZoom}); }); } }); -- Gitblit v1.9.3