' +
'', -38.27310, 145.04115, 3],
['
' +
'Mornington Peninsula Astronomical Society | |
' +
'Public Viewing Nights | |
' +
'Location: | The Briars, Mount Martha |
' +
'Date/Time: | 1st Friday each month, 8pm |
' +
'Melway ref: | 151 E1 |
' +
'Costs: | Adults $10, Children $5 and Families $25 |
' +
'Bookings: | Phone 0419 253 252 |
' +
'Visit MPAS website for more information | |
' +
' |
' +
' |
' +
'
', -38.27308, 145.04117, 3],
];
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 9,
center: new google.maps.LatLng(-37.91666, 145.03694),
mapTypeId: google.maps.MapTypeId.ROADMAP
});
var infowindow = new google.maps.InfoWindow();
var marker, i;
var markers = new Array();
for (i = 0; i < locations.length; i++) {
marker = new google.maps.Marker({
position: new google.maps.LatLng(locations[i][1], locations[i][2]),
map: map
});
markers.push(marker);
google.maps.event.addListener(marker, 'click', (function(marker, i) {
return function() {
infowindow.setContent(locations[i][0]);
infowindow.open(map, marker);
}
})(marker, i));
}
function AutoCenter() {
// Create a new viewpoint bound
var bounds = new google.maps.LatLngBounds();
// Go through each...
$.each(markers, function (index, marker) {
bounds.extend(marker.position);
});
// Fit these bounds to the map
map.fitBounds(bounds);
}
AutoCenter();