| | |
| | | 'jimu/BaseWidget', |
| | | 'jimu/utils', |
| | | 'jimu/css!libs/zTree_v3/css/zTreeStyle/zTreeStyle.css', |
| | | 'libs/zTree_v3/js/jquery.ztree.all' |
| | | 'libs/zTree_v3/js/jquery.ztree.all', |
| | | './Cesiumadd' |
| | | ], |
| | | function (declare, |
| | | lang, |
| | |
| | | addOneEntitys: null, |
| | | startup: function () { |
| | | var that = this; |
| | | |
| | | |
| | | |
| | | //关键词&&坐标 |
| | | $("#i-f-gjz").click(function () { |
| | |
| | | if (d == []) { |
| | | if (n == 0) { |
| | | this.beginLayUi(d); |
| | | topic.publish('getLegendsData', "legends", d, "./images/addL/全景.png", "全景站点"); |
| | | topic.publish('getLegendsData', "legends", d, "./images/addL/全景.png", "全景站点"); |
| | | } else if (n == 1) { |
| | | this.beginLayUi(1, d); |
| | | topic.publish('getLegendsData', "legends", d, "./images/addL/监控.png", "监控站点"); |
| | | topic.publish('getLegendsData', "legends", d, "./images/addL/监控.png", "监控站点"); |
| | | } else if (n == 2) { |
| | | this.beginLayUi(1, 1, d); |
| | | topic.publish('getLegendsData', "legends", d, "./images/addL/全景.png", "监测站点"); |
| | | topic.publish('getLegendsData', "legends", d, "./images/addL/全景.png", "监测站点"); |
| | | } |
| | | } else { |
| | | var i = 1; |
| | |
| | | var data = d; |
| | | if (n == 0) { |
| | | this.beginLayUi(data); |
| | | topic.publish('getLegendsData', "legends", d, "./images/addL/全景.png", "全景站点"); |
| | | topic.publish('getLegendsData', "legends", d, "./images/addL/全景.png", "全景站点"); |
| | | } else if (n == 1) { |
| | | this.beginLayUi(1, data); |
| | | topic.publish('getLegendsData', "legends", d, "./images/addL/监控.png", "监控站点"); |
| | | topic.publish('getLegendsData', "legends", d, "./images/addL/监控.png", "监控站点"); |
| | | } else if (n == 2) { |
| | | this.beginLayUi(1, 1, data); |
| | | topic.publish('getLegendsData', "legends", d, "./images/addL/监测.png", "监测站点"); |
| | | topic.publish('getLegendsData', "legends", d, "./images/addL/监测.png", "监测站点"); |
| | | } |
| | | } |
| | | }, |
| | |
| | | this.mountainHandler.setInputAction(lang.hitch(this, this.clickHand), Cesium.ScreenSpaceEventType.LEFT_CLICK); |
| | | }, |
| | | // 注册鼠标左键单击事件 |
| | | clickHand: function clickHand(data) { |
| | | clickHand: function clickHand(data) {// 全局鼠标点击图标事件 渲染地图图标时 添加个相对应的数组储存该对象数据 通过数组是否存在判断点击的项目 |
| | | var pickedObjects = this.map.scene.drillPick(data.position) || 0; |
| | | // console.log(pickedObjects); |
| | | if (pickedObjects.length != 0) { |
| | |
| | | |
| | | } else if (pickedObjects[0].primitive.id.SQLData != undefined) {//SQL查询图标点击事件 |
| | | // console.log('SQLData') |
| | | } else if (pickedObjects[0].primitive.id.spatialQueryData != undefined) {//SQL查询图标点击事件 |
| | | var data = pickedObjects[0].primitive.id.spatialQueryData; |
| | | data.name = pickedObjects[0].primitive.id.name; |
| | | data.dom = pickedObjects[0].primitive.id.description; |
| | | // console.log(data); |
| | | var doms = $('#spatialQueryValuemain'); |
| | | var domo = $('#spatialQueryValue'); |
| | | doms.empty(); |
| | | doms.append('<div>name:' + data.name + '<div/>' + data.dom._value); |
| | | domo.show(); |
| | | } |
| | | } |
| | | } |