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

Function string2RGBAData

src/common/mapping/utils/L7LayerUtil.js:1515–1519  ·  view source on GitHub ↗

* 将字符串颜色值转换成rgba对象 * @param color

(color)

Source from the content-addressed store, hash-verified

1513 * @param color
1514 */
1515 function string2RGBAData(color) {
1516 const data = Color.getData(Color.toRGBA(color));
1517 const [r, g, b, a] = data;
1518 return { r, g, b, a };
1519 }
1520
1521 async function getChangedImageUrl(url, iconStyle) {
1522 const img = await loadImage(url);

Callers 1

getChangedImageUrlFunction · 0.85

Calls 2

getDataMethod · 0.45
toRGBAMethod · 0.45

Tested by

no test coverage detected