function addMarkers() { mySelect = document.getElementById('selection'); Newark = [];Etna = [];Heath = [];Granville = [];Hebron = [];Johnstown = [];Kirkersville = [];Pataskala = [];Summit_Station = [];Alexandria = [];Croton = [];Homer = [];Nashport = [];Reynoldsburg = [];Utica = [];mySelect.options[mySelect.options.length] = new Option("Alexandria schools",'all=Alexandria'); mySelect.options[mySelect.options.length] = new Option("Croton schools",'all=Croton'); mySelect.options[mySelect.options.length] = new Option("Etna schools",'all=Etna'); mySelect.options[mySelect.options.length] = new Option("Granville schools",'all=Granville'); mySelect.options[mySelect.options.length] = new Option("Heath schools",'all=Heath'); mySelect.options[mySelect.options.length] = new Option("Hebron schools",'all=Hebron'); mySelect.options[mySelect.options.length] = new Option("Homer schools",'all=Homer'); mySelect.options[mySelect.options.length] = new Option("Johnstown schools",'all=Johnstown'); mySelect.options[mySelect.options.length] = new Option("Kirkersville schools",'all=Kirkersville'); mySelect.options[mySelect.options.length] = new Option("Nashport schools",'all=Nashport'); mySelect.options[mySelect.options.length] = new Option("Newark schools",'all=Newark'); mySelect.options[mySelect.options.length] = new Option("Pataskala schools",'all=Pataskala'); mySelect.options[mySelect.options.length] = new Option("Reynoldsburg schools",'all=Reynoldsburg'); mySelect.options[mySelect.options.length] = new Option("Summit Station schools",'all=Summit_Station'); mySelect.options[mySelect.options.length] = new Option("Utica schools",'all=Utica'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Newark[Newark.length] = createMarker(new GPoint(-82.39668274,40.04513931),"
Ben Franklin Elementary School
533 Beacon Rd
Newark, OH 43055

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Ben Franklin Elementary School",'Newark=' + Newark.length); Newark[Newark.length] = createMarker(new GPoint(-82.40799713,40.05778503),"
Central Intermediate Elementary School
116 W Church St
Newark, OH 43055

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Central Intermediate Elementary School",'Newark=' + Newark.length); Newark[Newark.length] = createMarker(new GPoint(-82.44108582,40.04907608),"
Cherry Valley Elementary School
1040 W Main St
Newark, OH 43055

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Cherry Valley Elementary School",'Newark=' + Newark.length); Newark[Newark.length] = createMarker(new GPoint(-82.38841248,40.06313705),"
Conrad Elementary School
310 Everett Ave
Newark, OH 43055

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Conrad Elementary School",'Newark=' + Newark.length); Etna[Etna.length] = createMarker(new GPoint(-82.68190002,39.95719910),"
Etna Elementary School
Po Box 156
Etna, OH 43018

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Etna Elementary School",'Etna=' + Etna.length); Heath[Heath.length] = createMarker(new GPoint(-82.44305420,40.03286743),"
Garfield Elementary School
680 S 30th St
Heath, OH 43056

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Garfield Elementary School",'Heath=' + Heath.length); Granville[Granville.length] = createMarker(new GPoint(-82.51438904,40.07026672),"
Granville Elementary School
310 N Granger St
Granville, OH 43023

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Granville Elementary School",'Granville=' + Granville.length); Granville[Granville.length] = createMarker(new GPoint(-82.52342224,40.07785034),"
Granville High School
248 New Burg St
Granville, OH 43023

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Granville High School",'Granville=' + Granville.length); Granville[Granville.length] = createMarker(new GPoint(-82.54003906,40.09025574),"
Granville Intermediate Elementary School
2025 Burg St
Granville, OH 43023

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Granville Intermediate Elementary School",'Granville=' + Granville.length); Granville[Granville.length] = createMarker(new GPoint(-82.52290344,40.07782364),"
Granville Middle School
210 New Burg St
Granville, OH 43023

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Granville Middle School",'Granville=' + Granville.length); Newark[Newark.length] = createMarker(new GPoint(-82.36998749,40.06213379),"
Hazelwood Elementary School
50 Obannon Ave
Newark, OH 43055

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Hazelwood Elementary School",'Newark=' + Newark.length); Heath[Heath.length] = createMarker(new GPoint(-82.43572998,40.02555084),"
Heath High School
300 Licking View Dr
Heath, OH 43056

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Heath High School",'Heath=' + Heath.length); Heath[Heath.length] = createMarker(new GPoint(-82.43507385,40.02536774),"
Heath Middle School
310 Licking View Dr
Heath, OH 43056

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Heath Middle School",'Heath=' + Heath.length); Hebron[Hebron.length] = createMarker(new GPoint(-82.49600220,39.95946121),"
Hebron Elementary School
709 Deacon St
Hebron, OH 43025

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Hebron Elementary School",'Hebron=' + Hebron.length); Hebron[Hebron.length] = createMarker(new GPoint(-82.43802643,39.95866013),"
Jackson Elementary School
9380 Lancer Rd
Hebron, OH 43025

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Jackson Elementary School",'Hebron=' + Hebron.length); Newark[Newark.length] = createMarker(new GPoint(-82.42835236,40.07251740),"
John Clem Elementary School
475 Jefferson Rd
Newark, OH 43055

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("John Clem Elementary School",'Newark=' + Newark.length); Johnstown[Johnstown.length] = createMarker(new GPoint(-82.68016052,40.14710236),"
Johnstown High School
401 S Oregon St
Johnstown, OH 43031

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Johnstown High School",'Johnstown=' + Johnstown.length); Newark[Newark.length] = createMarker(new GPoint(-82.37842560,40.06998825),"
Kettering Intermediate Elementary School
600 Arlington Ave
Newark, OH 43055

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Kettering Intermediate Elementary School",'Newark=' + Newark.length); Kirkersville[Kirkersville.length] = createMarker(new GPoint(-82.59917450,39.96125793),"
Kirkersville Elementary School
215 N Fifth St
Kirkersville, OH 43033

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Kirkersville Elementary School",'Kirkersville=' + Kirkersville.length); Hebron[Hebron.length] = createMarker(new GPoint(-82.48709869,39.95550156),"
Lakewood Digital Academy
Po Box 70
Hebron, OH 43025

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lakewood Digital Academy",'Hebron=' + Hebron.length); Hebron[Hebron.length] = createMarker(new GPoint(-82.43756866,39.95966721),"
Lakewood High School
9331 Lancer Rd
Hebron, OH 43025

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lakewood High School",'Hebron=' + Hebron.length); Hebron[Hebron.length] = createMarker(new GPoint(-82.43800354,39.95881271),"
Lakewood Intermediate Elementary School
9370 Lancer Rd
Hebron, OH 43025

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Lakewood Intermediate Elementary School",'Hebron=' + Hebron.length); Hebron[Hebron.length] = createMarker(new GPoint(-82.44147491,39.96033478),"
Lakewood Middle School
5222 National Rd Se
Hebron, OH 43025

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Lakewood Middle School",'Hebron=' + Hebron.length); Newark[Newark.length] = createMarker(new GPoint(-82.42897034,40.09898758),"
Licking County
150 Price Rd
Newark, OH 43055

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Licking County",'Newark=' + Newark.length); Pataskala[Pataskala.length] = createMarker(new GPoint(-82.75187683,39.99555206),"
Licking Heights High School
4000 Mink St Sw
Pataskala, OH 43062

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Licking Heights High School",'Pataskala=' + Pataskala.length); Summit_Station[Summit_Station.length] = createMarker(new GPoint(-82.75187683,39.99555206),"
Licking Heights Middle School
6539 Summit Rd Sw
Summit Station, OH 43073

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Licking Heights Middle School",'Summit_Station=' + Summit_Station.length); Newark[Newark.length] = createMarker(new GPoint(-82.28616333,40.07948685),"
Licking Valley High School
100 Hainsview Dr
Newark, OH 43055

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Licking Valley High School",'Newark=' + Newark.length); Newark[Newark.length] = createMarker(new GPoint(-82.28984833,40.07740021),"
Licking Valley Middle School
1379 Licking Valley Rd
Newark, OH 43055

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Licking Valley Middle School",'Newark=' + Newark.length); Newark[Newark.length] = createMarker(new GPoint(-82.38262939,40.05934525),"
Lincoln Middle School
471 E Main St
Newark, OH 43055

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Lincoln Middle School",'Newark=' + Newark.length); Newark[Newark.length] = createMarker(new GPoint(-82.33820343,40.06231308),"
Madison Elementary School
1718 E Main St
Newark, OH 43055

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Madison Elementary School",'Newark=' + Newark.length); Newark[Newark.length] = createMarker(new GPoint(-82.42407227,40.05130386),"
Maholm Elementary School
96 Maholm St
Newark, OH 43055

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Maholm Elementary School",'Newark=' + Newark.length); Newark[Newark.length] = createMarker(new GPoint(-82.33467102,40.12776566),"
Mary Ann Elementary School
11152 Wilkins Run Rd
Newark, OH 43055

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Mary Ann Elementary School",'Newark=' + Newark.length); Newark[Newark.length] = createMarker(new GPoint(-82.43324280,40.05479050),"
Mcguffey Elementary School
130 Green Wave Dr
Newark, OH 43055

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Mcguffey Elementary School",'Newark=' + Newark.length); Newark[Newark.length] = createMarker(new GPoint(-82.39839172,40.05873871),"
Newark Digital Academy
255 Woods Ave
Newark, OH 43055

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Newark Digital Academy",'Newark=' + Newark.length); Newark[Newark.length] = createMarker(new GPoint(-82.41828918,40.06274414),"
Newark High School
314 Granville St
Newark, OH 43055

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Newark High School",'Newark=' + Newark.length); Newark[Newark.length] = createMarker(new GPoint(-82.42568207,40.15209198),"
Newton Elementary School
6645 Mount Vernon Rd
Newark, OH 43055

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Newton Elementary School",'Newark=' + Newark.length); Newark[Newark.length] = createMarker(new GPoint(-82.42633820,40.08643723),"
North Elementary School
300 Deo Dr
Newark, OH 43055

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("North Elementary School",'Newark=' + Newark.length); Alexandria[Alexandria.length] = createMarker(new GPoint(-82.61340332,40.08710098),"
Northridge Alexandria Elementary School
Po Box 68
Alexandria, OH 43001

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Northridge Alexandria Elementary School",'Alexandria=' + Alexandria.length); Croton[Croton.length] = createMarker(new GPoint(-82.69463348,40.23902130),"
Northridge Hartford Elementary School
10843 Foundation Rd
Croton, OH 43013

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Northridge Hartford Elementary School",'Croton=' + Croton.length); Johnstown[Johnstown.length] = createMarker(new GPoint(-82.67980194,40.15340042),"
Northridge High School
6066 Johnstown Utica Rd
Johnstown, OH 43031

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Northridge High School",'Johnstown=' + Johnstown.length); Homer[Homer.length] = createMarker(new GPoint(-82.50980377,40.25230026),"
Northridge Homer Elementary School
Po Box 7
Homer, OH 43027

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Northridge Homer Elementary School",'Homer=' + Homer.length); Johnstown[Johnstown.length] = createMarker(new GPoint(-82.60996246,40.18858337),"
Northridge Middle School
6066 Johnstown Utica Rd
Johnstown, OH 43031

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Northridge Middle School",'Johnstown=' + Johnstown.length); Johnstown[Johnstown.length] = createMarker(new GPoint(-82.68796539,40.15506363),"
Oregon Elementary School
125 N Oregon St
Johnstown, OH 43031

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Oregon Elementary School",'Johnstown=' + Johnstown.length); Pataskala[Pataskala.length] = createMarker(new GPoint(-82.67745209,39.99445343),"
Pataskala Elementary School
395 S High St
Pataskala, OH 43062

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Pataskala Elementary School",'Pataskala=' + Pataskala.length); Nashport[Nashport.length] = createMarker(new GPoint(-82.23099518,40.12675858),"
Perry Elementary School
4661 Licking Valley Rd Se
Nashport, OH 43830

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Perry Elementary School",'Nashport=' + Nashport.length); Newark[Newark.length] = createMarker(new GPoint(-82.41318512,40.07341385),"
Roosevelt Middle School
621 Mount Vernon Rd
Newark, OH 43055

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Roosevelt Middle School",'Newark=' + Newark.length); Johnstown[Johnstown.length] = createMarker(new GPoint(-82.68150330,40.14796066),"
Searfoss Elementary School
85 W Douglas St
Johnstown, OH 43031

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Searfoss Elementary School",'Johnstown=' + Johnstown.length); Reynoldsburg[Reynoldsburg.length] = createMarker(new GPoint(-82.77100300,39.96254000),"
Slate Ridge Elementary School
10466 Taylor Rd Sw
Reynoldsburg, OH 43068

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Slate Ridge Elementary School",'Reynoldsburg=' + Reynoldsburg.length); Etna[Etna.length] = createMarker(new GPoint(-82.68190002,39.95719910),"
Southwest Licking Digital Academy
Po Box 180
Etna, OH 43018

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Southwest Licking Digital Academy",'Etna=' + Etna.length); Etna[Etna.length] = createMarker(new GPoint(-82.68190002,39.95719910),"
Southwest Licking Kindergarten Elementary School
Po Box 120
Etna, OH 43018

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Southwest Licking Kindergarten Elementary School",'Etna=' + Etna.length); Heath[Heath.length] = createMarker(new GPoint(-82.44907379,40.03735352),"
Stevenson Elementary School
152 Cynthia St
Heath, OH 43056

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Stevenson Elementary School",'Heath=' + Heath.length); Summit_Station[Summit_Station.length] = createMarker(new GPoint(-82.75187683,39.99555206),"
Summit Elementary School
6539 Summit Rd
Summit Station, OH 43073

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Summit Elementary School",'Summit_Station=' + Summit_Station.length); Summit_Station[Summit_Station.length] = createMarker(new GPoint(-82.75187683,39.99555206),"
Summit Primary
6539 Summit Road
Summit Station, OH 43073

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Summit Primary",'Summit_Station=' + Summit_Station.length); Newark[Newark.length] = createMarker(new GPoint(-82.45441437,40.09970474),"
Swift Creek Elementary School
96 Maholm St
Newark, OH 43055

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Swift Creek Elementary School",'Newark=' + Newark.length); Reynoldsburg[Reynoldsburg.length] = createMarker(new GPoint(-82.76979828,39.97411346),"
Taylor Road Elementary School
8200 Taylor Rd Sw
Reynoldsburg, OH 43068

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Taylor Road Elementary School",'Reynoldsburg=' + Reynoldsburg.length); Newark[Newark.length] = createMarker(new GPoint(-82.21675110,40.05528641),"
Toboso Elementary School
2345 Gratiot Rd
Newark, OH 43056

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Toboso Elementary School",'Newark=' + Newark.length); Utica[Utica.length] = createMarker(new GPoint(-82.42389679,40.24430084),"
Utica Elementary School
Po Box 956
Utica, OH 43080

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Utica Elementary School",'Utica=' + Utica.length); Utica[Utica.length] = createMarker(new GPoint(-82.42389679,40.24430084),"
Utica High School
Po Box 677
Utica, OH 43080

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Utica High School",'Utica=' + Utica.length); Utica[Utica.length] = createMarker(new GPoint(-82.42389679,40.24430084),"
Utica Junior High School
Po Box 647
Utica, OH 43080

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Utica Junior High School",'Utica=' + Utica.length); Pataskala[Pataskala.length] = createMarker(new GPoint(-82.64680481,39.96335983),"
Watkins Memorial High School
8868 Watkins Rd Sw
Pataskala, OH 43062

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Watkins Memorial High School",'Pataskala=' + Pataskala.length); Pataskala[Pataskala.length] = createMarker(new GPoint(-82.64671326,39.96455383),"
Watkins Middle School
8808 Watkins Rd Sw
Pataskala, OH 43062

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Watkins Middle School",'Pataskala=' + Pataskala.length); Newark[Newark.length] = createMarker(new GPoint(-82.40714264,40.05656815),"
West Main Intermediate Elementary School
112 W Main St
Newark, OH 43055

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("West Main Intermediate Elementary School",'Newark=' + Newark.length); Newark[Newark.length] = createMarker(new GPoint(-82.45156097,40.06028748),"
William E Miller Elementary School
1350 Granville Rd
Newark, OH 43055

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("William E Miller Elementary School",'Newark=' + Newark.length); Johnstown[Johnstown.length] = createMarker(new GPoint(-82.68788910,40.15425873),"
Willis C Adams Middle School
80 W Maple St
Johnstown, OH 43031

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Willis C Adams Middle School",'Johnstown=' + Johnstown.length); Newark[Newark.length] = createMarker(new GPoint(-82.43148041,40.05808258),"
Wilson Middle School
805 W Church St
Newark, OH 43055

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Wilson Middle School",'Newark=' + Newark.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(Alexandria); map.removeOverlays(Croton); map.removeOverlays(Etna); map.removeOverlays(Granville); map.removeOverlays(Heath); map.removeOverlays(Hebron); map.removeOverlays(Homer); map.removeOverlays(Johnstown); map.removeOverlays(Kirkersville); map.removeOverlays(Nashport); map.removeOverlays(Newark); map.removeOverlays(Pataskala); map.removeOverlays(Reynoldsburg); map.removeOverlays(Summit_Station); map.removeOverlays(Utica); 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(Newark);map.removeOverlays(Alexandria); map.removeOverlays(Croton); map.removeOverlays(Etna); map.removeOverlays(Granville); map.removeOverlays(Heath); map.removeOverlays(Hebron); map.removeOverlays(Homer); map.removeOverlays(Johnstown); map.removeOverlays(Kirkersville); map.removeOverlays(Nashport); map.removeOverlays(Newark); map.removeOverlays(Pataskala); map.removeOverlays(Reynoldsburg); map.removeOverlays(Summit_Station); map.removeOverlays(Utica); map.addOverlays(Alexandria); centerByArray(Alexandria, false, false); cntMarker += Alexandria.length; map.addOverlays(Croton); centerByArray(Croton, false, false); cntMarker += Croton.length; map.addOverlays(Etna); centerByArray(Etna, false, false); cntMarker += Etna.length; map.addOverlays(Granville); centerByArray(Granville, false, false); cntMarker += Granville.length; map.addOverlays(Heath); centerByArray(Heath, false, false); cntMarker += Heath.length; map.addOverlays(Hebron); centerByArray(Hebron, false, false); cntMarker += Hebron.length; map.addOverlays(Homer); centerByArray(Homer, false, false); cntMarker += Homer.length; map.addOverlays(Johnstown); centerByArray(Johnstown, false, false); cntMarker += Johnstown.length; map.addOverlays(Kirkersville); centerByArray(Kirkersville, false, false); cntMarker += Kirkersville.length; map.addOverlays(Nashport); centerByArray(Nashport, false, false); cntMarker += Nashport.length; map.addOverlays(Newark); centerByArray(Newark, false, false); cntMarker += Newark.length; map.addOverlays(Pataskala); centerByArray(Pataskala, false, false); cntMarker += Pataskala.length; map.addOverlays(Reynoldsburg); centerByArray(Reynoldsburg, false, false); cntMarker += Reynoldsburg.length; map.addOverlays(Summit_Station); centerByArray(Summit_Station, false, false); cntMarker += Summit_Station.length; map.addOverlays(Utica); centerByArray(Utica, false, false); cntMarker += Utica.length; centerByArray(Newark,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'); } }