Skip to content

Commit d0350ce

Browse files
author
Paweł Marynowski
committed
feat(map): limit query to zoom 12
1 parent 1927996 commit d0350ce

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/components/main/map/map.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,13 @@ function controller($location, $scope, $state, $stateParams, $timeout, leafletDa
2828
$timeout(() => {
2929
vm.loadingMap = false;
3030
leafletData.getMap().then((map) => {
31-
getDataBB(map.getBounds());
32-
map.on('dragend zoomend', () => {
31+
if (map.getZoom() > 12) {
3332
getDataBB(map.getBounds());
33+
}
34+
map.on('dragend zoomend', () => {
35+
if (map.getZoom() > 12) {
36+
getDataBB(map.getBounds());
37+
}
3438
});
3539
});
3640
}, 100);

0 commit comments

Comments
 (0)