X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/380027ffe0ca1b741148d8f66c6fcb4c450ce588..a7da2a5b3962a28e2cafbd6ae606290a29639a78:/app/assets/javascripts/index.js diff --git a/app/assets/javascripts/index.js b/app/assets/javascripts/index.js index 4dfc849fe..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,9 +205,9 @@ $(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.keyid]; + var goal = OSM.MATOMO.goals[e.layer.options.layerId]; if (goal) { $("body").trigger("matomogoal", goal); @@ -255,20 +255,10 @@ $(document).ready(function () { }); function sendRemoteEditCommand(url, callback) { - var iframe = $("