function addMarkers() { mySelect = document.getElementById('selection'); Adamsville = [];Zanesville = [];Duncan_Falls = [];New_Concord = [];Frazeysburg = [];Hopewell = [];Dresden = [];New = [];Nashport = [];Philo = [];South_Zanesville = [];mySelect.options[mySelect.options.length] = new Option("Adamsville schools",'all=Adamsville'); mySelect.options[mySelect.options.length] = new Option("Dresden schools",'all=Dresden'); mySelect.options[mySelect.options.length] = new Option("Duncan Falls schools",'all=Duncan_Falls'); mySelect.options[mySelect.options.length] = new Option("Frazeysburg schools",'all=Frazeysburg'); mySelect.options[mySelect.options.length] = new Option("Hopewell schools",'all=Hopewell'); mySelect.options[mySelect.options.length] = new Option("Nashport schools",'all=Nashport'); mySelect.options[mySelect.options.length] = new Option("New schools",'all=New'); mySelect.options[mySelect.options.length] = new Option("New Concord schools",'all=New_Concord'); mySelect.options[mySelect.options.length] = new Option("Philo schools",'all=Philo'); mySelect.options[mySelect.options.length] = new Option("South Zanesville schools",'all=South_Zanesville'); mySelect.options[mySelect.options.length] = new Option("Zanesville schools",'all=Zanesville'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Adamsville[Adamsville.length] = createMarker(new GPoint(-81.88240051,40.06699371),"
Adamsville Elementary School
7950 East St
Adamsville, OH 43802

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Adamsville Elementary School",'Adamsville=' + Adamsville.length); Zanesville[Zanesville.length] = createMarker(new GPoint(-81.97753906,39.93588257),"
Adult Basic & Literacy Ed-able
400 Richards Rd
Zanesville, OH 43701

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Adult Basic & Literacy Ed-able",'Zanesville=' + Zanesville.length); Zanesville[Zanesville.length] = createMarker(new GPoint(-81.97753906,39.93588257),"
Adult Center For Education
400 Richards Rd
Zanesville, OH 43701

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Adult Center For Education",'Zanesville=' + Zanesville.length); Zanesville[Zanesville.length] = createMarker(new GPoint(-82.01560211,39.92499161),"
Cleveland Middle School
928 Pine St
Zanesville, OH 43701

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Cleveland Middle School",'Zanesville=' + Zanesville.length); Zanesville[Zanesville.length] = createMarker(new GPoint(-82.05499268,39.97224808),"
Dillon Elementary School
3005 Dillon School Dr
Zanesville, OH 43701

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Dillon Elementary School",'Zanesville=' + Zanesville.length); Duncan_Falls[Duncan_Falls.length] = createMarker(new GPoint(-81.91159821,39.87699890),"
Duncan Falls Elementary School
Po Box 398
Duncan Falls, OH 43734

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Duncan Falls Elementary School",'Duncan_Falls=' + Duncan_Falls.length); New_Concord[New_Concord.length] = createMarker(new GPoint(-81.74018860,40.00785446),"
East Muskingum Middle School
13120 John Glenn School Rd
New Concord, OH 43762

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("East Muskingum Middle School",'New_Concord=' + New_Concord.length); Zanesville[Zanesville.length] = createMarker(new GPoint(-82.05149078,39.89693832),"
Foxfire Alternative High School
2805 Pinkerton Lane
Zanesville, OH 43702

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Foxfire Alternative High School",'Zanesville=' + Zanesville.length); Duncan_Falls[Duncan_Falls.length] = createMarker(new GPoint(-81.90829468,39.87554932),"
Franklin Local Digital Academy
360 Cedar St
Duncan Falls, OH 43734

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Franklin Local Digital Academy",'Duncan_Falls=' + Duncan_Falls.length); Frazeysburg[Frazeysburg.length] = createMarker(new GPoint(-82.14749908,40.15029907),"
Frazeyburg Intermediate Elementary School
58 N State St
Frazeysburg, OH 43822

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Frazeyburg Intermediate Elementary School",'Frazeysburg=' + Frazeysburg.length); Frazeysburg[Frazeysburg.length] = createMarker(new GPoint(-82.14749908,40.15029907),"
Frazeysburg Elementary School
Po Box 250
Frazeysburg, OH 43822

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Frazeysburg Elementary School",'Frazeysburg=' + Frazeysburg.length); Zanesville[Zanesville.length] = createMarker(new GPoint(-82.00511932,39.92457581),"
General Rufus Putnam Community Elementary School
920 Moxahala Ave
Zanesville, OH 43701

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("General Rufus Putnam Community Elementary School",'Zanesville=' + Zanesville.length); Hopewell[Hopewell.length] = createMarker(new GPoint(-82.19068146,39.95606232),"
Hopewell Elementary School
11100 West Pike
Hopewell, OH 43746

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Hopewell Elementary School",'Hopewell=' + Hopewell.length); Zanesville[Zanesville.length] = createMarker(new GPoint(-82.00578308,39.93013763),"
James Madison Family Center
109 Madison St
Zanesville, OH 43701

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("James Madison Family Center",'Zanesville=' + Zanesville.length); Dresden[Dresden.length] = createMarker(new GPoint(-82.00460052,40.12689972),"
Jefferson Elementary School
1318 Main St
Dresden, OH 43821

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Jefferson Elementary School",'Dresden=' + Dresden.length); New[New.length] = createMarker(new GPoint(-81.74055481,40.00791550),"
John Glenn High School
13505 John Glenn School Rd
New, OH 43762

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("John Glenn High School",'New=' + New.length); New_Concord[New_Concord.length] = createMarker(new GPoint(-81.73429871,40.01190186),"
Larry Miller Intermediate Elementary School
13125 John Glenn School Rd
New Concord, OH 43762

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Larry Miller Intermediate Elementary School",'New_Concord=' + New_Concord.length); Zanesville[Zanesville.length] = createMarker(new GPoint(-82.05133057,39.88205719),"
Maysville Elementary School
3850 Panther Dr
Zanesville, OH 43701

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Maysville Elementary School",'Zanesville=' + Zanesville.length); Zanesville[Zanesville.length] = createMarker(new GPoint(-82.05520630,39.88378525),"
Maysville High School
3725 Panther Drive
Zanesville, OH 43701

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Maysville High School",'Zanesville=' + Zanesville.length); Zanesville[Zanesville.length] = createMarker(new GPoint(-82.05520630,39.88378525),"
Maysville Middle School
3725 Panther Drive
Zanesville, OH 43701

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Maysville Middle School",'Zanesville=' + Zanesville.length); Zanesville[Zanesville.length] = createMarker(new GPoint(-82.01766205,39.95120621),"
Mcintire Elementary School
1007 Mcintire Ave
Zanesville, OH 43701

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Mcintire Elementary School",'Zanesville=' + Zanesville.length); Zanesville[Zanesville.length] = createMarker(new GPoint(-81.98825073,39.93500137),"
Mckinley Elementary School
1428 Sharon Ave
Zanesville, OH 43701

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Mckinley Elementary School",'Zanesville=' + Zanesville.length); Zanesville[Zanesville.length] = createMarker(new GPoint(-82.02331543,39.93885040),"
Munson Elementary School
1275 Roosevelt Ave
Zanesville, OH 43701

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Munson Elementary School",'Zanesville=' + Zanesville.length); Nashport[Nashport.length] = createMarker(new GPoint(-82.10256958,40.02865982),"
Nashport Elementary School
6260 Newark Rd
Nashport, OH 43830

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Nashport Elementary School",'Nashport=' + Nashport.length); Zanesville[Zanesville.length] = createMarker(new GPoint(-81.93805900,39.95397900),"
National Road
3505 East Pike
Zanesville, OH 43701

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("National Road",'Zanesville=' + Zanesville.length); New_Concord[New_Concord.length] = createMarker(new GPoint(-81.73807526,39.99604034),"
New Concord Elementary School
4 Stormont St
New Concord, OH 43762

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("New Concord Elementary School",'New_Concord=' + New_Concord.length); Zanesville[Zanesville.length] = createMarker(new GPoint(-82.12231445,39.85467148),"
Newton Elementary School
5500 Maysville Pike
Zanesville, OH 43701

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Newton Elementary School",'Zanesville=' + Zanesville.length); Zanesville[Zanesville.length] = createMarker(new GPoint(-81.85847473,39.97103500),"
Perry Elementary School
6975 East Pike
Zanesville, OH 43701

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Perry Elementary School",'Zanesville=' + Zanesville.length); Philo[Philo.length] = createMarker(new GPoint(-81.92350006,39.84960175),"
Philo High School
Po Box 177
Philo, OH 43771

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Philo High School",'Philo=' + Philo.length); Philo[Philo.length] = createMarker(new GPoint(-81.92350006,39.84960175),"
Philo Junior High School
Po Box 178
Philo, OH 43771

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Philo Junior High School",'Philo=' + Philo.length); Zanesville[Zanesville.length] = createMarker(new GPoint(-82.00180817,39.93946838),"
Pioneer Elementary School
20 9th St
Zanesville, OH 43701

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Pioneer Elementary School",'Zanesville=' + Zanesville.length); Zanesville[Zanesville.length] = createMarker(new GPoint(-81.96057129,39.94982910),"
Pleasant Grove Elementary School
199 Pleasant Grove Rd
Zanesville, OH 43701

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Pleasant Grove Elementary School",'Zanesville=' + Zanesville.length); Zanesville[Zanesville.length] = createMarker(new GPoint(-82.00753784,39.99549866),"
Richey Elementary School
645 Richey Rd
Zanesville, OH 43701

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Richey Elementary School",'Zanesville=' + Zanesville.length); Zanesville[Zanesville.length] = createMarker(new GPoint(-82.02162170,39.95130539),"
Roosevelt Middle School
1429 Blue Ave
Zanesville, OH 43701

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Roosevelt Middle School",'Zanesville=' + Zanesville.length); South_Zanesville[South_Zanesville.length] = createMarker(new GPoint(-82.01103973,39.90280151),"
South Zanesville Elementary S
E Main St
South Zanesville, OH 43701

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("South Zanesville Elementary S",'South_Zanesville=' + South_Zanesville.length); Zanesville[Zanesville.length] = createMarker(new GPoint(-82.03601837,39.92142105),"
Springfield-bell Elementary S
1148 Potts Ln
Zanesville, OH 43701

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Springfield-bell Elementary S",'Zanesville=' + Zanesville.length); Zanesville[Zanesville.length] = createMarker(new GPoint(-82.00736237,39.94305038),"
Squire Elementary School
160 N 4th St
Zanesville, OH 43701

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Squire Elementary School",'Zanesville=' + Zanesville.length); Dresden[Dresden.length] = createMarker(new GPoint(-82.00460052,40.12689972),"
Tri Valley Middle School
1358 Main St
Dresden, OH 43821

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Tri Valley Middle School",'Dresden=' + Dresden.length); Dresden[Dresden.length] = createMarker(new GPoint(-82.00460052,40.12689972),"
Tri-valley High School
46 E Muskingum Ave
Dresden, OH 43821

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Tri-valley High School",'Dresden=' + Dresden.length); Zanesville[Zanesville.length] = createMarker(new GPoint(-82.08907318,39.95536423),"
West Muskingum High School
150 Kimes Rd
Zanesville, OH 43701

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("West Muskingum High School",'Zanesville=' + Zanesville.length); Zanesville[Zanesville.length] = createMarker(new GPoint(-82.08921051,39.95392609),"
West Muskingum Middle School
100 Kimes Rd
Zanesville, OH 43701

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("West Muskingum Middle School",'Zanesville=' + Zanesville.length); Zanesville[Zanesville.length] = createMarker(new GPoint(-82.00627899,39.96485138),"
Westview Elementary School
2256 Dresden Rd
Zanesville, OH 43701

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Westview Elementary School",'Zanesville=' + Zanesville.length); Zanesville[Zanesville.length] = createMarker(new GPoint(-82.01557922,39.92218399),"
Wilson Elementary School
1063 Superior St
Zanesville, OH 43701

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Wilson Elementary School",'Zanesville=' + Zanesville.length); Zanesville[Zanesville.length] = createMarker(new GPoint(-81.97753906,39.93588257),"
Zanesville Campus
400 Richards Rd
Zanesville, OH 43701

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Zanesville Campus",'Zanesville=' + Zanesville.length); Zanesville[Zanesville.length] = createMarker(new GPoint(-82.01677704,39.96203995),"
Zanesville High School
1701 Blue Ave
Zanesville, OH 43701

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Zanesville High School",'Zanesville=' + Zanesville.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(Adamsville); map.removeOverlays(Dresden); map.removeOverlays(Duncan_Falls); map.removeOverlays(Frazeysburg); map.removeOverlays(Hopewell); map.removeOverlays(Nashport); map.removeOverlays(New); map.removeOverlays(New_Concord); map.removeOverlays(Philo); map.removeOverlays(South_Zanesville); map.removeOverlays(Zanesville); 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(Adamsville);map.removeOverlays(Adamsville); map.removeOverlays(Dresden); map.removeOverlays(Duncan_Falls); map.removeOverlays(Frazeysburg); map.removeOverlays(Hopewell); map.removeOverlays(Nashport); map.removeOverlays(New); map.removeOverlays(New_Concord); map.removeOverlays(Philo); map.removeOverlays(South_Zanesville); map.removeOverlays(Zanesville); map.addOverlays(Adamsville); centerByArray(Adamsville, false, false); cntMarker += Adamsville.length; map.addOverlays(Dresden); centerByArray(Dresden, false, false); cntMarker += Dresden.length; map.addOverlays(Duncan_Falls); centerByArray(Duncan_Falls, false, false); cntMarker += Duncan_Falls.length; map.addOverlays(Frazeysburg); centerByArray(Frazeysburg, false, false); cntMarker += Frazeysburg.length; map.addOverlays(Hopewell); centerByArray(Hopewell, false, false); cntMarker += Hopewell.length; map.addOverlays(Nashport); centerByArray(Nashport, false, false); cntMarker += Nashport.length; map.addOverlays(New); centerByArray(New, false, false); cntMarker += New.length; map.addOverlays(New_Concord); centerByArray(New_Concord, false, false); cntMarker += New_Concord.length; map.addOverlays(Philo); centerByArray(Philo, false, false); cntMarker += Philo.length; map.addOverlays(South_Zanesville); centerByArray(South_Zanesville, false, false); cntMarker += South_Zanesville.length; map.addOverlays(Zanesville); centerByArray(Zanesville, false, false); cntMarker += Zanesville.length; centerByArray(Adamsville,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'); } }