From 55e4fc6f2879c6d15b5a077ac4f905ac0e500a46 Mon Sep 17 00:00:00 2001 From: Erik Michaels-Ober Date: Wed, 25 Jan 2012 15:59:40 -0800 Subject: [PATCH] Re-add zoom control --- app/assets/javascripts/main.js.erb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/main.js.erb b/app/assets/javascripts/main.js.erb index 4d3416784..393f6eb76 100644 --- a/app/assets/javascripts/main.js.erb +++ b/app/assets/javascripts/main.js.erb @@ -6,13 +6,15 @@ $(function() { keyboardShortcuts: false, mapTypeControl: false, mapTypeId: google.maps.MapTypeId.ROADMAP, + maxZoom: 19, + minZoom: 15, panControl: false, rotateControl: false, scaleControl: false, scrollwheel: false, streetViewControl: true, zoom: 15, - zoomControl: false + zoomControl: true }; var map = new google.maps.Map(document.getElementById("map"), mapOptions); var size = new google.maps.Size(27.0, 37.0); @@ -123,7 +125,6 @@ $(function() { addMarker(thing.id, point, color); }, i * 100); }); - map.setZoom(19); } } }); @@ -165,6 +166,7 @@ $(function() { addMarkersAround(data[0], data[1]); var center = new google.maps.LatLng(data[0], data[1]); map.setCenter(center); + map.setZoom(19); } } });