Skip to content

Commit

Permalink
Limit zooming to 9.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruslan Kabalin authored and kabalin committed Feb 3, 2019
1 parent ec2f6cc commit 37bff77
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions client/templates/locations/locations_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Template.locationsPage.onRendered(function() {
map: instance.$('.map-container'),
mapOptions: {
zoom: 12,
minZoom: 9,
scrollwheel: true,
streetViewControl: false
},
Expand All @@ -35,11 +36,11 @@ Template.locationsPage.onRendered(function() {
var ne = bounds.getNorthEast();
var sw = bounds.getSouthWest();
var boundsCoordinates = [
[ne.lng(), ne.lat()],
[sw.lng(), ne.lat()],
[sw.lng(), sw.lat()],
[ne.lng(), sw.lat()],
[ne.lng(), ne.lat()]
[sw.lng(), ne.lat()], // nw
[ne.lng(), ne.lat()], // ne
[ne.lng(), sw.lat()], // se
[sw.lng(), sw.lat()], // sw
[sw.lng(), ne.lat()], // nw
];
instance.mapBoundsCoordinates.set(boundsCoordinates);
}
Expand Down

0 comments on commit 37bff77

Please sign in to comment.