Fix remote portal map tiles and geocode

- history.js reads tile URL from data-tile-url attribute on #history-map div,
  falling back to local offline tiles (Pi behavior unchanged)
- server history.html sets data-tile-url to live OSM tiles
- maxZoom raised to 19 (OSM supports it, local tiles were limited to 15)
- server geocode returns 'label' key to match what history.js/yaris.js expect

Co-authored-by: Copilot <[email protected]>
This commit is contained in:
Mathieu Moran
2026-08-10 04:34:49 -04:00
co-authored by Copilot
parent e2a319ae08
commit a13d74e18e
3 changed files with 12 additions and 7 deletions
+8 -5
View File
@@ -10,11 +10,14 @@
const playButton = document.getElementById("trip-play");
const replayTime = document.getElementById("trip-replay-time");
const replaySpeed = document.getElementById("trip-replay-speed");
const map = L.map("history-map", { minZoom: 8, maxZoom: 15 }).setView([48.505, -0.09], 12);
const tiles = L.tileLayer("/static/vendor/tiles/{z}/{x}/{y}.png", {
minZoom: 8,
maxZoom: 15,
attribution: "&copy; MapTiler &copy; OpenStreetMap contributors",
const mapEl = document.getElementById("history-map");
const tileUrl = mapEl.dataset.tileUrl || "/static/vendor/tiles/{z}/{x}/{y}.png";
const tileAttrib = mapEl.dataset.tileAttrib || "&copy; MapTiler &copy; OpenStreetMap contributors";
const map = L.map("history-map", { minZoom: 3, maxZoom: 19 }).setView([48.505, -0.09], 12);
const tiles = L.tileLayer(tileUrl, {
minZoom: 3,
maxZoom: 19,
attribution: tileAttrib,
});
let routeLayer = null;
let vehicleMarker = null;