var map; var gmarkers = []; var infowindow; var loc_list; var center = new google.maps.LatLng(1, 2); function HomeControl(controlDiv, map){ controlDiv.style.padding = '5px'; var controlUI = document.createElement('DIV'); controlUI.id = 'pb_button'; controlUI.title = 'Powered by: Helios Calendar'; controlDiv.appendChild(controlUI); var controlText = document.createElement('DIV'); controlText.innerHTML = 'Visit VU Calendar'; controlUI.appendChild(controlText); google.maps.event.addDomListener(controlUI, 'click', function() { window.location.href = 'https://events.vanderbilt.edu'; }); } function initialize() { var myOptions = { zoom: 12, center: center, mapTypeId: google.maps.MapTypeId.ROADMAP, mapTypeControl: true, mapTypeControlOptions: { style: google.maps.MapTypeControlStyle.DROPDOWN_MENU }, scaleControl: true, scaleControlOptions: { position: google.maps.ControlPosition.BOTTOM_LEFT }, zoomControl: true, zoomControlOptions: { style: google.maps.ZoomControlStyle.SMALL, position: google.maps.ControlPosition.TOP_LEFT }}; map = new google.maps.Map(document.getElementById('map_canvas'), myOptions); setMarkers(map, locations); infowindow = new google.maps.InfoWindow({content: ''}); var homeControlDiv = document.createElement('DIV'); var homeControl = new HomeControl(homeControlDiv, map); homeControlDiv.index = 1; map.controls[google.maps.ControlPosition.TOP_RIGHT].push(homeControlDiv); } var locations = [ ["2173"," Engineering & Science Bldg","36.1457192","-86.8066559"," Engineering & Science Bldg","Highland Ave","","Nashville","TN","","37240","29","Thursday, June 07, 2018","0",""], ["982","214 Light Hall","36.1666667","-86.7833333","214 Light Hall","VUMC","","Nashville","TN","","","26","Friday, May 25, 2018","0",""], ["980","3401 West End Ave","36.1378452","-86.7290546","3401 West End Ave","","Nashville","TN","TN","","","3","Wednesday, May 30, 2018","0",""], ["2063","419 Light Hall","36.1432028","-86.8039240","419 Light Hall","Garland Street","","Nashville","TN","","","5","Wednesday, May 23, 2018","0",""], ["764","Baker Building Garage","36.140568","-86.800378","Baker Building Garage","110 21St Ave S","","Nashville","TN","USA","37203","1","Wednesday, July 18, 2018","0",""], ["1084","Barnes and Noble at Vanderbilt","36.1463543","-86.8083744","Barnes and Noble at Vanderbilt","2501 West End Avenue",""," Nashville","TN","","37203","4","Saturday, June 02, 2018","0",""], ["786","Benson Old Central","36.145025","-86.802138","Benson Old Central","2119 West End Ave","","Nashville","TN","USA","37240","1","Thursday, November 01, 2018","0",""], ["788","Buttrick Hall","36.14795","-86.802562","Buttrick Hall","390 24th Ave S","","Nashville","TN","USA","37240","2","Wednesday, August 15, 2018","0",""], ["1117","Children's Hospital - Theater","36.1392019","-86.8025827","Children's Hospital - Theater","2200 Children's Way","","Nashville","TN","","37232","6","Thursday, May 24, 2018","0",""], ["938","Community Room, Jean and Alexander Heard Library","36.1443747","-86.8027437","Community Room, Jean and Alexander Heard Library","Vanderbilt University","","Nashville","TN","United States","37204","2","Friday, June 01, 2018","0",""], ["1074","E. Bronson Ingram Studio Art Center","36.1449800","-86.8068573","E. Bronson Ingram Studio Art Center","1204 25th Avenue South","","nashville","TN","United States","37240","57","Wednesday, June 13, 2018","0",""], ["770","Godchaux Nursing Annex","36.13916","-86.80073","Godchaux Nursing Annex","461 21St Ave S","","Nashville","TN","USA","37232","1","Monday, June 04, 2018","0",""], ["1033","Green Hills Office Building","36.1426398","-86.8001068","Green Hills Office Building","VMG, 3841 Green Hills Village Drive","","Nashville","TN","","37232","2","Wednesday, June 20, 2018","0",""], ["988","Langford Auditorium","36.1447","-86.8027","Langford Auditorium","","","","TN","","","9","Wednesday, May 23, 2018","0",""], ["902","Light Hall ","36.1421640","-86.8024230","Light Hall ","2215 Garland Avenue","","Nashville","TN","USA","37232","6","Friday, June 08, 2018","0",""], ["2071","Light Hall, North Lobby","36.1421640","-86.8024230","Light Hall, North Lobby","2215 Garland Ave","","Nashville ","TN","","37232","1","Tuesday, June 05, 2018","0",""], ["813","Margaret Cuninggim Women's Center","36.147387","-86.804724","Margaret Cuninggim Women's Center","316 West Side Row","","Nashville","TN","USA","37240","1","Thursday, November 01, 2018","0",""], ["995","Medical Center East (MCE)","36.1447","-86.8027","Medical Center East (MCE)","","","","TN","","","5","Thursday, May 24, 2018","0",""], ["930","Medical Center East, South Tower","36.1447","-86.8027","Medical Center East, South Tower","",""," ","TN","","","19","Tuesday, June 19, 2018","0",""], ["943","Monroe Carell Jr Children's Hospital","36.1388929","-86.8022694","Monroe Carell Jr Children's Hospital","2200 Childrens Way","","Nashville","TN","USA","37232","12","Thursday, May 24, 2018","0",""], ["755","One Magnolia Circle","36.140573","-86.79949","One Magnolia Circle","110 Magnolia Cir","","Nashville","TN","USA","37212","1","Tuesday, June 05, 2018","0",""], ["907","Peabody Campus","36.1437507","-86.7964559","Peabody Campus","230 Appleton Place","","Nashville","TN","US","37203","1","Friday, September 14, 2018","0",""], ["800","Sarratt Student Center","36.145485","-86.803743","Sarratt Student Center","2302 Vanderbilt Pl","","Nashville","TN","USA","37240","8","Wednesday, May 23, 2018","0",""], ["857","Schulman Center Hillel","36.146391","-86.806373","Schulman Center Hillel","2421 Vanderbilt Pl","","Nashville","TN","USA","37212","19","Thursday, May 24, 2018","0",""], ["939","Vanderbilt Dyer Observatory","36.0527330","-86.8048080","Vanderbilt Dyer Observatory","1000 Oman Drive","","Brentwood","TN","","37027","21","Tuesday, June 05, 2018","0",""], ["1090","Vanderbilt Health 100 Oaks","36.1080624","-86.7639372","Vanderbilt Health 100 Oaks","719 Thompson Lane","","Nashville","TN","","37204","10","Thursday, May 24, 2018","0",""], ["1936","Vanderbilt Kennedy Center","36.1430906","-86.7994519","Vanderbilt Kennedy Center","110 Magnolia Circle","","Nashville","TN","","37203","3","Saturday, June 09, 2018","0",""], ["2054","Vanderbilt Medical Center","36.1413237","-86.8017829","Vanderbilt Medical Center","1211 Medical Center Drive","","Nashville ","TN","","37232","1","Wednesday, June 20, 2018","0",""], ["1047","Vanderbilt Medical Group - Brentwood Primary Care","35.9386511","-86.8579753","Vanderbilt Medical Group - Brentwood Primary Care","343 Franklin Road, Suite 101","","Franklin","TN","","37069-2255","1","Friday, July 20, 2018","0",""], ["1042","Vanderbilt Medical Group - Cool Springs Urology Clinic","35.9508220","-86.8204010","Vanderbilt Medical Group - Cool Springs Urology Clinic","2009 Mallory Lane, Suite 100","","Franklin","TN","","37067-2844","1","Friday, June 15, 2018","0",""], ["1041","Vanderbilt Medical Group - Oncology Clinic","35.9422130","-86.8288390","Vanderbilt Medical Group - Oncology Clinic","324 Cool Springs Blvd.","","Franklin ","TN","","37067-1631","2","Friday, June 15, 2018","0",""], ["1045","Vanderbilt Medical Group - Williamson County","35.9178798","-86.8197744","Vanderbilt Medical Group - Williamson County","2105 Edward Curd Lane ","","Franklin ","TN","","37067","1","Friday, July 20, 2018","0",""], ["2057","Vanderbilt University Fine Arts Gallery","36.1591258","-86.8050998","Vanderbilt University Fine Arts Gallery","1220 21st Avenue South","","Nashville","TN","","37203","39","Wednesday, May 23, 2018","0",""], ["918","Vanderbilt University Hospital","36.1413920","-86.8019910","Vanderbilt University Hospital","1211 Medical Center Drive","","Nashville","TN","USA","37232","585","Wednesday, May 23, 2018","0",""], ["1900","VUH 4203","36.1414463","-86.8015694","VUH 4203","1211 Medical Center Drive","","","TN","","","7","Tuesday, June 05, 2018","0",""], ["769","Wilson Hall","36.14068","-86.800694","Wilson Hall","111 21St Ave S","","Nashville","TN","USA","37240","2","Thursday, May 24, 2018","0",""], ]; function setMarkers(map, markers) { for (var i = 0; i < markers.length; i++) { if(markers[i] != undefined){ var location = markers[i]; var siteLatLng = new google.maps.LatLng(location[2], location[3]); var marker = new google.maps.Marker({ position: siteLatLng, map: map, title: location[1], html: '
'+location[1]+''+setIW(location)+'
', icon: 'https://events.vanderbilt.edu/img/pins/default.png' }); google.maps.event.addListener(marker, 'click', function(){ infowindow.setContent(this.html); infowindow.open(map, this); }); gmarkers.push(marker); } } } function setIW(loc){ var iw = (loc[5] != '') ? '' + loc[5] + '' : ''; iw += (loc[6] != '') ? ''+loc[6]+'' : ''; iw += (loc[7] != '') ? ''+loc[7]+'' : ''; iw += (loc[8] != '') ? ''+loc[8]+'' : ''; iw += (loc[10] != '') ? ''+loc[10]+'' : ''; iw += (loc[9] != '') ? ''+loc[9]+'' : ''; iw += (loc[13] == 1) ? 'Website: Click to Visit' : ''; iw += (loc[14] != '') ? 'Phone: '+loc[14]+'' : ''; iw += (loc[2] != '' && loc[3] != '') ? ''+loc[2]+', '+loc[3]+'' : ''; iw += (loc[11] != '') ? 'Events: '+loc[11]+'' : 'Events: 0'; iw += (loc[12] != '') ? 'Next Event: '+loc[12]+'' : ''; return iw; } function showIW(loc){ map.setZoom(16); google.maps.event.trigger(gmarkers[loc], 'click'); }