码迷,mamicode.com
首页 > Windows程序 > 详细

SkylineGlobe API 如何以图层的方式导入MPT地形

时间:2015-08-21 15:05:49      阅读:239      评论:0      收藏:0      [点我收藏+]

标签:

测试环境: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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!