Commits
- collapses list actions to [more-vertical.svg] dropdown on /bookmarks
- show a [share-2.svg] icon on shared lists and bookmarks
- add coords + z to a map url to define a default viewport
This reverts commit 090552c09487d80f7a63ab6c47fb6e3bca2833ac.
- start sync at boot
- set blob sync to lazy
- add new settings components
- update app config
- add icons to precache
- track-on-load should only ask on main route
- list deletion now confirms first
- misrouting imported bookmarks
- fix address clearing
downloadAndSavePMTiles previously did `new Blob([await response
.arrayBuffer()])`, buffering the entire file (up to ~1.6GB) in memory
before writing. Now the response body is streamed straight into chunk
records.
- storage.ts: add setSourceFromStream(), which repacks a ReadableStream's
arbitrary read sizes into exact CHUNK_SIZE records, writing in batches of
WRITE_BATCH chunks (~2 MiB working set) and writing the meta record last
as the commit marker. setSource(blob) now delegates via blob.stream().
Factored shared meta+chunk teardown into #clear() (used by deleteFile too).
- fs.ts: stream response.body instead of buffering the whole arrayBuffer.
Verified the repack/round-trip (uneven reads, reads larger than a chunk,
chunk-aligned, tiny files) keeps every non-final chunk at exactly
CHUNK_SIZE so the read path stays correct.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
These two regional layers referenced the `building` and `housenumber`
source-layers, which the tile build no longer emits (see "Drop building +
housenumber layers from tile build"). With no matching source-layer they
rendered nothing, so remove them. WORLD_LAYERS never referenced either.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The previous source (pmtiles-offline) stored each file as one Blob and did
`store.get(filename)` on every byte-range request. On engines that
materialize IndexedDB Blobs into memory on read (Safari), that pulled the
entire file — up to ~1.6GB for india.pmtiles — into memory per tile fetch,
defeating the point of PMTiles' partial access.
storage.ts now splits each file into 256 KiB chunks and reads only the
chunks a range touches, so per-read cost is bounded regardless of file
size. Reads issue all chunk gets within a single transaction and reassemble
the slice; over-reads past EOF are clamped.
- storage.ts: chunked IndexedDBSource (meta record + `${filename} <i>`
chunk records); exists() keys off the meta record; setSource() clears
stale chunks first; deleteFile() removes meta + all chunks
- fs.ts: import from ./storage.ts; deletePMTiles() now uses deleteFile()
so chunks aren't orphaned
Note: legacy single-blob entries are treated as absent and re-downloaded
in chunked form. Download still buffers the whole file in memory before
chunking (fs.ts), which is a separate, follow-up concern.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Buildings dominate z14 vector tiles (43-62% of z14 bytes measured on
Jordan/Lebanon) and housenumbers add clutter for ~1%. Removing both from
the tilemaker config and process.lua trims regional .pmtiles by an
estimated 25-40% while keeping z14 street-level roads/water/POIs intact.
- config.json: remove `building` and `housenumber` layer definitions
- process.lua: remove building/housenumber Layer() writes (node + way),
the dam->building fallback, and `addr:housenumber` from node_keys so
housenumber-only nodes are skipped during the build
Tiles must be rebuilt for this to take effect. Style layers in
www/utils/layers.ts that reference these source-layers become no-ops and
can be pruned separately.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Focus on country centroid for determining whether to show
- Show parent region in subregions
- Only start showing download at z6
- parks, waterways, rails, bridges
- Show minor roads even later
- Move buildings to be in a 3-step process:
- z12: area > ~1460 sqm (ZRES12^2) — malls, apartment blocks, factories
- z13: area > ~365 sqm (ZRES13^2) — houses, shops
- z14: everything else — sheds, garages
- Adjusts styles to fade-in the three tiers of buildings
downloadAndSavePMTiles previously did `new Blob([await response
.arrayBuffer()])`, buffering the entire file (up to ~1.6GB) in memory
before writing. Now the response body is streamed straight into chunk
records.
- storage.ts: add setSourceFromStream(), which repacks a ReadableStream's
arbitrary read sizes into exact CHUNK_SIZE records, writing in batches of
WRITE_BATCH chunks (~2 MiB working set) and writing the meta record last
as the commit marker. setSource(blob) now delegates via blob.stream().
Factored shared meta+chunk teardown into #clear() (used by deleteFile too).
- fs.ts: stream response.body instead of buffering the whole arrayBuffer.
Verified the repack/round-trip (uneven reads, reads larger than a chunk,
chunk-aligned, tiny files) keeps every non-final chunk at exactly
CHUNK_SIZE so the read path stays correct.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
These two regional layers referenced the `building` and `housenumber`
source-layers, which the tile build no longer emits (see "Drop building +
housenumber layers from tile build"). With no matching source-layer they
rendered nothing, so remove them. WORLD_LAYERS never referenced either.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The previous source (pmtiles-offline) stored each file as one Blob and did
`store.get(filename)` on every byte-range request. On engines that
materialize IndexedDB Blobs into memory on read (Safari), that pulled the
entire file — up to ~1.6GB for india.pmtiles — into memory per tile fetch,
defeating the point of PMTiles' partial access.
storage.ts now splits each file into 256 KiB chunks and reads only the
chunks a range touches, so per-read cost is bounded regardless of file
size. Reads issue all chunk gets within a single transaction and reassemble
the slice; over-reads past EOF are clamped.
- storage.ts: chunked IndexedDBSource (meta record + `${filename} <i>`
chunk records); exists() keys off the meta record; setSource() clears
stale chunks first; deleteFile() removes meta + all chunks
- fs.ts: import from ./storage.ts; deletePMTiles() now uses deleteFile()
so chunks aren't orphaned
Note: legacy single-blob entries are treated as absent and re-downloaded
in chunked form. Download still buffers the whole file in memory before
chunking (fs.ts), which is a separate, follow-up concern.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Buildings dominate z14 vector tiles (43-62% of z14 bytes measured on
Jordan/Lebanon) and housenumbers add clutter for ~1%. Removing both from
the tilemaker config and process.lua trims regional .pmtiles by an
estimated 25-40% while keeping z14 street-level roads/water/POIs intact.
- config.json: remove `building` and `housenumber` layer definitions
- process.lua: remove building/housenumber Layer() writes (node + way),
the dam->building fallback, and `addr:housenumber` from node_keys so
housenumber-only nodes are skipped during the build
Tiles must be rebuilt for this to take effect. Style layers in
www/utils/layers.ts that reference these source-layers become no-ops and
can be pruned separately.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>