MCPcopy Index your code
hub / github.com/SuperMap/iClient-JavaScript / _heatColorToGradient

Method _heatColorToGradient

src/common/mapping/WebMapV2.js:2743–2754  ·  view source on GitHub ↗
(colors = [])

Source from the content-addressed store, hash-verified

2741 }
2742
2743 _heatColorToGradient(colors = []) {
2744 const colorList = [];
2745 colors.forEach((color, index) => {
2746 if (index > 5 && index % 2 === 0) {
2747 colorList.push({
2748 value: color,
2749 key: index === 6 ? 0 : colors[index - 1]
2750 });
2751 }
2752 });
2753 return colorList;
2754 }
2755
2756 _getType(type) {
2757 return ['IMAGE_POINT', 'SVG_POINT'].includes(type) ? 'image' : 'style';

Callers 1

_initLegendConfigInfoMethod · 0.95

Calls 2

forEachMethod · 0.80
pushMethod · 0.80

Tested by

no test coverage detected