diff options
-rw-r--r-- | fietsboek/static/osm-monkeypatch.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fietsboek/static/osm-monkeypatch.js b/fietsboek/static/osm-monkeypatch.js index a8310a2..586901a 100644 --- a/fietsboek/static/osm-monkeypatch.js +++ b/fietsboek/static/osm-monkeypatch.js @@ -15,6 +15,13 @@ dieses.mapcanvas = mapcanvas; this.cluster_zoomhistory = []; + // The change function is doing weird things and expects the OSM layer + // to be there, which leads to exceptions and the map not working at + // all if the OSM layer is disabled. We fix this by simply not caring + // about the change function. + // See https://gitlab.com/dunj3/fietsboek/-/issues/27 + this.change = (_) => {}; + // Map anlegen const mycp = '<a href="https://www.j-berkemeier.de/GPXViewer" title="GPX Viewer '+JB.GPX2GM.ver+'">GPXViewer</a> | '; @@ -76,6 +83,8 @@ keyboard: genugplatz, touchZoom: true, dragging: true, + // Make sure we get the first layer in there + layers: Object.values(this.baseLayers)[0], } ); JB.handle_touch_action(dieses,genugplatz); |