From 37bff779db455b917319c7477ab3fc248236523a Mon Sep 17 00:00:00 2001 From: Ruslan Kabalin Date: Fri, 26 Jun 2015 21:17:57 +0100 Subject: [PATCH] Limit zooming to 9. --- client/templates/locations/locations_page.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/client/templates/locations/locations_page.js b/client/templates/locations/locations_page.js index 7a79888..6d0a0e1 100644 --- a/client/templates/locations/locations_page.js +++ b/client/templates/locations/locations_page.js @@ -13,6 +13,7 @@ Template.locationsPage.onRendered(function() { map: instance.$('.map-container'), mapOptions: { zoom: 12, + minZoom: 9, scrollwheel: true, streetViewControl: false }, @@ -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); }