js中,怎么使数据加载完成后再执行下面的内容,而不是边加载数据边执行下面的内容 20
points.push(data[i].wellpoints);wellIds.push(data[i].wellId);wellNames.push(data[i].w...
points.push(data[i].wellpoints);
wellIds.push(data[i].wellId);
wellNames.push(data[i].wellName);
}
///////////////////////////////让上面的全部加载完再执行下面的
if (points.length % 10 > 0) {
groupCount = (points.length / 10) + 1;
} else {
groupCount = (points.length / 10);
}
for (var i = 0; i < groupCount; i++) {
var pos = new Array();
for (var j = 0; j < 10; j++) {
if (total < points.length) {
var point = new BMap.Point(points[(i * 10) + j].lng, points[(i * 10) + j].lat);
pos.push(point);
} 展开
wellIds.push(data[i].wellId);
wellNames.push(data[i].wellName);
}
///////////////////////////////让上面的全部加载完再执行下面的
if (points.length % 10 > 0) {
groupCount = (points.length / 10) + 1;
} else {
groupCount = (points.length / 10);
}
for (var i = 0; i < groupCount; i++) {
var pos = new Array();
for (var j = 0; j < 10; j++) {
if (total < points.length) {
var point = new BMap.Point(points[(i * 10) + j].lng, points[(i * 10) + j].lat);
pos.push(point);
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询