MapLibre-Port 3a-Fix: Scanner-Endlosschleife (resize im Scan) + Pinch-Page-Zoom + Rotation
- _loadOsmLayers: kein _map.resize() für GL (löste move→moveend→scan-Loop aus, 'pausenlos') - _initMapGL: touchZoomRotate.disableRotation() + touchPitch.disable() + container touch-action:none → Pinch=reines Zoom, bleibt in der Karte (kein iOS-Page-Zoom), keine ungewollte Drehung
This commit is contained in:
parent
ef16ec92ba
commit
2d7eca16a7
6 changed files with 24 additions and 17 deletions
|
|
@ -749,6 +749,11 @@ window.Page_map = (() => {
|
|||
center, zoom, attributionControl: false,
|
||||
maxZoom: 19, dragRotate: false, pitchWithRotate: false,
|
||||
});
|
||||
// Zwei-Finger-Rotation aus → Pinch ist reines Zoom (weniger moveend, klarere Geste).
|
||||
_map.touchZoomRotate.disableRotation();
|
||||
_map.touchPitch.disable();
|
||||
// Pinch bleibt in der Karte (verhindert iOS-Page-Zoom), ohne globales user-scalable=no.
|
||||
el.style.touchAction = 'none';
|
||||
_map.addControl(new maplibregl.NavigationControl({ showCompass: false }), 'top-left');
|
||||
_map.addControl(new maplibregl.ScaleControl());
|
||||
_map.addControl(new maplibregl.AttributionControl({
|
||||
|
|
@ -1274,7 +1279,9 @@ window.Page_map = (() => {
|
|||
}
|
||||
|
||||
_overpassActive = true;
|
||||
_mapResize();
|
||||
// GL: KEIN resize() im Scan — MapLibre würde dadurch move/moveend feuern →
|
||||
// triggert den Scan erneut → Endlosschleife. invalidateSize ist eine Leaflet-Eigenheit.
|
||||
if (!_engineGL) _mapResize();
|
||||
let bbox;
|
||||
if (_engineGL) {
|
||||
const p = _mapPaddedBounds(0.15);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue