Allow data tile source loader to return a value or a promise

This commit is contained in:
Tim Schaub
2021-11-20 13:49:10 -07:00
parent fcb39c84ce
commit f6f34f82e5
10 changed files with 100 additions and 13 deletions

View File

@@ -34,7 +34,7 @@ new Map({
const bandCount = 3;
const result = data.filter((_, index) => index % 4 < bandCount);
return Promise.resolve(result);
return result;
},
tileSize: size,
}),

View File

@@ -53,7 +53,7 @@ new Map({
}
}
return Promise.resolve(output);
return output;
},
}),
}),

View File

@@ -66,7 +66,7 @@ new Map({
labelCanvasSize,
labelCanvasSize
).data;
return Promise.resolve(new Uint8Array(data.buffer));
return new Uint8Array(data.buffer);
},
transition: 0,
}),

View File

@@ -64,7 +64,7 @@ new Map({
labelCanvasSize,
labelCanvasSize
).data;
return Promise.resolve(new Uint8Array(data.buffer));
return new Uint8Array(data.buffer);
},
transition: 0,
}),