diff --git a/geonode/static/geonode/js/search/search.js b/geonode/static/geonode/js/search/search.js index 23af35744ae..ed23dab03f4 100644 --- a/geonode/static/geonode/js/search/search.js +++ b/geonode/static/geonode/js/search/search.js @@ -625,12 +625,16 @@ var showMap = false; $('#_extent_filter').click(function(evt) { - showMap = !showMap + showMap = !showMap if (showMap){ leafletData.getMap().then(function(map) { map.invalidateSize(); }); - } + } else { + /* clear the extent filter when the map is hidden */ + delete $scope.query['extent']; + query_api($scope.query); + } }); } });