var map;
var markers = [];
var infoWindow = null;
// Create infoWidow for a marker: function called at end of marker loop
function bindInfoWindow(marker, map, infowindow, contentString) {
marker.addListener('click', function() {
infowindow.setContent(contentString);
infowindow.close(map, this);
infowindow.open(map, this);
});
}
function newLocation(newLat,newLng){
map.setCenter({
lat : newLat,
lng : newLng
});
}
$("#hw").on('click', function (){
newLocation(48.1293954,11.556663);
});
$("#md").on('click', function (){
newLocation(37.58634598423514, 14.18876212500004);
});
$("wa").on('click', function (){
newLocation(4.442766936149948, -8.92647224999996);
});
$("#in").on('click', function (){
newLocation(48.1293954,11.556663);
});
$("#fe").on('click', function (){
newLocation(48.1293954,11.556663);
});
$("#cb").on('click', function (){
newLocation(48.1293954,11.556663);
});
function initMap() {
// Set map display settings and styling
map = new google.maps.Map(document.getElementById('map'), {
zoom: 6,
center: {lat: 53.799434217378305, lng: -1.5483856201171875},
mapTypeId: 'terrain',
styles: [
{"featureType":"administrative","elementType":"country","stylers":[{"visibility":"on"}]},
{"featureType":"administrative","elementType":"land_parcel","stylers":[{"visibility":"on"}]},
{"featureType":"administrative","elementType":"locality","stylers":[{"visibility":"on"}]},
{"featureType":"administrative","elementType":"neighborhood","stylers":[{"visibility":"on"}]},
{"featureType":"administrative","elementType":"province","stylers":[{"visibility":"on"}]},
{"featureType":"poi","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"road","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"transit","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"landscape","elementType":"all","stylers":[{"hue":"#727D82"},{"lightness":-30},{"saturation":-80}]},{"featureType":"water","elementType":"all","stylers":[{"visibility":"simplified"},{"hue":"#F3F4F4"},{"lightness":80},{"saturation":-80}]}]
});
// Create a