feat: add map rotation controls (90° left/right/reset) in map visualization

This commit is contained in:
ywb
2026-05-17 09:10:32 +08:00
parent 80a4beabcf
commit 4b964b7067
2 changed files with 24 additions and 9 deletions
+4
View File
@@ -16,6 +16,7 @@ createApp({
mapLoaded: false,
mapImageUrl: '',
mapMeta: null,
mapRotation: 0,
// 点位
points: [],
newPointName: '',
@@ -110,6 +111,9 @@ createApp({
onMapError() {
this.mapMsg = '❌ 地图图像加载失败'
},
rotateMap(deg) {
this.mapRotation = (this.mapRotation + deg) % 360
},
getMapX(coords) {
if (!coords || !this.mapMeta) return 50
const [x, y, yaw] = coords