var map;
var bounds;
var mapIconGold = _gdoc_root+'img/map-icon-gold.png';
var mapIconGreen = _gdoc_root+'img/map-icon-green.png';
window.onload = function () {
var styles = [
{ "elementType": "labels.text.fill", "stylers": [ { "visibility": "on" }, { "color": "#245C40" } ] }
];
var markerPosHardCoded = new google.maps.LatLng(51.5782854,-0.1779822);
// var markerPos02 = new google.maps.LatLng(51.560686,-0.18571);
var options = {
// center: markerPos01,
// zoom: 16,
scrollwheel: false, //prevents the map zooming when the user is scroll-wheeling the web page
disableDefaultUI: false ,
mapId: "mapsp_MAP_ID",
// mapTypeControlOptions: {
// mapTypeIds: [google.maps.MapTypeId.ROADMAP, google.maps.MapTypeId.SATELLITE]
// }
};
var div = document.getElementById('propertyMap');
map = new google.maps.Map(div, options);
bounds = new google.maps.LatLngBounds();
var markerPos0 = new google.maps.LatLng(51.572101,-0.176543);
var marker0 = new google.maps.Marker({ position: markerPos0, map: map,icon: mapIconGreen,id: '1185'});var iw0 = new google.maps.InfoWindow({
content: "
INGRAM AVENUE, , £10,000 Per Week
"
});google.maps.event.addListener(marker0, "mouseover", function (e) { iw0.open(map, this); }); google.maps.event.addListener(marker0, "mouseout", function (e) { iw0.close(map, this); });google.maps.event.addListener(marker0, 'click', function() { if ($('#map_'+this.id).length > 0 ) {
$('html, body').animate({
scrollTop: $('#map_'+this.id).offset().top}, 2000);
}else{
//Make Ajax cal to get the DIV
var i = new ajaxVars;
i.incModule = "common";
i.vars["action"] = "runFunction";
i.vars["func"] = "getPropDiv";
i.vars["nosplit"] = 1;
i.vars["type"] = 'all';
i.vars["from_price"] = '0';
i.vars["to_price"] = '5000';
i.vars["orderBy"] = 'DESC';
i.vars["page"] = selPage;
i.vars["rental"] = '1';
i.vars["location"] = '';
i.vars["latest"] = '';
i.vars["latestFlag"] = '';
i.vars["showFav"] = '0';
i.vars["sold"] = '';
i.vars["id"] = this.id;
i.fnVars["id"] = this.id;
i.gotoFunction = "propDivAdd";
i.AjaxPostSQL()
}});bounds.extend(markerPos0);var markerPos1 = new google.maps.LatLng(51.579021,-0.16898);
var marker1 = new google.maps.Marker({ position: markerPos1, map: map,icon: mapIconGreen,id: '1175'});var iw1 = new google.maps.InfoWindow({
content: "THE BISHOPS AVENUE, , £5,500 Per Week
"
});google.maps.event.addListener(marker1, "mouseover", function (e) { iw1.open(map, this); }); google.maps.event.addListener(marker1, "mouseout", function (e) { iw1.close(map, this); });google.maps.event.addListener(marker1, 'click', function() { if ($('#map_'+this.id).length > 0 ) {
$('html, body').animate({
scrollTop: $('#map_'+this.id).offset().top}, 2000);
}else{
//Make Ajax cal to get the DIV
var i = new ajaxVars;
i.incModule = "common";
i.vars["action"] = "runFunction";
i.vars["func"] = "getPropDiv";
i.vars["nosplit"] = 1;
i.vars["type"] = 'all';
i.vars["from_price"] = '0';
i.vars["to_price"] = '5000';
i.vars["orderBy"] = 'DESC';
i.vars["page"] = selPage;
i.vars["rental"] = '1';
i.vars["location"] = '';
i.vars["latest"] = '';
i.vars["latestFlag"] = '';
i.vars["showFav"] = '0';
i.vars["sold"] = '';
i.vars["id"] = this.id;
i.fnVars["id"] = this.id;
i.gotoFunction = "propDivAdd";
i.AjaxPostSQL()
}});bounds.extend(markerPos1);var markerPos2 = new google.maps.LatLng(51.582103,-0.176178);
var marker2 = new google.maps.Marker({ position: markerPos2, map: map,icon: mapIconGreen,id: '1138'});var iw2 = new google.maps.InfoWindow({
content: "LINDEN LEA, , £3,500 Per Week
"
});google.maps.event.addListener(marker2, "mouseover", function (e) { iw2.open(map, this); }); google.maps.event.addListener(marker2, "mouseout", function (e) { iw2.close(map, this); });google.maps.event.addListener(marker2, 'click', function() { if ($('#map_'+this.id).length > 0 ) {
$('html, body').animate({
scrollTop: $('#map_'+this.id).offset().top}, 2000);
}else{
//Make Ajax cal to get the DIV
var i = new ajaxVars;
i.incModule = "common";
i.vars["action"] = "runFunction";
i.vars["func"] = "getPropDiv";
i.vars["nosplit"] = 1;
i.vars["type"] = 'all';
i.vars["from_price"] = '0';
i.vars["to_price"] = '5000';
i.vars["orderBy"] = 'DESC';
i.vars["page"] = selPage;
i.vars["rental"] = '1';
i.vars["location"] = '';
i.vars["latest"] = '';
i.vars["latestFlag"] = '';
i.vars["showFav"] = '0';
i.vars["sold"] = '';
i.vars["id"] = this.id;
i.fnVars["id"] = this.id;
i.gotoFunction = "propDivAdd";
i.AjaxPostSQL()
}});bounds.extend(markerPos2);var markerPos3 = new google.maps.LatLng(51.572547,-0.200987);
var marker3 = new google.maps.Marker({ position: markerPos3, map: map,icon: mapIconGreen,id: '1195'});var iw3 = new google.maps.InfoWindow({
content: "THE LUXLEY, , £1,961 Per Week
"
});google.maps.event.addListener(marker3, "mouseover", function (e) { iw3.open(map, this); }); google.maps.event.addListener(marker3, "mouseout", function (e) { iw3.close(map, this); });google.maps.event.addListener(marker3, 'click', function() { if ($('#map_'+this.id).length > 0 ) {
$('html, body').animate({
scrollTop: $('#map_'+this.id).offset().top}, 2000);
}else{
//Make Ajax cal to get the DIV
var i = new ajaxVars;
i.incModule = "common";
i.vars["action"] = "runFunction";
i.vars["func"] = "getPropDiv";
i.vars["nosplit"] = 1;
i.vars["type"] = 'all';
i.vars["from_price"] = '0';
i.vars["to_price"] = '5000';
i.vars["orderBy"] = 'DESC';
i.vars["page"] = selPage;
i.vars["rental"] = '1';
i.vars["location"] = '';
i.vars["latest"] = '';
i.vars["latestFlag"] = '';
i.vars["showFav"] = '0';
i.vars["sold"] = '';
i.vars["id"] = this.id;
i.fnVars["id"] = this.id;
i.gotoFunction = "propDivAdd";
i.AjaxPostSQL()
}});bounds.extend(markerPos3);var markerPos4 = new google.maps.LatLng(51.584415,-0.171939);
var marker4 = new google.maps.Marker({ position: markerPos4, map: map,icon: mapIconGreen,id: '1191'});var iw4 = new google.maps.InfoWindow({
content: "DEACONS RISE, , £1,750 Per Week
"
});google.maps.event.addListener(marker4, "mouseover", function (e) { iw4.open(map, this); }); google.maps.event.addListener(marker4, "mouseout", function (e) { iw4.close(map, this); });google.maps.event.addListener(marker4, 'click', function() { if ($('#map_'+this.id).length > 0 ) {
$('html, body').animate({
scrollTop: $('#map_'+this.id).offset().top}, 2000);
}else{
//Make Ajax cal to get the DIV
var i = new ajaxVars;
i.incModule = "common";
i.vars["action"] = "runFunction";
i.vars["func"] = "getPropDiv";
i.vars["nosplit"] = 1;
i.vars["type"] = 'all';
i.vars["from_price"] = '0';
i.vars["to_price"] = '5000';
i.vars["orderBy"] = 'DESC';
i.vars["page"] = selPage;
i.vars["rental"] = '1';
i.vars["location"] = '';
i.vars["latest"] = '';
i.vars["latestFlag"] = '';
i.vars["showFav"] = '0';
i.vars["sold"] = '';
i.vars["id"] = this.id;
i.fnVars["id"] = this.id;
i.gotoFunction = "propDivAdd";
i.AjaxPostSQL()
}});bounds.extend(markerPos4);var markerPos5 = new google.maps.LatLng(51.572586,-0.200864);
var marker5 = new google.maps.Marker({ position: markerPos5, map: map,icon: mapIconGreen,id: '1149'});var iw5 = new google.maps.InfoWindow({
content: "THE LUXLEY, , £1,400 Per Week
"
});google.maps.event.addListener(marker5, "mouseover", function (e) { iw5.open(map, this); }); google.maps.event.addListener(marker5, "mouseout", function (e) { iw5.close(map, this); });google.maps.event.addListener(marker5, 'click', function() { if ($('#map_'+this.id).length > 0 ) {
$('html, body').animate({
scrollTop: $('#map_'+this.id).offset().top}, 2000);
}else{
//Make Ajax cal to get the DIV
var i = new ajaxVars;
i.incModule = "common";
i.vars["action"] = "runFunction";
i.vars["func"] = "getPropDiv";
i.vars["nosplit"] = 1;
i.vars["type"] = 'all';
i.vars["from_price"] = '0';
i.vars["to_price"] = '5000';
i.vars["orderBy"] = 'DESC';
i.vars["page"] = selPage;
i.vars["rental"] = '1';
i.vars["location"] = '';
i.vars["latest"] = '';
i.vars["latestFlag"] = '';
i.vars["showFav"] = '0';
i.vars["sold"] = '';
i.vars["id"] = this.id;
i.fnVars["id"] = this.id;
i.gotoFunction = "propDivAdd";
i.AjaxPostSQL()
}});bounds.extend(markerPos5);var markerPos6 = new google.maps.LatLng(51.592357,-0.20745);
var marker6 = new google.maps.Marker({ position: markerPos6, map: map,icon: mapIconGreen,id: '1187'});var iw6 = new google.maps.InfoWindow({
content: "CROOKED USAGE, , £1,350 Per Week
"
});google.maps.event.addListener(marker6, "mouseover", function (e) { iw6.open(map, this); }); google.maps.event.addListener(marker6, "mouseout", function (e) { iw6.close(map, this); });google.maps.event.addListener(marker6, 'click', function() { if ($('#map_'+this.id).length > 0 ) {
$('html, body').animate({
scrollTop: $('#map_'+this.id).offset().top}, 2000);
}else{
//Make Ajax cal to get the DIV
var i = new ajaxVars;
i.incModule = "common";
i.vars["action"] = "runFunction";
i.vars["func"] = "getPropDiv";
i.vars["nosplit"] = 1;
i.vars["type"] = 'all';
i.vars["from_price"] = '0';
i.vars["to_price"] = '5000';
i.vars["orderBy"] = 'DESC';
i.vars["page"] = selPage;
i.vars["rental"] = '1';
i.vars["location"] = '';
i.vars["latest"] = '';
i.vars["latestFlag"] = '';
i.vars["showFav"] = '0';
i.vars["sold"] = '';
i.vars["id"] = this.id;
i.fnVars["id"] = this.id;
i.gotoFunction = "propDivAdd";
i.AjaxPostSQL()
}});bounds.extend(markerPos6);var markerPos7 = new google.maps.LatLng(51.574291,-0.199113);
var marker7 = new google.maps.Marker({ position: markerPos7, map: map,icon: mapIconGreen,id: '1199'});var iw7 = new google.maps.InfoWindow({
content: "BEECHCROFT AVENUE, , £1,200 Per Week
"
});google.maps.event.addListener(marker7, "mouseover", function (e) { iw7.open(map, this); }); google.maps.event.addListener(marker7, "mouseout", function (e) { iw7.close(map, this); });google.maps.event.addListener(marker7, 'click', function() { if ($('#map_'+this.id).length > 0 ) {
$('html, body').animate({
scrollTop: $('#map_'+this.id).offset().top}, 2000);
}else{
//Make Ajax cal to get the DIV
var i = new ajaxVars;
i.incModule = "common";
i.vars["action"] = "runFunction";
i.vars["func"] = "getPropDiv";
i.vars["nosplit"] = 1;
i.vars["type"] = 'all';
i.vars["from_price"] = '0';
i.vars["to_price"] = '5000';
i.vars["orderBy"] = 'DESC';
i.vars["page"] = selPage;
i.vars["rental"] = '1';
i.vars["location"] = '';
i.vars["latest"] = '';
i.vars["latestFlag"] = '';
i.vars["showFav"] = '0';
i.vars["sold"] = '';
i.vars["id"] = this.id;
i.fnVars["id"] = this.id;
i.gotoFunction = "propDivAdd";
i.AjaxPostSQL()
}});bounds.extend(markerPos7);var markerPos8 = new google.maps.LatLng(51.56977,-0.195035);
var marker8 = new google.maps.Marker({ position: markerPos8, map: map,icon: mapIconGreen,id: '1200'});var iw8 = new google.maps.InfoWindow({
content: "FINCHLEY ROAD, , £900 Per Week
"
});google.maps.event.addListener(marker8, "mouseover", function (e) { iw8.open(map, this); }); google.maps.event.addListener(marker8, "mouseout", function (e) { iw8.close(map, this); });google.maps.event.addListener(marker8, 'click', function() { if ($('#map_'+this.id).length > 0 ) {
$('html, body').animate({
scrollTop: $('#map_'+this.id).offset().top}, 2000);
}else{
//Make Ajax cal to get the DIV
var i = new ajaxVars;
i.incModule = "common";
i.vars["action"] = "runFunction";
i.vars["func"] = "getPropDiv";
i.vars["nosplit"] = 1;
i.vars["type"] = 'all';
i.vars["from_price"] = '0';
i.vars["to_price"] = '5000';
i.vars["orderBy"] = 'DESC';
i.vars["page"] = selPage;
i.vars["rental"] = '1';
i.vars["location"] = '';
i.vars["latest"] = '';
i.vars["latestFlag"] = '';
i.vars["showFav"] = '0';
i.vars["sold"] = '';
i.vars["id"] = this.id;
i.fnVars["id"] = this.id;
i.gotoFunction = "propDivAdd";
i.AjaxPostSQL()
}});bounds.extend(markerPos8);var markerPos9 = new google.maps.LatLng(51.57484,-0.200129);
var marker9 = new google.maps.Marker({ position: markerPos9, map: map,icon: mapIconGreen,id: '1197'});var iw9 = new google.maps.InfoWindow({
content: "BEECHCROFT AVENUE, , £807 Per Week
"
});google.maps.event.addListener(marker9, "mouseover", function (e) { iw9.open(map, this); }); google.maps.event.addListener(marker9, "mouseout", function (e) { iw9.close(map, this); });google.maps.event.addListener(marker9, 'click', function() { if ($('#map_'+this.id).length > 0 ) {
$('html, body').animate({
scrollTop: $('#map_'+this.id).offset().top}, 2000);
}else{
//Make Ajax cal to get the DIV
var i = new ajaxVars;
i.incModule = "common";
i.vars["action"] = "runFunction";
i.vars["func"] = "getPropDiv";
i.vars["nosplit"] = 1;
i.vars["type"] = 'all';
i.vars["from_price"] = '0';
i.vars["to_price"] = '5000';
i.vars["orderBy"] = 'DESC';
i.vars["page"] = selPage;
i.vars["rental"] = '1';
i.vars["location"] = '';
i.vars["latest"] = '';
i.vars["latestFlag"] = '';
i.vars["showFav"] = '0';
i.vars["sold"] = '';
i.vars["id"] = this.id;
i.fnVars["id"] = this.id;
i.gotoFunction = "propDivAdd";
i.AjaxPostSQL()
}});bounds.extend(markerPos9);var markerPos10 = new google.maps.LatLng(51.574211,-0.19885);
var marker10 = new google.maps.Marker({ position: markerPos10, map: map,icon: mapIconGreen,id: '1198'});var iw10 = new google.maps.InfoWindow({
content: "BEECHCROFT AVENUE, , £807 Per Week
"
});google.maps.event.addListener(marker10, "mouseover", function (e) { iw10.open(map, this); }); google.maps.event.addListener(marker10, "mouseout", function (e) { iw10.close(map, this); });google.maps.event.addListener(marker10, 'click', function() { if ($('#map_'+this.id).length > 0 ) {
$('html, body').animate({
scrollTop: $('#map_'+this.id).offset().top}, 2000);
}else{
//Make Ajax cal to get the DIV
var i = new ajaxVars;
i.incModule = "common";
i.vars["action"] = "runFunction";
i.vars["func"] = "getPropDiv";
i.vars["nosplit"] = 1;
i.vars["type"] = 'all';
i.vars["from_price"] = '0';
i.vars["to_price"] = '5000';
i.vars["orderBy"] = 'DESC';
i.vars["page"] = selPage;
i.vars["rental"] = '1';
i.vars["location"] = '';
i.vars["latest"] = '';
i.vars["latestFlag"] = '';
i.vars["showFav"] = '0';
i.vars["sold"] = '';
i.vars["id"] = this.id;
i.fnVars["id"] = this.id;
i.gotoFunction = "propDivAdd";
i.AjaxPostSQL()
}});bounds.extend(markerPos10);var markerPos11 = new google.maps.LatLng(51.565956,-0.197543);
var marker11 = new google.maps.Marker({ position: markerPos11, map: map,icon: mapIconGreen,id: '777'});var iw11 = new google.maps.InfoWindow({
content: "WEST HEATH PLACE, , £750 Per Week
"
});google.maps.event.addListener(marker11, "mouseover", function (e) { iw11.open(map, this); }); google.maps.event.addListener(marker11, "mouseout", function (e) { iw11.close(map, this); });google.maps.event.addListener(marker11, 'click', function() { if ($('#map_'+this.id).length > 0 ) {
$('html, body').animate({
scrollTop: $('#map_'+this.id).offset().top}, 2000);
}else{
//Make Ajax cal to get the DIV
var i = new ajaxVars;
i.incModule = "common";
i.vars["action"] = "runFunction";
i.vars["func"] = "getPropDiv";
i.vars["nosplit"] = 1;
i.vars["type"] = 'all';
i.vars["from_price"] = '0';
i.vars["to_price"] = '5000';
i.vars["orderBy"] = 'DESC';
i.vars["page"] = selPage;
i.vars["rental"] = '1';
i.vars["location"] = '';
i.vars["latest"] = '';
i.vars["latestFlag"] = '';
i.vars["showFav"] = '0';
i.vars["sold"] = '';
i.vars["id"] = this.id;
i.fnVars["id"] = this.id;
i.gotoFunction = "propDivAdd";
i.AjaxPostSQL()
}});bounds.extend(markerPos11);var markerPos12 = new google.maps.LatLng(51.574348,-0.199212);
var marker12 = new google.maps.Marker({ position: markerPos12, map: map,icon: mapIconGreen,id: '1196'});var iw12 = new google.maps.InfoWindow({
content: "BEECHCROFT AVENUE, , £715 Per Week
"
});google.maps.event.addListener(marker12, "mouseover", function (e) { iw12.open(map, this); }); google.maps.event.addListener(marker12, "mouseout", function (e) { iw12.close(map, this); });google.maps.event.addListener(marker12, 'click', function() { if ($('#map_'+this.id).length > 0 ) {
$('html, body').animate({
scrollTop: $('#map_'+this.id).offset().top}, 2000);
}else{
//Make Ajax cal to get the DIV
var i = new ajaxVars;
i.incModule = "common";
i.vars["action"] = "runFunction";
i.vars["func"] = "getPropDiv";
i.vars["nosplit"] = 1;
i.vars["type"] = 'all';
i.vars["from_price"] = '0';
i.vars["to_price"] = '5000';
i.vars["orderBy"] = 'DESC';
i.vars["page"] = selPage;
i.vars["rental"] = '1';
i.vars["location"] = '';
i.vars["latest"] = '';
i.vars["latestFlag"] = '';
i.vars["showFav"] = '0';
i.vars["sold"] = '';
i.vars["id"] = this.id;
i.fnVars["id"] = this.id;
i.gotoFunction = "propDivAdd";
i.AjaxPostSQL()
}});bounds.extend(markerPos12);var markerPos13 = new google.maps.LatLng(51.574432,-0.200095);
var marker13 = new google.maps.Marker({ position: markerPos13, map: map,icon: mapIconGreen,id: '1201'});var iw13 = new google.maps.InfoWindow({
content: "BEECHCROFT AVENUE, , £692 Per Week
"
});google.maps.event.addListener(marker13, "mouseover", function (e) { iw13.open(map, this); }); google.maps.event.addListener(marker13, "mouseout", function (e) { iw13.close(map, this); });google.maps.event.addListener(marker13, 'click', function() { if ($('#map_'+this.id).length > 0 ) {
$('html, body').animate({
scrollTop: $('#map_'+this.id).offset().top}, 2000);
}else{
//Make Ajax cal to get the DIV
var i = new ajaxVars;
i.incModule = "common";
i.vars["action"] = "runFunction";
i.vars["func"] = "getPropDiv";
i.vars["nosplit"] = 1;
i.vars["type"] = 'all';
i.vars["from_price"] = '0';
i.vars["to_price"] = '5000';
i.vars["orderBy"] = 'DESC';
i.vars["page"] = selPage;
i.vars["rental"] = '1';
i.vars["location"] = '';
i.vars["latest"] = '';
i.vars["latestFlag"] = '';
i.vars["showFav"] = '0';
i.vars["sold"] = '';
i.vars["id"] = this.id;
i.fnVars["id"] = this.id;
i.gotoFunction = "propDivAdd";
i.AjaxPostSQL()
}});bounds.extend(markerPos13);var markerPos14 = new google.maps.LatLng(51.579616,-0.197953);
var marker14 = new google.maps.Marker({ position: markerPos14, map: map,icon: mapIconGreen,id: '1194'});var iw14 = new google.maps.InfoWindow({
content: "CLIFTON GARDENS, , £550 Per Week
"
});google.maps.event.addListener(marker14, "mouseover", function (e) { iw14.open(map, this); }); google.maps.event.addListener(marker14, "mouseout", function (e) { iw14.close(map, this); });google.maps.event.addListener(marker14, 'click', function() { if ($('#map_'+this.id).length > 0 ) {
$('html, body').animate({
scrollTop: $('#map_'+this.id).offset().top}, 2000);
}else{
//Make Ajax cal to get the DIV
var i = new ajaxVars;
i.incModule = "common";
i.vars["action"] = "runFunction";
i.vars["func"] = "getPropDiv";
i.vars["nosplit"] = 1;
i.vars["type"] = 'all';
i.vars["from_price"] = '0';
i.vars["to_price"] = '5000';
i.vars["orderBy"] = 'DESC';
i.vars["page"] = selPage;
i.vars["rental"] = '1';
i.vars["location"] = '';
i.vars["latest"] = '';
i.vars["latestFlag"] = '';
i.vars["showFav"] = '0';
i.vars["sold"] = '';
i.vars["id"] = this.id;
i.fnVars["id"] = this.id;
i.gotoFunction = "propDivAdd";
i.AjaxPostSQL()
}});bounds.extend(markerPos14);var markerPos15 = new google.maps.LatLng(51.576236,-0.196448);
var marker15 = new google.maps.Marker({ position: markerPos15, map: map,icon: mapIconGreen,id: '1202'});var iw15 = new google.maps.InfoWindow({
content: "HOOP LANE, , £461 Per Week
"
});google.maps.event.addListener(marker15, "mouseover", function (e) { iw15.open(map, this); }); google.maps.event.addListener(marker15, "mouseout", function (e) { iw15.close(map, this); });google.maps.event.addListener(marker15, 'click', function() { if ($('#map_'+this.id).length > 0 ) {
$('html, body').animate({
scrollTop: $('#map_'+this.id).offset().top}, 2000);
}else{
//Make Ajax cal to get the DIV
var i = new ajaxVars;
i.incModule = "common";
i.vars["action"] = "runFunction";
i.vars["func"] = "getPropDiv";
i.vars["nosplit"] = 1;
i.vars["type"] = 'all';
i.vars["from_price"] = '0';
i.vars["to_price"] = '5000';
i.vars["orderBy"] = 'DESC';
i.vars["page"] = selPage;
i.vars["rental"] = '1';
i.vars["location"] = '';
i.vars["latest"] = '';
i.vars["latestFlag"] = '';
i.vars["showFav"] = '0';
i.vars["sold"] = '';
i.vars["id"] = this.id;
i.fnVars["id"] = this.id;
i.gotoFunction = "propDivAdd";
i.AjaxPostSQL()
}});bounds.extend(markerPos15);
map.setCenter(bounds.getCenter());
map.fitBounds(bounds);
zoomChangeBoundsListener =
google.maps.event.addListenerOnce(map, 'bounds_changed', function(event) {
if (map.getZoom()){
map.setCenter(new google.maps.LatLng(51.5801607,-0.184152));
map.setZoom(14);
}
});
}