skyline属性查询
来源:互联网 发布:淘宝c店投诉违反广告法 编辑:程序博客网 时间:2024/06/14 17:00
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.1//EN' 'http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd'><html xmlns='http://www.w3.org/1999/xhtml'><head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <script> //-------------- // Init var lastFW = null; var lastLD = null; var lastobj = null; var tintcolor = null; var messageid = ""; var ifkey = false; function Init() {SGWorld.AttachEvent("OnLButtonClicked", OnLButtonClicked);SGWorld.AttachEvent("OnFrame", OnFrame);SGWorld.AttachEvent("OnSGWorldMessage", OnSGWorldMessage);tintcolor = SGWorld.Creator.CreateColor(0, 255, 0, 125); } function OnSGWorldMessage(MessageID, SourceObjectID) { try { var cto = SGWorld.Creator.GetObject(SourceObjectID); var layerid = cto.LayerID; if (layerid == undefined) return; var layer = SGWorld.ProjectTree.GetLayer(layerid); var layername = SGWorld.ProjectTree.GetItemName(layerid); if (layername == "build_model" || layername == "Building_DL") { if (ifkey) { if (lastLD != null) { lastLD.Show = 1; } SGWorld.ProjectTree.SetVisibility(layerid, 0); ifkey = false; return true; } if (lastFW != null) { if (lastFW != cto) { lastFW.Tint.abgrColor = 0x00000000; } lastFW = cto; } else { lastFW = cto; } if (cto.Tint.abgrColor == "" || cto.Tint.abgrColor == "0" || cto.Tint.abgrColor == 0x00000000 || cto.Tint.abgrColor == 0) { cto.Tint = tintcolor; // cto.Tint.abgrColor=0xff0000aa; } else { cto.Tint.abgrColor = 0x00000000; } } else if (layername == "poly_dl") { } } catch (e) { } } function OnFrame() { var mouseInfo = SGWorld.Window.GetMouseInfo() //将平面坐标转换为球面坐标 var worldPst = SGWorld.Window.PixelToWorld(mouseInfo.x, mouseInfo.y, -1); var type = worldPst.Type; var focusID = worldPst.ObjectID; if (type == "1" || type == "8192") { try { var cto = SGWorld.Creator.GetObject(focusID); if (lastobj != null) { if (lastobj != cto) { lastobj.Tint.abgrColor = 0x00000000; } lastobj = cto; } else { lastobj = cto; } if (cto.Tint.abgrColor == "" || cto.Tint.abgrColor == "0" || cto.Tint.abgrColor == 0x00000000 || cto.Tint.abgrColor == 0) { cto.Tint.abgrColor = 0x330000ff; } else { cto.Tint.abgrColor = 0x00000000; } } catch (e) { if (lastobj != null) { lastobj.Tint.abgrColor = 0x00000000; } } } else { if (lastobj != null) { lastobj.Tint.abgrColor = 0x00000000; } } } function OnLButtonClicked(flag, x, y) { var mouseInfo = SGWorld.Window.GetMouseInfo(); //将平面坐标转换为球面坐标 var worldPst = SGWorld.Window.PixelToWorld(mouseInfo.x, mouseInfo.y, -1); var type = worldPst.Type; var focusID = worldPst.ObjectID;//alert(focusID);if(focusID!=""){ var cto = SGWorld.Creator.GetObject(focusID);/*var data = new Array();data.push('<table border=1><tbody>');for (var i = 0; i < cto.FeatureAttributes.Count; i++) {data.push('<tr>');data.push('<th>' + cto.FeatureAttributes.Item(i).Name.toString() + ":" + '</th>'); data.push('<td>' + cto.FeatureAttributes.Item(i).Value.toString() + '</td>');data.push('</tr>');}data.push('</tbody></table>');*///动态的创建表格,注意innerHTML的本质是将标签里面的内容给替换掉。var str = "";str += '<table border=1><tbody>';var count = cto.FeatureAttributes.Count;if(count!=0){for (var i = 0; i < count; i++) {str +='<tr>';str +='<th>' + cto.FeatureAttributes.Item(i).Name.toString() + ":" + '</th>';str +='<td>' + cto.FeatureAttributes.Item(i).Value.toString() + '</td>';str +='</tr>';}//var s = data.join('');str += '</tbody></table>';}//alert(s);document.getElementById('table').innerHTML = str;}} function onunload() { if (lastLD != null) { try { lastLD.Show = 1; } catch (e) { } } SGWorld.DetachEvent("OnFrame", OnFrame); SGWorld.DetachEvent("OnSGWorldMessage", OnSGWorldMessage); SGWorld.DetachEvent("OnLButtonClicked", OnLButtonClicked); //SGWorld.DetachEvent("OnMButtonUp",OnMButtonUp); } </script> <!--测试是否可以画线--> <!--<script>--> <!--function Init() {--> <!--SGWorld.Command.Execute(1012,4);--> <!--}--> <!--</script>--></head><body leftmargin="0" topmargin="0" marginheight="0" style="border:0;overflow:auto;" id="body" onload="Init()" onunload="onunload()"><object id="SGWorld" classid="CLSID:3A4F9199-65A8-11D5-85C1-0001023952C1"></object><div id="table"> </div><!--<!–表格–>--><!--<table border="1" cellpadding="1" style="background-color: #E8E8E8;width: 100%;height: 300px">--> <!--<colgroup>--> <!--<col span="1" style="background-color:#E0E0E0">--> <!--<col style="background-color:#F8F8F8">--> <!--</colgroup>--> <!--<tr>--> <!--<th id="attr" colspan="2">Attributes</th>--> <!--</tr>--> <!--<tr>--> <!--<th id="title_name">Name:</th>--> <!--<td id="name_content">null</td>--> <!--</tr>--> <!--<tr>--> <!--<th id="x">X:</th>--> <!--<td id="x_content">null</td>--> <!--</tr>--> <!--<tr>--> <!--<th id="y">Y:</th>--> <!--<td id="y_content">null</td>--> <!--</tr>--> <!--<tr>--> <!--<th id="z">Z:</th>--> <!--<td id="z_content">null</td>--> <!--</tr>--><!--</table>--></body></html>
阅读全文
0 0
- skyline属性查询
- skyline查询算法
- skyline
- skyline中点击读取属性信息
- 空间数据挖掘中的Skyline查询
- Skyline查询实验数据点的生成
- skyline查询——bitmap算法
- 移动端Skyline获取Feature图层属性的
- 一种空间数据挖掘方法——skyline查询
- 属性查询
- 属性查询
- skyline web开发 js报告SGWorld对象不支持此属性或方法的原因
- skyline 6.6.1 javascript实现遍历树,然后获取图层树中的属性数据
- 简介skyline
- I - Skyline
- 1232 - SKYLINE
- skyline 二次开发
- LA4108 SKYLINE
- Js中对象初认识
- 细说指针
- 阿里开发
- shell 函数实现检测字符串是否为合法的 IPv4 地址
- Redis学习04——存储哈希(hash)
- skyline属性查询
- Atom不能下载插件
- 简单的LNMP架构的配置
- django 报错'NoneType' object has no attribute 'strftime'
- PS html CSS JS
- FragmentTransaction管理的Fragment生命周期状态
- Android Studio里的jni实现方法(一)
- 栈和队列自主学习作业
- NoSQL之Redis高级命令详解--持久化机制