b2科目四模拟试题多少题驾考考爆了怎么补救
b2科目四模拟试题多少题 驾考考爆了怎么补救

skyline6:二次开发web项目调用网络fly文件

电脑杂谈  发布时间:2019-11-21 02:01:14  来源:网络整理

如何打开fly文件_skyline fly文件_fly文件

(1)新建一个空的web项目,并在工程中新建一个HTML页面skyline fly文件,将页面分成左右结构,并将skyline的相关对象采用到页面中,如右图所示:

备注:

skyline fly文件_fly文件_如何打开fly文件

上图中的各OBJECT对象从“TerraExplorerPro”软件中的程序研发指南中复制。

步骤1:打开“TerraExplorerPro”软件,找到程序开发指南,如下图

skyline fly文件_fly文件_如何打开fly文件

步骤2:进入ActiveXcontrols,将以上的Object信息分别复制到html页面中。

备注:在拷贝API信息后,记得将多余的空格去掉,不然会页面将能够识别该API。

(2)浏览web工程页面,便可开启页面,也可以将该新建的web项目推进到iis中,随时访问

(3)在html页面上直接写<object></object>会出现一个问题,html加载skyline的之后有时候三维的建模不在html页面上显示反倒调用了本地的terraexplorerpro软件

这个理由是初始化先后的难题,为了缓解这个疑问我们可以在js后面动态读取sgword等等。代码片段如下

createSGWorld:function(){
var self = this;
var dom = this.TEBox;
//<!--定义一个TerraExplorer 3D窗口对象-->
var sgword = domConstruct.create("object", {
id:"TE3DWindow",
classid: "CLSID:3A4F9197-65A8-11D5-85C1-0001023952C1"
});
domStyle.set(sgword,"width:100%;height:100%;");
//<!--定义一个TerraExplorer 对象-->
var TE = domConstruct.create("object", {
id:"TerraExplorerX",
classid: "CLSID:3a4f9192-65a8-11d5-85c1-0001023952c1"
});
domStyle.set(TE,"width","100%");
domStyle.set(TE,"height","100%");
dom.appendChild(TE);
//定义TerraExplorer的信息窗口对象
self.TEinfowindow = domConstruct.create("object", {
id:"TerraExplorerInformationWindow",
classid: "CLSID:3a4f9193-65a8-11d5-85c1-0001023952c1"
});
domStyle.set(self.TEinfowindow,"position","absolute");
domStyle.set(self.TEinfowindow,"bottom","5px");
domStyle.set(self.TEinfowindow,"right","10px");
domStyle.set(self.TEinfowindow,"width","250px");
domStyle.set(self.TEinfowindow,"height","300px");
dom.appendChild(self.TEinfowindow);
//<!--定义TerraExplorer对象SGWorld65-->
var SGWorld = domConstruct.create("object", {
id:"SGWorld66",
name:"SGWorld66",
//classid:"CLSID:3A4F9197-65A8-11D5-85C1-0001023952C1"//6.5版本
classid:"CLSID:3A4F9199-65A8-11D5-85C1-0001023952C1"
});
dom.appendChild(SGWorld);
return SGWorld;
}

(4)判定是否安装了terraexplorer代码片段

initSGWorld: function(extent,isCompare) {
var self = this;
this.SGWorld = this.createSGWorld();
var InformationWindow = self.TEinfowindow;
try {
if(!self.DisActiveX("TerraExplorerX.TE3DWindow.1")){
console.log(this.SGWorld.version);
alert("请先下载并安装TEPro6.6.1-SC插件!!!");
    window.location=require.toUrl("./TEPro6.6.1-SC.zip");
}else{
this.SGWorld.Open(this.flyUrl);
}
    } catch (e) {
            return;
    }
this.SGWorld.SetOptionParam("AltitudeType",1);
this.SGWorld.AttachEvent("OnLoadFinished", function() {
treeDtoolBar.SGWorld=self.SGWorld;
treeDtoolBar.InformationWindow=InformationWindow;
}); 
}
/**
   * 检测是否已安装指定插件 
   * 
   * pluginName 插件名称 
   */
DisActiveX:function(pluginName)
   {       
var result;
    try {
            result = new ActiveXObject(pluginName);
            delete result;
        } catch (e) {
            return false;
        }
        return true;
   }

将不定期升级资源skyline fly文件,欢迎持续关注


本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/bofangqi/article-130793-1.html

    相关阅读
      发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

      • 李朋远
        李朋远

        伊拉克人民或许会投你的票

      • 于祥国
        于祥国

      • 李金凤
        李金凤

        最先进的濒海战斗舰不就驻扎在新加坡么~

      热点图片
      拼命载入中...