function addMarkers(){ mySelect = document.getElementById('selection'); Canton = [];Louisville = [];Hartville = [];North_Canton = [];Massillon = [];Minerva = [];Alliance = [];Canal_Fulton = [];Navarre = [];Waynesburg = [];mySelect.options[mySelect.options.length] = new Option("Alliance schools",'all=Alliance'); mySelect.options[mySelect.options.length] = new Option("Canal Fulton schools",'all=Canal_Fulton'); mySelect.options[mySelect.options.length] = new Option("Canton schools",'all=Canton'); mySelect.options[mySelect.options.length] = new Option("Hartville schools",'all=Hartville'); mySelect.options[mySelect.options.length] = new Option("Louisville schools",'all=Louisville'); mySelect.options[mySelect.options.length] = new Option("Massillon schools",'all=Massillon'); mySelect.options[mySelect.options.length] = new Option("Minerva schools",'all=Minerva'); mySelect.options[mySelect.options.length] = new Option("Navarre schools",'all=Navarre'); mySelect.options[mySelect.options.length] = new Option("North Canton schools",'all=North_Canton'); mySelect.options[mySelect.options.length] = new Option("Waynesburg schools",'all=Waynesburg'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Canton[Canton.length] = createMarker(new GPoint(-81.42026300,40.84193800),"
The Academy Early Childhood An
4111 38th St Nw
Canton, OH 44718
Co-ed school, PK-2
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Academy Early Childhood An",'Canton=' + Canton.length); Canton[Canton.length] = createMarker(new GPoint(-81.40448700,40.83199900),"
Canton Country Day School
3000 Demington Ave Nw
Canton, OH 44718
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Canton Country Day School",'Canton=' + Canton.length); Canton[Canton.length] = createMarker(new GPoint(-81.37171000,40.81393700),"
Canton Montessori School
125 15th Street Nw
Canton, OH 44703
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Canton Montessori School",'Canton=' + Canton.length); Louisville[Louisville.length] = createMarker(new GPoint(-81.23034800,40.95130000),"
Good Shepherd School
8700 Edison St Ne
Louisville, OH 44641
Co-ed school, 1-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Good Shepherd School",'Louisville=' + Louisville.length); Hartville[Hartville.length] = createMarker(new GPoint(-81.36063200,40.93946200),"
Hartville Christian School
10515 Market Avenue N
Hartville, OH 44632
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Hartville Christian School",'Hartville=' + Hartville.length); Canton[Canton.length] = createMarker(new GPoint(-81.39734600,40.79676700),"
Heritage Christian School
2107 6th Street Sw
Canton, OH 44706
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Heritage Christian School",'Canton=' + Canton.length); North_Canton[North_Canton.length] = createMarker(new GPoint(-81.36315500,40.89748300),"
Holy Cross Ps, Kg & Childcare
7707 Market Avenue N
North Canton, OH 44721
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Holy Cross Ps, Kg & Childcare",'North_Canton=' + North_Canton.length); Hartville[Hartville.length] = createMarker(new GPoint(-81.36843000,40.97592400),"
Lake Center Christian School
12893 Kaufman Ave.
Hartville, OH 44632
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lake Center Christian School",'Hartville=' + Hartville.length); Massillon[Massillon.length] = createMarker(new GPoint(-81.51442500,40.80082500),"
Little Sprouts Child Development Center
806 North Avenue Ne
Massillon, OH 44646
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Little Sprouts Child Development Center",'Massillon=' + Massillon.length); Canton[Canton.length] = createMarker(new GPoint(-81.37644200,40.82413700),"
Malone College Weaver Child Development Center
515 25th Street Nw
Canton, OH 44709
Co-ed school, PK-1
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Malone College Weaver Child Development Center",'Canton=' + Canton.length); Massillon[Massillon.length] = createMarker(new GPoint(-81.53432900,40.78596300),"
Massillon Christian School
965 Overlook Avenue Sw
Massillon, OH 44647
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Massillon Christian School",'Massillon=' + Massillon.length); Minerva[Minerva.length] = createMarker(new GPoint(-81.10578200,40.72998500),"
Minerva Area Christian School
300 W Lincolnway
Minerva, OH 44657
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Minerva Area Christian School",'Minerva=' + Minerva.length); Minerva[Minerva.length] = createMarker(new GPoint(-81.09568100,40.79789700),"
New Franklin Christian Academy
16310 Lisbon Street Se
Minerva, OH 44657
Co-ed school, 1-10
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("New Franklin Christian Academy",'Minerva=' + Minerva.length); Canton[Canton.length] = createMarker(new GPoint(-81.38088500,40.84193700),"
Our Lady Of Peace School
1001 39th Street Nw
Canton, OH 44709
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Our Lady Of Peace School",'Canton=' + Canton.length); Alliance[Alliance.length] = createMarker(new GPoint(-81.12349400,40.91497000),"
Regina Coeli/st Joseph School
733 Fernwood Blvd
Alliance, OH 44601
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Regina Coeli/st Joseph School",'Alliance=' + Alliance.length); Massillon[Massillon.length] = createMarker(new GPoint(-81.48663400,40.87925600),"
Rivertree Christian School
7373 Portage Street Nw
Massillon, OH 44646
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Rivertree Christian School",'Massillon=' + Massillon.length); Louisville[Louisville.length] = createMarker(new GPoint(-81.25930000,40.85120000),"
Sacred Heart Of Mary School
8276 N Nickelplate Street
Louisville, OH 44641
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sacred Heart Of Mary School",'Louisville=' + Louisville.length); Canton[Canton.length] = createMarker(new GPoint(-81.44173300,40.79331500),"
St. Joan Of Arc School
120 Bordner Avenue Sw
Canton, OH 44710
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Joan Of Arc School",'Canton=' + Canton.length); Massillon[Massillon.length] = createMarker(new GPoint(-81.50509700,40.81857500),"
St. John Lutheran School
1900 Wales Road Ne
Massillon, OH 44646
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. John Lutheran School",'Massillon=' + Massillon.length); Canton[Canton.length] = createMarker(new GPoint(-81.42140000,40.96360000),"
St. Mark's Episcopal Day School
515 48th St Nw
Canton, OH 44685
Co-ed school, PK-KG
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Mark's Episcopal Day School",'Canton=' + Canton.length); North_Canton[North_Canton.length] = createMarker(new GPoint(-81.40186700,40.87470000),"
St. Paul School
303 S Main Street
North Canton, OH 44720
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Paul School",'North_Canton=' + North_Canton.length); Canton[Canton.length] = createMarker(new GPoint(-81.37481400,40.80318700),"
St. Peter Elementary School
702 Cleveland Avenue Nw
Canton, OH 44702
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Peter Elementary School",'Canton=' + Canton.length); Canton[Canton.length] = createMarker(new GPoint(-81.41803900,40.83331900),"
Small Word Montessori Inc
3909 Blackburn Road Nw
Canton, OH 44718
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Small Word Montessori Inc",'Canton=' + Canton.length); Canal_Fulton[Canal_Fulton.length] = createMarker(new GPoint(-81.59514500,40.88931800),"
Ss Philip & James School
532 High Street Ne
Canal Fulton, OH 44614
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ss Philip & James School",'Canal_Fulton=' + Canal_Fulton.length); Massillon[Massillon.length] = createMarker(new GPoint(-81.56054600,40.79576700),"
St Barbara Elementary School
2809 Lincoln Way Nw
Massillon, OH 44647
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Barbara Elementary School",'Massillon=' + Massillon.length); Navarre[Navarre.length] = createMarker(new GPoint(-81.51811800,40.72448200),"
St Clement Elementary School
402 Market Street Ne
Navarre, OH 44662
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Clement Elementary School",'Navarre=' + Navarre.length); Waynesburg[Waynesburg.length] = createMarker(new GPoint(-81.26729100,40.66581900),"
St James Elementary School
400 W Lisbon Street
Waynesburg, OH 44688
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St James Elementary School",'Waynesburg=' + Waynesburg.length); Canton[Canton.length] = createMarker(new GPoint(-81.40248100,40.79942500),"
St Joseph School
126 Columbus Avenue Nw
Canton, OH 44708
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Joseph School",'Canton=' + Canton.length); Louisville[Louisville.length] = createMarker(new GPoint(-81.25939700,40.83841000),"
St Louis Elementary School
214 N Chapel Street
Louisville, OH 44641
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Louis Elementary School",'Louisville=' + Louisville.length); Massillon[Massillon.length] = createMarker(new GPoint(-81.52347500,40.80212500),"
St Mary Elementary School
640 1st Street Ne
Massillon, OH 44646
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Mary Elementary School",'Massillon=' + Massillon.length); Canton[Canton.length] = createMarker(new GPoint(-81.42114100,40.83585300),"
St Michael Elementary School
3431 Saint Michael Blvd. NW
Canton, OH 44718
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Michael Elementary School",'Canton=' + Canton.length); Canton[Canton.length] = createMarker(new GPoint(-81.36647100,40.82632500),"
Stark County Christian Academy
2651 Market Avenue North
Canton, OH 44714
Co-ed school, PK-2
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Stark County Christian Academy",'Canton=' + Canton.length); Canton[Canton.length] = createMarker(new GPoint(-81.38965500,40.83736400),"
Stark Montessori School
3500 Cleveland Avenue,nw
Canton, OH 44709
Co-ed school, PK-KG
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Stark Montessori School",'Canton=' + Canton.length); Canton[Canton.length] = createMarker(new GPoint(-81.37570000,40.79880000),"
Trinity Lutheran Presch & Kindergarten
Dewalt Ave. N.w.
Canton, OH 44702
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Trinity Lutheran Presch & Kindergarten",'Canton=' + Canton.length); Canton[Canton.length] = createMarker(new GPoint(-81.37748300,40.79880300),"
Trinity Lutheran Preschool
115 Deewalt
Canton, OH 44702
Co-ed school, PK-KG
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Trinity Lutheran Preschool",'Canton=' + Canton.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(Alliance); map.removeOverlays(Canal_Fulton); map.removeOverlays(Canton); map.removeOverlays(Hartville); map.removeOverlays(Louisville); map.removeOverlays(Massillon); map.removeOverlays(Minerva); map.removeOverlays(Navarre); map.removeOverlays(North_Canton); map.removeOverlays(Waynesburg); 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(Canton);map.removeOverlays(Alliance); map.removeOverlays(Canal_Fulton); map.removeOverlays(Canton); map.removeOverlays(Hartville); map.removeOverlays(Louisville); map.removeOverlays(Massillon); map.removeOverlays(Minerva); map.removeOverlays(Navarre); map.removeOverlays(North_Canton); map.removeOverlays(Waynesburg); map.addOverlays(Alliance); centerByArray(Alliance, false, false); cntMarker += Alliance.length; map.addOverlays(Canal_Fulton); centerByArray(Canal_Fulton, false, false); cntMarker += Canal_Fulton.length; map.addOverlays(Canton); centerByArray(Canton, false, false); cntMarker += Canton.length; map.addOverlays(Hartville); centerByArray(Hartville, false, false); cntMarker += Hartville.length; map.addOverlays(Louisville); centerByArray(Louisville, false, false); cntMarker += Louisville.length; map.addOverlays(Massillon); centerByArray(Massillon, false, false); cntMarker += Massillon.length; map.addOverlays(Minerva); centerByArray(Minerva, false, false); cntMarker += Minerva.length; map.addOverlays(Navarre); centerByArray(Navarre, false, false); cntMarker += Navarre.length; map.addOverlays(North_Canton); centerByArray(North_Canton, false, false); cntMarker += North_Canton.length; map.addOverlays(Waynesburg); centerByArray(Waynesburg, false, false); cntMarker += Waynesburg.length; centerByArray(Canton,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; }