SkylineGlobe TerraExplorer Pro 7.0 是原生的64位应用程序,在Web端用插件方式开发的第一行示例代码如下:

常规代码,需要IE64位:

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<meta http-equiv="X-UA-Compatible" content="IE=9" />
<script type="text/javascript" >
function Init3D() {
try {
var projecttree = window.document.getElementById("projecttree");
var obj2 = CProjectTree();
projecttree.appendChild(obj2); var dmap = window.document.getElementById("3dmap");
var obj = C3DWindow();
dmap.appendChild(obj); setTimeout(function () { LoadFly(); }, 1000); //setTimeout(function () { SetProjectTree(); }, 500);
}
catch (e) {
alert(e);
}
} function LoadFly() {
alert(0);
var sg = CSGWorld();
var flyurl = "C:\\Users\\Administrator\\Desktop\\a.FLY";
sg.Open(flyurl);
alert(1);
} function SetProjectTree() {
TerraExplorerInformationWindow.AttachTo3dWindow(TerraExplorer3DWindow); // attach project tree to 3D
} // SGWorld70
function CSGWorld() {
try {
var obj = window.document.getElementById("SGWorld");
if (obj == null) {
//obj = TerraExplorer3DWindow.CreateInstance("{3a4f919a-65a8-11d5-85c1-0001023952c1}"); obj = document.createElement('object');
document.body.appendChild(obj);
obj.name = "SGWorld";
obj.id = "SGWorld";
obj.classid = "CLSID:3A4F919A-65A8-11D5-85C1-0001023952C1";
}
return obj;
}
catch (e) {
alert(e);
}
} function C3DWindow() {
try {
var obj = window.document.getElementById("TerraExplorer3DWindow");
if (obj == null) {
obj = document.createElement('object');
obj.name = "TerraExplorer3DWindow";
obj.id = "TerraExplorer3DWindow";
obj.style.width = "100%";
obj.style.height = "100%";
obj.classid = "CLSID:3a4f9192-65a8-11d5-85c1-0001023952c1";
}
return obj;
}
catch (e) {
alert(e);
}
} function CProjectTree() {
try {
var obj = window.document.getElementById("TerraExplorerInformationWindow");
if (obj == null) {
obj = document.createElement('object');
obj.name = "TerraExplorerInformationWindow";
obj.id = "TerraExplorerInformationWindow";
obj.style.width = "100%";
obj.style.height = "100%";
obj.classid = "clsid:3a4f9193-65a8-11d5-85c1-0001023952c1";
}
return obj;
}
catch (e) {
alert(e);
}
}
</script>
</head>
<body style="overflow: hidden;margin:0px;padding:0px;" onload="Init3D();">
<input id="Button1" type="button" value="button" onclick="LoadFly()" />
<div id="3dmap" style="z-index:0;background-image:url('images/bg.jpg');width:75%;height:100%;margin-top:38px;position:fixed;"></div>
<div id="projecttree"style="z-index:0;width:25%;height:100%;margin-top:0px;position:fixed;left:75%;background-color:yellowgreen;z-index:1000;"></div>
</body>
</html>

扩展控件 IE32位和IE64位都可以支持:

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<script type="text/javascript" >
function Init3D() {
try {
alert("OS:" + window.navigator.platform);
var projecttree = window.document.getElementById("projecttree");
var obj2 = CProjectTree();
projecttree.appendChild(obj2); var dmap = window.document.getElementById("3dmap");
var obj = C3DWindow();
dmap.appendChild(obj); setTimeout(function () { LoadFly(); }, 500); setTimeout(function () { SetProjectTree(); }, 500);
}
catch (e) {
alert(e);
}
} function LoadFly() {
var sg = CSGWorld();
var flyurl = "http://192.168.9.73/SG/projects/tg7.401998";
sg.Open(flyurl);
} function SetProjectTree() {
TerraExplorerInformationWindow.AttachTo3dWindow(TerraExplorer3DWindow); // attach project tree to 3D
} // SGWorld70
function CSGWorld() {
try {
var obj = window.document.getElementById("SGWorld");
if (obj == null) {
obj = TerraExplorer3DWindow.CreateInstance("{3a4f919a-65a8-11d5-85c1-0001023952c1}");
}
return obj;
}
catch (e) {
alert(e);
}
} function C3DWindow() {
try {
var obj = window.document.getElementById("TerraExplorer3DWindow");
if (obj == null) {
obj = document.createElement('object');
obj.name = "TerraExplorer3DWindow";
obj.id = "TerraExplorer3DWindow";
obj.style.width = "100%";
obj.style.height = "100%";
obj.classid = "CLSID:3a4f9196-65a8-11d5-85c1-0001023952c1";
obj.style.zIndex = -10000;
}
return obj;
}
catch (e) {
alert(e);
}
} function CProjectTree() {
try {
var obj = window.document.getElementById("TerraExplorerInformationWindow");
if (obj == null) {
obj = document.createElement('object');
obj.name = "TerraExplorerInformationWindow";
obj.id = "TerraExplorerInformationWindow";
obj.style.width = "100%";
obj.style.height = "100%";
obj.classid = "clsid:3a4f919b-65a8-11d5-85c1-0001023952c1";
}
return obj;
}
catch (e) {
alert(e);
}
}
</script>
</head>
<body style="overflow: hidden;margin:0px;padding:0px;" onload="Init3D();">
<div id="3dmap" style="z-index:0;background-image:url('images/bg.jpg');width:75%;height:100%;margin-top:38px;position:fixed;"></div>
<div id="projecttree"style="z-index:0;width:25%;height:100%;margin-top:0px;position:fixed;left:75%;background-color:yellowgreen;z-index:1000;"></div>
</body>
</html>

SkylineGlobe TerraExplorer Pro 7.0 Web 控件版 第一行示例代码的更多相关文章

  1. Skyline TerraExplorer Pro(等ActiveX控件)在Google Chrome浏览器的运行方法

    首先感谢ActiveX for Chrome 网银助手(np-activex)这个项目(https://code.google.com/p/np-activex/),解决了我们困惑很久的问题——在Ch ...

  2. 首次加载进来DEV控件列表第一行颜色总是不对,后台代码显示的数据正确

    1:行改变的颜色正确的颜色: 1.1颜色效果如下图: 1.2:设置行改变颜色: 2:结果首次加载第一行颜色为: 3:解决方案: 3.1 :Views-->OptionsSelection --& ...

  3. 033. asp.netWeb用户控件之二将页面转换成web控件和使用Web控件显示热点新闻

    访问Web用户控件的属性 ASP.NET提供的各种服务器控件都有其自身的属性和方法,程序开发人员可以灵活地使用服务器控件中的属性和方法开发程序.在用户控件中,程序开发人员也可以自行定义各种属性和方法, ...

  4. [MFC] MFC 打开HTML资源(用ID版,也可加载到自己的web控件上)

    @ ^ @:如果是加载到web控件上,就把注释掉的解除注释(改为web控件点后面的函数),把下一句注释 BOOL Button::LoadFromResource(UINT nRes){//打开网页加 ...

  5. 基本的Web控件四

    基本的Web控件用法二 ListBox控件 页面布局: <div> <h1>ListBox控件</h1> 学生列表: <br/> <asp:Lis ...

  6. 一个完善的ActiveX Web控件教程

    免费打工仔:一个完善的ActiveX Web控件教程 出自Ogre3D开放资源地带   跳转到: 导航, 搜索 原作者 David Marcionek. 翻译 免费打工仔 这个教程可以帮助你快速开发一 ...

  7. 【VS开发】免费打工仔:一个完善的ActiveX Web控件教程

    作者 David Marcionek. 翻译 免费打工仔 这个教程可以帮助你快速开发一个ActiveX控件.其中将要讲解关于ActiveX开发的一些基础概念,诸如方法(method).属性(prope ...

  8. 2015.2.16 关于delphi web控件打开新网页时弹出关闭页面(js代码)出错的解决办法研究

    参考网址1:http://www.csharpwin.com/csharpspace/2360.shtml...参考网址2:http://www.oschina.net/question/234345 ...

  9. 一个Activity掌握Android5.0新控件 (转)

    原文地址:http://blog.csdn.net/lavor_zl/article/details/51279386 谷歌在推出Android5.0的同时推出了一些新控件,Android5.0中最常 ...

随机推荐

  1. 快速上手ABP - Angular部分 - 如何最快速度了解相关API。

    不是google,不是angular官网,而是在Visual Studio Code选中这个API对象,鼠标右键,选"Go to Definition" 例子:要想了解FormGr ...

  2. 也说Socket

    网上有大量socket相关文章,茫茫多,大多交代不清,最近自我整理了一下socket相关知识,附加了大量代码注释,先看效果. 上代码,客户端: Socket socket1 = null;//一个全局 ...

  3. C#生成唯一订单号

    今天系统出了一个问题,发现生成的订单号存在重复的情况了,这是要命的bug,不马上解决,就会有投诉了 经过改进后的代码我先简单的放一下,后面在慢慢的写清楚整个流程 string key = " ...

  4. android Camera相机类

    Camera相机类相关的几个流程方法 Camera.open(cameraId) 打开相机 camera.setDisplayOrientation(0) 设置相机水平方向 mCamera.setPr ...

  5. UE3多参数函数实现

    基础宏定义 #define VARARG_EXTRA(A) A, #define VARARG_NONE #define VARARG_PURE =0 static inline DWORD Chec ...

  6. [20181109]12c sqlplus rowprefetch参数5

    [20181109]12c sqlplus rowprefetch参数5.txt --//这几天一直在探究设置sqlplus参数rowprefetch与arraysize的关系,有必要做一些总结以及一 ...

  7. 关于Inception默认配置的一个坑

    本文地址:https://www.cnblogs.com/ajiangg/p/9850902.html 约半年前上线了去哪儿的开源审核工具Inception(最近发现已经闭源了.....)以及基于In ...

  8. 登录views

    import osimport hashlibfrom django.shortcuts import render,render_to_response,redirect,HttpResponseR ...

  9. django数据查询之F查询和Q查询

    仅仅靠单一的关键字参数查询已经很难满足查询要求.此时Django为我们提供了F和Q查询: # F 使用查询条件的值,专门取对象中某列值的操作 # from django.db.models impor ...

  10. c/c++赋值函数(重载=号运算符)

    c/c++赋值函数(重载=号运算符) 首先c++里的各种运算符都是用函数实现的,比如=,就等号函数. 所以当用=给一个对象赋值的时候,实际调用的是=号所对应的=号函数. 分析下面的代码 #includ ...