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. 腾讯的产品思维 VS 阿里的终局思维

    从成立到借壳上市,有赞用了5年多时间.这期间,它有好几次机会死掉,有很多的理由活不到今天,白鸦曾经说,每一次度过难关最关键都是靠团队的力量.谢天谢地,它活了下来. 那么,这个在To B领域敢打敢拼的团 ...

  2. vue2 设置网页title的问题

    好东东,没个标题看着多难受 看到1文章  http://blog.csdn.net/qishuixian/article/details/72912368 推荐使用 vue-wechat-title插 ...

  3. 初步了解redux

    redux作为react的状态状态管理工具,是十分重要的一部分,但是它在学习起来比较困难.它的写法一共分为三部分,而且他不像其他的东西一样可以写一步,在页面上查看一下.它必须三个部分全部完成之后,才能 ...

  4. onmouseover和onmouseenter区别

    onmouseover和onmouseenter都是鼠标进入时触发,onmouseover在所选元素的子元素间切换的时候也触发! <!doctype html><html lang= ...

  5. <自动化测试方案_5>第五章、代码单元自动化测试

    第五章.代码单元自动化测试 代码单元测试需要根据编程语言,选择单元测试框架,然后访问类方法,函数.代码单元测试做自动化,相比API.UI自动化做起来更加麻烦,建议放到待API自动化测试.UI自动化测试 ...

  6. Jmeter和Loadrunner的异同

    1.jmeter的架构跟loadrunner原理一样,都是通过中间代理,监控&收集并发客户端发现的指令,把他们生成脚本,再发送到应用服务器,再监控服务器反馈的结果的一个过程. 2.分布式中间代 ...

  7. C#-非泛型集合的方法

    非泛型集合的类和接口位于System.Collections命名空间 如:列表.队列.位数组.哈希表和字典的集合     ArrayList 动态数组 可被单独索引的对象的有序集合可以使用索引在指定的 ...

  8. Process 0:0:0 (0x1ffc) Worker 0x00000001E580A1A0 appears to be non-yielding on Scheduler 3. Thread creation time: 13153975602106.

    现场报错如下: Process 0:0:0 (0x1ffc) Worker 0x00000001E580A1A0 appears to be non-yielding on Scheduler 3. ...

  9. Javascript_06_表单验证(离开单项,输入框后提示信息)

    Javascript_06_ 表单验证(离开单项,输入框后提示信息) 说明:对于必须输入的入力框,光标离开(使用 onblur方法)时进行检查.假如有错,红色的提示信息直接在该画面的这个输入框的后面显 ...

  10. 4.7Python数据处理篇之Matplotlib系列(七)---matplotlib原理分析

    目录 目录 前言 (一)总框架分析 (二)函数式的绘图 1.说明: 2.函数绘图的缺优点 3.绘图类的函数 4.操作类的函数 5.例子: (三)面向对象式的绘图 1.基本概念 2.基本对象 3.面向对 ...