<< Click to Display Table of Contents >>
<說明>
當您資料有特定空間範圍而非全球尺度的資料,您可以選擇Cube模式來呈現三維空間,
按此範例即可完成Cube圖台初始化。
<範例>
function documentLoad() { 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.lastIndexOf("/"); 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); // false: 使用 Cube 模式; true: 使用 Planet 模式 pEarth.SetupSkin(pEarth.CreateEnvelope(121, 121.5, 24.8, 25, s_WGS84), sHost + "/white.jpg"); // 設定背景貼皮影像 pEarth.MajorGraticule.Visible = false; pEarth.MinorGraticule.Visible = false;
pEarth.SetViewpoint(121.25, 24.5, 12000, 0, 65, true); } }
|
© 2017 Supergeo Technologies Inc.