* @description 获取单值专题图自定义样式对象。 * @param {Object} style - 图层上的样式。 * @param {string} color - 单值对应的颜色。 * @param {string} featureType - 要素类型。
(style, color, featureType)
| 3630 | * @param {string} featureType - 要素类型。 |
| 3631 | */ |
| 3632 | getCustomSetting(style, color, featureType) { |
| 3633 | let newProps = {}; |
| 3634 | if (featureType === 'LINE') { |
| 3635 | newProps.strokeColor = color; |
| 3636 | } else { |
| 3637 | newProps.fillColor = color; |
| 3638 | } |
| 3639 | let customSetting = Object.assign(style, newProps); |
| 3640 | return customSetting; |
| 3641 | } |
| 3642 | |
| 3643 | getCustomSettingColors(customSettings, featureType) { |
| 3644 | const keys = Object.keys(customSettings); |