MapLibre-Port Runde 3a: MapGLMarkers in map.js verdrahtet (flag-gated)
- _loadOsmLayers/_loadAll/_addPlaces/_addPoison/_addBreeders/_applyVisibility/_deleteUserPoi engine-neutral (GL: POI-DATEN statt Marker, MapGLMarkers.setLayer/setVisible) - Standort-Dot, Place-Picker-Temp-Marker, Such-Marker als maplibregl.Marker - engine-spez. Aufrufe über Facade (_mapFlyTo/_mapSetView/_mapResize) - Wetter + GPS-Recording für GL vorerst gegated (Port in 3b/3c) - Flag 'by_map_gl'/?mapgl=1, default AUS
This commit is contained in:
parent
11922c1d22
commit
542106e77b
7 changed files with 295 additions and 70 deletions
|
|
@ -11,6 +11,7 @@
|
|||
var _dangerRadiusM = 100;
|
||||
var _popupHTML = null; // (props, key) -> htmlString
|
||||
var _popupWire = null; // (props, key, closeFn) -> void
|
||||
var _onClick = null; // (props, key) -> true = Klick behandelt, Popup unterdrücken
|
||||
var _activePopup = null;
|
||||
var _dangerKeys = [];
|
||||
|
||||
|
|
@ -132,6 +133,7 @@
|
|||
if (!e.features || !e.features.length) return;
|
||||
var f = e.features[0];
|
||||
var props = f.properties || {};
|
||||
if (_onClick && _onClick(props, key) === true) return; // Klick anderweitig behandelt
|
||||
if (_activePopup) { _activePopup.remove(); _activePopup = null; }
|
||||
var html = _popupHTML ? _popupHTML(props, key) : ('<b>' + (props.name || key) + '</b>');
|
||||
if (!html) return;
|
||||
|
|
@ -166,6 +168,7 @@
|
|||
_dangerRadiusM = opts.dangerRadiusM || 100;
|
||||
_popupHTML = opts.popupHTML || null;
|
||||
_popupWire = opts.popupWire || null;
|
||||
_onClick = opts.onClick || null;
|
||||
_addCategoryLayers();
|
||||
return _buildIcons();
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue