Commit bb3c80f4755bd1bc57a2e600d6538152c2e5cd84
1 parent
557ac29e
stock map
Showing
1 changed file
with
1 additions
and
17 deletions
Show diff stats
web/js/stock.js
@@ -28,25 +28,9 @@ $(function() { | @@ -28,25 +28,9 @@ $(function() { | ||
28 | 28 | ||
29 | $("#lat").val(results[0].geometry.location.lat()); | 29 | $("#lat").val(results[0].geometry.location.lat()); |
30 | $("#lng").val(results[0].geometry.location.lng()); | 30 | $("#lng").val(results[0].geometry.location.lng()); |
31 | - start_position = new google.maps.LatLng(results[0].geometry.location.lat(), results[0].geometry.location.lng()); | ||
32 | - settings = { | ||
33 | - styles: styles, | ||
34 | - zoom: 12, | ||
35 | - scrollwheel: false, | ||
36 | - center: start_position, | ||
37 | - mapTypeControl: true, | ||
38 | - mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.DROPDOWN_MENU}, | ||
39 | - navigationControl: false, | ||
40 | - navigationControlOptions: {style: google.maps.NavigationControlStyle.SMALL}, | ||
41 | - scaleControl: true, | ||
42 | - streetViewControl: true, | ||
43 | - rotateControl: true, | ||
44 | - zoomControl: true, | ||
45 | - mapTypeId: google.maps.MapTypeId.ROADMAP | ||
46 | - }; | ||
47 | - map = new google.maps.Map(document.getElementById("map_canvas"), settings); | ||
48 | var marker = AddMarker(); | 31 | var marker = AddMarker(); |
49 | marker.setMap(map); | 32 | marker.setMap(map); |
33 | + map.setCenter(marker.getPosition()); | ||
50 | } else { | 34 | } else { |
51 | alert("Geocode was not successful for the following reason: " + status); | 35 | alert("Geocode was not successful for the following reason: " + status); |
52 | } | 36 | } |