日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

Skyline软件二次开发初级——2如何在WEB页面中控制三维地图的观察点坐标和角度...

發布時間:2023/12/14 编程问答 36 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Skyline软件二次开发初级——2如何在WEB页面中控制三维地图的观察点坐标和角度... 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

1.放大:

<html>

<head>

<title>Zoom?In</title>
????????<object?id="SGWorld"?classid="CLSID:3a4f91b1-65a8-11d5-85c1-0001023952c1"?style="visibility:hidden;height:0?"></object>
????????<script?type="text/javascript">
????????
????????function?Init()
????????{
????????????SGWorld.Navigate.ZoomIn();
????????}
????????
????????</script>
????</head>
????<body?onload="Init();">
????</body>
</html>

?

2.縮小:?

<html>

? ? ? ? <head>

<title>Zoom?Out</title>
????????<object?id="SGWorld"?classid="CLSID:3a4f91b1-65a8-11d5-85c1-0001023952c1"?style="visibility:hidden;height:0?"></object>
????????<script?type="text/javascript">
????????
????????function?Init()
????????{
????????????SGWorld.Navigate.ZoomOut();
????????}
????????
????????</script>
????</head>
????<body?onload="Init();">
????</body>
</html>

3.放大到街道級別:

<html>?
<head>
????????<title>Zoom?To?Street?Level</title>
????????<object?id="SGWorld"?classid="CLSID:3a4f91b1-65a8-11d5-85c1-0001023952c1"?style="visibility:hidden;height:0?"></object>
????????<script?type="text/javascript">

????????function?Init()
????????{
????????????var?position?=?SGWorld.Navigate.GetPosition();
????????????position.Altitude?=?1000;???????//?Street?level?in?TerraExplorer?corresponds?to?altitude?of?1000m
????????????position.AltitudeType?=?0;??????//?0?is?relative?to?terrain;
????????????SGWorld.Navigate.FlyTo(position,?0);?//?0?is?fly?to
????????}
????????
????????</script>
????</head>
????<body?onload="Init();">
????</body>
</html>

4.獲取攝像機的位置:

<html>?
<head>
????????<title>Get?the?current?position</title>
????????<object?id="SGWorld"?classid="CLSID:3a4f91b1-65a8-11d5-85c1-0001023952c1"?style="visibility:hidden;height:0?"></object>
????????<script?type="text/javascript">

????????function?Init()
????????{
????????????var?pos?=?SGWorld.Navigate.GetPosition();

????????????alert("Current?Position:\n\nX:?"?+?pos.X?+?"\nY:?"?+?pos.Y?+?"\nHeight:?"?+?pos.Altitude?+?"\nYaw:?"?+?pos.Yaw?+?"\nPitch:?"?+?pos.Pitch);
???????}
????????
????????</script>
????</head>
????<body?onload="Init();">
????</body>
</html>

5.設置攝像機的位置:

<html>?
<head>
????????<title>Set?the?current?position</title>
????????<object?id="SGWorld"?classid="CLSID:3a4f91b1-65a8-11d5-85c1-0001023952c1"?style="visibility:hidden;height:0?"></object>
????????<script?type="text/javascript">

????????function?Init()
????????{
????????????var?pos?=?SGWorld.Creator.CreatePosition(-71.05216,?//?X
???????????????????????????????????????????????????????42.34569,?//?Y
???????????????????????????????????????????????????????1000,?????//?Altitude
???????????????????????????????????????????????????????0,?//AltitudeTypeCode.ATC_TERRAIN_RELATIVE,?//?Altitude?type
???????????????????????????????????????????????????????0.0,??????//?Yaw
??????????????????????????????????????????????????????-43.0);?????//?Pitch
????????????
????????????SGWorld.Navigate.SetPosition(pos);
????????}
?????????????????????
????????</script>
????</head>
????<body?onload="Init();">
????</body>
</html>

6.跳到興趣點:

<html>
????<head>
????????<title>Set?the?current?position</title>
????????<object?id="SGWorld"?classid="CLSID:3a4f91b1-65a8-11d5-85c1-0001023952c1"?style="visibility:hidden;height:0?"></object>
????????<script?type="text/javascript">
????????var?popup;

????????function?Init()
????????{
????????????
????????????var?POI?=?SGWorld.Creator.CreatePosition(-71.07596,?//?Point?of?interest?X???
??????????????????????????????????????????????????????42.34998,?//?Point?of?interest?Y
??????????????????????????????????????????????????????30,???????//?Point?of?interest?altitude?(30m)
??????????????????????????????????????????????????????0,????????//?Altitude?type?-?relative?to?terrain
??????????????????????????????????????????????????????90.0,?????//?Direction?from?which?we?want?to?view?the?point?of?interest?(90.0?means?from?we?are?looking?east)
?????????????????????????????????????????????????????-10.0,?????//?Pitch?from?which?we?want?to?view?the?point?of?interest?(looking?10?degree?down)
??????????????????????????????????????????????????????0,????????//?Roll
??????????????????????????????????????????????????????250);?????//?The?distance?we?want?to?be?from?the?point?of?interest?(250m)

????????????SGWorld.Navigate.JumpTo(POI);
????????????????????????
????????????showPopup();
????????}


????????function?showPopup()
????????{
????????????popup?=?SGWorld.Creator.CreatePopupMessage("Point?Of?Interest?sample");
????????????popup.InnerHtml?=?"<b>Trinity?Church?Boston</b><br>Distance?from?camera:?250?meters<br>Looking?from?west?to?east";
????????????SGWorld.Window.ShowPopup(popup);
????????}
????????
????????function?onExit()
????????{
????????????if(popup)
????????????????SGWorld.Window.RemovePopup(popup);
????????}
????????
????????</script>
????</head>
????<body?onload="Init();"?onunload="onExit();">
????</body>
</html>

轉載于:https://www.cnblogs.com/yitianhe/archive/2012/09/21/2696518.html

總結

以上是生活随笔為你收集整理的Skyline软件二次开发初级——2如何在WEB页面中控制三维地图的观察点坐标和角度...的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。