';
iconBase = '/resources/images/icons/franchise.png';
addMarker(inputMap, -36.0858612060547, 146.918182373047, infoContent);
infoContent = '
';
iconBase = '/resources/images/icons/franchise.png';
addMarker(inputMap, -31.9535121917725, 115.857048034668, infoContent);
infoContent = '
';
iconBase = '/resources/images/icons/franchise.png';
addMarker(inputMap, -34.575927734375, 150.852828979492, infoContent);
}
var markers = [];
var iconBase = '/resources/images/icons/star.png?23';
var openPopup;
function addMarker(map, loc1, loc2, windowContent) {
var globalMarker = new google.maps.Marker({
position: new google.maps.LatLng(loc1, loc2),
map: map,
icon: iconBase,
shadow: iconBase
});
//globalPopup = new google.maps.InfoWindow({
// content: "
Suite 203, Bermuda Point - Lake Side20 Lake Orr Drive
Varsity Lakes, QLD, 4227
+61 5636 3900Open in Google Maps",
// title: "|Title|"
//});
var globalPopup = new google.maps.InfoWindow({
content: windowContent
});
google.maps.event.addListener(globalMarker, 'click', function (e) {
if (openPopup) openPopup.close();
globalPopup.open(map, this);
openPopup = globalPopup;
});
markers.push(globalMarker);
}
function initializeHP() {
var map_canvas = document.getElementById('map_canvas_id_1');
var map_options = {
center: new google.maps.LatLng(-24.46948628, 145.1280215),
zoom: 4,
mapTypeId: google.maps.MapTypeId.ROADMAP,
scrollwheel: false,
disableDefaultUI: true,
zoomControl: true
};
var map = new google.maps.Map(map_canvas, map_options);
map.set('styles', [
{
"stylers": [
{ "saturation": -100 }
]
}
]);
bootDbOptions(map);
//var center;
//function calculateCenter() {
// center = map.getCenter();
//}
//google.maps.event.addDomListener(map, 'idle', function () {
// calculateCenter();
//});
//google.maps.event.addDomListener(window, 'resize', function () {
// map.setCenter(center);
//});
function zoomToMarkers(map, markers) {
// Get the bounds of all the markers
var bounds = new google.maps.LatLngBounds();
for (var i = 0; i < markers.length; i++) {
bounds.extend(markers[i].getPosition());
}
// Zoom and center the map to the bounds
map.fitBounds(bounds);
}
zoomToMarkers(map, markers);
//POPUP BY DEFAULT?
//globalPopup.open(map, globalMarker);
}
google.maps.event.addDomListener(window, 'load', initializeHP);