Skip to content

Instantly share code, notes, and snippets.

@Rainbowrain-TW
Last active January 31, 2024 09:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Rainbowrain-TW/8b1a74a2bb6e8e78c0d958217a66809a to your computer and use it in GitHub Desktop.
Save Rainbowrain-TW/8b1a74a2bb6e8e78c0d958217a66809a to your computer and use it in GitHub Desktop.
範例 Vue 圖台設定預設相機位置
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