X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/f8b0b861d4be9a665f6dc381647ece9f6a312f4b..648f23259680f55d233656413679c58eec98c985:/app/assets/javascripts/index/browse.js?ds=sidebyside diff --git a/app/assets/javascripts/index/browse.js b/app/assets/javascripts/index/browse.js index 98a67a421..61ac51f69 100644 --- a/app/assets/javascripts/index/browse.js +++ b/app/assets/javascripts/index/browse.js @@ -42,10 +42,11 @@ $(document).ready(function () { var locationFilter = new L.LocationFilter({ enableButton: false, - adjustButton: false, - onChange: getData + adjustButton: false }).addTo(map); + locationFilter.on("change", getData); + $("#sidebar_title").html(I18n.t('browse.start_rjs.data_frame_title')); $("#sidebar_content").html(sidebarHtml); @@ -77,6 +78,7 @@ $(document).ready(function () { map.removeLayer(dataLayer); map.removeLayer(locationFilter); map.off("moveend", updateData); + locationFilter.off("change", getData); }); function enableFilter() {