var map; var markers = []; var infoWindow; var latlng; var styledMap; function initialize( path ) { if( $('#map_canvas').length ) { var styles = [{"featureType": "poi.place_of_worship", "elementType": "labels.icon", "stylers": [{"hue": "#ff00f9"}, {"saturation": "74"} ] }, {"featureType": "poi.school", "elementType": "labels.icon", "stylers": [{"hue": "#ff00d5"}, {"saturation": "83"} ] }, {"featureType": "transit.station", "elementType": "labels.icon", "stylers": [{"hue": "#ff00cb"} ] } ]; styledMap = new google.maps.StyledMapType(styles, {name: "NHS Bradford CCG"}); latlng = new google.maps.LatLng(53.782919, -1.755214); var myOptions = { zoom: 17, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP } map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); marker = new google.maps.Marker({ position: latlng, map: map, title:"NHS Bradford CCG" }); map.mapTypes.set('map_style', styledMap); map.setMapTypeId('map_style'); } if( $('#map_canvas2').length ) { var styles2 = [{"featureType": "poi.place_of_worship", "elementType": "labels.icon", "stylers": [{"hue": "#ff00f9"}, {"saturation": "74"} ] }, {"featureType": "poi.school", "elementType": "labels.icon", "stylers": [{"hue": "#ff00d5"}, {"saturation": "83"} ] }, {"featureType": "transit.station", "elementType": "labels.icon", "stylers": [{"hue": "#ff00cb"} ] } ]; styledMap2 = new google.maps.StyledMapType(styles2, {name: "NHS Airedale, Wharfedale and Craven Clinical Commissioning Group"}); latlng2 = new google.maps.LatLng(53.899829, -1.949980); var myOptions2 = { zoom: 17, center: latlng2, mapTypeId: google.maps.MapTypeId.ROADMAP } map2 = new google.maps.Map(document.getElementById("map_canvas2"), myOptions2); marker2 = new google.maps.Marker({ position: latlng2, map: map2, title:"NHS Airedale, Wharfedale and Craven Clinical Commissioning Group" }); map2.mapTypes.set('map_style', styledMap2); map2.setMapTypeId('map_style'); } }