function addMarkers(){ mySelect = document.getElementById('selection'); Saint_Louis = [];Webster_Groves = [];Florissant = [];Chesterfield = [];Manchester = [];Olivette = [];Kirkwood = [];mySelect.options[mySelect.options.length] = new Option("Chesterfield schools",'all=Chesterfield'); mySelect.options[mySelect.options.length] = new Option("Florissant schools",'all=Florissant'); mySelect.options[mySelect.options.length] = new Option("Kirkwood schools",'all=Kirkwood'); mySelect.options[mySelect.options.length] = new Option("Manchester schools",'all=Manchester'); mySelect.options[mySelect.options.length] = new Option("Olivette schools",'all=Olivette'); mySelect.options[mySelect.options.length] = new Option("Saint Louis schools",'all=Saint_Louis'); mySelect.options[mySelect.options.length] = new Option("Webster Groves schools",'all=Webster_Groves'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Saint_Louis[Saint_Louis.length] = createMarker(new GPoint(-90.45889300,38.55564100),"
Apprende Private School
2495 Marshall Road
Saint Louis, MO 63122
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Apprende Private School",'Saint_Louis=' + Saint_Louis.length); Saint_Louis[Saint_Louis.length] = createMarker(new GPoint(-90.33710900,38.66032500),"
Bais Yaakov High School Of St Louis
700 N And South Road
Saint Louis, MO 63130
All-girls school, 9-12
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Bais Yaakov High School Of St Louis",'Saint_Louis=' + Saint_Louis.length); Saint_Louis[Saint_Louis.length] = createMarker(new GPoint(-90.39452300,38.68011300),"
Block Yeshiva High School
1146 North Warson
Saint Louis, MO 63132
All-boys school, 9-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Block Yeshiva High School",'Saint_Louis=' + Saint_Louis.length); Saint_Louis[Saint_Louis.length] = createMarker(new GPoint(-90.40562800,38.65073600),"
Chaminade College Preparatory School
425 S Lindbergh Blvd
Saint Louis, MO 63131
All-boys school, 6-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Chaminade College Preparatory School",'Saint_Louis=' + Saint_Louis.length); Saint_Louis[Saint_Louis.length] = createMarker(new GPoint(-90.40687300,38.69968700),"
Christian Academy Of Greater St Louis
11050 North Warson Road
Saint Louis, MO 63114
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Christian Academy Of Greater St Louis",'Saint_Louis=' + Saint_Louis.length); Saint_Louis[Saint_Louis.length] = createMarker(new GPoint(-90.45104700,38.63214500),"
Churchill Center & School for Learning Disabilities
1021 Municipal Center Drive
Saint Louis, MO 63131
Co-ed school, 1-10
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Churchill Center & School for Learning Disabilities",'Saint_Louis=' + Saint_Louis.length); Saint_Louis[Saint_Louis.length] = createMarker(new GPoint(-90.37154200,38.63975600),"
Churchill School
1035 Price School Lane
Saint Louis, MO 63124
Co-ed school, 1-10
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Churchill School",'Saint_Louis=' + Saint_Louis.length); Saint_Louis[Saint_Louis.length] = createMarker(new GPoint(-90.34539800,38.54773500),"
Cor Jesu Academy
10230 Gravois Road
Saint Louis, MO 63123
All-girls school, 9-12
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Cor Jesu Academy",'Saint_Louis=' + Saint_Louis.length); Saint_Louis[Saint_Louis.length] = createMarker(new GPoint(-90.44347500,38.65876400),"
De Smet Jesuit High School
233 North New Ballas Road
Saint Louis, MO 63141
All-boys school, 9-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("De Smet Jesuit High School",'Saint_Louis=' + Saint_Louis.length); Webster_Groves[Webster_Groves.length] = createMarker(new GPoint(-90.36349200,38.59840700),"
Edgewood Children Center
330 North Gore Avenue
Webster Groves, MO 63119
Co-ed school, NS-NS
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Edgewood Children Center",'Webster_Groves=' + Webster_Groves.length); Saint_Louis[Saint_Louis.length] = createMarker(new GPoint(-90.36346100,38.59838600),"
Edgewood Children's Center
330 N Gore Avenue
Saint Louis, MO 63119
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Edgewood Children's Center",'Saint_Louis=' + Saint_Louis.length); Webster_Groves[Webster_Groves.length] = createMarker(new GPoint(-90.35622300,38.59485500),"
Epworth School
110 N Elm Avenue
Webster Groves, MO 63119
Co-ed school, 4-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Epworth School",'Webster_Groves=' + Webster_Groves.length); Saint_Louis[Saint_Louis.length] = createMarker(new GPoint(-90.33390400,38.70172300),"
Evangelical Childrens Home School
8240 Saint Charles Rock Road
Saint Louis, MO 63114
Co-ed school, 2-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Evangelical Childrens Home School",'Saint_Louis=' + Saint_Louis.length); Florissant[Florissant.length] = createMarker(new GPoint(-90.31029000,38.79526300),"
Faith Christian School
2300 Parker Road
Florissant, MO 63033
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Faith Christian School",'Florissant=' + Florissant.length); Chesterfield[Chesterfield.length] = createMarker(new GPoint(-90.64299200,38.65134900),"
Gateway Academy
17815 Wild Horse Creek Road
Chesterfield, MO 63005
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Gateway Academy",'Chesterfield=' + Chesterfield.length); Saint_Louis[Saint_Louis.length] = createMarker(new GPoint(-90.31293400,38.70020100),"
Incarnate Word Academy
2788 Normandy Drive
Saint Louis, MO 63121
All-girls school, 9-12
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Incarnate Word Academy",'Saint_Louis=' + Saint_Louis.length); Saint_Louis[Saint_Louis.length] = createMarker(new GPoint(-90.36696300,38.64421200),"
John Burroughs School
755 S Price Road
Saint Louis, MO 63124
Co-ed school, 7-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("John Burroughs School",'Saint_Louis=' + Saint_Louis.length); Manchester[Manchester.length] = createMarker(new GPoint(-90.50916800,38.60230600),"
John F Kennedy Catholic School
500 Woods Mill Road
Manchester, MO 63011
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("John F Kennedy Catholic School",'Manchester=' + Manchester.length); Saint_Louis[Saint_Louis.length] = createMarker(new GPoint(-90.41801800,38.51517400),"
Life Christian School
13001 Gravois Road
Saint Louis, MO 63127
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Life Christian School",'Saint_Louis=' + Saint_Louis.length); Olivette[Olivette.length] = createMarker(new GPoint(-90.36556300,38.66687300),"
Logos School
9137 Old Bonhomme Road
Olivette, MO 63132
Co-ed school, 6-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Logos School",'Olivette=' + Olivette.length); Saint_Louis[Saint_Louis.length] = createMarker(new GPoint(-90.28078200,38.71828500),"
Lutheran High School North
5401 Lucas And Hunt Road
Saint Louis, MO 63121
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lutheran High School North",'Saint_Louis=' + Saint_Louis.length); Saint_Louis[Saint_Louis.length] = createMarker(new GPoint(-90.33298200,38.54732600),"
Lutheran High School South
9515 Tesson Ferry Road
Saint Louis, MO 63123
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lutheran High School South",'Saint_Louis=' + Saint_Louis.length); Florissant[Florissant.length] = createMarker(new GPoint(-90.35626500,38.82013300),"
Marygrove School
2705 Mullanphy Lane
Florissant, MO 63031
Co-ed school, 4-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Marygrove School",'Florissant=' + Florissant.length); Saint_Louis[Saint_Louis.length] = createMarker(new GPoint(-90.31617700,38.61284500),"
Metropolitan School
7281 Sarah St
Saint Louis, MO 63143
Co-ed school, 5-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Metropolitan School",'Saint_Louis=' + Saint_Louis.length); Saint_Louis[Saint_Louis.length] = createMarker(new GPoint(-90.39555200,38.65526500),"
MICDS
101 N Warson Road
Saint Louis, MO 63124
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("MICDS",'Saint_Louis=' + Saint_Louis.length); Webster_Groves[Webster_Groves.length] = createMarker(new GPoint(-90.34280900,38.59109700),"
Nerinx Hall High School
530 E Lockwood Avenue
Webster Groves, MO 63119
All-girls school, 9-12
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Nerinx Hall High School",'Webster_Groves=' + Webster_Groves.length); Florissant[Florissant.length] = createMarker(new GPoint(-90.32371400,38.77488900),"
North County Christian School
845 Dunn Rd.
Florissant, MO 63031
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("North County Christian School",'Florissant=' + Florissant.length); Saint_Louis[Saint_Louis.length] = createMarker(new GPoint(-90.27267500,38.52416300),"
Notre Dame High School
320 East Ripa Avenue
Saint Louis, MO 63125
All-girls school, 9-12
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Notre Dame High School",'Saint_Louis=' + Saint_Louis.length); Saint_Louis[Saint_Louis.length] = createMarker(new GPoint(-90.47102600,38.62653900),"
The Principia School
13201 Clayton Road
Saint Louis, MO 63131
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Principia School",'Saint_Louis=' + Saint_Louis.length); Saint_Louis[Saint_Louis.length] = createMarker(new GPoint(-90.25350600,38.64169500),"
Rosati-Kain High School
4389 Lindell Blvd
Saint Louis, MO 63108
All-girls school, 9-12
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Rosati-Kain High School",'Saint_Louis=' + Saint_Louis.length); Saint_Louis[Saint_Louis.length] = createMarker(new GPoint(-90.30230000,38.67820000),"
St. Christopher School
11755 Mehl St.
Saint Louis, MO 63033
Co-ed school, Ungraded
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Christopher School",'Saint_Louis=' + Saint_Louis.length); Kirkwood[Kirkwood.length] = createMarker(new GPoint(-90.40695900,38.56093500),"
St. John Vianney High School
1311 S Kirkwood Road
Kirkwood, MO 63122
All-boys school, 9-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("St. John Vianney High School",'Kirkwood=' + Kirkwood.length); Saint_Louis[Saint_Louis.length] = createMarker(new GPoint(-90.40614200,38.62375200),"
St. Josephs Academy
2307 S Lindbergh Blvd
Saint Louis, MO 63131
All-girls school, 9-12
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("St. Josephs Academy",'Saint_Louis=' + Saint_Louis.length); Saint_Louis[Saint_Louis.length] = createMarker(new GPoint(-90.48144000,38.64411500),"
Saint Louis Priory School
500 South Mason Road
Saint Louis, MO 63141
All-boys school, 7-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Saint Louis Priory School",'Saint_Louis=' + Saint_Louis.length); Saint_Louis[Saint_Louis.length] = createMarker(new GPoint(-90.29685400,38.70531500),"
St Vincent Home/school
7401 Florissant Road
Saint Louis, MO 63121
Co-ed school, 2-10
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Vincent Home/school",'Saint_Louis=' + Saint_Louis.length); Saint_Louis[Saint_Louis.length] = createMarker(new GPoint(-90.39651900,38.53962700),"
Thomas Jefferson School
4100 S Lindbergh Blvd
Saint Louis, MO 63127
Co-ed school, 7-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Thomas Jefferson School",'Saint_Louis=' + Saint_Louis.length); Saint_Louis[Saint_Louis.length] = createMarker(new GPoint(-90.22287500,38.78556300),"
Trinity Catholic High School
1720 Redman Road
Saint Louis, MO 63138
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Trinity Catholic High School",'Saint_Louis=' + Saint_Louis.length); Saint_Louis[Saint_Louis.length] = createMarker(new GPoint(-90.38567500,38.57706000),"
Ursuline Academy Of St Louis
341 S Sappington Road
Saint Louis, MO 63122
All-girls school, 9-12
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Ursuline Academy Of St Louis",'Saint_Louis=' + Saint_Louis.length); Saint_Louis[Saint_Louis.length] = createMarker(new GPoint(-90.41550600,38.64355600),"
Villa Duchesne and Oak Hill School
801 S. Spoede
Saint Louis, MO 63131
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Villa Duchesne and Oak Hill School",'Saint_Louis=' + Saint_Louis.length); Saint_Louis[Saint_Louis.length] = createMarker(new GPoint(-90.44345600,38.63612600),"
Visitation Academy Of St Louis
3020 North Ballas Road
Saint Louis, MO 63131
All-girls school, PK-12
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Visitation Academy Of St Louis",'Saint_Louis=' + Saint_Louis.length); Saint_Louis[Saint_Louis.length] = createMarker(new GPoint(-90.41904600,38.65505400),"
Westminster Christian Academy
10900 Ladue Road
Saint Louis, MO 63141
Co-ed school, 7-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Westminster Christian Academy",'Saint_Louis=' + Saint_Louis.length); Saint_Louis[Saint_Louis.length] = createMarker(new GPoint(-90.47995000,38.65336200),"
Whitfield School
175 South Mason Road
Saint Louis, MO 63141
Co-ed school, 6-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Whitfield School",'Saint_Louis=' + Saint_Louis.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(Chesterfield); map.removeOverlays(Florissant); map.removeOverlays(Kirkwood); map.removeOverlays(Manchester); map.removeOverlays(Olivette); map.removeOverlays(Saint_Louis); map.removeOverlays(Webster_Groves); 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(Saint_Louis);map.removeOverlays(Chesterfield); map.removeOverlays(Florissant); map.removeOverlays(Kirkwood); map.removeOverlays(Manchester); map.removeOverlays(Olivette); map.removeOverlays(Saint_Louis); map.removeOverlays(Webster_Groves); map.addOverlays(Chesterfield); centerByArray(Chesterfield, false, false); cntMarker += Chesterfield.length; map.addOverlays(Florissant); centerByArray(Florissant, false, false); cntMarker += Florissant.length; map.addOverlays(Kirkwood); centerByArray(Kirkwood, false, false); cntMarker += Kirkwood.length; map.addOverlays(Manchester); centerByArray(Manchester, false, false); cntMarker += Manchester.length; map.addOverlays(Olivette); centerByArray(Olivette, false, false); cntMarker += Olivette.length; map.addOverlays(Saint_Louis); centerByArray(Saint_Louis, false, false); cntMarker += Saint_Louis.length; map.addOverlays(Webster_Groves); centerByArray(Webster_Groves, false, false); cntMarker += Webster_Groves.length; centerByArray(Saint_Louis,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; }