skyline画折现bug代码
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>加载3dwindow</title>
</head>
<body onload="init3d()">
<div style="margin:0">
<button type="button" onclick="start_line"> 开始</button>
<!-- <span id='pos'></span> -->
<div id="3dmap" style="z-index:0;background-image:url('images/bg.jpg');width:100%;height:100%;margin-top:38px;position:fixed;">
<object class="window3d" id="TerraExplorer3DWindow" classid="CLSID:3a4f9192-65a8-11d5-85c1-0001023952c1"></object>
</div>
</div>
</body>
<script type="text/javascript">
function init3d() {
var dmap = $("3dmap");
var TerraExplorer3DWindow = $("TerraExplorer3DWindow");
dmap.appendChild(CSGWorld());
var SGWorld = $("SGWorld");
//
// SGWorld.AttachEvent("onLButtonDown", onLButtonDown);
// SGWorld.AttachEvent("onRButtonDown", onRButtonDown);
var flyurl = "../Default.FLY";
SGWorld.Open(flyurl);
}
function $(id) {
return window.document.getElementById(id);
}
function CSGWorld() {
obj = document.createElement('object');
document.body.appendChild(obj);
obj.name = "SGWorld";
obj.id = "SGWorld";
obj.classid = "CLSID:3A4F919A-65A8-11D5-85C1-0001023952C1";
return obj;
}
</script>
<script type="text/javascript">
function start_line() {
var SGWorld = $("SGWorld");
SGWorld.AttachEvent("onLButtonDown", onLButtonDown);
SGWorld.AttachEvent("onRButtonDown", onRButtonDown);
}
var line_geometry = []
function onRButtonDown(flags, x, y) {
SGWorld.DetachEvent("onLButtonDown", onLButtonDown);
SGWorld.DetachEvent("onRButtonDown", onRButtonDown);
}
function onLButtonDown(flags, x, y) {
var SGWorld = $("SGWorld");
var ret = SGWorld.Window.PixelToWorld(x, y, flags);
line_geometry.push(ret.Position.X, ret.Position.Y, 180)
if (line_geometry.length > 1) {
var geometry = SGWorld.Creator.GeometryCreator.CreateLineStringGeometry(line_geometry)
}
var color = SGWorld.Creator.CreateColor(255, 0, 0, 0.7);
// 2 in AltitudeTypeCode means on terrain, "" means add to root
var line = SGWorld.Creator.CreatePolyline(geometry, color, 2, "", "my poly on terrain");
line.LineStyle.Width = 1.5; // 15000m (15km)
line.Position.Distance = 600.0; // set max viewing distance in meters
SGWorld.Navigate.FlyTo(line);
// popup = SGWorld.Creator.CreatePopupMessage("onLButtonDown event", "", x, y);
// popup.InnerText = (ret == null) ? "Screen coordinate hit the sky" : "Screen coordinates (" + x + "," + y +
// "):\nTerrain coordinate:\nX: " + ret.Position.X + "\nY: " + ret.Position.Y;
//
// SGWorld.Window.ShowPopup(popup);
//
// return true; // event was processed by the client. return false to allow additional processing of the event.
}
</script>
<style type="text/css">
.window3d {
z-index: -1000;
width: 100%;
height: 100%;
position: absolute;
left: 0px;
top: 10px;
margin: 0;
}
</style>
</html>
skyline画折现bug代码的更多相关文章
- 偶现bug如何处理?
请先允许我对此类bug进行吐槽,相信做测试的同学都碰见过这种bug! 我们在测试过程中经常会碰见一类很头疼的bug,就是偶现性的bug,所谓偶现性,是相对于必现而言,这类bug有些可以有重现路径,但是 ...
- 阿里聚安全·安全周刊】一种秘密窃取数据的新型 Android 木马|iOS 11相机惊现BUG
本周的七个关键词: 新型 Android 木马丨 TLS 1.3 丨 阿里安全图灵实验室 丨 漏洞感染 Linux 服务器 丨 CPU曝极危漏洞 丨 iOS 11相机BUG 丨R2D2技术 - ...
- 佛祖保佑永无BUG代码注释
// // _oo0oo_ // o8888888o // 88" . "88 // (| -_- |) // 0\ = /0 // ___/`---'\___ // .' \\| ...
- 佛祖保佑 永无bug 代码注释
// // _oo0oo_ // o8888888o // 88" . "88 // (| -_- |) // 0\ = /0 // ___/`---'\___ // .' \\| ...
- Mapreduce-实现webcount代码
参考博文:https://blog.csdn.net/qq_41035588/article/details/90514824 首先安装一个Hadoop-Eclipse-Plugin 方便来对于hdf ...
- 小程序部分机型上一个诡异的偶现bug
如上图所示:开始的时候进到下单页面,价格是0,当选中了商品产生价格的时候,生成的价格如 ¥150,这个时候会只露出¥1以及一小半的5,后面的都被遮挡住了. wxml里是这样的写的 <view w ...
- V7承保 bug代码
v7 bug1
- 20140312 Excel表格画折现图次坐标轴
1.struct 是8字节对齐 2.char * a, sizeof(a)=4; char a[]="abcdefg";sizeof(a)=8; 3.内存对其齐
- 从 A/Looper: Could not create epoll instance. errno=24 错误浅谈解决各种 bug 的思路
今天代码写着写着就莫名闪退了,手机也没有“程序停止运行”的提示,logcat也没有看到蓝色的调用栈log,这样的闪退最是蛋疼了,还好必现.复现几次之后,终于从logcat中看到了一行可疑的log: A ...
随机推荐
- 深圳云栖大会人工智能专场:探索视频+AI,玩转智能视频应用
摘要: 在人工智能时代,AI技术是如何在各行业和领域真正的发挥应用和商业价值,带来产业变革才是关键.在3月28日深圳云栖大会的人工智能专场中,阿里云视频服务技术专家邹娟将带领大家探索熟悉的视频场景中, ...
- 浏览器跨域访问WebApi
webapi地址:wapapi.ebcbuy.com web地址:wapweb.ebcbuy.com 在默认情况下这两个域名属于两个不同的域,他们之间的交互存在跨域的问题,但因为他们都同属于一 ...
- 10G client连接数据库
tnsnames.ora文件中的名字一定要顶格写(前面不留空格),不然连接时会如下报错. 已使用的参数文件:F:\oracle\product\10.2.0\client_1\network\admi ...
- December 25th 2016 Week 53rd Sunday
Patience is bitter, but its fruit is sweet. 忍耐是痛苦的,但它的果实是甜蜜的. What can we do if there is no fruit of ...
- pat 5—1 求该日是该年的第几天
哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈 前面还是欠了一堆,慢慢补吧. 看了别人的博客才知道前面有一次圆面积的题,我上课是在干啥......... 打是打出来了,但是还是有几个蒙蔽的地方: ...
- 关于$.fn.scrollPath is not a function
关于$.fn.scrollPath is not a function 在做项目过程中,用到了一个jQuery的滚动路径插件——jQuery Scroll Path.引入相关的js文件后,但是控制台一 ...
- Safari自动代理
1. 准备一个代理服务器,我使用的是GoAgent. 2. 准备一个PAC文件,我是从chrome导出的. 3. 准备一个本地文件服务器或web服务器,我是因为手头有一个使用NodeJS的小项目,所以 ...
- POJ 3261 Milk Patterns 【后缀数组 最长可重叠子串】
题目题目:http://poj.org/problem?id=3261 Milk Patterns Time Limit: 5000MS Memory Limit: 65536K Total Subm ...
- PHP面试系列 之Linux(二)---- Linux系统定时任务
环境:ubuntu 16 一.cron实现定时任务 cron实现的定时任务是周期性循环执行的. 1.安装cron sudo apt-get install cron 2.添加定时任务(进行编辑) cr ...
- 如何异步的处理restful服务(基础)
1.使用Runnable 2.使用DeferredResult 3.异步处理的一些配置 正常请求方式 package com.nxz.controller; import lombok.extern. ...