Karte: Follow-Mode + Live-Strecke bei Routen-Aufzeichnung (Wunsch Rene)
- MapGLMini-Polyline hatte KEIN addLatLng (nur setLatLngs) -> TypeError im Rec-Overlay: Strecke unsichtbar, Marker fror ein, kein Folgen. Facade ergaenzt (Leaflet-kompatibel). - Rec-Overlay (routes.js): Follow-Mode default AN — Karte wandert mit dem Standort, Drag pausiert, Crosshair-Button (unten rechts) reaktiviert; erster Fix setzt Zoom 16, danach bleibt der Zoom erhalten - Zentrale Karte (map.js): Standort-Button aktiviert Follow (+Toast), dragstart beendet es (beide Engines); GPS-Tracking folgt sanft (easeTo); Aufzeichnung startet im Follow-Mode, _updateRecMap pant nur noch im Follow Bump v1238
This commit is contained in:
parent
2cdb743ce7
commit
abd7447d29
8 changed files with 61 additions and 18 deletions
|
|
@ -190,6 +190,13 @@
|
|||
if (this._map && this._map.getSource(this._id)) this._map.getSource(this._id).setData(this._geo());
|
||||
return this;
|
||||
},
|
||||
// Leaflet-kompatibel: Punkt anhängen (Live-Track bei Routen-Aufzeichnung).
|
||||
// FEHLTE bis 2026-06-08 → TypeError im Rec-Overlay = Strecke blieb unsichtbar.
|
||||
addLatLng: function (ll) {
|
||||
this._latlngs.push(ll);
|
||||
if (this._map && this._map.getSource(this._id)) this._map.getSource(this._id).setData(this._geo());
|
||||
return this;
|
||||
},
|
||||
// Leaflet-kompatibel: Array von {lat,lng} (für fitBounds-Sammlung).
|
||||
getLatLngs: function () { return this._latlngs.map(function (p) { return (p && p.lat != null) ? { lat: p.lat, lng: p.lng } : { lat: p[0], lng: p[1] }; }); },
|
||||
getBounds: function () { return { _coords: this._latlngs.map(function (p) { return (p && p.lat != null) ? [p.lat, p.lng] : p; }) }; },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue