shuishen
2021-06-15 786f4295f9e08b98cf973f90ad7983218c2fd35e
widgets/searchL/Widget.js
@@ -29,6 +29,7 @@
         layers: {},
         states: 'one',
         searchDatas: '',
         addOneEntitys: null,
         startup: function () {
            var that = this;
@@ -94,7 +95,7 @@
            })
            $(".searchColce").click(function () {
               $('.searchLMain').hide();
               that.map.entities.removeAll();
               that.addOneEntitys.removeAll();
            })
            $("#local_data").keyup(function (e) {
@@ -160,7 +161,7 @@
            })
         },
         createDatas: function (d, n) {
            this.map.entities.removeAll();//清除图标点
            this.addOneEntitys.removeAll();//清除图标点
            if (d == []) {
               if (n == 0) {
                  this.beginLayUi(d);
@@ -187,6 +188,9 @@
            }
         },
         onOpen: function () {
            var dataSourceOne = new Cesium.CustomDataSource();
            this.addOneEntitys = dataSourceOne.entities;
            this.map.dataSources.add(dataSourceOne);
            //面板打开的时候触发
            var that = this;
            that.getData(0)
@@ -301,7 +305,7 @@
         //定位实体位置
         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 实体经纬度