Last active
January 31, 2024 09:50
-
-
Save Rainbowrain-TW/8b1a74a2bb6e8e78c0d958217a66809a to your computer and use it in GitHub Desktop.
範例 Vue 圖台設定預設相機位置
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
onMounted(() => { | |
if (window.ov) { | |
terrainview = new window.ov.TerrainView("map"); | |
window.terrainview = terrainview; | |
// 開啟地形檔 | |
terrainview.openTerrain({ | |
url: "https://t-klport-map.insynerger.com", | |
identifier: "terrain", | |
callback: openMapResEvent, | |
}); | |
function openMapResEvent(){ | |
if (isPort.value === "kl") { | |
gotoPosition(121.7412914260421, 25.131920625994965) | |
}else if(isPort.value === "tp"){ | |
gotoPosition(121.37874759408272,25.153533516606366) | |
}else if(isPort.value === "suao"){ | |
gotoPosition(121.86843134255943,24.59722165846716) | |
} | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment