forked from MapComplete/MapComplete
Properly await
This commit is contained in:
parent
a7f1295d9a
commit
78859ec699
1 changed files with 6 additions and 6 deletions
|
@ -47,11 +47,11 @@ class GenerateSummaryTileCache extends Script {
|
|||
if (z >= 14) {
|
||||
feature = await this.fetchTile(z, x, y, layersSummed)
|
||||
} else {
|
||||
const parts = await Promise.all([
|
||||
this.fetchTileRecursive(z + 1, x * 2, y * 2, layersSummed, 50),
|
||||
this.fetchTileRecursive(z + 1, x * 2 + 1, y * 2, layersSummed,100),
|
||||
this.fetchTileRecursive(z + 1, x * 2, y * 2 + 1, layersSummed,250),
|
||||
this.fetchTileRecursive(z + 1, x * 2 + 1, y * 2 + 1, layersSummed, 500)])
|
||||
const parts = [
|
||||
await this.fetchTileRecursive(z + 1, x * 2, y * 2, layersSummed),
|
||||
await this.fetchTileRecursive(z + 1, x * 2 + 1, y * 2, layersSummeawait d),
|
||||
await this.fetchTileRecursive(z + 1, x * 2, y * 2 + 1, layersSummed),
|
||||
await this.fetchTileRecursive(z + 1, x * 2 + 1, y * 2 + 1, layersSummed)]
|
||||
const sum = this.sumTotals(parts.map(f => f.properties))
|
||||
feature = <Feature<Point>>{
|
||||
type: "Feature",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue