Skyline 7 1. 通过CreateInsatace创建SGWorld

<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title></title>
</head>

    <body onload="Init3D();">
        <div id="id3DEarthEFO" style="height:100%;width:100%;" ></div>

        <script >


var SGWorldEFO;

//1.关联控件
function Init3D() {
    var dmap = window.document.getElementById("id3DEarthEFO");
    var obj = C3DWindow();
    
    if (obj) {
        dmap.appendChild(obj);

        obj.BorderStyle = "0";

        setTimeout(function () { LoadFly(); }, 500);
    }
}
//2 . 创建3D对象
function C3DWindow() {
    try {
        var obj = window.document.getElementById("TerraExplorer3DWindowEFO");
        if (obj == null) {
            obj = document.createElement('object');
            obj.name = "TerraExplorer3DWindowEFO";
            obj.id = "TerraExplorer3DWindowEFO";
            obj.style.width = "100%";
            obj.style.height = "100%";
            obj.classid = "CLSID:3a4f9196-65a8-11d5-85c1-0001023952c1";
            obj.style.zIndex = -10000;
            
            obj.innerHTML = "<param value= 'transparent' name='wmode'>";

        }
        return obj;
    }
    catch (e) {
        alert(e.message);
    }
}
//3 . 加载Fly
function LoadFly() {
    SGWorldEFO = CSGEFOWorld();
    SGWorldEFO.AttachEvent("OnLoadFinished", OnProjectLoadFinished);
    SGWorldEFO.Open(flyurl);

}
function CSGEFOWorld() {
    try {
        return TerraExplorer3DWindowEFO.CreateInstance("TerraExplorerX.SGWorld70");
    }
    catch (e) { alert(e.message); }
}

function OnProjectLoadFinished() {
}

        </script>

    </body>

</html>

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值