Reset filter bounds whenever it's enabled
This commit is contained in:
parent
160f7b26e8
commit
21ad851612
1 changed files with 1 additions and 4 deletions
|
@ -243,10 +243,7 @@ L.OSM.share = function (options) {
|
|||
|
||||
function toggleFilter() {
|
||||
if ($(this).is(':checked')) {
|
||||
if (!locationFilter.getBounds().isValid()) {
|
||||
locationFilter.setBounds(map.getBounds().pad(-0.2));
|
||||
}
|
||||
|
||||
locationFilter.setBounds(map.getBounds().pad(-0.2));
|
||||
locationFilter.enable();
|
||||
} else {
|
||||
locationFilter.disable();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue