From 46998fbb10373ffd02b3d9baf9f1b8fa4955e059 Mon Sep 17 00:00:00 2001 From: Aurélio A. Heckert Date: Fri, 10 Apr 2015 11:55:19 -0300 Subject: [PATCH] Remove default Brazil reference from google_maps.js --- public/javascripts/google_maps.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/public/javascripts/google_maps.js b/public/javascripts/google_maps.js index 1a7738f..2ba218c 100644 --- a/public/javascripts/google_maps.js +++ b/public/javascripts/google_maps.js @@ -36,12 +36,12 @@ function mapPutMarker(lat, lng, title, icon, url_or_function) { return marker; } -function mapLoad(initial_zoom) { - //center in Brazil - centerPoint = new google.maps.LatLng(-15.0, -50.1419); +function mapLoad(initialZoom, centerPoint) { + if (!initialZoom) initialZoom = 4; + if (!centerPoint) centerPoint = new google.maps.LatLng(0, 0); map = new google.maps.Map(document.getElementById("map"), { - zoom: initial_zoom, + zoom: initialZoom, center: centerPoint, mapTypeId: google.maps.MapTypeId.ROADMAP }); @@ -55,7 +55,6 @@ function mapLoad(initial_zoom) { } function mapCenter(latlng) { - if (!latlng) - map.fitBounds(mapBounds); + if (!latlng) map.fitBounds(mapBounds); map.setCenter(latlng ? latlng : mapBounds.getCenter()); } -- libgit2 0.21.2