MCPcopy Create free account
hub / github.com/SuperMap/iClient-JavaScript / getCustomSetting

Method getCustomSetting

src/openlayers/mapping/WebMap.js:3632–3641  ·  view source on GitHub ↗

* @description 获取单值专题图自定义样式对象。 * @param {Object} style - 图层上的样式。 * @param {string} color - 单值对应的颜色。 * @param {string} featureType - 要素类型。

(style, color, featureType)

Source from the content-addressed store, hash-verified

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);

Callers 1

getUniqueStyleGroupMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected