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

Function loadImage

src/common/mapping/utils/L7LayerUtil.js:1546–1557  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

1544 }
1545
1546 function loadImage(url) {
1547 return new Promise((resolve, reject) => {
1548 const img = new Image();
1549 img.onload = () => {
1550 resolve(img);
1551 };
1552 img.onerror = () => {
1553 reject();
1554 };
1555 img.src = url;
1556 });
1557 }
1558
1559 async function processImage(url, iconStyle) {
1560 const changeedUrl = await getChangedImageUrl(url, iconStyle);

Callers 2

getChangedImageUrlFunction · 0.85
processImageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected