zoukankan      html  css  js  c++  java
  • SkylineGlobe API 如何以图层的方式导入MPT地形

    测试环境: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>
  • 相关阅读:
    【09】绝不在构造和析构过程中调用virtual方法
    【08】别让异常逃离析构函数
    C++ 外部调用private方法
    【07】为多态基类声明virtual析构方法
    C++ 构造过程和析构过程
    理解C# Lazy<T>
    DG
    MongoDB
    sh.status()
    DG
  • 原文地址:https://www.cnblogs.com/yitianhe/p/4747606.html
Copyright © 2011-2022 走看看