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. SpringBoot项目打war包部署Tomcat教程

    一.简介 正常来说SpringBoot项目就直接用jar包来启动,使用它内部的tomcat实现微服务,但有些时候可能有部署到外部tomcat的需求,本教程就讲解一下如何操作 二.修改pom.xml 将 ...

  2. 基于Aspectj 注解实现 spring AOP

    AOP 面向切面编程,是 OOP (面向对象编程)的补充 术语 横切关注点:方法中非主要业务逻辑部分 比如运算的模块:有验证参数.执行方法前的操作.执行方法.执行方法后的操作,验证参数.执行方法前后的 ...

  3. Python入门基础之函数、切片

    Python之函数 Python不但能非常灵活地定义函数,而且本身内置了很多有用的函数,可以直接调用. Python之调用函数 Python内置了很多有用的函数,我们可以直接调用. 要调用一个函数,需 ...

  4. 关于苹果延迟了App接入HTTPS服务截止日期

    可参考 http://www.cocoachina.com/apple/20161223/18431.html https://developer.apple.com/news/?id=1221201 ...

  5. Javascript 对象 - 数组对象

    JavaScript核心对象 数组对象Array 字符串对象String 日期对象Date 数学对象Math 数组对象 数组对象是用来在单一的变量名中存储一系列的值.数组是在编程语言中经常使用的一种数 ...

  6. C# 实现FTP客户端

    本文是利用C# 实现FTP客户端的小例子,主要实现上传,下载,删除等功能,以供学习分享使用. 思路: 通过读取FTP站点的目录信息,列出对应的文件及文件夹. 双击目录,则显示子目录,如果是文件,则点击 ...

  7. socket通讯,TCP,UDP,HTTP的区别

    socket编程有TCP和UDP, TCP:传送控制协议(Transmission Control Protocol) 传输控制协议TCP是TCP/IP协议栈中的传输层协议,它通过序列确认以及包重发机 ...

  8. Django + Uwsgi + Nginx 实现生产环境部署

    本节内容 uwsgi 介绍 uwsgi安装使用 nginx安装配置 django with nginx 如何在生产上部署Django? Django的部署可以有很多方式,采用nginx+uwsgi的方 ...

  9. c/c++链队列

    链队列 链队列就是简化了的单链表 nodequeue.h #ifndef __NODEQUEUE__ #define __NODEQUEUE__ #include <stdio.h> #i ...

  10. node.js cluster模式启用方式

    众所周知,Node.js运行在Chrome的JavaScript运行时平台上,我们把该平台优雅地称之为V8引擎.不论是V8引擎,还是之后的Node.js,都是以单线程的方式运行的,因此,在多核心处理器 ...