| | |
| | | strokeWeight: 1, //线条宽度,默认为 2 |
| | | strokeColor: 'white', //线条颜色 |
| | | fillOpacity: 0, |
| | | extData: p.extData |
| | | extData: p.extData, |
| | | zIndex: 11 |
| | | }); |
| | | |
| | | if (typeof event === 'function') { |
| | |
| | | * @param {string} factorName 监测因子名称 |
| | | * @param {number} opacity 透明度 |
| | | */ |
| | | drawGridColor(gridViews, gridDataDetail, factorName, opacity, zIndex) { |
| | | drawGridColor(gridViews, gridDataDetail, factorName, style) { |
| | | let { |
| | | strokeWeight = 1, |
| | | strokeColor = 'white', |
| | | opacity = 1, |
| | | zIndex = 11 |
| | | } = style; |
| | | const res = []; |
| | | // 遍历卫星遥测数据数组 |
| | | gridDataDetail.forEach((d, i) => { |
| | |
| | | nextColor.map((v) => v * 255), |
| | | ratio |
| | | ); |
| | | |
| | | const _extData = grid.getExtData(); |
| | | grid.setOptions({ |
| | | zIndex: zIndex ? zIndex : 10, |
| | | fillColor: _color, |
| | | fillOpacity: opacity ? opacity : color[3] == 0 ? 0 : 0.7 |
| | | strokeWeight, |
| | | strokeColor, |
| | | zIndex, |
| | | fillColor: _color, //多边形填充颜色 |
| | | fillOpacity: opacity, |
| | | extData: { |
| | | ..._extData, |
| | | gridData: d |
| | | } |
| | | }); |
| | | if (d.gridStyle && style.isMixGridHighlight) { |
| | | const _strokeWeight = d.gridStyle.strokeWeight; |
| | | const _strokeColor = d.gridStyle.strokeColor; |
| | | grid.setOptions({ |
| | | strokeWeight: _strokeWeight, //线条宽度,默认为 1 |
| | | strokeColor: _strokeColor //线条颜色 |
| | | }); |
| | | } |
| | | |
| | | res.push(grid); |
| | | } |
| | |
| | | return res; |
| | | }, |
| | | |
| | | drawGridColorCustom(gridViews, gridDataDetail, opacity) { |
| | | drawGridColorCustom(gridViews, gridDataDetail) { |
| | | |
| | | var max, min; |
| | | gridDataDetail.forEach((t) => { |
| | | if (!t.pm25) return; |
| | |
| | | ratio |
| | | ); |
| | | grid.setOptions({ |
| | | fillColor: _color, |
| | | fillOpacity: opacity ? opacity : color[3] == 0 ? 0 : 0.7 |
| | | fillColor: _color, //多边形填充颜色 |
| | | // fillOpacity: style.opacity ? style.opacity : color[3] == 0 ? 0 : 1 |
| | | }); |
| | | |
| | | res.push(grid); |