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

Function getImage

libs/mapv/mapv.js:4234–4243  ·  view source on GitHub ↗
(url, callback, fallback)

Source from the content-addressed store, hash-verified

4232};
4233
4234function getImage(url, callback, fallback) {
4235 var img = new Image();
4236 img.onload = function () {
4237 callback && callback(img, url);
4238 };
4239 img.onerror = function () {
4240 fallback && fallback(url);
4241 };
4242 img.src = window.decodeURIComponent(url);
4243}
4244
4245/**
4246 * @author Mofei Zhu<mapv@zhuwenlong.com>

Callers 1

mapv.jsFile · 0.85

Calls 1

callbackFunction · 0.50

Tested by

no test coverage detected