function addMarkers(){ mySelect = document.getElementById('selection'); Hudson = [];Akron = [];Cuyahoga_Falls = [];Stow = [];Tallmadge = [];Copley = [];Uniontown = [];Northfield = [];Bath = [];Barberton = [];Fairlawn = [];mySelect.options[mySelect.options.length] = new Option("Akron schools",'all=Akron'); mySelect.options[mySelect.options.length] = new Option("Barberton schools",'all=Barberton'); mySelect.options[mySelect.options.length] = new Option("Bath schools",'all=Bath'); mySelect.options[mySelect.options.length] = new Option("Copley schools",'all=Copley'); mySelect.options[mySelect.options.length] = new Option("Cuyahoga Falls schools",'all=Cuyahoga_Falls'); mySelect.options[mySelect.options.length] = new Option("Fairlawn schools",'all=Fairlawn'); mySelect.options[mySelect.options.length] = new Option("Hudson schools",'all=Hudson'); mySelect.options[mySelect.options.length] = new Option("Northfield schools",'all=Northfield'); mySelect.options[mySelect.options.length] = new Option("Stow schools",'all=Stow'); mySelect.options[mySelect.options.length] = new Option("Tallmadge schools",'all=Tallmadge'); mySelect.options[mySelect.options.length] = new Option("Uniontown schools",'all=Uniontown'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Hudson[Hudson.length] = createMarker(new GPoint(-81.43598600,41.23695900),"
Academy For Young Children Tlc
187 Ravenna Street
Hudson, OH 44236
Co-ed school, K-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Academy For Young Children Tlc",'Hudson=' + Hudson.length); Akron[Akron.length] = createMarker(new GPoint(-81.62880000,41.14840000),"
Akron Montessori School
3882 Bywood Avenue
Akron, OH 44333
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Akron Montessori School",'Akron=' + Akron.length); Akron[Akron.length] = createMarker(new GPoint(-81.48804300,41.07283700),"
Annunciation St John School
88 Kent Street
Akron, OH 44305
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Annunciation St John School",'Akron=' + Akron.length); Akron[Akron.length] = createMarker(new GPoint(-81.49071700,41.05757600),"
Arlington Christian Academy
539 S Arlington Street
Akron, OH 44306
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Arlington Christian Academy",'Akron=' + Akron.length); Cuyahoga_Falls[Cuyahoga_Falls.length] = createMarker(new GPoint(-81.46824300,41.11882100),"
Chapel Hill Christian School
1090 Howe Avenue
Cuyahoga Falls, OH 44221
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Chapel Hill Christian School",'Cuyahoga_Falls=' + Cuyahoga_Falls.length); Akron[Akron.length] = createMarker(new GPoint(-81.48955500,40.97449300),"
Chapel Hill Christian School-Green Campus
946 E Turkeyfoot Lake Road
Akron, OH 44312
Co-ed school, NS-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Chapel Hill Christian School-Green Campus",'Akron=' + Akron.length); Akron[Akron.length] = createMarker(new GPoint(-81.47226700,41.07020400),"
Color Our Rainbow Academy
1430 Goodyear Blvd
Akron, OH 44305
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Color Our Rainbow Academy",'Akron=' + Akron.length); Stow[Stow.length] = createMarker(new GPoint(-81.42521700,41.18401900),"
Cornerstone Community School
4510 Stow Road
Stow, OH 44224
Co-ed school, K-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Cornerstone Community School",'Stow=' + Stow.length); Akron[Akron.length] = createMarker(new GPoint(-93.57805300,45.31167500),"
Discovery Montessori School
464 S Hawkins Avenue
Akron, OH 44320
Co-ed school, PK-4
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Discovery Montessori School",'Akron=' + Akron.length); Akron[Akron.length] = createMarker(new GPoint(-81.47981900,41.06676300),"
East Akron Ymca Phoenix Program
110 Goodyear Blvd
Akron, OH 44305
Co-ed school, 4-11
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("East Akron Ymca Phoenix Program",'Akron=' + Akron.length); Akron[Akron.length] = createMarker(new GPoint(-81.56978100,41.06803600),"
Emmanuel Christian Academy
1650 Diagonal Road
Akron, OH 44320
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Emmanuel Christian Academy",'Akron=' + Akron.length); Tallmadge[Tallmadge.length] = createMarker(new GPoint(-81.44094900,41.09540000),"
Fact Academy
Po Box 123
Tallmadge, OH 44278
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Fact Academy",'Tallmadge=' + Tallmadge.length); Cuyahoga_Falls[Cuyahoga_Falls.length] = createMarker(new GPoint(-81.50247500,41.18086400),"
Faith Islamic Academy
152 East Steels Corners Road
Cuyahoga Falls, OH 44224
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Faith Islamic Academy",'Cuyahoga_Falls=' + Cuyahoga_Falls.length); Akron[Akron.length] = createMarker(new GPoint(-81.55342600,41.10202800),"
First Assembly Preschool
1175 W Market Street
Akron, OH 44313
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("First Assembly Preschool",'Akron=' + Akron.length); Copley[Copley.length] = createMarker(new GPoint(-81.65188000,41.09943700),"
The Ghent Academy For Boys
3745 Copley Road
Copley, OH 44321
All-boys school, K-8
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("The Ghent Academy For Boys",'Copley=' + Copley.length); Stow[Stow.length] = createMarker(new GPoint(-81.44689200,41.15694500),"
Holy Family School-stow
3163 Kent Road
Stow, OH 44224
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Holy Family School-stow",'Stow=' + Stow.length); Hudson[Hudson.length] = createMarker(new GPoint(-81.44030900,41.27088600),"
Hudson Montessori School
7545 Darrow Rd
Hudson, OH 44236
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Hudson Montessori School",'Hudson=' + Hudson.length); Cuyahoga_Falls[Cuyahoga_Falls.length] = createMarker(new GPoint(-81.50587200,41.14996500),"
Immaculate Heart Of Mary School
2859 Lillis Drive
Cuyahoga Falls, OH 44223
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Immaculate Heart Of Mary School",'Cuyahoga_Falls=' + Cuyahoga_Falls.length); Uniontown[Uniontown.length] = createMarker(new GPoint(-81.46824800,40.95070300),"
Kids Country
1801 Town Park Blvd
Uniontown, OH 44685
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Kids Country",'Uniontown=' + Uniontown.length); Stow[Stow.length] = createMarker(new GPoint(-81.45623700,41.19922900),"
Kids Country Stow
4923 Hudson Drive
Stow, OH 44224
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Kids Country Stow",'Stow=' + Stow.length); Akron[Akron.length] = createMarker(new GPoint(-81.61523600,41.14041200),"
Kids Couontry School
387 Ghent Rd
Akron, OH 44333
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Kids Couontry School",'Akron=' + Akron.length); Akron[Akron.length] = createMarker(new GPoint(-81.58903200,41.09651800),"
Lippman Jewish Community Day School
750 White Pond Drive
Akron, OH 44320
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lippman Jewish Community Day School",'Akron=' + Akron.length); Uniontown[Uniontown.length] = createMarker(new GPoint(-81.44822000,40.95594700),"
Mayfair Junior Academy
2350 Graybill Road
Uniontown, OH 44685
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mayfair Junior Academy",'Uniontown=' + Uniontown.length); Akron[Akron.length] = createMarker(new GPoint(-81.39647700,41.03848900),"
Mogadore Christian Academy
3603 Carper Ave
Akron, OH 44312
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mogadore Christian Academy",'Akron=' + Akron.length); Akron[Akron.length] = createMarker(new GPoint(-81.47688100,41.10667300),"
North Akron Catholic School
1570 Creighton Avenue
Akron, OH 44310
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("North Akron Catholic School",'Akron=' + Akron.length); Northfield[Northfield.length] = createMarker(new GPoint(-81.54965400,41.31442600),"
Northfield Baptist Christian School
311 West Aurora Road
Northfield, OH 44067
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Northfield Baptist Christian School",'Northfield=' + Northfield.length); Bath[Bath.length] = createMarker(new GPoint(-81.63630000,41.18880000),"
Old Trail School
Po Box 827
Bath, OH 44210
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Old Trail School",'Bath=' + Bath.length); Akron[Akron.length] = createMarker(new GPoint(-81.55771300,41.10397200),"
Our Lady Of The Elms Elementary School
1290 West Market Street
Akron, OH 44313
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Our Lady Of The Elms Elementary School",'Akron=' + Akron.length); Akron[Akron.length] = createMarker(new GPoint(-81.55590800,41.09962300),"
Our Lady Of The Elms Preschool
1295 W Exchange St
Akron, OH 44313
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Our Lady Of The Elms Preschool",'Akron=' + Akron.length); Cuyahoga_Falls[Cuyahoga_Falls.length] = createMarker(new GPoint(-81.48871400,41.13659200),"
Redeemer Lutheran School
2141 5th Street
Cuyahoga Falls, OH 44221
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Redeemer Lutheran School",'Cuyahoga_Falls=' + Cuyahoga_Falls.length); Akron[Akron.length] = createMarker(new GPoint(-81.51266800,41.09958300),"
St. Anthony Of Padua Elementary School
80 East York Street
Akron, OH 44310
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Anthony Of Padua Elementary School",'Akron=' + Akron.length); Barberton[Barberton.length] = createMarker(new GPoint(-81.61336000,41.01599600),"
St. Augustine Elementary School
195 7th Street Nw
Barberton, OH 44203
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Augustine Elementary School",'Barberton=' + Barberton.length); Fairlawn[Fairlawn.length] = createMarker(new GPoint(-81.60440000,41.12407400),"
St. Hilary Elementary School
645 Moorfield Road
Fairlawn, OH 44333
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Hilary Elementary School",'Fairlawn=' + Fairlawn.length); Cuyahoga_Falls[Cuyahoga_Falls.length] = createMarker(new GPoint(-81.48608000,41.13273200),"
St. Joseph Elementary School
1909 3rd Street
Cuyahoga Falls, OH 44221
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Joseph Elementary School",'Cuyahoga_Falls=' + Cuyahoga_Falls.length); Akron[Akron.length] = createMarker(new GPoint(-81.50433100,41.10206300),"
St. Martha Elementary School
300 E Tallmadge Avenue
Akron, OH 44310
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Martha Elementary School",'Akron=' + Akron.length); Akron[Akron.length] = createMarker(new GPoint(-81.52640200,41.06588100),"
St. Mary Elementary School
750 South Main Street
Akron, OH 44311
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Mary Elementary School",'Akron=' + Akron.length); Akron[Akron.length] = createMarker(new GPoint(-81.43797800,41.05356300),"
St. Matthew Parish School
2580 Benton Avenue
Akron, OH 44312
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Matthew Parish School",'Akron=' + Akron.length); Akron[Akron.length] = createMarker(new GPoint(-81.51058100,41.03871000),"
St. Paul School
1580 Brown Street
Akron, OH 44301
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Paul School",'Akron=' + Akron.length); Hudson[Hudson.length] = createMarker(new GPoint(-81.41091600,41.24624300),"
Seton Catholic Elementary School
6923 Stow Road
Hudson, OH 44236
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Seton Catholic Elementary School",'Hudson=' + Hudson.length); Copley[Copley.length] = createMarker(new GPoint(-81.61921900,41.08378700),"
Spring Garden Waldorf School
1791 Jacoby Road
Copley, OH 44321
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Spring Garden Waldorf School",'Copley=' + Copley.length); Northfield[Northfield.length] = createMarker(new GPoint(-81.53629000,41.31081800),"
St Barnabas School
9200 Olde 8 Road
Northfield, OH 44067
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Barnabas School",'Northfield=' + Northfield.length); Akron[Akron.length] = createMarker(new GPoint(-81.55805200,40.99212300),"
St Francis De Sales School
4009 Manchester Road
Akron, OH 44319
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Francis De Sales School",'Akron=' + Akron.length); Cuyahoga_Falls[Cuyahoga_Falls.length] = createMarker(new GPoint(-81.45345400,41.13780100),"
St Nicholas Orthodox School
2222 Issaquah Street
Cuyahoga Falls, OH 44221
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Nicholas Orthodox School",'Cuyahoga_Falls=' + Cuyahoga_Falls.length); Akron[Akron.length] = createMarker(new GPoint(-81.56844400,41.09944400),"
St Sebastian School
500 Mull Avenue
Akron, OH 44320
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Sebastian School",'Akron=' + Akron.length); Akron[Akron.length] = createMarker(new GPoint(-81.52346900,41.08768900),"
St Vincent Depaul Elementary School
17 S Maple Street
Akron, OH 44303
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Vincent Depaul Elementary School",'Akron=' + Akron.length); Cuyahoga_Falls[Cuyahoga_Falls.length] = createMarker(new GPoint(-81.51398200,41.10223700),"
Summit Christian School
2800 13th Street
Cuyahoga Falls, OH 44223
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Summit Christian School",'Cuyahoga_Falls=' + Cuyahoga_Falls.length); Tallmadge[Tallmadge.length] = createMarker(new GPoint(-81.42343300,41.07234900),"
Tallmadge Christian Academy
508 Newton Street
Tallmadge, OH 44278
Co-ed school, KG-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Tallmadge Christian Academy",'Tallmadge=' + Tallmadge.length); Akron[Akron.length] = createMarker(new GPoint(-81.51700600,41.08138700),"
Zion Christian School
139 S High St
Akron, OH 44308
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Zion Christian School",'Akron=' + Akron.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/////1/' + showArray); map.removeOverlays(Akron); map.removeOverlays(Barberton); map.removeOverlays(Bath); map.removeOverlays(Copley); map.removeOverlays(Cuyahoga_Falls); map.removeOverlays(Fairlawn); map.removeOverlays(Hudson); map.removeOverlays(Northfield); map.removeOverlays(Stow); map.removeOverlays(Tallmadge); map.removeOverlays(Uniontown); 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(Hudson);map.removeOverlays(Akron); map.removeOverlays(Barberton); map.removeOverlays(Bath); map.removeOverlays(Copley); map.removeOverlays(Cuyahoga_Falls); map.removeOverlays(Fairlawn); map.removeOverlays(Hudson); map.removeOverlays(Northfield); map.removeOverlays(Stow); map.removeOverlays(Tallmadge); map.removeOverlays(Uniontown); map.addOverlays(Akron); centerByArray(Akron, false, false); cntMarker += Akron.length; map.addOverlays(Barberton); centerByArray(Barberton, false, false); cntMarker += Barberton.length; map.addOverlays(Bath); centerByArray(Bath, false, false); cntMarker += Bath.length; map.addOverlays(Copley); centerByArray(Copley, false, false); cntMarker += Copley.length; map.addOverlays(Cuyahoga_Falls); centerByArray(Cuyahoga_Falls, false, false); cntMarker += Cuyahoga_Falls.length; map.addOverlays(Fairlawn); centerByArray(Fairlawn, false, false); cntMarker += Fairlawn.length; map.addOverlays(Hudson); centerByArray(Hudson, false, false); cntMarker += Hudson.length; map.addOverlays(Northfield); centerByArray(Northfield, false, false); cntMarker += Northfield.length; map.addOverlays(Stow); centerByArray(Stow, false, false); cntMarker += Stow.length; map.addOverlays(Tallmadge); centerByArray(Tallmadge, false, false); cntMarker += Tallmadge.length; map.addOverlays(Uniontown); centerByArray(Uniontown, false, false); cntMarker += Uniontown.length; centerByArray(Hudson,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=1&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; }