Riku
2025-03-20 7d02024c5351e620dcc2d49f36331e4a37228ea4
src/utils/map/grid.js
@@ -264,7 +264,8 @@
        strokeWeight: 1, //线条宽度,默认为 2
        strokeColor: 'white', //线条颜色
        fillOpacity: 0,
        extData: p.extData
        extData: p.extData,
        zIndex: 11
      });
      if (typeof event === 'function') {
@@ -349,7 +350,12 @@
   * @param {number} opacity 透明度
   */
  drawGridColor(gridViews, gridDataDetail, factorName, style) {
    let { strokeWeight, strokeColor, opacity, zIndex } = style;
    let {
      strokeWeight = 1,
      strokeColor = 'white',
      opacity = 1,
      zIndex = 11
    } = style;
    const res = [];
    // 遍历卫星遥测数据数组
    gridDataDetail.forEach((d, i) => {
@@ -369,9 +375,11 @@
        const _extData = grid.getExtData();
        grid.setOptions({
          ...style,
          strokeWeight,
          strokeColor,
          zIndex,
          fillColor: _color, //多边形填充颜色
          fillOpacity: style.opacity ? style.opacity : color[3] == 0 ? 0 : 1,
          fillOpacity: opacity,
          extData: {
            ..._extData,
            gridData: d
@@ -393,8 +401,7 @@
    return res;
  },
  drawGridColorCustom(gridViews, gridDataDetail, style) {
    const { strokeWeight, strokeColor, opacity, zIndex } = style;
  drawGridColorCustom(gridViews, gridDataDetail) {
    var max, min;
    gridDataDetail.forEach((t) => {
@@ -424,9 +431,8 @@
          ratio
        );
        grid.setOptions({
          ...style,
          fillColor: _color, //多边形填充颜色
          fillOpacity: style.opacity ? style.opacity : color[3] == 0 ? 0 : 1
          // fillOpacity: style.opacity ? style.opacity : color[3] == 0 ? 0 : 1
        });
        res.push(grid);