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. leaflet 如何绘制圆

    方法1(根据指定的半径和中心点去绘制圆) var polygon1 = new L.Circle([34, 108], 120000, { color: 'red', //颜色 fillColor: ...

  2. Android IPC机制(三)使用AIDL实现跨进程方法调用

    上一篇文章中我们介绍了使用Messenger来进行进程间通信的方法,但是我们能发现Messenger是以串行的方式来处理客户端发来的信息,如果有大量的消息发到服务端,服务端仍然一个一个的处理再响应客户 ...

  3. java中的数据类型,运算符,字符串,输入输出,控制流,大数值,数组; 《java核心技术卷i》 第三章:java基本程序结构;

    <java核心技术卷i> 第三章:java基本程序结构: 每次看书,去总结的时候,总会发现一些新的东西,这次对于java的数组有了更深的了解: java中的数据类型,运算符,字符串,输入输 ...

  4. python 冒泡、二分查找

    冒泡: import random def _sort(_lst): count = 1 while count < len(_lst): for i in range(0, len(_lst) ...

  5. SQL 数据插入、删除 大数据

    --测试表 CREATE TABLE [dbo].[Employee] ( [EmployeeNo] INT PRIMARY KEY, [EmployeeName] [nvarchar](50) NU ...

  6. Ext 日期格式化

    //日期格式化 Date.prototype.Format = function (fmt) { var o = { , //月份 "d+": this.getDate(), // ...

  7. Java代码优化总结(持续更新)

    1.对equals不熟 例子 if(user.get("s").equals("ss")){ //一堆代码 } 注:一旦前端页面传null值过来,就错了,nul ...

  8. 【Apache运维基础(6)】Apache的日志管理与分析

    简述 Apache 访问日志在实际工作中非常有用,比较典型的例子是进行网站流量统计,查看用户访问时间.地理位置分布.页面点击率等.Apache 的访问日志具有如下4个方面的作用: 记录访问服务器的远程 ...

  9. JavaScript -- 时光流逝(五):js中的 Date 对象的方法

    JavaScript -- 知识点回顾篇(五):js中的 Date 对象的方法 Date 对象: 用于处理日期和时间. 1. Date对象的方法 <script type="text/ ...

  10. Shell编程基础知识(一)

    一.基本的运行Linux程序的3种方法: (1) 使文件具有可执行权限,直接运行文件.eg:  chmod a+x testfile.sh   ./testfile.sh (2) 直接调用命令解释器来 ...