function addMarkers(){ mySelect = document.getElementById('selection'); Memphis = [];Eads = [];Germantown = [];Cordova = [];Millington = [];Arlington = [];Collierville = [];mySelect.options[mySelect.options.length] = new Option("Arlington schools",'all=Arlington'); mySelect.options[mySelect.options.length] = new Option("Collierville schools",'all=Collierville'); mySelect.options[mySelect.options.length] = new Option("Cordova schools",'all=Cordova'); mySelect.options[mySelect.options.length] = new Option("Eads schools",'all=Eads'); mySelect.options[mySelect.options.length] = new Option("Germantown schools",'all=Germantown'); mySelect.options[mySelect.options.length] = new Option("Memphis schools",'all=Memphis'); mySelect.options[mySelect.options.length] = new Option("Millington schools",'all=Millington'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Memphis[Memphis.length] = createMarker(new GPoint(-90.01468600,35.02086300),"
Bishop Byrne Middle High School
1475 East Shelby Drive
Memphis, TN 38116
Co-ed school, 7-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bishop Byrne Middle High School",'Memphis=' + Memphis.length); Eads[Eads.length] = createMarker(new GPoint(-89.72804900,35.12950000),"
Briarcrest Christian High School
76 S. Houston Levee Road
Eads, TN 38028
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Briarcrest Christian High School",'Eads=' + Eads.length); Eads[Eads.length] = createMarker(new GPoint(-89.72305900,35.11709000),"
Briarcrest Christian School
76 S. Houston Levee Road
Eads, TN 38028
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Briarcrest Christian School",'Eads=' + Eads.length); Memphis[Memphis.length] = createMarker(new GPoint(-89.77544700,35.20484000),"
Brunswick Day School At Lakesi
2911 Brunswick Road
Memphis, TN 38133
Co-ed school, 2-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Brunswick Day School At Lakesi",'Memphis=' + Memphis.length); Memphis[Memphis.length] = createMarker(new GPoint(-89.84306400,35.04458000),"
Calvary Baptist Academy
3812 Kirby Parkway
Memphis, TN 38115
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Calvary Baptist Academy",'Memphis=' + Memphis.length); Memphis[Memphis.length] = createMarker(new GPoint(-89.88110400,35.18488900),"
Central Baptist School
5470 Raleigh Lagrange Road
Memphis, TN 38134
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Central Baptist School",'Memphis=' + Memphis.length); Memphis[Memphis.length] = createMarker(new GPoint(-89.77022900,35.04803700),"
Christ The Rock Christian Academy
8800 Winchester Road
Memphis, TN 38125
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Christ The Rock Christian Academy",'Memphis=' + Memphis.length); Memphis[Memphis.length] = createMarker(new GPoint(-89.86429900,35.13099800),"
Christian Brothers High School
5900 Walnut Grove Rd
Memphis, TN 38120
All-boys school, 9-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Christian Brothers High School",'Memphis=' + Memphis.length); Memphis[Memphis.length] = createMarker(new GPoint(-89.89717200,35.13074000),"
Concord Academy Inc
4942 Walnut Grove Road
Memphis, TN 38117
Co-ed school, 6-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Concord Academy Inc",'Memphis=' + Memphis.length); Germantown[Germantown.length] = createMarker(new GPoint(-89.81058100,35.08733700),"
Daybreak Specialized School
2262 S Germantown Road
Germantown, TN 38138
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Daybreak Specialized School",'Germantown=' + Germantown.length); Memphis[Memphis.length] = createMarker(new GPoint(-89.92257700,35.08464800),"
Elliston Baptist Academy
4179 Elliston Rd
Memphis, TN 38111
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Elliston Baptist Academy",'Memphis=' + Memphis.length); Cordova[Cordova.length] = createMarker(new GPoint(-89.77610000,35.15550000),"
Evangelical Christian School
Po Box 1030
Cordova, TN 38088
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Evangelical Christian School",'Cordova=' + Cordova.length); Millington[Millington.length] = createMarker(new GPoint(-89.90180000,35.34100000),"
Faith Heritage Christian Academy
Po Box 157
Millington, TN 38083
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Faith Heritage Christian Academy",'Millington=' + Millington.length); Cordova[Cordova.length] = createMarker(new GPoint(-89.77426500,35.12764000),"
First Assembly Christian School
8650 Walnut Grove Road
Cordova, TN 38018
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("First Assembly Christian School",'Cordova=' + Cordova.length); Memphis[Memphis.length] = createMarker(new GPoint(-90.00338100,35.22986400),"
Frayser Academy Of Christian Education
3820 North Watkins Street
Memphis, TN 38127
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Frayser Academy Of Christian Education",'Memphis=' + Memphis.length); Memphis[Memphis.length] = createMarker(new GPoint(-89.91134900,35.15357000),"
Grace Christian School
816 Berclair Road
Memphis, TN 38122
Co-ed school, 1-11
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Grace Christian School",'Memphis=' + Memphis.length); Memphis[Memphis.length] = createMarker(new GPoint(-89.91880800,35.17238700),"
Grey Road Christian Academy
4248 Grey Road
Memphis, TN 38108
Co-ed school, PK-10
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Grey Road Christian Academy",'Memphis=' + Memphis.length); Memphis[Memphis.length] = createMarker(new GPoint(-89.91572000,35.10002400),"
Harding Academy Of Memphis
1100 Cherry Road
Memphis, TN 38117
Co-ed school, 7-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Harding Academy Of Memphis",'Memphis=' + Memphis.length); Memphis[Memphis.length] = createMarker(new GPoint(-90.03195500,35.16459300),"
Helicon School @ Porterheath
868 N Manassas
Memphis, TN 38107
Co-ed school, 6-11
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Helicon School @ Porterheath",'Memphis=' + Memphis.length); Memphis[Memphis.length] = createMarker(new GPoint(-89.92938900,35.17819500),"
Heritage Baptist Academy
Po Box 280709
Memphis, TN 38168
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Heritage Baptist Academy",'Memphis=' + Memphis.length); Memphis[Memphis.length] = createMarker(new GPoint(-89.85850400,35.09172900),"
Hutchison School
1740 Ridgeway Road
Memphis, TN 38119
All-girls school, PK-12
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Hutchison School",'Memphis=' + Memphis.length); Memphis[Memphis.length] = createMarker(new GPoint(-90.00431100,35.12612400),"
Immaculate Comception Mid. - High School
1725 Central Avenue
Memphis, TN 38104
All-girls school, 9-12
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Immaculate Comception Mid. - High School",'Memphis=' + Memphis.length); Memphis[Memphis.length] = createMarker(new GPoint(-89.85168700,35.11078400),"
Lausanne Collegiate School
1381 W Massey Rd
Memphis, TN 38120
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lausanne Collegiate School",'Memphis=' + Memphis.length); Millington[Millington.length] = createMarker(new GPoint(-89.94179700,35.35186500),"
Lighthouse Christian Academy
3660 Shelby Road
Millington, TN 38053
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lighthouse Christian Academy",'Millington=' + Millington.length); Germantown[Germantown.length] = createMarker(new GPoint(-89.82983300,35.09698500),"
Madonna Learning Center
7007 Poplar Avenue
Germantown, TN 38138
Co-ed school, NS-NS
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Madonna Learning Center",'Germantown=' + Germantown.length); Memphis[Memphis.length] = createMarker(new GPoint(-89.88763100,35.12073900),"
Margolin Hebrew Academy
390 S White Station Road
Memphis, TN 38117
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Margolin Hebrew Academy",'Memphis=' + Memphis.length); Memphis[Memphis.length] = createMarker(new GPoint(-90.05358000,35.16191200),"
Maria Montessori School
740 Harbor Bend Road
Memphis, TN 38103
Co-ed school, NS-NS
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Maria Montessori School",'Memphis=' + Memphis.length); Memphis[Memphis.length] = createMarker(new GPoint(-89.99963300,35.13928000),"
Memphis Cath High School - Middle School
61 N Mclean Boulevard
Memphis, TN 38104
Co-ed school, 7-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Memphis Cath High School - Middle School",'Memphis=' + Memphis.length); Memphis[Memphis.length] = createMarker(new GPoint(-89.89829900,35.13219600),"
Memphis Junior Academy
50 N Mendenhall Road
Memphis, TN 38117
Co-ed school, NS-10
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Memphis Junior Academy",'Memphis=' + Memphis.length); Memphis[Memphis.length] = createMarker(new GPoint(-90.01936900,35.14432400),"
Memphis Recovery Center
1234 Poplar Avenue
Memphis, TN 38104
All-boys school, 8-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Memphis Recovery Center",'Memphis=' + Memphis.length); Memphis[Memphis.length] = createMarker(new GPoint(-89.85625600,35.09959300),"
Memphis University School
6191 Park Avenue
Memphis, TN 38119
All-boys school, 7-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Memphis University School",'Memphis=' + Memphis.length); Arlington[Arlington.length] = createMarker(new GPoint(-89.68823000,35.20465500),"
Morris Wilson Campus School
2890 Bekemeyer Road
Arlington, TN 38002
Co-ed school, 2-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Morris Wilson Campus School",'Arlington=' + Arlington.length); Memphis[Memphis.length] = createMarker(new GPoint(-89.81612000,35.23565800),"
Nicholas Hobbs Academy
7410 Memphis Arlington Road
Memphis, TN 38135
Co-ed school, 2-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Nicholas Hobbs Academy",'Memphis=' + Memphis.length); Germantown[Germantown.length] = createMarker(new GPoint(-89.81015700,35.08550800),"
The Phoenix School For Creative Learning
2320 S Germantown Road
Germantown, TN 38138
Co-ed school, 6-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Phoenix School For Creative Learning",'Germantown=' + Germantown.length); Germantown[Germantown.length] = createMarker(new GPoint(-89.81016300,35.08551200),"
Phoenix School For Creative Lrng
2320 S. Germantown Rd.
Germantown, TN 38138
Co-ed school, 6-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Phoenix School For Creative Lrng",'Germantown=' + Germantown.length); Memphis[Memphis.length] = createMarker(new GPoint(-89.90123600,35.13107900),"
St. Agnes Academy-st Dominic School
4830 Walnut Grove Rd
Memphis, TN 38117
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Agnes Academy-st Dominic School",'Memphis=' + Memphis.length); Cordova[Cordova.length] = createMarker(new GPoint(-89.79058600,35.18760600),"
St. Benedict At Auburndale
8250 Varnavas Drive
Cordova, TN 38016
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Benedict At Auburndale",'Cordova=' + Cordova.length); Collierville[Collierville.length] = createMarker(new GPoint(-89.72993900,35.09533000),"
St. Georges Independent School
1880 Wolf River Blvd.
Collierville, TN 38017
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Georges Independent School",'Collierville=' + Collierville.length); Memphis[Memphis.length] = createMarker(new GPoint(-89.89816700,35.14516300),"
Shady Oaks School
501 N. Mendenhall Rd.
Memphis, TN 38117
Co-ed school, Ungraded
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Shady Oaks School",'Memphis=' + Memphis.length); Memphis[Memphis.length] = createMarker(new GPoint(-89.93597200,35.05584900),"
Shelby Training Center
3420 Old Getwell Road
Memphis, TN 38118
All-boys school, 7-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Shelby Training Center",'Memphis=' + Memphis.length); Memphis[Memphis.length] = createMarker(new GPoint(-89.90855700,35.12956500),"
St Mary's Episcopal School
60 Perkins Extended
Memphis, TN 38117
All-girls school, PK-12
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("St Mary's Episcopal School",'Memphis=' + Memphis.length); Millington[Millington.length] = createMarker(new GPoint(-89.77198100,35.36363900),"
Tipton-rosemark Academy
8696 Rosemark Road
Millington, TN 38053
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Tipton-rosemark Academy",'Millington=' + Millington.length); Memphis[Memphis.length] = createMarker(new GPoint(-89.85777600,35.18230600),"
Trafalgar Village Bapt Dc/kg
6161 Summer Avenue
Memphis, TN 38134
Co-ed school, KG-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Trafalgar Village Bapt Dc/kg",'Memphis=' + Memphis.length); Millington[Millington.length] = createMarker(new GPoint(-89.96448100,35.29231400),"
Woodlawn Baptist Academy
6083 Old Millington Road
Millington, TN 38053
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Woodlawn Baptist Academy",'Millington=' + Millington.length); Memphis[Memphis.length] = createMarker(new GPoint(-89.94509800,35.08673800),"
Word Of Faith Christian Academy
3528 Sharpe Avenue
Memphis, TN 38111
Co-ed school, PK-10
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Word Of Faith Christian Academy",'Memphis=' + Memphis.length); Memphis[Memphis.length] = createMarker(new GPoint(-90.04656100,35.13604600),"
Y.d.a.c.-mid-town Mental Health
450 E Pontotoc Avenue
Memphis, TN 38126
Co-ed school, 6-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Y.d.a.c.-mid-town Mental Health",'Memphis=' + Memphis.length); Memphis[Memphis.length] = createMarker(new GPoint(-89.85127200,35.15557600),"
Youth Habilitation Center
1071 Mullins Station Road
Memphis, TN 38134
All-boys school, 7-11
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Youth Habilitation Center",'Memphis=' + Memphis.length); } // End addStateMarkers JavaScript Function // Takes an array of markers and centers/zooms map based on marker range function centerByArray(myArray, recenter, newMaxMin) { if (newMaxMin == true) reMaxMin(myArray); for (var i = 0; i < myArray.length; i++) { var markLng = myArray[i].getPoint().x; var markLat = myArray[i].getPoint().y; if (markLat > maxLat) maxLat = markLat; if (markLng > maxLng) maxLng = markLng; if (markLat < minLat) minLat = markLat; if (markLng < minLng) minLng = markLng; } if (recenter) reCenterMap(); } // Reinit max/mins function reMaxMin(myArray) { maxLng = myArray[0].getPoint().x; maxLat = myArray[0].getPoint().y; minLng = myArray[0].getPoint().x; minLat = myArray[0].getPoint().y; } // Recenter map based on global max/mins function reCenterMap() { var bounds = new GLatLngBounds(); bounds.extend(new GLatLng(minLat, minLng)); bounds.extend(new GLatLng(maxLat, maxLng)); var center_lat = (bounds.getNorthEast().lat() + bounds.getSouthWest().lat()) / 2.0; var center_lng = (bounds.getNorthEast().lng() + bounds.getSouthWest().lng()) / 2.0; var center = new GLatLng(center_lat, center_lng); var zoom = map.getBoundsZoomLevel(bounds); map.setCenter(center,zoom); //map.setCenter(center,11); /* var center = new GPoint( (maxLng + minLng)/2, (maxLat+minLat)/2 ); var delta = new GSize(maxLng - minLng, maxLat - minLat); var minZoom = map.spec.getLowestZoomLevel(center, delta, map.viewSize); if (minZoom < 4) minZoom = 4; // Lowest possible zoom is 4 map.centerAndZoom(center, minZoom); */ } // Fires when drop down list of schools changes function selectChange(selection) { var myVal = selection.options[selection.selectedIndex].value; map.closeInfoWindow(); // Add entire array based on variable type if (myVal.indexOf('all') != -1 && myVal != 'all') { var temp = myVal.split('='); var showArray = temp[1]; // If Array is > X amount of markers, then open in a new page if (eval(showArray).length > 20) // New window depends on whether or not we're on the search page if (location.href.indexOf('nearby_schools.php') == -1) window.open(location.href + '/map/' + showArray); else window.open('/search/////2/' + showArray); map.removeOverlays(Arlington); map.removeOverlays(Collierville); map.removeOverlays(Cordova); map.removeOverlays(Eads); map.removeOverlays(Germantown); map.removeOverlays(Memphis); map.removeOverlays(Millington); map.addOverlays(eval(showArray)); centerByArray(eval(showArray), true, true); // Center and zoom on set of markers } // Add individual markers if (myVal.indexOf('all') == -1 && myVal != 'all' && myVal.length) { var temp = myVal.split('='); var myArray = temp[0]; var myIndex = parseInt(temp[1]) - 1; document.getElementById('map').width = "750"; map.removeOverlay(eval(myArray)[myIndex]); map.addOverlay(eval(myArray)[myIndex]); GEvent.trigger(eval(myArray)[myIndex],'click'); } // Show all markers if (myVal == 'all') { cntMarker = 0; reMaxMin(Memphis);map.removeOverlays(Arlington); map.removeOverlays(Collierville); map.removeOverlays(Cordova); map.removeOverlays(Eads); map.removeOverlays(Germantown); map.removeOverlays(Memphis); map.removeOverlays(Millington); map.addOverlays(Arlington); centerByArray(Arlington, false, false); cntMarker += Arlington.length; map.addOverlays(Collierville); centerByArray(Collierville, false, false); cntMarker += Collierville.length; map.addOverlays(Cordova); centerByArray(Cordova, false, false); cntMarker += Cordova.length; map.addOverlays(Eads); centerByArray(Eads, false, false); cntMarker += Eads.length; map.addOverlays(Germantown); centerByArray(Germantown, false, false); cntMarker += Germantown.length; map.addOverlays(Memphis); centerByArray(Memphis, false, false); cntMarker += Memphis.length; map.addOverlays(Millington); centerByArray(Millington, false, false); cntMarker += Millington.length; centerByArray(Memphis,true, false); if (cntMarker > 20) // New window depends on whether or not we're on the search page if (location.href.indexOf('schools-by-distance') == -1) window.open(location.href + '/map/all'); else window.open('/search////all'); //window.open('/map.php?type=1&schools=&school_level=2&radius=&zipcode=&school_type_search=&school_type_code='); } } function createMarker(point, label, icon) { var marker = new GMarker(point, icon); var html = label; GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml(html); }); return marker; }