Map tiles: switch to Esri World Light Gray (OSM 403s file://)
tiles="OpenStreetMap" returned HTTP 403 "referer is required by tile usage policy" in the target browser — OSM graylists refererless requests and a karte.html opened via file:// sends no Referer. Esri's Canvas/World_Light_Gray base + reference layers need neither a key nor a Referer and keep the muted look. New MAP_TILES / MAP_TILES_LABELS / MAP_TILES_ATTR constants; generate_map adds them as explicit TileLayers. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
+10
-8
@@ -65,9 +65,10 @@ A table view of everything in `orte.csv`.
|
||||
|
||||
Generated by `generate_map()`:
|
||||
|
||||
- Base layer: **OpenStreetMap** standard tiles (`MAP_TILES`) – no API key.
|
||||
Initial view centred on `[49.0, 9.0]`, zoom 8 (roughly Baden-Württemberg);
|
||||
the view auto-fits to the markers when there is more than one.
|
||||
- Base layer: **Esri "World Light Gray"** (`MAP_TILES` + a labels overlay) – a
|
||||
light, muted basemap that needs no API key and no `Referer`. Initial view
|
||||
centred on `[49.0, 9.0]`, zoom 8; auto-fits to the markers when there is more
|
||||
than one.
|
||||
- One **`CircleMarker`** per unique `(city, lat, lon)` group. Radius scales
|
||||
linearly with the visit count for that location
|
||||
(`5 + count / max_count * 20` px), colour is DRK red (`#CC0000`).
|
||||
@@ -77,11 +78,12 @@ Generated by `generate_map()`:
|
||||
bar shows a warning).
|
||||
|
||||
> The generated HTML pulls Leaflet, jQuery and Bootstrap from CDNs, and the map
|
||||
> tiles from `tile.openstreetmap.org`, so the map needs an internet connection to
|
||||
> render even though the data is local. To change the look, set `MAP_TILES` near
|
||||
> the top of `app.py` to another no-key provider Folium knows
|
||||
> (`"OpenStreetMap"`, `"CartoDB positron"` *now needs a key*, or a custom
|
||||
> `folium.TileLayer` URL such as OSM Germany / OSM France).
|
||||
> tiles from `server.arcgisonline.com`, so the map needs an internet connection
|
||||
> to render even though the data is local. To change the look, edit `MAP_TILES` /
|
||||
> `MAP_TILES_LABELS` near the top of `app.py` — the comment there lists other
|
||||
> no-key Esri layers (Street, Topo). `tile.openstreetmap.org` was tried first
|
||||
> but its tile-usage policy **403s** pages opened from `file://` (no `Referer`);
|
||||
> `CartoDB positron` needs an API key.
|
||||
|
||||
## Geocoding behaviour
|
||||
|
||||
|
||||
Reference in New Issue
Block a user