| | |
| | | return styles; |
| | | }; |
| | | const allLayers = props.olMap.layerInfo.value.reduce((preVal, curVal) => { |
| | | return preVal.concat(curVal.children.map((item) => item.model)); |
| | | return preVal.concat(curVal.children.map((item) => item)); |
| | | }, []); |
| | | for (const item of allLayers) { |
| | | item.setStyle(themeLayerStyleFunc); |
| | | if (props.olMap?.unsupportedLayers.includes(item.id)) { |
| | | continue; |
| | | } |
| | | item.model.setStyle(themeLayerStyleFunc); |
| | | } |
| | | return res?.legends ?? []; |
| | | }; |
| | |
| | | }, []); |
| | | for (const item of allLayers) { |
| | | const originStyle = item.get('originStyle'); |
| | | item.setStyle(originStyle); |
| | | originStyle && item.setStyle(originStyle); |
| | | } |
| | | return; |
| | | } |