<< Click to Display Table of Contents >>
<說明>
當您的空間資訊是在地表以下或是Z值有負值時,3D API 提供使用者啟用地下模式,您將可以輕鬆滑鼠滾輪向後滾動,流暢的下探地表下。
<範例>
function documentLoad() { document.body.style.overflow = "hidden"; SuperGIS.Initialize("/ServerGate/", function () { SuperGIS.ServerEarth.Initialize(InitEarth); }); }
function InitEarth() { var pBody = new SuperGIS.Windows.HTMLContainer(document.body);
var sHost = location.href; var idx = sHost.indexOf("/", 8); if (idx >= 0) sHost = sHost.substring(0, idx); CreateHTML5Earth(pBody, function (pEarth) { EarthLoaded(pEarth); });
function EarthLoaded(pEarth) { pEarth.Scene.BackgroundColor = pEarth.CreateColor(0, 0, 0, 1); pEarth.SetupSystem(false, s_WGS84); pEarth.SetupSkin(pEarth.CreateEnvelope(121, 121.5, 24.8, 25, s_WGS84), sHost + "/ServerGate/white.jpg"); pEarth.MajorGraticule.Visible = false; pEarth.MinorGraticule.Visible = false; pEarth.SetViewpoint(121.25, 24.82, 100, 0, 80, false);
var pGlobe = pEarth.GetGlobe(); pGlobe.ReferenceAltitude = -10; // 必須先設定最大地下深度, 再將 UndergroundMode 設為 true, 也可不設定, 預設值為 -50 pEarth.UndergroundMode = true; } }
|
© 2017 Supergeo Technologies Inc.