GL-Karte: Ortsnamen-Labels (Glyphs self-hosted) + ScaleControl raus (lag unter der Status-Pill)
- main.py: /fonts-Mount (Glyph-PBFs aus data/tiles/fonts), Open Sans Regular self-hosted - map-gl-style.js: glyphs-URL + Label-Layer (Ortsnamen/Straßen/Gewässer, name:de) - map.js _initMapGL: ScaleControl entfernt (überdeckte die Zoom/Wetter/Zecken-Pill) Ortsnamen für Orientierung (René), auch bei kleinem Zoom.
This commit is contained in:
parent
4d0cd0f460
commit
9c959dd632
8 changed files with 54 additions and 17 deletions
|
|
@ -381,6 +381,12 @@ app.mount("/img", StaticFiles(directory=f"{STATIC_DIR}/img"), name="img")
|
|||
# (Range nativ, keine App-CPU) — siehe docs/TILE_SERVER_HANDOVER.md, Entscheidung #2.
|
||||
_TILES_DIR = os.getenv("TILES_DIR", "/data/tiles")
|
||||
|
||||
# Glyphs (Font-PBFs) für MapLibre-Labels — kleine Static-Files (kein Range nötig),
|
||||
# liegen im data-Volume unter tiles/fonts/{fontstack}/{range}.pbf.
|
||||
_FONTS_DIR = os.getenv("FONTS_DIR", os.path.join(_TILES_DIR, "fonts"))
|
||||
if os.path.isdir(_FONTS_DIR):
|
||||
app.mount("/fonts", StaticFiles(directory=_FONTS_DIR), name="fonts")
|
||||
|
||||
@app.api_route("/tiles/{filename}", methods=["GET", "HEAD"])
|
||||
async def serve_tile(filename: str, request: Request):
|
||||
# Kein Path-Traversal
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue