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);
map.removeLayer(dataLayer);
map.removeLayer(locationFilter);
map.off("moveend", updateData);
+ locationFilter.off("change", getData);
});
function enableFilter() {
$("#browse_filter_toggle").html(I18n.t('browse.start_rjs.view_data'));
+ locationFilter.setBounds(map.getBounds().pad(-0.2));
locationFilter.enable();
getData();
}