Add local MBTiles server for Flight Maps layers#654
Draft
msupino wants to merge 18 commits into
Draft
Conversation
Contributor
🚀 Preview deployed
Commit: |
9ec59ad to
3cfed2d
Compare
3cfed2d to
50f1ed9
Compare
- Replace toolbar layer select with a button that opens a draggable modal - Modal includes layer selection dropdown and zoom in/out controls - Follows existing patterns used by route templates, frequency table, etc. - Adds i18n support for English and Hebrew - Persists layer selection to localStorage
…no/NavigationApp into codex/local-mbtiles-server
…e in /tmp Tile resolution order: 1. Pre-extracted tile dir (--tile-dir, ~/Downloads/flight-maps-tiles) 2. /tmp/navaid-tiles download cache (--download-cache): if valid SHA-256 sidecar matches, serve immediately; otherwise download from flight-maps.com, write PNG + .sha256 sidecar atomically, serve. 3. MBTiles SQLite fallback (--mbtiles-dir, now optional — warns instead of errors) 4. 404 New flags: --download-cache (default /tmp/navaid-tiles), --no-download. Startup no longer fails when MBTiles are absent; prints a warning instead. Co-authored-by: Cursor <cursoragent@cursor.com>
… /tmp Co-authored-by: Cursor <cursoragent@cursor.com>
…ic defaults Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…D level Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
- core.js: fall back to CVFR on boot if a CDN-only layer was saved in localStorage - io.js: skip Satellite/OpenStreetMap in layer selector modal and export PNG modal when NavAid.localChartTiles is set Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--extract/--extract-onlyto expand all MBTiles into XYZ PNG folders under~/Downloads/flight-maps-tiles/./tiles/...; SQLite MBTiles reads remain as a fallback when an extracted file is missing.?localTiles=1switch that rewrites those Flight Maps chart layers to same-origin/tiles/...paths.How to try
~/Downloads/flight-maps-mbtiles/:CVFR.mbtilesIsrael-Navigation.mbtilesLSA-Low-Altitude.mbtilesIsrael-Helicopters.mbtilespython3 scripts/local-mbtiles-server.py --extract.http://127.0.0.1:8000/?localTiles=1.Tests
python3 -m py_compile scripts/local-mbtiles-server.pynode --check docs/app/core.js docs/sw.js tests/local-mbtiles.spec.js tests/local-mbtiles-extract.spec.jsBASE_URL=http://127.0.0.1:8765 npx playwright test tests/local-mbtiles.spec.js tests/local-mbtiles-extract.spec.js tests/export-png-options.spec.js tests/bugfix-178-180-sw.spec.jsnpm run lint:spellRefs #111