zhaoxing
2022-03-16 bf2c64b65c772d4b245154dabc4dfe005ff5a9f4
重新打开监控网格,去除5000自动缩放地图视野
1个文件已修改
55 ■■■■ 已修改文件
widgetsTS/widget_grid/widget.js 55 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
widgetsTS/widget_grid/widget.js
@@ -24,41 +24,41 @@
      this.grid_5000 = this.map.getLayerById(3003);
      this.style_options = this.grid_1000.options.style_options;
      this.style_selected = this.grid_1000.options.style_selected;
      this.nodejs_url_predix = mars3d.global_variables.nodejs_url_predix;
      this.heatmapGroupLayer = new mars3d.layer.GroupLayer({ id: 5000, pid: 50, name: "", show: false });
      this.map.addLayer(this.heatmapGroupLayer);
    }
    //每个窗口创建完成后调用
    winCreateOK(opt, result) {
      this.grid_500.show = true;
      this.grid_1000.show = true;
      this.grid_3000.show = true;
      this.grid_5000.show = true;
      this.map.setCameraView(mars3d.global_variables.grid_camerview.grid5000);
      //this.grid_500.show = true;
      //this.grid_1000.show = true;
      //this.grid_3000.show = true;
      //this.grid_5000.show = true;
      //this.map.setCameraView(mars3d.global_variables.grid_camerview.grid5000);
      this.datatype = mars3d.global_variables.queryDataType;
      this.datatime = mars3d.global_variables.queryDataTStart;
    }
    showGridmapLayers() {
      this.grid_500.show = true;
      this.grid_1000.show = true;
      this.grid_3000.show = true;
      this.grid_5000.show = true;
    }
    hideGridmapLayers() {
      this.grid_500.show = false;
      this.grid_1000.show = false;
      this.grid_3000.show = false;
      this.grid_5000.show = false;
    }
    showHeatmapLayers(){
      this.heatmapGroupLayer.show = true;
      this.heatmapGroupLayer.getLayers().forEach(layer => {
@@ -72,19 +72,18 @@
        layer.show= false;
      });
    }
    //打开激活
    activate() {
      this.grid_500.show = false;
      this.grid_1000.show = false;
      this.grid_3000.show = false;
      this.grid_5000.show = false;
      this.heatmapGroupLayer.getLayers().forEach(layer => {
         layer.show= false;
       layer.show= false;
      });
    }
    changeCamerView(gridlevel) {
      this.map.setCameraView(mars3d.global_variables.grid_camerview[gridlevel]);
    }
@@ -94,11 +93,11 @@
      //this.grid_1000.show = false;
      //this.grid_3000.show = false;
      //this.grid_5000.show = false;
      // this.heatmapGroupLayer.getLayers().forEach(layer => {
      //this.heatmapGroupLayer.getLayers().forEach(layer => {
      //  layer.show= false;
      // });
      //});
    }
    update_grid_style(new_style) {
      this.grid_500.options.parameters.styles = this.grid_500.options.style_prefix + new_style;
      this.grid_500.options.style_selected = new_style;
@@ -113,7 +112,7 @@
      this.grid_5000.options.style_selected = new_style;
      this.grid_5000.reload();
    }
    setHeatmapAlpha(value) {
      this.heatmapGroupLayer.getLayers().forEach(layer => {
        layer.opacity= value;
@@ -126,13 +125,13 @@
      this.grid_5000.opacity = value;
      
    }
  }
  //注册到widget管理器中。
  mars3d.widget.bindClass(MyWidget)
  //每个widet之间都是直接引入到index.html中,会存在彼此命名冲突,所以闭包处理下。
})(window, mars3d)
})(window, mars3d)