Fix tile coords + reduce mosaic for faster load

Tile coords were wrong — Passau at zoom 11 is (1099, 706), not
(1102, 710). My earlier hand-calc (1100/706) was close but
rounded in the wrong direction.

Mosaic 16x16 = 256 tiles took 5-10s to load due to browser
6-connection limit. Reduced to 9x9 = 81 tiles (~2s). Camera
already looks down enough that visible ground fits in 9 units.
This commit is contained in:
Richard Zink committed 2026-10-07 21:00:32 +02:00
1 parent 0f54adefda
commit e80a270b05
1 file changed
+3 -3
+3 -3
View File
@@ -270,11 +270,11 @@ function init(canvas) {
var GROUND_TILE_URL = 'https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/';
var GROUND_TILE_Z = 11;
var GROUND_TILE_SIZE = 256;
var GROUND_MOSAIC_SIZE = 16; // 16x16 tiles around the camera
var GROUND_MOSAIC_SIZE = 9; // 9x9 tiles around the camera (~81 tiles, fast initial load)
var GROUND_BUFFER_TILES = 2; // refetch when this close to edge
// Passau tile at zoom 11
var GROUND_BASE_X = 1102;
var GROUND_BASE_Y = 710;
var GROUND_BASE_X = 1099;
var GROUND_BASE_Y = 706;
// Module-level state, shared across renderer instances
var groundCanvas = null;