function addMarkers(){ mySelect = document.getElementById('selection'); Cleveland_Heights = [];Cleveland = [];University_Heights = [];Gates_Mills = [];Beachwood = [];Brooklyn = [];Parma_Heights = [];Broadview_Heights = [];Pepper_Pike = [];Rocky_River = [];Olmsted_Falls = [];Orange_Village = [];South_Euclid = [];Cleveland_Hts = [];Lakewood = [];Bedford = [];mySelect.options[mySelect.options.length] = new Option("Beachwood schools",'all=Beachwood'); mySelect.options[mySelect.options.length] = new Option("Bedford schools",'all=Bedford'); mySelect.options[mySelect.options.length] = new Option("Broadview Heights schools",'all=Broadview_Heights'); mySelect.options[mySelect.options.length] = new Option("Brooklyn schools",'all=Brooklyn'); mySelect.options[mySelect.options.length] = new Option("Cleveland schools",'all=Cleveland'); mySelect.options[mySelect.options.length] = new Option("Cleveland Heights schools",'all=Cleveland_Heights'); mySelect.options[mySelect.options.length] = new Option("Cleveland Hts schools",'all=Cleveland_Hts'); mySelect.options[mySelect.options.length] = new Option("Gates Mills schools",'all=Gates_Mills'); mySelect.options[mySelect.options.length] = new Option("Lakewood schools",'all=Lakewood'); mySelect.options[mySelect.options.length] = new Option("Olmsted Falls schools",'all=Olmsted_Falls'); mySelect.options[mySelect.options.length] = new Option("Orange Village schools",'all=Orange_Village'); mySelect.options[mySelect.options.length] = new Option("Parma Heights schools",'all=Parma_Heights'); mySelect.options[mySelect.options.length] = new Option("Pepper Pike schools",'all=Pepper_Pike'); mySelect.options[mySelect.options.length] = new Option("Rocky River schools",'all=Rocky_River'); mySelect.options[mySelect.options.length] = new Option("South Euclid schools",'all=South_Euclid'); mySelect.options[mySelect.options.length] = new Option("University Heights schools",'all=University_Heights'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Cleveland_Heights[Cleveland_Heights.length] = createMarker(new GPoint(-81.56086200,41.48463600),"
Beaumont School
3301 N Park Blvd
Cleveland Heights, OH 44118
All-girls school, 9-12
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Beaumont School",'Cleveland_Heights=' + Cleveland_Heights.length); Cleveland[Cleveland.length] = createMarker(new GPoint(-81.60998100,41.48009400),"
Benedictine
2900 Mlk Jr Drive
Cleveland, OH 44104
All-boys school, 9-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Benedictine",'Cleveland=' + Cleveland.length); Cleveland[Cleveland.length] = createMarker(new GPoint(-81.64429500,41.45929200),"
Cleveland Central Catholic High School
6550 Baxter Avenue
Cleveland, OH 44105
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Cleveland Central Catholic High School",'Cleveland=' + Cleveland.length); Cleveland[Cleveland.length] = createMarker(new GPoint(-81.74329100,41.47371800),"
Cleveland Christian Academy
8607 Sauer Avenue
Cleveland, OH 44102
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Cleveland Christian Academy",'Cleveland=' + Cleveland.length); Cleveland[Cleveland.length] = createMarker(new GPoint(-81.68043000,41.49782100),"
Eleanor Gerson High School
1320 Sumner Avenue
Cleveland, OH 44115
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Eleanor Gerson High School",'Cleveland=' + Cleveland.length); Cleveland[Cleveland.length] = createMarker(new GPoint(-81.75795700,41.48071100),"
Eleanor Gerson West Middle School
10427 Detroit Avenue
Cleveland, OH 44102
Co-ed school, 6-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Eleanor Gerson West Middle School",'Cleveland=' + Cleveland.length); Cleveland[Cleveland.length] = createMarker(new GPoint(-81.72156400,41.48073700),"
Enterprise Christian Academy
5022 Bridge Ave
Cleveland, OH 44102
Co-ed school, KG-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Enterprise Christian Academy",'Cleveland=' + Cleveland.length); University_Heights[University_Heights.length] = createMarker(new GPoint(-81.54111600,41.49749400),"
Fuchs Mizrachi School
2301 Fenwick Road
University Heights, OH 44118
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Fuchs Mizrachi School",'University_Heights=' + University_Heights.length); Gates_Mills[Gates_Mills.length] = createMarker(new GPoint(-81.43673500,41.50096500),"
Gilmour Academy
34001 Cedar Road
Gates Mills, OH 44040
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Gilmour Academy",'Gates_Mills=' + Gates_Mills.length); Beachwood[Beachwood.length] = createMarker(new GPoint(-81.51693400,41.49207400),"
Hebrew Academy Of Cleve. Yavne
2475 S Green Road
Beachwood, OH 44122
All-girls school, 7-12
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Hebrew Academy Of Cleve. Yavne",'Beachwood=' + Beachwood.length); Cleveland_Heights[Cleveland_Heights.length] = createMarker(new GPoint(-81.55596400,41.50898300),"
Hebrew Academy Of Cleveland
1860 S Taylor Road
Cleveland Heights, OH 44118
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Hebrew Academy Of Cleveland",'Cleveland_Heights=' + Cleveland_Heights.length); Brooklyn[Brooklyn.length] = createMarker(new GPoint(-81.75720300,41.43787500),"
Heritage Christian School
4403 Tiedeman Road
Brooklyn, OH 44144
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Heritage Christian School",'Brooklyn=' + Brooklyn.length); Parma_Heights[Parma_Heights.length] = createMarker(new GPoint(-81.76150300,41.40276700),"
Holy Name High School
6000 Queens Highway
Parma Heights, OH 44130
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Holy Name High School",'Parma_Heights=' + Parma_Heights.length); Broadview_Heights[Broadview_Heights.length] = createMarker(new GPoint(-81.67482000,41.34492000),"
Lawrence School
1551 E Wallings Rd
Broadview Heights, OH 44147
Co-ed school, 1-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lawrence School",'Broadview_Heights=' + Broadview_Heights.length); Pepper_Pike[Pepper_Pike.length] = createMarker(new GPoint(-81.48584200,41.47948900),"
The Lillian and Betty Ratner School
27575 Shaker Boulevard
Pepper Pike, OH 44124
Co-ed school, NS-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Lillian and Betty Ratner School",'Pepper_Pike=' + Pepper_Pike.length); Cleveland_Heights[Cleveland_Heights.length] = createMarker(new GPoint(-81.55108100,41.52063700),"
Lutheran High School East
3565 Mayfield Road
Cleveland Heights, OH 44118
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lutheran High School East",'Cleveland_Heights=' + Cleveland_Heights.length); Rocky_River[Rocky_River.length] = createMarker(new GPoint(-81.84721200,41.45683400),"
Lutheran High West
3850 Linden Road
Rocky River, OH 44116
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lutheran High West",'Rocky_River=' + Rocky_River.length); Cleveland[Cleveland.length] = createMarker(new GPoint(-81.59810400,41.50697200),"
The Lyceum
2062 Murray Hill Road
Cleveland, OH 44106
Co-ed school, 7-11
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Lyceum",'Cleveland=' + Cleveland.length); Rocky_River[Rocky_River.length] = createMarker(new GPoint(-81.85050200,41.46780900),"
Magnificat High School
20770 Hilliard Blvd
Rocky River, OH 44116
All-girls school, 9-12
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Magnificat High School",'Rocky_River=' + Rocky_River.length); Cleveland_Heights[Cleveland_Heights.length] = createMarker(new GPoint(-81.53668200,41.51908000),"
Mosdos Ohr Hatorah
1508 Warrensville Center Road
Cleveland Heights, OH 44121
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mosdos Ohr Hatorah",'Cleveland_Heights=' + Cleveland_Heights.length); Olmsted_Falls[Olmsted_Falls.length] = createMarker(new GPoint(-81.90149000,41.37372900),"
Ombudsman Educational Services
8131 Columbia Road
Olmsted Falls, OH 44138
Co-ed school, 8-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ombudsman Educational Services",'Olmsted_Falls=' + Olmsted_Falls.length); Orange_Village[Orange_Village.length] = createMarker(new GPoint(-81.48679100,41.43505500),"
Orange Christian Academy
27200 Emery Road
Orange Village, OH 44128
Co-ed school, 7-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Orange Christian Academy",'Orange_Village=' + Orange_Village.length); Cleveland[Cleveland.length] = createMarker(new GPoint(-81.71234600,41.38103600),"
Padua Franciscan High School
6740 State Road
Cleveland, OH 44134
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Padua Franciscan High School",'Cleveland=' + Cleveland.length); South_Euclid[South_Euclid.length] = createMarker(new GPoint(-81.51929200,41.50890700),"
Regina High School
1857 S Green Road
South Euclid, OH 44121
All-girls school, 9-12
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Regina High School",'South_Euclid=' + South_Euclid.length); Cleveland_Hts[Cleveland_Hts.length] = createMarker(new GPoint(-81.55988300,41.48636300),"
Ruffing Montessori
3380 Fairmount Boulevard
Cleveland Hts, OH 44118
Co-ed school, NS-NS
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ruffing Montessori",'Cleveland_Hts=' + Cleveland_Hts.length); Lakewood[Lakewood.length] = createMarker(new GPoint(-81.78503000,41.48523300),"
St. Edward High School
13500 Detroit Avenue
Lakewood, OH 44107
All-boys school, 9-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("St. Edward High School",'Lakewood=' + Lakewood.length); Cleveland[Cleveland.length] = createMarker(new GPoint(-81.81466200,41.45964700),"
St. Joseph Academy
3430 Rocky River Drive
Cleveland, OH 44111
All-girls school, 9-12
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("St. Joseph Academy",'Cleveland=' + Cleveland.length); Bedford[Bedford.length] = createMarker(new GPoint(-81.52748200,41.40390000),"
St. Peter Chanel High School
480 Northfield Road
Bedford, OH 44146
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Peter Chanel High School",'Bedford=' + Bedford.length); Cleveland[Cleveland.length] = createMarker(new GPoint(-81.60271600,41.47983900),"
Second New Hope Christian Academy
2917 E 116th St
Cleveland, OH 44120
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Second New Hope Christian Academy",'Cleveland=' + Cleveland.length); Cleveland[Cleveland.length] = createMarker(new GPoint(-81.70689200,41.48248300),"
St Ignatius High School
1911 W 30th Street
Cleveland, OH 44113
All-boys school, 9-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("St Ignatius High School",'Cleveland=' + Cleveland.length); Cleveland[Cleveland.length] = createMarker(new GPoint(-81.64825000,41.52282800),"
St Martin De Porres High School
6111 Lausche Avenue
Cleveland, OH 44103
Co-ed school, 9-10
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Martin De Porres High School",'Cleveland=' + Cleveland.length); Cleveland[Cleveland.length] = createMarker(new GPoint(-81.59678500,41.41725900),"
Trinity High School
12425 Granger Road
Cleveland, OH 44125
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Trinity High School",'Cleveland=' + Cleveland.length); Cleveland[Cleveland.length] = createMarker(new GPoint(-81.55040200,41.59511000),"
Villa Angela - St Joseph High School
18491 Lake Shore Blvd
Cleveland, OH 44119
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Villa Angela - St Joseph High School",'Cleveland=' + Cleveland.length); Cleveland[Cleveland.length] = createMarker(new GPoint(-81.51249200,41.50499600),"
Yeshiva High School-jacob Sapirstein Campus Boys
1975 Lyndway Road
Cleveland, OH 44121
All-boys school, 7-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Yeshiva High School-jacob Sapirstein Campus Boys",'Cleveland=' + Cleveland.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(Beachwood); map.removeOverlays(Bedford); map.removeOverlays(Broadview_Heights); map.removeOverlays(Brooklyn); map.removeOverlays(Cleveland); map.removeOverlays(Cleveland_Heights); map.removeOverlays(Cleveland_Hts); map.removeOverlays(Gates_Mills); map.removeOverlays(Lakewood); map.removeOverlays(Olmsted_Falls); map.removeOverlays(Orange_Village); map.removeOverlays(Parma_Heights); map.removeOverlays(Pepper_Pike); map.removeOverlays(Rocky_River); map.removeOverlays(South_Euclid); map.removeOverlays(University_Heights); 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(Cleveland_Heights);map.removeOverlays(Beachwood); map.removeOverlays(Bedford); map.removeOverlays(Broadview_Heights); map.removeOverlays(Brooklyn); map.removeOverlays(Cleveland); map.removeOverlays(Cleveland_Heights); map.removeOverlays(Cleveland_Hts); map.removeOverlays(Gates_Mills); map.removeOverlays(Lakewood); map.removeOverlays(Olmsted_Falls); map.removeOverlays(Orange_Village); map.removeOverlays(Parma_Heights); map.removeOverlays(Pepper_Pike); map.removeOverlays(Rocky_River); map.removeOverlays(South_Euclid); map.removeOverlays(University_Heights); map.addOverlays(Beachwood); centerByArray(Beachwood, false, false); cntMarker += Beachwood.length; map.addOverlays(Bedford); centerByArray(Bedford, false, false); cntMarker += Bedford.length; map.addOverlays(Broadview_Heights); centerByArray(Broadview_Heights, false, false); cntMarker += Broadview_Heights.length; map.addOverlays(Brooklyn); centerByArray(Brooklyn, false, false); cntMarker += Brooklyn.length; map.addOverlays(Cleveland); centerByArray(Cleveland, false, false); cntMarker += Cleveland.length; map.addOverlays(Cleveland_Heights); centerByArray(Cleveland_Heights, false, false); cntMarker += Cleveland_Heights.length; map.addOverlays(Cleveland_Hts); centerByArray(Cleveland_Hts, false, false); cntMarker += Cleveland_Hts.length; map.addOverlays(Gates_Mills); centerByArray(Gates_Mills, false, false); cntMarker += Gates_Mills.length; map.addOverlays(Lakewood); centerByArray(Lakewood, false, false); cntMarker += Lakewood.length; map.addOverlays(Olmsted_Falls); centerByArray(Olmsted_Falls, false, false); cntMarker += Olmsted_Falls.length; map.addOverlays(Orange_Village); centerByArray(Orange_Village, false, false); cntMarker += Orange_Village.length; map.addOverlays(Parma_Heights); centerByArray(Parma_Heights, false, false); cntMarker += Parma_Heights.length; map.addOverlays(Pepper_Pike); centerByArray(Pepper_Pike, false, false); cntMarker += Pepper_Pike.length; map.addOverlays(Rocky_River); centerByArray(Rocky_River, false, false); cntMarker += Rocky_River.length; map.addOverlays(South_Euclid); centerByArray(South_Euclid, false, false); cntMarker += South_Euclid.length; map.addOverlays(University_Heights); centerByArray(University_Heights, false, false); cntMarker += University_Heights.length; centerByArray(Cleveland_Heights,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; }