function addMarkers() { mySelect = document.getElementById('selection'); Aberdeen = [];Abingdon = [];Bel_Air = [];Belcamp = [];Churchville = [];Darlington = [];Edgewood = [];Street = [];Fallston = [];Forest_Hill = [];Havre_De_Grace = [];Jarrettsville = [];Joppa = [];White_Hall = [];Pylesville = [];mySelect.options[mySelect.options.length] = new Option("Aberdeen schools",'all=Aberdeen'); mySelect.options[mySelect.options.length] = new Option("Abingdon schools",'all=Abingdon'); mySelect.options[mySelect.options.length] = new Option("Bel Air schools",'all=Bel_Air'); mySelect.options[mySelect.options.length] = new Option("Belcamp schools",'all=Belcamp'); mySelect.options[mySelect.options.length] = new Option("Churchville schools",'all=Churchville'); mySelect.options[mySelect.options.length] = new Option("Darlington schools",'all=Darlington'); mySelect.options[mySelect.options.length] = new Option("Edgewood schools",'all=Edgewood'); mySelect.options[mySelect.options.length] = new Option("Fallston schools",'all=Fallston'); mySelect.options[mySelect.options.length] = new Option("Forest Hill schools",'all=Forest_Hill'); mySelect.options[mySelect.options.length] = new Option("Havre De Grace schools",'all=Havre_De_Grace'); mySelect.options[mySelect.options.length] = new Option("Jarrettsville schools",'all=Jarrettsville'); mySelect.options[mySelect.options.length] = new Option("Joppa schools",'all=Joppa'); mySelect.options[mySelect.options.length] = new Option("Pylesville schools",'all=Pylesville'); mySelect.options[mySelect.options.length] = new Option("Street schools",'all=Street'); mySelect.options[mySelect.options.length] = new Option("White Hall schools",'all=White_Hall'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Aberdeen[Aberdeen.length] = createMarker(new GPoint(-76.17172241,39.51770020),"
Aberdeen High School
251 Paradise Rd
Aberdeen, MD 21001

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Aberdeen High School",'Aberdeen=' + Aberdeen.length); Aberdeen[Aberdeen.length] = createMarker(new GPoint(-76.16711426,39.51530457),"
Aberdeen Middle School
111 Mount Royal Ave
Aberdeen, MD 21001

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Aberdeen Middle School",'Aberdeen=' + Aberdeen.length); Abingdon[Abingdon.length] = createMarker(new GPoint(-76.32728577,39.47822571),"
Abingdon Elementary School
399 Singer Rd
Abingdon, MD 21009

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Abingdon Elementary School",'Abingdon=' + Abingdon.length); Aberdeen[Aberdeen.length] = createMarker(new GPoint(-76.29229736,39.42286682),"
Alternative Center
253 Paradise Rd
Aberdeen, MD 21001

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Alternative Center",'Aberdeen=' + Aberdeen.length); Aberdeen[Aberdeen.length] = createMarker(new GPoint(-76.17172241,39.51770020),"
Alternative Center/aberdeen High/hsp High School
251 Paradise Rd
Aberdeen, MD 21001

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Alternative Center/aberdeen High/hsp High School",'Aberdeen=' + Aberdeen.length); Aberdeen[Aberdeen.length] = createMarker(new GPoint(-76.17024231,39.51252747),"
Bakerfield Elementary School
36 Baker St
Aberdeen, MD 21001

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Bakerfield Elementary School",'Aberdeen=' + Aberdeen.length); Bel_Air[Bel_Air.length] = createMarker(new GPoint(-76.35021973,39.53809738),"
Bel Air Elementary School
30 E Lee St
Bel Air, MD 21014

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Bel Air Elementary School",'Bel_Air=' + Bel_Air.length); Bel_Air[Bel_Air.length] = createMarker(new GPoint(-76.34555054,39.53078079),"
Bel Air High School
100 Heighe St
Bel Air, MD 21014

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bel Air High School",'Bel_Air=' + Bel_Air.length); Bel_Air[Bel_Air.length] = createMarker(new GPoint(-76.34436035,39.52810669),"
Bel Air Middle School
99 Idlewild Street
Bel Air, MD 21014

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Bel Air Middle School",'Bel_Air=' + Bel_Air.length); Bel_Air[Bel_Air.length] = createMarker(new GPoint(-76.33300781,39.56225586),"
C. Milton Wright High School
1301 N Fountain Green Rd
Bel Air, MD 21015

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("C. Milton Wright High School",'Bel_Air=' + Bel_Air.length); Belcamp[Belcamp.length] = createMarker(new GPoint(-76.23858643,39.47594452),"
Church Creek Elementary School
4299 Church Creek Rd
Belcamp, MD 21017

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Church Creek Elementary School",'Belcamp=' + Belcamp.length); Churchville[Churchville.length] = createMarker(new GPoint(-76.24851990,39.56037140),"
Churchville Elementary School
2935 Level Rd
Churchville, MD 21028

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Churchville Elementary School",'Churchville=' + Churchville.length); Darlington[Darlington.length] = createMarker(new GPoint(-76.20209503,39.63868332),"
Darlington Elementary School
2119 Shuresville Rd
Darlington, MD 21034

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Darlington Elementary School",'Darlington=' + Darlington.length); Edgewood[Edgewood.length] = createMarker(new GPoint(-76.29244232,39.42292786),"
Deerfield Elementary School
2307 Willoughby Beach Rd
Edgewood, MD 21040

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Deerfield Elementary School",'Edgewood=' + Edgewood.length); Street[Street.length] = createMarker(new GPoint(-76.38082500,39.66660400),"
Dublin Elementary School
1527 Whiteford Rd
Street, MD 21154

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Dublin Elementary School",'Street=' + Street.length); Edgewood[Edgewood.length] = createMarker(new GPoint(-76.30329895,39.42195511),"
Edgewood Elementary School
2100 Cedar Dr
Edgewood, MD 21040

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Edgewood Elementary School",'Edgewood=' + Edgewood.length); Edgewood[Edgewood.length] = createMarker(new GPoint(-76.29070282,39.42365646),"
Edgewood High School
2415 Willoughby Beach Rd
Edgewood, MD 21040

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Edgewood High School",'Edgewood=' + Edgewood.length); Edgewood[Edgewood.length] = createMarker(new GPoint(-76.29226685,39.42302322),"
Edgewood Middle School
2311 Willoughby Beach Rd
Edgewood, MD 21040

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Edgewood Middle School",'Edgewood=' + Edgewood.length); Bel_Air[Bel_Air.length] = createMarker(new GPoint(-76.34556580,39.50868988),"
Emmorton Elementary School
2502 Tollgate Rd
Bel Air, MD 21014

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Emmorton Elementary School",'Bel_Air=' + Bel_Air.length); Fallston[Fallston.length] = createMarker(new GPoint(-76.41402435,39.52410126),"
Fallston High School
2301 Carrs Mill Rd
Fallston, MD 21047

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Fallston High School",'Fallston=' + Fallston.length); Fallston[Fallston.length] = createMarker(new GPoint(-76.41406250,39.52404022),"
Fallston Middle School
2303 Carrs Mill Rd
Fallston, MD 21047

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Fallston Middle School",'Fallston=' + Fallston.length); Forest_Hill[Forest_Hill.length] = createMarker(new GPoint(-76.38777924,39.58547974),"
Forest Hill Elementary School
2407 Rocks Rd
Forest Hill, MD 21050

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Forest Hill Elementary School",'Forest_Hill=' + Forest_Hill.length); Forest_Hill[Forest_Hill.length] = createMarker(new GPoint(-76.38578033,39.56683731),"
Forest Lakes Elementary School
100 Osborne Pkwy
Forest Hill, MD 21050

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Forest Lakes Elementary School",'Forest_Hill=' + Forest_Hill.length); Bel_Air[Bel_Air.length] = createMarker(new GPoint(-76.32564545,39.55421066),"
Fountain Green Elementary School
517 Fountain Green Rd
Bel Air, MD 21015

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Fountain Green Elementary School",'Bel_Air=' + Bel_Air.length); Aberdeen[Aberdeen.length] = createMarker(new GPoint(-76.17789459,39.50358582),"
G. Lisby Elementary At Hillsdale
810 Edmund St
Aberdeen, MD 21001

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("G. Lisby Elementary At Hillsdale",'Aberdeen=' + Aberdeen.length); Aberdeen[Aberdeen.length] = createMarker(new GPoint(-76.15796661,39.50657272),"
Halls Cross Roads Elementary School
203 E Bel Air Ave
Aberdeen, MD 21001

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Halls Cross Roads Elementary School",'Aberdeen=' + Aberdeen.length); Bel_Air[Bel_Air.length] = createMarker(new GPoint(-76.28640747,39.55927658),"
Harford Technical High School
200 Thomas Run Rd
Bel Air, MD 21015

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Harford Technical High School",'Bel_Air=' + Bel_Air.length); Havre_De_Grace[Havre_De_Grace.length] = createMarker(new GPoint(-76.09677124,39.54234695),"
Havre De Grace Elementary School
600 Juniata St
Havre De Grace, MD 21078

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Havre De Grace Elementary School",'Havre_De_Grace=' + Havre_De_Grace.length); Havre_De_Grace[Havre_De_Grace.length] = createMarker(new GPoint(-76.09522247,39.54755020),"
Havre De Grace High School
700 Congress Ave
Havre De Grace, MD 21078

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Havre De Grace High School",'Havre_De_Grace=' + Havre_De_Grace.length); Havre_De_Grace[Havre_De_Grace.length] = createMarker(new GPoint(-76.10792542,39.54683304),"
Havre De Grace Middle School
401 Lewis Ln
Havre De Grace, MD 21078

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Havre De Grace Middle School",'Havre_De_Grace=' + Havre_De_Grace.length); Bel_Air[Bel_Air.length] = createMarker(new GPoint(-76.34783936,39.57779312),"
Hickory Elementary School
2100 Conowingo Rd
Bel Air, MD 21014

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Hickory Elementary School",'Bel_Air=' + Bel_Air.length); Bel_Air[Bel_Air.length] = createMarker(new GPoint(-76.33985138,39.52654266),"
Homestead/wakefield Elementary School
900 S Main St
Bel Air, MD 21014

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Homestead/wakefield Elementary School",'Bel_Air=' + Bel_Air.length); Jarrettsville[Jarrettsville.length] = createMarker(new GPoint(-76.48742676,39.60313034),"
Jarrettsville Elementary School
3818 Norrisville Rd
Jarrettsville, MD 21084

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Jarrettsville Elementary School",'Jarrettsville=' + Jarrettsville.length); Bel_Air[Bel_Air.length] = createMarker(new GPoint(-76.28659821,39.55503464),"
John Archer School
100 Thomas Run Rd
Bel Air, MD 21015

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("John Archer School",'Bel_Air=' + Bel_Air.length); Joppa[Joppa.length] = createMarker(new GPoint(-76.36293793,39.41942978),"
Joppatowne Elementary School
410 Barksdale Rd
Joppa, MD 21085

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Joppatowne Elementary School",'Joppa=' + Joppa.length); Joppa[Joppa.length] = createMarker(new GPoint(-76.35103607,39.41098022),"
Joppatowne High School
555 Joppa Farm Rd
Joppa, MD 21085

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Joppatowne High School",'Joppa=' + Joppa.length); Joppa[Joppa.length] = createMarker(new GPoint(-76.33343506,39.41181946),"
Magnolia Elementary School
901 Trimble Rd
Joppa, MD 21085

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Magnolia Elementary School",'Joppa=' + Joppa.length); Joppa[Joppa.length] = createMarker(new GPoint(-76.33162689,39.40735626),"
Magnolia Middle School
299 Fort Hoyle Rd
Joppa, MD 21085

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Magnolia Middle School",'Joppa=' + Joppa.length); Havre_De_Grace[Havre_De_Grace.length] = createMarker(new GPoint(-76.10677338,39.56213760),"
Meadowvale Elementary School
910 Grace View Dr
Havre De Grace, MD 21078

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Meadowvale Elementary School",'Havre_De_Grace=' + Havre_De_Grace.length); White_Hall[White_Hall.length] = createMarker(new GPoint(-76.53267670,39.69995499),"
Norrisville Elementary School
5302 Norrisville Rd
White Hall, MD 21161

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Norrisville Elementary School",'White_Hall=' + White_Hall.length); Jarrettsville[Jarrettsville.length] = createMarker(new GPoint(-76.45953369,39.63354111),"
North Bend Elementary School
1445 N Bend Rd
Jarrettsville, MD 21084

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("North Bend Elementary School",'Jarrettsville=' + Jarrettsville.length); Pylesville[Pylesville.length] = createMarker(new GPoint(-76.40776062,39.67309952),"
North Harford Elementary School
120 Pylesville Rd
Pylesville, MD 21132

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("North Harford Elementary School",'Pylesville=' + Pylesville.length); Pylesville[Pylesville.length] = createMarker(new GPoint(-76.40399170,39.67539597),"
North Harford High School
211 Pylesville Rd
Pylesville, MD 21132

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("North Harford High School",'Pylesville=' + Pylesville.length); Pylesville[Pylesville.length] = createMarker(new GPoint(-76.40841675,39.67272949),"
North Harford Middle School
112 Pylesville Rd
Pylesville, MD 21132

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("North Harford Middle School",'Pylesville=' + Pylesville.length); Bel_Air[Bel_Air.length] = createMarker(new GPoint(-76.29159546,39.55526352),"
Prospect Mill Elementary School
101 Prospect Mill Rd
Bel Air, MD 21015

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Prospect Mill Elementary School",'Bel_Air=' + Bel_Air.length); Bel_Air[Bel_Air.length] = createMarker(new GPoint(-76.33108521,39.51531982),"
Ring Factory Elementary School
1400 Emmorton Rd
Bel Air, MD 21014

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Ring Factory Elementary School",'Bel_Air=' + Bel_Air.length); Joppa[Joppa.length] = createMarker(new GPoint(-76.33903503,39.39979553),"
Riverside Elementary School
211 Stillmeadow Dr
Joppa, MD 21085

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Riverside Elementary School",'Joppa=' + Joppa.length); Havre_De_Grace[Havre_De_Grace.length] = createMarker(new GPoint(-76.13740540,39.52311707),"
Roye-williams Elementary School
201 Oakington Rd
Havre De Grace, MD 21078

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Roye-williams Elementary School",'Havre_De_Grace=' + Havre_De_Grace.length); Bel_Air[Bel_Air.length] = createMarker(new GPoint(-76.33024597,39.54676819),"
Southampton Middle School
1200 Moores Mill Rd
Bel Air, MD 21014

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Southampton Middle School",'Bel_Air=' + Bel_Air.length); Abingdon[Abingdon.length] = createMarker(new GPoint(-76.27738953,39.46200943),"
William Paca/old Post Road Elementary School
2706 Old Philadelphia Rd
Abingdon, MD 21009

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("William Paca/old Post Road Elementary School",'Abingdon=' + Abingdon.length); Abingdon[Abingdon.length] = createMarker(new GPoint(-76.30714417,39.48194885),"
William S. James Elementary School
1 Laurentum Pkw
Abingdon, MD 21009

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("William S. James Elementary School",'Abingdon=' + Abingdon.length); Fallston[Fallston.length] = createMarker(new GPoint(-76.44232941,39.53046036),"
Youths Benefit Elementary School
1901 Fallston Rd
Fallston, MD 21047

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Youths Benefit Elementary School",'Fallston=' + Fallston.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(Aberdeen); map.removeOverlays(Abingdon); map.removeOverlays(Bel_Air); map.removeOverlays(Belcamp); map.removeOverlays(Churchville); map.removeOverlays(Darlington); map.removeOverlays(Edgewood); map.removeOverlays(Fallston); map.removeOverlays(Forest_Hill); map.removeOverlays(Havre_De_Grace); map.removeOverlays(Jarrettsville); map.removeOverlays(Joppa); map.removeOverlays(Pylesville); map.removeOverlays(Street); map.removeOverlays(White_Hall); 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(Aberdeen);map.removeOverlays(Aberdeen); map.removeOverlays(Abingdon); map.removeOverlays(Bel_Air); map.removeOverlays(Belcamp); map.removeOverlays(Churchville); map.removeOverlays(Darlington); map.removeOverlays(Edgewood); map.removeOverlays(Fallston); map.removeOverlays(Forest_Hill); map.removeOverlays(Havre_De_Grace); map.removeOverlays(Jarrettsville); map.removeOverlays(Joppa); map.removeOverlays(Pylesville); map.removeOverlays(Street); map.removeOverlays(White_Hall); map.addOverlays(Aberdeen); centerByArray(Aberdeen, false, false); cntMarker += Aberdeen.length; map.addOverlays(Abingdon); centerByArray(Abingdon, false, false); cntMarker += Abingdon.length; map.addOverlays(Bel_Air); centerByArray(Bel_Air, false, false); cntMarker += Bel_Air.length; map.addOverlays(Belcamp); centerByArray(Belcamp, false, false); cntMarker += Belcamp.length; map.addOverlays(Churchville); centerByArray(Churchville, false, false); cntMarker += Churchville.length; map.addOverlays(Darlington); centerByArray(Darlington, false, false); cntMarker += Darlington.length; map.addOverlays(Edgewood); centerByArray(Edgewood, false, false); cntMarker += Edgewood.length; map.addOverlays(Fallston); centerByArray(Fallston, false, false); cntMarker += Fallston.length; map.addOverlays(Forest_Hill); centerByArray(Forest_Hill, false, false); cntMarker += Forest_Hill.length; map.addOverlays(Havre_De_Grace); centerByArray(Havre_De_Grace, false, false); cntMarker += Havre_De_Grace.length; map.addOverlays(Jarrettsville); centerByArray(Jarrettsville, false, false); cntMarker += Jarrettsville.length; map.addOverlays(Joppa); centerByArray(Joppa, false, false); cntMarker += Joppa.length; map.addOverlays(Pylesville); centerByArray(Pylesville, false, false); cntMarker += Pylesville.length; map.addOverlays(Street); centerByArray(Street, false, false); cntMarker += Street.length; map.addOverlays(White_Hall); centerByArray(White_Hall, false, false); cntMarker += White_Hall.length; centerByArray(Aberdeen,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'); } }