qinbo
2021-12-31 8a8eb9fbd4b887b782f2ba5c409241138b6be3f0
widgetsTS/widget_grid/widget.js
@@ -9,7 +9,7 @@
        type: "window",
        url: "view.html",
        windowOptions: {
          width: 360,
          width: 400,
          height: 320,
          left: 5,
          top: 120
@@ -18,6 +18,7 @@
    }
    //初始化[仅执行1次]
    create() {
      this.grid_500 = this.map.getLayerById(3000);
      this.grid_1000 = this.map.getLayerById(3001);
      this.grid_3000 = this.map.getLayerById(3002);
      this.grid_5000 = this.map.getLayerById(3003);
@@ -33,6 +34,7 @@
    //每个窗口创建完成后调用
    winCreateOK(opt, result) {
      this.grid_500.show = true;
      this.grid_1000.show = true;
      this.grid_3000.show = true;
      this.grid_5000.show = true;
@@ -42,6 +44,7 @@
    }
    showGridmapLayers() {
      this.grid_500.show = true;
      this.grid_1000.show = true;
      this.grid_3000.show = true;
      this.grid_5000.show = true;
@@ -49,6 +52,7 @@
    }
    hideGridmapLayers() {
      this.grid_500.show = true;
      this.grid_1000.show = false;
      this.grid_3000.show = false;
      this.grid_5000.show = false;
@@ -79,6 +83,7 @@
    }
    //关闭释放
    disable() {
      this.grid_500.show = true;
      this.grid_1000.show = false;
      this.grid_3000.show = false;
      this.grid_5000.show = false;
@@ -88,6 +93,9 @@
    }
    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;
      this.grid_500.reload();
      this.grid_1000.options.parameters.styles = this.grid_1000.options.style_prefix + new_style;
      this.grid_1000.options.style_selected = new_style;
      this.grid_1000.reload();
@@ -105,6 +113,7 @@
      });
    }
    setGridmapAlpha(value) {
      this.grid_500.opacity = value;
      this.grid_1000.opacity = value;
      this.grid_3000.opacity = value;
      this.grid_5000.opacity = value;