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