define(['dojo/_base/lang', 'dojo/_base/array', "dojo/_base/declare", 'dojo/topic', 'jimu/dijit/Popup', './GeologicalDisasterPanel' ], function (lang, array, declare, topic, Popup, GeologicalDisasterPanel ) { return declare("practice.cesium.layers.CommonPointLayer3D", [], { // 三维点图层 map: null, labelLayer: null, selected: null, defaultSymbolImage: "base/images/marker/marker_green.png", catalog: "", layerName: "", showName: "name",//title显示字段 idField: "id", constructor: function () { this.billboards = null; this.labels = null; var tStr = 'layer/GeologicalDisaster/'; //接收服务端的数据 topic.subscribe(tStr + "data", lang.hitch(this, this.getData)); //控制可见 topic.subscribe(tStr + "visible", lang.hitch(this, this.setVis)); }, destroy: function () { for (var i = 0, max = this.labels.length; i < max; i++) { var item = this.labels[i]; this.map.entities.remove(item); } for (var i = 0, max = this.billboards.length; i < max; i++) { var item = this.billboards[i]; this.map.entities.remove(item); } this.labels = null; this.billboards = null; this.inherited(arguments); }, setMap: function (map) { this.map = map; }, firstLoad: true, billboards: null, labels: null, getData: function (list) { //判断下 if (!lang.isArray(list)) { var ls = list.data; this.filterData = list.filterData; list = ls; } if (this.firstLoad) { this.labels = []; this.billboards = []; this.moveHandler(); this.firstLoad = false; } else { //循环删除 for(var i=0;i