Skip to content

Commit ec31b96

Browse files
committed
Debug for zoom bug
1 parent d534a7d commit ec31b96

7 files changed

Lines changed: 91 additions & 86 deletions

File tree

dist/weiwudi-sw.es.js

Lines changed: 82 additions & 81 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/weiwudi-sw.es.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/weiwudi-sw.umd.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/weiwudi-sw.umd.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/weiwudi_gw_logic.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/weiwudi-sw.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/weiwudi_gw_logic.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,9 @@ export function Weiwudi_Internal(registerRoute: (capture: RegExp, handler: Route
293293
let outExtent;
294294
const db = await getDB('Weiwudi');
295295
const setting = await getItem(db, 'mapSetting', mapID) as MapSetting;
296+
console.log(`MapID: ${mapID}, z: ${z}, x: ${x}, y: ${y}`);
297+
console.log(`Setting: ${JSON.stringify(setting)}`);
298+
console.log(`Before: ${outExtent}`);
296299
if (!noOutput) {
297300
if (!setting) return `Error: MapID "${mapID}" not found`;
298301
if (z < (setting.minZoom || 0) || z > (setting.maxZoom || 0)) outExtent = 'zoom';
@@ -305,6 +308,7 @@ export function Weiwudi_Internal(registerRoute: (capture: RegExp, handler: Route
305308
if (x < minXatZ || x > maxXatZ || y < minYatZ || y > maxYatZ) outExtent = 'extent';
306309
}
307310
}
311+
console.log(`After: ${outExtent}`);
308312
let headers: Record<string, string> = {};
309313
let blob: Blob | undefined;
310314
let status = 200;

0 commit comments

Comments
 (0)