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

Method _parseRangeStyle

src/common/mapping/WebMapV3.js:1191–1214  ·  view source on GitHub ↗
({ legendRenderType, styleField, simpleStyle, defaultSetting, custom, shape })

Source from the content-addressed store, hash-verified

1189 }
1190
1191 _parseRangeStyle({ legendRenderType, styleField, simpleStyle, defaultSetting, custom, shape }) {
1192 const styleGroup = custom.map((c) => {
1193 const itemStyle = this._getSettingStyle(styleField, c.value, simpleStyle);
1194 const resData = this._parseLegendtyle({ legendRenderType, customValue: itemStyle });
1195 return {
1196 start: c.start,
1197 end: c.end,
1198 style: {
1199 ...resData,
1200 shape
1201 }
1202 };
1203 });
1204 const resData = this._parseLegendtyle({ legendRenderType, customValue: defaultSetting });
1205 styleGroup.push({
1206 start: null,
1207 end: null,
1208 style: {
1209 ...resData,
1210 shape
1211 }
1212 });
1213 return styleGroup;
1214 }
1215
1216 _getSettingStyle(styleField, value, simpleStyle) {
1217 const itemStyle = Object.assign({}, simpleStyle);

Callers 1

Calls 4

_getSettingStyleMethod · 0.95
_parseLegendtyleMethod · 0.95
mapMethod · 0.80
pushMethod · 0.80

Tested by

no test coverage detected