From bb3c80f4755bd1bc57a2e600d6538152c2e5cd84 Mon Sep 17 00:00:00 2001 From: stes Date: Thu, 27 Jul 2017 17:52:08 +0300 Subject: [PATCH] stock map --- web/js/stock.js | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/web/js/stock.js b/web/js/stock.js index 75e2530..a694af8 100644 --- a/web/js/stock.js +++ b/web/js/stock.js @@ -28,25 +28,9 @@ $(function() { $("#lat").val(results[0].geometry.location.lat()); $("#lng").val(results[0].geometry.location.lng()); - start_position = new google.maps.LatLng(results[0].geometry.location.lat(), results[0].geometry.location.lng()); - settings = { - styles: styles, - zoom: 12, - scrollwheel: false, - center: start_position, - mapTypeControl: true, - mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.DROPDOWN_MENU}, - navigationControl: false, - navigationControlOptions: {style: google.maps.NavigationControlStyle.SMALL}, - scaleControl: true, - streetViewControl: true, - rotateControl: true, - zoomControl: true, - mapTypeId: google.maps.MapTypeId.ROADMAP - }; - map = new google.maps.Map(document.getElementById("map_canvas"), settings); var marker = AddMarker(); marker.setMap(map); + map.setCenter(marker.getPosition()); } else { alert("Geocode was not successful for the following reason: " + status); } -- libgit2 0.21.4