]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index/key.js
Use baselayerchange event
[rails.git] / app / assets / javascripts / index / key.js
index a4fbb6c64ed14b481bffc7b638608b45e9657186..9722cf4cf0511f684c95ff7b651a4d06393cf9dd 100644 (file)
@@ -26,9 +26,9 @@ $(document).ready(function () {
     openSidebar({ title: title });
 
     $("#sidebar").one("closed", function () {
-      map.off("zoomend layeradd layerremove", updateMapKey);
+      map.off("zoomend baselayerchange", updateMapKey);
     });
 
-    map.on("zoomend layeradd layerremove", updateMapKey);
+    map.on("zoomend baselayerchange", updateMapKey);
   });
 });