Feature/offline basemap - #302
Closed
BlessedRebuS wants to merge 2 commits into
Closed
Conversation
Remove CARTO and all tile-provider configurability. The map now renders from a single bundled dark raster pyramid (z0-z6) served offline from /static/tiles — no CDN, no tile server, no API key, no network at runtime. - scripts/build_tiles.py: one-time build-time downloader (Esri Canvas World Dark Gray Base, keyless); output is committed to the repo - Commit the full 5461-tile / 25MB dark pyramid under src/templates/static/tiles/ so the image ships a working map with no generation step - map.js / _ip_detail.html: hardcode the local tile path, maxZoom 6 - config.py/config.yaml/helm: drop the map:tile_url/api_key surface - dashboard.css: apply the darker desaturation filter on :root so the main map and per-IP popup map share the same style - docs: note the bundled offline basemap
Contributor
Bandit — security issuesNo HIGH severity issues found. View full report |
Contributor
Ruff — lint & security issuesNo issues found. |
Owner
Author
|
EDIT: after some brainstorming we tought that 25MB of files is too much for a containerized app se we roll back including the Js from the website |
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.
Offline Dark Basemap for the Map
#295
Problem
CARTO began stamping an
API KEY REQUIREDwatermark across every tile servedwithout a key, and its raster basemap service is being retired. The dashboard
map relied on CARTO's
dark_alltiles, so every unconfigured instance showed adefaced map and "fixing" it meant plumbing a per-install API key.
We prefer using open-source alternatives rather than third-party API keys when possible, in order to be as independent as possible.
What changed
The map is now fully offline and self-contained. It renders from a single
bundled dark raster pyramid (z0–z6) shipped inside the repo, no CDN, orthird
party tile server.
committed under
src/templates/static/tiles/{z}/{x}/{y}.jpgand served as astatic asset. Deployers get a working map with zero build or configuration
steps.
:rootso the main IP map and the per-IP popup map share the same darktreatment (previously only the main map was filtered).
docs/dashboard.md, anddocs/architecture.mdtonote the bundled offline basemap.
Why the darkest single variant
Following review, the map stays on one hardcoded style (a darker
desaturation of the bundled Esri dark canvas) rather than becoming a picker or
multi-style surface. Only a coarse global overview (z0–z6) is ever needed, so a
small pre-rendered pyramid is sufficient and keeps Leaflet (already vendored
for marker clustering) as the only map runtime.
In the future we will add a button to change the whole Krawl style, including the map.