标签:
测试环境:TerraExplorer Pro 6.6;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <script type="text/javascript" language="javascript"> function LoadMPT() { try { var sg = CreateSGObj(); var ElevationLayer = sg.Creator.CreateElevationLayer("sample.MPT", 0.0, 0.0, 0.0, 0.0, "<EXT><ExtInfo><![CDATA[<Skyline version=\"1.0.0\"><ServerList name=\"sample.MPT\"><Server priority=\"1\">192.168.9.97:8088$</Server></ServerList></Skyline>]]></ExtInfo><ExtType>mpt</ExtType></EXT>", "mptplg.rct"); ElevationLayer.ElevationScale = 100; } catch (e) { alert(e); } } /* 功能: 创建sgworld对象 备注: 赵贺 2015.04.01. */ function CreateSGObj() { var obj = $("sgworld"); if (obj == null) { obj = document.createElement(‘object‘); document.body.appendChild(obj); obj.name = "sgworld"; obj.id = "sgworld"; obj.classid = "CLSID:3A4F9199-65a8-11d5-85c1-0001023952c1"; } return obj; } function $(id) { return window.document.getElementById(id); } </script> </head> <body> <input id="Button1" type="button" value="button" onclick="LoadMPT()" /> <object id="TE3DWindow" classid="CLSID:3a4f9192-65a8-11d5-85c1-0001023952c1" width="1000px" height="600px"> </object> <object id="TerraExplorerInformationWindow" classid="CLSID:3a4f9193-65a8-11d5-85c1-0001023952c1" width="200px" height="600px"> </object> </body> </html>
SkylineGlobe API 如何以图层的方式导入MPT地形
标签:
原文地址:http://www.cnblogs.com/yitianhe/p/4747606.html