diff --git a/src/Logic/FeatureSource/Sources/OsmFeatureSource.ts b/src/Logic/FeatureSource/Sources/OsmFeatureSource.ts index 31616f4391..1475744e9f 100644 --- a/src/Logic/FeatureSource/Sources/OsmFeatureSource.ts +++ b/src/Logic/FeatureSource/Sources/OsmFeatureSource.ts @@ -72,6 +72,11 @@ export default class OsmFeatureSource extends FeatureSourceMerger { return } + if (neededTiles.total > 100) { + console.error("Too much tiles to download!") + return + } + this.isRunning.setData(true) try { const tileNumbers = Tiles.MapRange(neededTiles, (x, y) => { @@ -133,7 +138,6 @@ export default class OsmFeatureSource extends FeatureSourceMerger { } private async LoadTile(z: number, x: number, y: number): Promise { - console.log("OsmFeatureSource: loading ", z, x, y, "from", this._backend) if (z >= 22) { throw "This is an absurd high zoom level" } @@ -145,6 +149,7 @@ export default class OsmFeatureSource extends FeatureSourceMerger { if (this._downloadedTiles.has(index)) { return } + console.log("OsmFeatureSource: loading ", z, x, y, "from", this._backend) this._downloadedTiles.add(index) const bbox = BBox.fromTile(z, x, y)