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

Function _loop

libs/mapv/mapv.js:4371–4406  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4369 var data = dataSet instanceof DataSet ? dataSet.get() : dataSet;
4370
4371 var _loop = function _loop() {
4372 var item = data[i];
4373 if (item.geometry) {
4374 icon = item.icon || options.icon;
4375
4376 if (typeof icon === 'string') {
4377 var url = window.encodeURIComponent(icon);
4378 var img = imageMap$1[url];
4379 if (img) {
4380 drawItem(img, options, context, item);
4381 } else {
4382 if (!stacks$1[url]) {
4383 stacks$1[url] = [];
4384 getImage$1(url, function (img, src) {
4385 stacks$1[src] && stacks$1[src].forEach(function (fun) {
4386 return fun(img);
4387 });
4388 stacks$1[src] = null;
4389 imageMap$1[src] = img;
4390 }, function (src) {
4391 stacks$1[src] && stacks$1[src].forEach(function (fun) {
4392 return fun('error');
4393 });
4394 stacks$1[src] = null;
4395 imageMap$1[src] = 'error';
4396 });
4397 }
4398 stacks$1[url].push(function (img) {
4399 drawItem(img, options, context, item);
4400 });
4401 }
4402 } else {
4403 drawItem(icon, options, context, item);
4404 }
4405 }
4406 };
4407
4408 for (var i = 0, len = data.length; i < len; i++) {
4409 var icon;

Callers 1

mapv.jsFile · 0.85

Calls 5

drawItemFunction · 0.85
getImage$1Function · 0.85
funFunction · 0.85
forEachMethod · 0.80
pushMethod · 0.80

Tested by

no test coverage detected