function addMarkers() { mySelect = document.getElementById('selection'); Aurora = [];Kent = [];Ravenna = [];Streetsboro = [];Mogadore = [];Mantua = [];Windham = [];Hiram = [];Garrettsville = [];Rootstown = [];Diamond = [];Atwater = [];mySelect.options[mySelect.options.length] = new Option("Atwater schools",'all=Atwater'); mySelect.options[mySelect.options.length] = new Option("Aurora schools",'all=Aurora'); mySelect.options[mySelect.options.length] = new Option("Diamond schools",'all=Diamond'); mySelect.options[mySelect.options.length] = new Option("Garrettsville schools",'all=Garrettsville'); mySelect.options[mySelect.options.length] = new Option("Hiram schools",'all=Hiram'); mySelect.options[mySelect.options.length] = new Option("Kent schools",'all=Kent'); mySelect.options[mySelect.options.length] = new Option("Mantua schools",'all=Mantua'); mySelect.options[mySelect.options.length] = new Option("Mogadore schools",'all=Mogadore'); mySelect.options[mySelect.options.length] = new Option("Ravenna schools",'all=Ravenna'); mySelect.options[mySelect.options.length] = new Option("Rootstown schools",'all=Rootstown'); mySelect.options[mySelect.options.length] = new Option("Streetsboro schools",'all=Streetsboro'); mySelect.options[mySelect.options.length] = new Option("Windham schools",'all=Windham'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Aurora[Aurora.length] = createMarker(new GPoint(-81.34886169,41.31270599),"
Aurora High School
109 W Pioneer Trl
Aurora, OH 44202

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Aurora High School",'Aurora=' + Aurora.length); Kent[Kent.length] = createMarker(new GPoint(-81.34670258,41.10444260),"
Brimfield Elementary School
4182 State Route 43
Kent, OH 44240

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Brimfield Elementary School",'Kent=' + Kent.length); Ravenna[Ravenna.length] = createMarker(new GPoint(-81.26350403,41.15798950),"
Brown Middle School
228 S Scranton St
Ravenna, OH 44266

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Brown Middle School",'Ravenna=' + Ravenna.length); Streetsboro[Streetsboro.length] = createMarker(new GPoint(-81.32188416,41.23619461),"
Campus Intermediate Elementary School
8955 Kirby Ln
Streetsboro, OH 44241

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Campus Intermediate Elementary School",'Streetsboro=' + Streetsboro.length); Ravenna[Ravenna.length] = createMarker(new GPoint(-81.23441315,41.16399765),"
Carlin Elementary School
531 Washington Ave
Ravenna, OH 44266

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Carlin Elementary School",'Ravenna=' + Ravenna.length); Mogadore[Mogadore.length] = createMarker(new GPoint(-81.34043884,41.06553650),"
Central Elementary School
1473 Saxe Rd
Mogadore, OH 44260

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Central Elementary School",'Mogadore=' + Mogadore.length); Aurora[Aurora.length] = createMarker(new GPoint(-81.34161377,41.31593704),"
Craddock/miller Elementary School
105 Hurd Rd
Aurora, OH 44202

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Craddock/miller Elementary School",'Aurora=' + Aurora.length); Mantua[Mantua.length] = createMarker(new GPoint(-81.22357941,41.28931808),"
Crestwood High School
10919 Main St
Mantua, OH 44255

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Crestwood High School",'Mantua=' + Mantua.length); Mantua[Mantua.length] = createMarker(new GPoint(-81.23464800,41.30001900),"
Crestwood Intermediate School
11260 Bowen Rd
Mantua, OH 44255

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Crestwood Intermediate School",'Mantua=' + Mantua.length); Mantua[Mantua.length] = createMarker(new GPoint(-81.23490906,41.28696823),"
Crestwood Middle School
10880 John Edward Dr
Mantua, OH 44255

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Crestwood Middle School",'Mantua=' + Mantua.length); Mantua[Mantua.length] = createMarker(new GPoint(-81.23458600,41.29993600),"
Crestwood Primary School
11256 Bowen Rd
Mantua, OH 44255

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Crestwood Primary School",'Mantua=' + Mantua.length); Mantua[Mantua.length] = createMarker(new GPoint(-81.28261566,41.25612259),"
Crestwood/larlham
4571 W Prospect St
Mantua, OH 44255

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Crestwood/larlham",'Mantua=' + Mantua.length); Kent[Kent.length] = createMarker(new GPoint(-81.36720276,41.15644455),"
Davey Elementary School
196 N Prospect St
Kent, OH 44240

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Davey Elementary School",'Kent=' + Kent.length); Windham[Windham.length] = createMarker(new GPoint(-81.03723145,41.23787308),"
East Elementary School
9005 Wilverne Dr
Windham, OH 44288

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("East Elementary School",'Windham=' + Windham.length); Mogadore[Mogadore.length] = createMarker(new GPoint(-81.34700775,41.06853867),"
Field High School
2900 State Route 43
Mogadore, OH 44260

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Field High School",'Mogadore=' + Mogadore.length); Mogadore[Mogadore.length] = createMarker(new GPoint(-81.34378052,41.06563568),"
Field Middle School
1379 Saxe Rd
Mogadore, OH 44260

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Field Middle School",'Mogadore=' + Mogadore.length); Kent[Kent.length] = createMarker(new GPoint(-81.35316467,41.13301849),"
Franklin Elementary School
6662 State Route 43
Kent, OH 44240

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Franklin Elementary School",'Kent=' + Kent.length); Aurora[Aurora.length] = createMarker(new GPoint(-81.34587097,41.30717850),"
Harmon Middle School
130 Aurora Hudson Rd
Aurora, OH 44202

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Harmon Middle School",'Aurora=' + Aurora.length); Streetsboro[Streetsboro.length] = createMarker(new GPoint(-81.32496643,41.23513794),"
Henry Defer Intermediate Elementary School
1895 Annalane Dr
Streetsboro, OH 44241

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Henry Defer Intermediate Elementary School",'Streetsboro=' + Streetsboro.length); Hiram[Hiram.length] = createMarker(new GPoint(-81.16190338,41.33779907),"
Hiram Elementary School
Po Box 68
Hiram, OH 44234

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Hiram Elementary School",'Hiram=' + Hiram.length); Kent[Kent.length] = createMarker(new GPoint(-81.35891724,41.14305878),"
Holden Elementary School
132 W School St
Kent, OH 44240

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Holden Elementary School",'Kent=' + Kent.length); Garrettsville[Garrettsville.length] = createMarker(new GPoint(-81.10125732,41.27004623),"
James A Garfield Elementary School
10207 State Route 88
Garrettsville, OH 44231

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("James A Garfield Elementary School",'Garrettsville=' + Garrettsville.length); Garrettsville[Garrettsville.length] = createMarker(new GPoint(-81.10064697,41.27060699),"
James A Garfield High School
10233 State Route 88
Garrettsville, OH 44231

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("James A Garfield High School",'Garrettsville=' + Garrettsville.length); Garrettsville[Garrettsville.length] = createMarker(new GPoint(-81.10069275,41.27056503),"
James A Garfield Middle School
10231 State Route 88
Garrettsville, OH 44231

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("James A Garfield Middle School",'Garrettsville=' + Garrettsville.length); Garrettsville[Garrettsville.length] = createMarker(new GPoint(-81.09328461,41.28524017),"
James A. Garfield Intermediate School
8233 Park Ave
Garrettsville, OH 44231

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("James A. Garfield Intermediate School",'Garrettsville=' + Garrettsville.length); Windham[Windham.length] = createMarker(new GPoint(-81.04322052,41.23829269),"
Katherine Thomas Elementary School
9032 Maple Grove Rd
Windham, OH 44288

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Katherine Thomas Elementary School",'Windham=' + Windham.length); Kent[Kent.length] = createMarker(new GPoint(-81.35621643,41.15660858),"
Kent Digital Academy
321 N Depeyster St
Kent, OH 44240

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Kent Digital Academy",'Kent=' + Kent.length); Aurora[Aurora.length] = createMarker(new GPoint(-81.35037231,41.30454636),"
Leighton Elementary School
121 Aurora Hudson Rd
Aurora, OH 44202

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Leighton Elementary School",'Aurora=' + Aurora.length); Kent[Kent.length] = createMarker(new GPoint(-81.38046265,41.14561844),"
Longcoy Elementary School
1069 Elno Ave
Kent, OH 44240

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Longcoy Elementary School",'Kent=' + Kent.length); Mantua[Mantua.length] = createMarker(new GPoint(-81.24485779,41.31028366),"
Mantua Center Elementary School
11741 Mantua Center Rd
Mantua, OH 44255

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Mantua Center Elementary School",'Mantua=' + Mantua.length); Mantua[Mantua.length] = createMarker(new GPoint(-81.22409058,41.28448868),"
Mantua Village Elementary School
10803 Main St
Mantua, OH 44255

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Mantua Village Elementary School",'Mantua=' + Mantua.length); Ravenna[Ravenna.length] = createMarker(new GPoint(-81.22245789,41.18275070),"
Maplewood Career Center
7075 State Route 88
Ravenna, OH 44266

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Maplewood Career Center",'Ravenna=' + Ravenna.length); Mogadore[Mogadore.length] = createMarker(new GPoint(-81.39291382,41.05096436),"
Perfection Digital Academy
1 S Cleveland Ave
Mogadore, OH 44260

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Perfection Digital Academy",'Mogadore=' + Mogadore.length); Ravenna[Ravenna.length] = createMarker(new GPoint(-81.26446533,41.15847778),"
Rausch Intermediate Middle School
3582 State Route 59
Ravenna, OH 44266

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Rausch Intermediate Middle School",'Ravenna=' + Ravenna.length); Ravenna[Ravenna.length] = createMarker(new GPoint(-81.29869080,41.15794754),"
Ravenna High School
345 E Main St
Ravenna, OH 44266

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ravenna High School",'Ravenna=' + Ravenna.length); Kent[Kent.length] = createMarker(new GPoint(-81.35821900,41.15093000),"
Roosevelt High School
1400 N Mantua St
Kent, OH 44240

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Roosevelt High School",'Kent=' + Kent.length); Rootstown[Rootstown.length] = createMarker(new GPoint(-81.24231720,41.10205841),"
Rootstown Elementary School
4140 State Route 44
Rootstown, OH 44272

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Rootstown Elementary School",'Rootstown=' + Rootstown.length); Rootstown[Rootstown.length] = createMarker(new GPoint(-81.24231720,41.10205841),"
Rootstown/mabel Schnee Bldg Middle School
4140 State Route 44
Rootstown, OH 44272

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Rootstown/mabel Schnee Bldg Middle School",'Rootstown=' + Rootstown.length); Rootstown[Rootstown.length] = createMarker(new GPoint(-81.24231720,41.10205841),"
Rootstown/ward Davis Bldg High School
4140 State Route 44
Rootstown, OH 44272

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Rootstown/ward Davis Bldg High School",'Rootstown=' + Rootstown.length); Ravenna[Ravenna.length] = createMarker(new GPoint(-81.23073578,41.23903656),"
Shalersville Elementary School
4519 State Route 303
Ravenna, OH 44266

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Shalersville Elementary School",'Ravenna=' + Ravenna.length); Ravenna[Ravenna.length] = createMarker(new GPoint(-81.05058289,41.02183533),"
Southeast Elementary Campus School
8301 Tallmadge Rd
Ravenna, OH 44266

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Southeast Elementary Campus School",'Ravenna=' + Ravenna.length); Ravenna[Ravenna.length] = createMarker(new GPoint(-81.24437400,41.15771700),"
Southeast High School
8423 Tallmadge Rd
Ravenna, OH 44266

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Southeast High School",'Ravenna=' + Ravenna.length); Ravenna[Ravenna.length] = createMarker(new GPoint(-81.07035828,41.09905243),"
Southeast Intermediate Elementary School
8301 Tallmadge Rd
Ravenna, OH 44266

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Southeast Intermediate Elementary School",'Ravenna=' + Ravenna.length); Diamond[Diamond.length] = createMarker(new GPoint(-81.09221649,41.09918594),"
Southeast Junior High School
8540 Tallmadge Rd
Diamond, OH 44412

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Southeast Junior High School",'Diamond=' + Diamond.length); Ravenna[Ravenna.length] = createMarker(new GPoint(-81.09221649,41.09918594),"
Southeast Primary Elementary School
8301 Tallmadge Rd
Ravenna, OH 44266

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Southeast Primary Elementary School",'Ravenna=' + Ravenna.length); Kent[Kent.length] = createMarker(new GPoint(-81.36391449,41.16801834),"
Stanton Middle School
1175 Hudson Rd
Kent, OH 44240

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Stanton Middle School",'Kent=' + Kent.length); Streetsboro[Streetsboro.length] = createMarker(new GPoint(-81.32482147,41.23486328),"
Streetsboro High School
1900 Annalane Dr
Streetsboro, OH 44241

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Streetsboro High School",'Streetsboro=' + Streetsboro.length); Streetsboro[Streetsboro.length] = createMarker(new GPoint(-81.32328796,41.23513794),"
Streetsboro Middle School
1951 Annalane Dr
Streetsboro, OH 44241

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Streetsboro Middle School",'Streetsboro=' + Streetsboro.length); Ravenna[Ravenna.length] = createMarker(new GPoint(-81.26600000,41.15853600),"
Student Services/child Care
3590 State Route 59
Ravenna, OH 44266

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Student Services/child Care",'Ravenna=' + Ravenna.length); Mogadore[Mogadore.length] = createMarker(new GPoint(-81.35214996,41.02265549),"
Suffield Elementary School
1128 Waterloo Rd
Mogadore, OH 44260

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Suffield Elementary School",'Mogadore=' + Mogadore.length); Ravenna[Ravenna.length] = createMarker(new GPoint(-81.23866272,41.15246964),"
Tappan Elementary School
310 Bennett Ave
Ravenna, OH 44266

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Tappan Elementary School",'Ravenna=' + Ravenna.length); Streetsboro[Streetsboro.length] = createMarker(new GPoint(-81.36218262,41.26163864),"
Wait Primary Elementary School
899 Frost Rd
Streetsboro, OH 44241

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Wait Primary Elementary School",'Streetsboro=' + Streetsboro.length); Kent[Kent.length] = createMarker(new GPoint(-81.34654999,41.15848923),"
Walls Elementary School
900 Doramor St
Kent, OH 44240

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Walls Elementary School",'Kent=' + Kent.length); Atwater[Atwater.length] = createMarker(new GPoint(-81.19471741,41.02845383),"
Waterloo High School
1464 Industry Rd
Atwater, OH 44201

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Waterloo High School",'Atwater=' + Atwater.length); Atwater[Atwater.length] = createMarker(new GPoint(-81.24859619,41.03269958),"
Waterloo Middle School
1464 Industry Rd
Atwater, OH 44201

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Waterloo Middle School",'Atwater=' + Atwater.length); Atwater[Atwater.length] = createMarker(new GPoint(-81.15390015,41.02366257),"
Waterloo Primary Elementary School
1464 Industry Rd
Atwater, OH 44201

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Waterloo Primary Elementary School",'Atwater=' + Atwater.length); Ravenna[Ravenna.length] = createMarker(new GPoint(-81.25166321,41.15800858),"
West Main Elementary School
639 W Main St
Ravenna, OH 44266

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("West Main Elementary School",'Ravenna=' + Ravenna.length); Ravenna[Ravenna.length] = createMarker(new GPoint(-81.26158905,41.16325378),"
West Park Elementary School
1071 Jones St
Ravenna, OH 44266

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("West Park Elementary School",'Ravenna=' + Ravenna.length); Ravenna[Ravenna.length] = createMarker(new GPoint(-81.25386810,41.13869858),"
Willyard Elementary School
680 Summit Rd
Ravenna, OH 44266

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Willyard Elementary School",'Ravenna=' + Ravenna.length); Windham[Windham.length] = createMarker(new GPoint(-81.04795837,41.23323059),"
Windham High School
9530 Bauer Ave
Windham, OH 44288

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Windham High School",'Windham=' + Windham.length); Windham[Windham.length] = createMarker(new GPoint(-81.04795837,41.23323059),"
Windham Junior High School
9530 Bauer Ave
Windham, OH 44288

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Windham Junior High School",'Windham=' + Windham.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,10); /* 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////' + showArray); map.removeOverlays(Atwater); map.removeOverlays(Aurora); map.removeOverlays(Diamond); map.removeOverlays(Garrettsville); map.removeOverlays(Hiram); map.removeOverlays(Kent); map.removeOverlays(Mantua); map.removeOverlays(Mogadore); map.removeOverlays(Ravenna); map.removeOverlays(Rootstown); map.removeOverlays(Streetsboro); map.removeOverlays(Windham); 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(Aurora);map.removeOverlays(Atwater); map.removeOverlays(Aurora); map.removeOverlays(Diamond); map.removeOverlays(Garrettsville); map.removeOverlays(Hiram); map.removeOverlays(Kent); map.removeOverlays(Mantua); map.removeOverlays(Mogadore); map.removeOverlays(Ravenna); map.removeOverlays(Rootstown); map.removeOverlays(Streetsboro); map.removeOverlays(Windham); map.addOverlays(Atwater); centerByArray(Atwater, false, false); cntMarker += Atwater.length; map.addOverlays(Aurora); centerByArray(Aurora, false, false); cntMarker += Aurora.length; map.addOverlays(Diamond); centerByArray(Diamond, false, false); cntMarker += Diamond.length; map.addOverlays(Garrettsville); centerByArray(Garrettsville, false, false); cntMarker += Garrettsville.length; map.addOverlays(Hiram); centerByArray(Hiram, false, false); cntMarker += Hiram.length; map.addOverlays(Kent); centerByArray(Kent, false, false); cntMarker += Kent.length; map.addOverlays(Mantua); centerByArray(Mantua, false, false); cntMarker += Mantua.length; map.addOverlays(Mogadore); centerByArray(Mogadore, false, false); cntMarker += Mogadore.length; map.addOverlays(Ravenna); centerByArray(Ravenna, false, false); cntMarker += Ravenna.length; map.addOverlays(Rootstown); centerByArray(Rootstown, false, false); cntMarker += Rootstown.length; map.addOverlays(Streetsboro); centerByArray(Streetsboro, false, false); cntMarker += Streetsboro.length; map.addOverlays(Windham); centerByArray(Windham, false, false); cntMarker += Windham.length; centerByArray(Aurora,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'); } }