X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/83043d6f1cd85729a3f91e5c73d78a39b8ae7d04..a7da2a5b3962a28e2cafbd6ae606290a29639a78:/app/assets/javascripts/index.js diff --git a/app/assets/javascripts/index.js b/app/assets/javascripts/index.js index 56495b31a..d61191fb4 100644 --- a/app/assets/javascripts/index.js +++ b/app/assets/javascripts/index.js @@ -173,7 +173,7 @@ $(document).ready(function () { var expiry = new Date(); expiry.setYear(expiry.getFullYear() + 10); - map.on("moveend layeradd layerremove", function () { + map.on("moveend baselayerchange overlayadd overlayremove", function () { updateLinks( map.getCenter().wrap(), map.getZoom(), @@ -205,7 +205,7 @@ $(document).ready(function () { }); if (OSM.MATOMO) { - map.on("layeradd", function (e) { + map.on("baselayerchange overlayadd", function (e) { if (e.layer.options) { var goal = OSM.MATOMO.goals[e.layer.options.layerId];