function addMarkers() { mySelect = document.getElementById('selection'); Jefferson = [];Austinburg = [];Ashtabula = [];Conneaut = [];Orwell = [];Geneva = [];Kingsville = [];North_Kingsville = [];Pierpont = [];Andover = [];Rock_Creek = [];Rome = [];Windsor = [];mySelect.options[mySelect.options.length] = new Option("Andover schools",'all=Andover'); mySelect.options[mySelect.options.length] = new Option("Ashtabula schools",'all=Ashtabula'); mySelect.options[mySelect.options.length] = new Option("Austinburg schools",'all=Austinburg'); mySelect.options[mySelect.options.length] = new Option("Conneaut schools",'all=Conneaut'); mySelect.options[mySelect.options.length] = new Option("Geneva schools",'all=Geneva'); mySelect.options[mySelect.options.length] = new Option("Jefferson schools",'all=Jefferson'); mySelect.options[mySelect.options.length] = new Option("Kingsville schools",'all=Kingsville'); mySelect.options[mySelect.options.length] = new Option("North Kingsville schools",'all=North_Kingsville'); mySelect.options[mySelect.options.length] = new Option("Orwell schools",'all=Orwell'); mySelect.options[mySelect.options.length] = new Option("Pierpont schools",'all=Pierpont'); mySelect.options[mySelect.options.length] = new Option("Rock Creek schools",'all=Rock_Creek'); mySelect.options[mySelect.options.length] = new Option("Rome schools",'all=Rome'); mySelect.options[mySelect.options.length] = new Option("Windsor schools",'all=Windsor'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Jefferson[Jefferson.length] = createMarker(new GPoint(-80.73207855,41.74913788),"
Ashtabula County High School
1565 State Route 167
Jefferson, OH 44047

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ashtabula County High School",'Jefferson=' + Jefferson.length); Austinburg[Austinburg.length] = createMarker(new GPoint(-80.86111450,41.77159882),"
Austinburg Elementary School
3030 State Route 307
Austinburg, OH 44010

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Austinburg Elementary School",'Austinburg=' + Austinburg.length); Ashtabula[Ashtabula.length] = createMarker(new GPoint(-80.78678131,41.86085129),"
Chestnut Elementary School
5321 Chestnut Ave
Ashtabula, OH 44004

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Chestnut Elementary School",'Ashtabula=' + Ashtabula.length); Conneaut[Conneaut.length] = createMarker(new GPoint(-80.56469727,41.96198273),"
Chestnut Elementary School
755 Chestnut St
Conneaut, OH 44030

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Chestnut Elementary School",'Conneaut=' + Conneaut.length); Orwell[Orwell.length] = createMarker(new GPoint(-80.76113129,41.53627014),"
Colebrook Elementary School
682 School St
Orwell, OH 44076

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Colebrook Elementary School",'Orwell=' + Orwell.length); Ashtabula[Ashtabula.length] = createMarker(new GPoint(-80.78765106,41.89561081),"
Columbus Junior High School
1326 Columbus Ave
Ashtabula, OH 44004

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Columbus Junior High School",'Ashtabula=' + Ashtabula.length); Conneaut[Conneaut.length] = createMarker(new GPoint(-80.56011963,41.94670105),"
Conneaut High School
381 Mill St
Conneaut, OH 44030

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Conneaut High School",'Conneaut=' + Conneaut.length); Conneaut[Conneaut.length] = createMarker(new GPoint(-80.54237366,41.94245148),"
Conneaut Middle School
230 Gateway Avenue
Conneaut, OH 44030

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Conneaut Middle School",'Conneaut=' + Conneaut.length); Geneva[Geneva.length] = createMarker(new GPoint(-80.95249176,41.72086716),"
Cork Elementary School
341 State Route 534 S
Geneva, OH 44041

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Cork Elementary School",'Geneva=' + Geneva.length); Ashtabula[Ashtabula.length] = createMarker(new GPoint(-80.73201752,41.88799667),"
Edgewood High School
2428 Blake Rd
Ashtabula, OH 44004

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Edgewood High School",'Ashtabula=' + Ashtabula.length); Geneva[Geneva.length] = createMarker(new GPoint(-80.95022583,41.80241394),"
Geneva Elementary School
119 S Eagle St
Geneva, OH 44041

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Geneva Elementary School",'Geneva=' + Geneva.length); Geneva[Geneva.length] = createMarker(new GPoint(-80.94126892,41.79448318),"
Geneva High School
1301 S Ridge Rd E
Geneva, OH 44041

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Geneva High School",'Geneva=' + Geneva.length); Geneva[Geneva.length] = createMarker(new GPoint(-80.94126892,41.79448318),"
Geneva Junior High School
839 Sherman St
Geneva, OH 44041

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Geneva Junior High School",'Geneva=' + Geneva.length); Orwell[Orwell.length] = createMarker(new GPoint(-80.81479645,41.53239822),"
Grand Valley Elementary School
111 Grand Valley Ave West
Orwell, OH 44076

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Grand Valley Elementary School",'Orwell=' + Orwell.length); Orwell[Orwell.length] = createMarker(new GPoint(-80.86611938,41.53574371),"
Grand Valley High School
111 Grand Valley Ave West
Orwell, OH 44076

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Grand Valley High School",'Orwell=' + Orwell.length); Jefferson[Jefferson.length] = createMarker(new GPoint(-80.77988434,41.73593140),"
Jefferson Area Jr/sr High School
125 S Poplar St
Jefferson, OH 44047

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Jefferson Area Jr/sr High School",'Jefferson=' + Jefferson.length); Jefferson[Jefferson.length] = createMarker(new GPoint(-80.76371765,41.73817444),"
Jefferson Elementary School
108 E Jefferson St
Jefferson, OH 44047

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Jefferson Elementary School",'Jefferson=' + Jefferson.length); Kingsville[Kingsville.length] = createMarker(new GPoint(-80.65720367,41.86560059),"
Kingsville Elementary School
Po Box 17
Kingsville, OH 44048

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Kingsville Elementary School",'Kingsville=' + Kingsville.length); Geneva[Geneva.length] = createMarker(new GPoint(-80.94515228,41.81168365),"
Krzic Elementary School
575 N Broadway
Geneva, OH 44041

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Krzic Elementary School",'Geneva=' + Geneva.length); Conneaut[Conneaut.length] = createMarker(new GPoint(-80.57262421,41.95390320),"
Lake View Elementary School
229 Gateway Av
Conneaut, OH 44030

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lake View Elementary School",'Conneaut=' + Conneaut.length); Ashtabula[Ashtabula.length] = createMarker(new GPoint(-80.80460358,41.89921951),"
Lakeside 9 High School
221 Lake Ave
Ashtabula, OH 44004

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lakeside 9 High School",'Ashtabula=' + Ashtabula.length); Ashtabula[Ashtabula.length] = createMarker(new GPoint(-80.78528595,41.86743546),"
Lakeside High School
401 W 44th St
Ashtabula, OH 44004

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lakeside High School",'Ashtabula=' + Ashtabula.length); Ashtabula[Ashtabula.length] = createMarker(new GPoint(-80.79586029,41.84983063),"
Mckinsey Elementary School
1113 Bunker Hill Rd
Ashtabula, OH 44004

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Mckinsey Elementary School",'Ashtabula=' + Ashtabula.length); North_Kingsville[North_Kingsville.length] = createMarker(new GPoint(-80.69049835,41.90579987),"
North Kingsville Elementary School
Po Box 249
North Kingsville, OH 44068

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("North Kingsville Elementary School",'North_Kingsville=' + North_Kingsville.length); Pierpont[Pierpont.length] = createMarker(new GPoint(-80.55940247,41.75989914),"
Pierpont Elementary School
Po Box 134
Pierpont, OH 44082

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Pierpont Elementary School",'Pierpont=' + Pierpont.length); Ashtabula[Ashtabula.length] = createMarker(new GPoint(-80.75620270,41.85225677),"
Plymouth Elementary School
1002 Plymouth Brick Rd
Ashtabula, OH 44004

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Plymouth Elementary School",'Ashtabula=' + Ashtabula.length); Andover[Andover.length] = createMarker(new GPoint(-80.55770111,41.61619949),"
Pymatuning Valley High School
Po Box 1180
Andover, OH 44003

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Pymatuning Valley High School",'Andover=' + Andover.length); Andover[Andover.length] = createMarker(new GPoint(-80.55770111,41.61619949),"
Pymatuning Valley Middle School
Po Box 1180
Andover, OH 44003

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Pymatuning Valley Middle School",'Andover=' + Andover.length); Andover[Andover.length] = createMarker(new GPoint(-80.55770111,41.61619949),"
Pymatuning Valley Primary Elementary School
Po Box 1180
Andover, OH 44003

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Pymatuning Valley Primary Elementary School",'Andover=' + Andover.length); Ashtabula[Ashtabula.length] = createMarker(new GPoint(-80.76491547,41.87377548),"
Ridgeview Elementary School
3456 Liberty St
Ashtabula, OH 44004

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Ridgeview Elementary School",'Ashtabula=' + Ashtabula.length); Rock_Creek[Rock_Creek.length] = createMarker(new GPoint(-80.85707092,41.66219711),"
Rock Creek Elementary School
2987 High St
Rock Creek, OH 44084

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Rock Creek Elementary School",'Rock_Creek=' + Rock_Creek.length); Rome[Rome.length] = createMarker(new GPoint(-80.84780121,41.60979843),"
Rome-hartsgrove Elementary School
Po Box 5039
Rome, OH 44085

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Rome-hartsgrove Elementary School",'Rome=' + Rome.length); Ashtabula[Ashtabula.length] = createMarker(new GPoint(-80.86988831,41.82395172),"
Saybrook Elementary School
7911 Depot Rd
Ashtabula, OH 44004

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Saybrook Elementary School",'Ashtabula=' + Ashtabula.length); Conneaut[Conneaut.length] = createMarker(new GPoint(-80.56008911,41.94726563),"
Southeast Elementary School
400 Mill St
Conneaut, OH 44030

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Southeast Elementary School",'Conneaut=' + Conneaut.length); Conneaut[Conneaut.length] = createMarker(new GPoint(-80.56004000,41.94738600),"
Southeast Preschool
400 Mill St
Conneaut, OH 44030

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Southeast Preschool",'Conneaut=' + Conneaut.length); Geneva[Geneva.length] = createMarker(new GPoint(-80.92062378,41.81327057),"
Spencer Elementary School
4641 N Ridge Rd E
Geneva, OH 44041

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Spencer Elementary School",'Geneva=' + Geneva.length); Ashtabula[Ashtabula.length] = createMarker(new GPoint(-80.77231598,41.86786270),"
State Road Elementary School
4200 State Rd
Ashtabula, OH 44004

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("State Road Elementary School",'Ashtabula=' + Ashtabula.length); Ashtabula[Ashtabula.length] = createMarker(new GPoint(-80.81990814,41.88766479),"
Thomas Jefferson Elementary School
2630 W 13th St
Ashtabula, OH 44004

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Thomas Jefferson Elementary School",'Ashtabula=' + Ashtabula.length); Ashtabula[Ashtabula.length] = createMarker(new GPoint(-80.78944397,41.87141800),"
Thurgood Marshall Elementary School
3703 Station Ave
Ashtabula, OH 44004

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Thurgood Marshall Elementary School",'Ashtabula=' + Ashtabula.length); Ashtabula[Ashtabula.length] = createMarker(new GPoint(-80.77218628,41.87393570),"
Wallace H Braden Junior High School
3436 Edgewood Dr
Ashtabula, OH 44004

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Wallace H Braden Junior High School",'Ashtabula=' + Ashtabula.length); Ashtabula[Ashtabula.length] = createMarker(new GPoint(-80.80568695,41.89219284),"
Washington Elementary School
917 Lake Ave
Ashtabula, OH 44004

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Washington Elementary School",'Ashtabula=' + Ashtabula.length); Ashtabula[Ashtabula.length] = createMarker(new GPoint(-80.79797363,41.86443710),"
West Junior High School
1231 W 47th St
Ashtabula, OH 44004

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("West Junior High School",'Ashtabula=' + Ashtabula.length); Conneaut[Conneaut.length] = createMarker(new GPoint(-80.57614899,41.93977356),"
West Main Elementary School
836 Main St
Conneaut, OH 44030

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("West Main Elementary School",'Conneaut=' + Conneaut.length); Ashtabula[Ashtabula.length] = createMarker(new GPoint(-80.82498169,41.84733582),"
Windermere
6309 Sanborn Rd
Ashtabula, OH 44004

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Windermere",'Ashtabula=' + Ashtabula.length); Windsor[Windsor.length] = createMarker(new GPoint(-80.94631958,41.53526306),"
Windsor Elementary School
5430 State Route 322
Windsor, OH 44099

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Windsor Elementary School",'Windsor=' + Windsor.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(Andover); map.removeOverlays(Ashtabula); map.removeOverlays(Austinburg); map.removeOverlays(Conneaut); map.removeOverlays(Geneva); map.removeOverlays(Jefferson); map.removeOverlays(Kingsville); map.removeOverlays(North_Kingsville); map.removeOverlays(Orwell); map.removeOverlays(Pierpont); map.removeOverlays(Rock_Creek); map.removeOverlays(Rome); map.removeOverlays(Windsor); 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(Jefferson);map.removeOverlays(Andover); map.removeOverlays(Ashtabula); map.removeOverlays(Austinburg); map.removeOverlays(Conneaut); map.removeOverlays(Geneva); map.removeOverlays(Jefferson); map.removeOverlays(Kingsville); map.removeOverlays(North_Kingsville); map.removeOverlays(Orwell); map.removeOverlays(Pierpont); map.removeOverlays(Rock_Creek); map.removeOverlays(Rome); map.removeOverlays(Windsor); map.addOverlays(Andover); centerByArray(Andover, false, false); cntMarker += Andover.length; map.addOverlays(Ashtabula); centerByArray(Ashtabula, false, false); cntMarker += Ashtabula.length; map.addOverlays(Austinburg); centerByArray(Austinburg, false, false); cntMarker += Austinburg.length; map.addOverlays(Conneaut); centerByArray(Conneaut, false, false); cntMarker += Conneaut.length; map.addOverlays(Geneva); centerByArray(Geneva, false, false); cntMarker += Geneva.length; map.addOverlays(Jefferson); centerByArray(Jefferson, false, false); cntMarker += Jefferson.length; map.addOverlays(Kingsville); centerByArray(Kingsville, false, false); cntMarker += Kingsville.length; map.addOverlays(North_Kingsville); centerByArray(North_Kingsville, false, false); cntMarker += North_Kingsville.length; map.addOverlays(Orwell); centerByArray(Orwell, false, false); cntMarker += Orwell.length; map.addOverlays(Pierpont); centerByArray(Pierpont, false, false); cntMarker += Pierpont.length; map.addOverlays(Rock_Creek); centerByArray(Rock_Creek, false, false); cntMarker += Rock_Creek.length; map.addOverlays(Rome); centerByArray(Rome, false, false); cntMarker += Rome.length; map.addOverlays(Windsor); centerByArray(Windsor, false, false); cntMarker += Windsor.length; centerByArray(Jefferson,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'); } }