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","3","Monday, February 26, 2018","0",""], ["1038"," Vanderbilt Eye Institute (VEI)","36.1389716","-86.8003809"," Vanderbilt Eye Institute (VEI)","2311 Pierce Ave. ","","Nashville ","TN","","37232","1","Friday, March 09, 2018","0",""], ["982","214 Light Hall","36.1666667","-86.7833333","214 Light Hall","VUMC","","Nashville","TN","","","38","Friday, February 23, 2018","0",""], ["931","2525 West End Ave. ","36.1447","-86.8027","2525 West End Ave. ","","","","TN","","","6","Tuesday, February 20, 2018","0",""], ["2197","3131 MRB III","35.5174913","-86.5804473","3131 MRB III","","","","TN","","","1","Tuesday, February 20, 2018","0",""], ["980","3401 West End Ave","36.1378452","-86.7290546","3401 West End Ave","","Nashville","TN","TN","","","9","Friday, February 23, 2018","0",""], ["2063","419 Light Hall","36.1432028","-86.8039240","419 Light Hall","Garland Street","","Nashville","TN","","","4","Wednesday, February 21, 2018","0",""], ["1150","512 Light Hall","36.1421640","-86.8024230","512 Light Hall","2215 Garland Ave","","Nashville","TN","","37232","1","Friday, February 23, 2018","0",""], ["962","5326 Stevenson Center","36.1447","-86.8027","5326 Stevenson Center","","","","TN","","","2","Wednesday, February 21, 2018","0",""], ["797","Alumni Hall","36.145261","-86.803343","Alumni Hall","2205 West End Ave","","Nashville","TN","USA","37240","1","Wednesday, April 04, 2018","0",""], ["1316","Alumni Hall 201","36.1447","-86.8027","Alumni Hall 201","","","","TN","","","1","Thursday, March 01, 2018","0",""], ["1084","Barnes and Noble at Vanderbilt","36.1463543","-86.8083744","Barnes and Noble at Vanderbilt","2501 West End Avenue",""," Nashville","TN","","37203","2","Saturday, March 10, 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",""], ["900","Biological Sciences Building/Medical Research Building (MRB) III ","36.1445701","-86.8003339","Biological Sciences Building/Medical Research Building (MRB) III ","465 21st Ave S","","Nashville","TN","","37232","6","Wednesday, February 21, 2018","0",""], ["847","Blair School of Music","36.145704","-86.806011","Blair School of Music","2400 Blakemore Ave","","Nashville","TN","USA","37212","4","Saturday, February 24, 2018","0",""], ["1025","Blair School of Music, Ingram Hall","36.1412135","-86.8027772","Blair School of Music, Ingram Hall","2400 Blakemore Avenue","","Nashville","TN","","37212","24","Friday, February 23, 2018","0",""], ["788","Buttrick Hall","36.14795","-86.802562","Buttrick Hall","390 24th Ave S","","Nashville","TN","USA","37240","23","Wednesday, February 21, 2018","0",""], ["762","Central & Divinity Libraries","36.149464","-86.800204","Central & Divinity Libraries","419 21St Ave S","","Nashville","TN","USA","37240","6","Friday, February 23, 2018","0",""], ["1117","Children's Hospital - Theater","36.1392019","-86.8025827","Children's Hospital - Theater","2200 Children's Way","","Nashville","TN","","37232","5","Friday, March 09, 2018","0",""], ["754","Cohen Memorial Hall","36.141554","-86.799382","Cohen Memorial Hall","1220 21St Ave S","","Nashville","TN","USA","37212","1","Wednesday, February 21, 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","Tuesday, March 13, 2018","0",""], ["1033","Green Hills Office Building","36.1426398","-86.8001068","Green Hills Office Building","VMG, 3841 Green Hills Village Drive","","Nashville","TN","","37232","1","Wednesday, February 21, 2018","0",""], ["736","Hobbs Hall","36.143871","-86.797787","Hobbs Hall","1818 Horton Ave","","Nashville","TN","USA","37212","1","Friday, April 06, 2018","0",""], ["742","Jesup Psychology","36.143887","-86.798256","Jesup Psychology","1820 Horton Ave","","Nashville","TN","USA","37212","1","Thursday, February 22, 2018","0",""], ["988","Langford Auditorium","36.1447","-86.8027","Langford Auditorium","","","","TN","","","3","Tuesday, February 20, 2018","0",""], ["902","Light Hall ","36.1421640","-86.8024230","Light Hall ","2215 Garland Avenue","","Nashville","TN","USA","37232","11","Tuesday, February 20, 2018","0",""], ["2071","Light Hall, North Lobby","36.1421640","-86.8024230","Light Hall, North Lobby","2215 Garland Ave","","Nashville ","TN","","37232","10","Thursday, February 22, 2018","0",""], ["734","Mayborn Building","36.14238","-86.797672","Mayborn Building","130 Magnolia Cir","","Nashville","TN","USA","37212","2","Friday, February 23, 2018","0",""], ["995","Medical Center East (MCE)","36.1447","-86.8027","Medical Center East (MCE)","","","","TN","","","6","Tuesday, February 20, 2018","0",""], ["930","Medical Center East, South Tower","36.1447","-86.8027","Medical Center East, South Tower","",""," ","TN","","","25","Tuesday, February 20, 2018","0",""], ["1036","Medical Center North ","36.1426398","-86.8001068","Medical Center North ","VUH","","Nashville ","TN","","37232 ","4","Tuesday, February 20, 2018","0",""], ["767","Medical Research Building (MRB) II (Preston Cancer Research Building)","36.140360","-86.802708","Medical Research Building (MRB) II (Preston Cancer Research Building)","465 21St Ave S","","Nashville","TN","USA","37232","2","Thursday, March 01, 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","19","Tuesday, February 20, 2018","0",""], ["1055","MRBIII","36.1445701","-86.8003339","MRBIII","465 21st Avenue South","","Nashville","TN","","37232","1","Wednesday, April 11, 2018","0",""], ["790","Neely Auditorium","36.14524","-86.80301","Neely Auditorium","2203 West End Ave","","Nashville","TN","USA","37240","2","Tuesday, February 27, 2018","0",""], ["750","Peabody Library","36.141371","-86.799203","Peabody Library","1210 21St Ave S","","Nashville","TN","USA","37212","1","Thursday, April 26, 2018","0",""], ["1063","Robert Penn Warren Center","36.1462046","-86.8039011","Robert Penn Warren Center","2301 Vanderbilt Place","","Nashville","TN","","37235","20","Thursday, February 22, 2018","0",""], ["857","Schulman Center Hillel","36.146391","-86.806373","Schulman Center Hillel","2421 Vanderbilt Pl","","Nashville","TN","USA","37212","32","Thursday, February 22, 2018","0",""], ["2164","Steve and Judy Turner Recital Hall","36.1386200","-86.8060680","Steve and Judy Turner Recital Hall","2400 Blakemore Avenue","","Nashville","TN","","37212","33","Tuesday, February 20, 2018","0",""], ["1086","Stevenson Center","36.1457192","-86.8066559","Stevenson Center","","","Nashville","TN","","37240","2","Monday, February 26, 2018","0",""], ["1039","The Vanderbilt Clinic (TVC)","36.1426398","-86.8001068","The Vanderbilt Clinic (TVC)","1301 Medical Center ","","Nashville ","TN","","37232","2","Thursday, February 22, 2018","0",""], ["2206","The Wondry","36.1429026","-86.8059497","The Wondry","2414 Highland Ave","Suite 102","Nashville ","TN","USA","37212","4","Tuesday, February 20, 2018","0",""], ["1619","Vanderbilt Divinity School","36.1466963","-86.8007657","Vanderbilt Divinity School","411 21st Avenue South","","Nashville","TN","USA","37240","1","Thursday, February 22, 2018","0",""], ["939","Vanderbilt Dyer Observatory","36.0527330","-86.8048080","Vanderbilt Dyer Observatory","1000 Oman Drive","","Brentwood","TN","","37027","17","Tuesday, March 06, 2018","0",""], ["1090","Vanderbilt Health 100 Oaks","36.1080624","-86.7639372","Vanderbilt Health 100 Oaks","719 Thompson Lane","","Nashville","TN","","37204","54","Thursday, February 22, 2018","0",""], ["1936","Vanderbilt Kennedy Center","36.1430906","-86.7994519","Vanderbilt Kennedy Center","110 Magnolia Circle","","Nashville","TN","","37203","2","Saturday, March 17, 2018","0",""], ["897","Vanderbilt Law School","36.1481438","-86.8000764","Vanderbilt Law School","131 21st Ave South","","Nashville","TN","USA","37203","10","Tuesday, February 20, 2018","0",""], ["1330","Vanderbilt Legends Club ","35.9502683","-86.8442516","Vanderbilt Legends Club ","1500 Legends Club Lane ","","Fraklin","TN","","37069","1","Saturday, February 24, 2018","0",""], ["1907","Vanderbilt Medical Center","36.1414463","-86.8015694","Vanderbilt Medical Center","1211 Medical Center Drive","","Nashville","TN","","37232","9","Tuesday, February 20, 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, March 16, 2018","0",""], ["1115","Vanderbilt Psychiatric Hospital","36.1384700","-86.8040230","Vanderbilt Psychiatric Hospital","1601 23rd Ave. S.","","Nashville ","TN","","37212","1","Thursday, February 22, 2018","0",""], ["998","Vanderbilt School of Nursing","36.1447","-86.8027","Vanderbilt School of Nursing","","","","TN","","","1","Saturday, March 03, 2018","0",""], ["2057","Vanderbilt University Fine Arts Gallery","36.1591258","-86.8050998","Vanderbilt University Fine Arts Gallery","1220 21st Avenue South","","Nashville","TN","","37203","22","Tuesday, February 20, 2018","0",""], ["918","Vanderbilt University Hospital","36.1413920","-86.8019910","Vanderbilt University Hospital","1211 Medical Center Drive","","Nashville","TN","USA","37232","675","Tuesday, February 20, 2018","0",""], ["1900","VUH 4203","36.1414463","-86.8015694","VUH 4203","1211 Medical Center Drive","","","TN","","","10","Tuesday, March 06, 2018","0",""], ["769","Wilson Hall","36.14068","-86.800694","Wilson Hall","111 21St Ave S","","Nashville","TN","USA","37240","9","Tuesday, February 20, 2018","0",""], ["746","Wyatt Center","36.144213","-86.799005","Wyatt Center","1930 South Dr","","Nashville","TN","USA","37212","1","Monday, April 02, 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'); }