| | |
| | | layers: {}, |
| | | states: 'one', |
| | | searchDatas: '', |
| | | addOneEntitys: null, |
| | | startup: function () { |
| | | var that = this; |
| | | |
| | |
| | | }) |
| | | $(".searchColce").click(function () { |
| | | $('.searchLMain').hide(); |
| | | that.map.entities.removeAll(); |
| | | that.addOneEntitys.removeAll(); |
| | | }) |
| | | |
| | | $("#local_data").keyup(function (e) { |
| | |
| | | }) |
| | | }, |
| | | createDatas: function (d, n) { |
| | | this.map.entities.removeAll();//清除图标点 |
| | | this.addOneEntitys.removeAll();//清除图标点 |
| | | if (d == []) { |
| | | if (n == 0) { |
| | | this.beginLayUi(d); |
| | |
| | | } |
| | | }, |
| | | onOpen: function () { |
| | | var dataSourceOne = new Cesium.CustomDataSource(); |
| | | this.addOneEntitys = dataSourceOne.entities; |
| | | this.map.dataSources.add(dataSourceOne); |
| | | //面板打开的时候触发 |
| | | var that = this; |
| | | that.getData(0) |
| | |
| | | //定位实体位置 |
| | | shiti: function (data, i) { |
| | | var imgs = i == 1 ? 'images/addL/全景.png' : i == 2 ? 'images/addL/监控.png' : i == 3 ? 'images/addL/监测.png' : ''; |
| | | this.map.entities.add({ |
| | | this.addOneEntitys.add({ |
| | | id: data.id, // 实体ID |
| | | name: data.name, // 实体名称 |
| | | position: Cesium.Cartesian3.fromDegrees(Number(data.lon), Number(data.lat)), // x,y 实体经纬度 |