Repository navigation
Add offline basemaps for the gallery map - #35
Merged
Merged
Conversation
…no network Replaces the disabled openstreetmap.org link. GLEAPP ships no map data and requests none; the examiner imports a basemap file after installation, GLEAPP copies it under the data folder with its SHA-256, serves it locally, and MapLibre GL JS draws it. - gleapp/basemaps.py: import/list/remove/activate, PMTiles v3 header read from the bytes, raster MBTiles served tile by tile with the TMS-to-XYZ row flip, a local-only MapLibre style, and the case recording which basemap its maps were drawn on - A .pmtiles vector tileset is served by byte range (send_file, conditional); a raster .mbtiles is the fallback; vector MBTiles are refused - Maps dialog, a map in the details pane for a geolocated file, and a Map view that plots the current filter; the GPS row gets a Copy button instead of the outbound link - Report names the basemap and hash so a reader can reproduce the view; gleapp maps list|import|remove|use|extract; README and manual Maps sections - Vendored under gleapp/web/static/maps: MapLibre GL JS 5.x, pmtiles.js, the Protomaps style layers, Noto Sans glyphs and v4 sprites, each with its licence; the page loads nothing remote and attribution is shown as text Co-Authored-By: Claude Opus 4.8 <[email protected]>
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.
Replaces the disabled openstreetmap.org link with an offline map. GLEAPP ships no map data and requests none: the examiner imports a basemap file after installation, GLEAPP copies it under the data folder with its SHA-256, serves it from the local server, and MapLibre GL JS draws it. The report names the file and hash the maps were drawn on, so a reader can obtain the same file and see the same map.
.pmtilesvector tileset (recommended) is served by byte range, so pmtiles.js reads only the tiles on screen and the server never decodes a tile. Cut a region from the Protomaps build withpmtiles extract <build> out.pmtiles --bbox=W,S,E,N; measured against the 137.7 GB planet build, the Washington DC metro box was 28 MB in 8 s and Puerto Rico 70 MB in 11 s, zoom 0 to 15..mbtilesis the fallback for a map an examiner already has: one query per tile, TMS row flipped to XYZ. Vector MBTiles are refused.gleapp maps list|import|remove|use|extract, README and manual Maps sections.Everything is vendored under
gleapp/web/static/maps(MapLibre GL JS 5.x, pmtiles.js, the Protomaps style layers, Noto Sans glyphs, v4 sprites), each with its licence; the page loads nothing remote and shows the OpenStreetMap credit as text. Verified against a real DC extract: the details map drew 297 vector features at the photo's coordinate, and the case recorded the basemap name and hash into the report.🤖 Generated with Claude Code