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","2","Friday, December 01, 2017","0",""], ["982","214 Light Hall","36.1666667","-86.7833333","214 Light Hall","VUMC","","Nashville","TN","","","51","Monday, November 27, 2017","0",""], ["797","Alumni Hall","36.145261","-86.803343","Alumni Hall","2205 West End Ave","","Nashville","TN","USA","37240","1","Monday, January 29, 2018","0",""], ["1316","Alumni Hall 201","36.1447","-86.8027","Alumni Hall 201","","","","TN","","","1","Wednesday, November 29, 2017","0",""], ["1084","Barnes and Noble at Vanderbilt","36.1463543","-86.8083744","Barnes and Noble at Vanderbilt","2501 West End Avenue",""," Nashville","TN","","37203","1","Wednesday, November 29, 2017","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","3","Wednesday, December 06, 2017","0",""], ["1528","Bishop Joseph Johnson Black Cultural Center","36.1489935","-86.8041151","Bishop Joseph Johnson Black Cultural Center","Black Cultural Center Building","2301 Vanderbilt Place ","Nashville","TN","United States","37235","1","Tuesday, January 16, 2018","0",""], ["847","Blair School of Music","36.145704","-86.806011","Blair School of Music","2400 Blakemore Ave","","Nashville","TN","USA","37212","2","Friday, December 01, 2017","0",""], ["1025","Blair School of Music, Ingram Hall","36.1412135","-86.8027772","Blair School of Music, Ingram Hall","2400 Blakemore Avenue","","Nashville","TN","","37212","12","Thursday, November 30, 2017","0",""], ["788","Buttrick Hall","36.14795","-86.802562","Buttrick Hall","390 24th Ave S","","Nashville","TN","USA","37240","37","Monday, November 27, 2017","0",""], ["1117","Children's Hospital - Theater","36.1392019","-86.8025827","Children's Hospital - Theater","2200 Children's Way","","Nashville","TN","","37232","1","Tuesday, November 28, 2017","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",""], ["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","10","Friday, November 24, 2017","0",""], ["1264","Frist Center for the Visual Arts","36.1447","-86.8027","Frist Center for the Visual Arts","","","","TN","","","1","Tuesday, December 12, 2017","0",""], ["1113","ISDE, Large Conference Room","36.1447","-86.8027","ISDE, Large Conference Room","","","","TN","","","1","Wednesday, November 29, 2017","0",""], ["742","Jesup Psychology","36.143887","-86.798256","Jesup Psychology","1820 Horton Ave","","Nashville","TN","USA","37212","1","Thursday, November 30, 2017","0",""], ["988","Langford Auditorium","36.1447","-86.8027","Langford Auditorium","","","","TN","","","5","Thursday, December 07, 2017","0",""], ["902","Light Hall ","36.1421640","-86.8024230","Light Hall ","2215 Garland Avenue","","Nashville","TN","USA","37232","14","Wednesday, November 29, 2017","0",""], ["2071","Light Hall, North Lobby","36.1421640","-86.8024230","Light Hall, North Lobby","2215 Garland Ave","","Nashville ","TN","","37232","3","Tuesday, December 05, 2017","0",""], ["734","Mayborn Building","36.14238","-86.797672","Mayborn Building","130 Magnolia Cir","","Nashville","TN","USA","37212","1","Thursday, November 30, 2017","0",""], ["883","Mcgugin Complex","36.146529","-86.808921","Mcgugin Complex","2601 Jess Neely Dr","","Nashville","TN","USA","37212","1","Friday, December 08, 2017","0",""], ["995","Medical Center East (MCE)","36.1447","-86.8027","Medical Center East (MCE)","","","","TN","","","12","Monday, November 27, 2017","0",""], ["930","Medical Center East, South Tower","36.1447","-86.8027","Medical Center East, South Tower","",""," ","TN","","","26","Friday, December 01, 2017","0",""], ["1036","Medical Center North ","36.1426398","-86.8001068","Medical Center North ","VUH","","Nashville ","TN","","37232 ","1","Wednesday, December 20, 2017","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","1","Thursday, December 14, 2017","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","2","Friday, December 01, 2017","0",""], ["1055","MRBIII","36.1445701","-86.8003339","MRBIII","465 21st Avenue South","","Nashville","TN","","37232","1","Wednesday, April 11, 2018","0",""], ["2178","Neyland Stadium","35.9509864","-83.9252960","Neyland Stadium","1600 Phillip Fulmer Way","","Knoxville","TN","","37916","1","Saturday, November 25, 2017","0",""], ["755","One Magnolia Circle","36.140573","-86.79949","One Magnolia Circle","110 Magnolia Cir","","Nashville","TN","USA","37212","1","Thursday, December 07, 2017","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","6","Thursday, November 30, 2017","0",""], ["800","Sarratt Student Center","36.145485","-86.803743","Sarratt Student Center","2302 Vanderbilt Pl","","Nashville","TN","USA","37240","54","Friday, November 24, 2017","0",""], ["2164","Steve and Judy Turner Recital Hall","36.1386200","-86.8060680","Steve and Judy Turner Recital Hall","2400 Blakemore Avenue","","Nashville","TN","","37212","11","Tuesday, November 28, 2017","0",""], ["1086","Stevenson Center","36.1457192","-86.8066559","Stevenson Center","","","Nashville","TN","","37240","1","Monday, December 04, 2017","0",""], ["940","TPAC","36.1650480","-86.7816860","TPAC","505 Deaderick Street","","Nashville","TN","","37243","1","Tuesday, November 28, 2017","0",""], ["1106","Vanderbilt Campus","36.1447","-86.8027","Vanderbilt Campus","","","","TN","","","1","Saturday, December 09, 2017","0",""], ["1090","Vanderbilt Health 100 Oaks","36.1080624","-86.7639372","Vanderbilt Health 100 Oaks","719 Thompson Lane","","Nashville","TN","","37204","5","Thursday, November 30, 2017","0",""], ["1936","Vanderbilt Kennedy Center","36.1430906","-86.7994519","Vanderbilt Kennedy Center","110 Magnolia Circle","","Nashville","TN","","37203","4","Saturday, December 02, 2017","0",""], ["897","Vanderbilt Law School","36.1481438","-86.8000764","Vanderbilt Law School","131 21st Ave South","","Nashville","TN","USA","37203","4","Tuesday, February 06, 2018","0",""], ["2054","Vanderbilt Medical Center","36.1413237","-86.8017829","Vanderbilt Medical Center","1211 Medical Center Drive","","Nashville ","TN","","37232","9","Friday, November 24, 2017","0",""], ["1907","Vanderbilt Medical Center","36.1414463","-86.8015694","Vanderbilt Medical Center","1211 Medical Center Drive","","Nashville","TN","","37232","15","Thursday, November 30, 2017","0",""], ["1046","Vanderbilt Medical Group - Bone & Joint Clinic ","35.9065080","-86.8389200","Vanderbilt Medical Group - Bone & Joint Clinic ","206 Bedford Way","","Franklin ","TN","","37064-5526","5","Wednesday, November 29, 2017","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","2","Friday, December 15, 2017","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","2","Friday, December 08, 2017","0",""], ["1045","Vanderbilt Medical Group - Williamson County","35.9178798","-86.8197744","Vanderbilt Medical Group - Williamson County","2105 Edward Curd Lane ","","Franklin ","TN","","37067","2","Friday, December 15, 2017","0",""], ["882","Vanderbilt Recreation and Wellness Center","36.146537","-86.808918","Vanderbilt Recreation and Wellness Center","2700 Childrens Way","","Nashville","TN","USA","37212","1","Saturday, February 17, 2018","0",""], ["2057","Vanderbilt University Fine Arts Gallery","36.1591258","-86.8050998","Vanderbilt University Fine Arts Gallery","1220 21st Avenue South","","Nashville","TN","","37203","14","Friday, November 24, 2017","0",""], ["918","Vanderbilt University Hospital","36.1413920","-86.8019910","Vanderbilt University Hospital","1211 Medical Center Drive","","Nashville","TN","USA","37232","4","Saturday, November 25, 2017","0",""], ["1032","VUSE-ISIS Building","36.1448748","-86.7932214","VUSE-ISIS Building","1025 16th Ave S, ","","Nashville","TN","","37212","1","Thursday, November 30, 2017","0",""], ["769","Wilson Hall","36.14068","-86.800694","Wilson Hall","111 21St Ave S","","Nashville","TN","USA","37240","7","Tuesday, November 28, 2017","0",""], ["746","Wyatt Center","36.144213","-86.799005","Wyatt Center","1930 South Dr","","Nashville","TN","USA","37212","2","Monday, November 27, 2017","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'); }