function addMarkers(){ mySelect = document.getElementById('selection'); Woodbridge = [];Manassas = [];Triangle = [];Bristow = [];Dumfries = [];Dale_City = [];Catharpin = [];Gainesville = [];Lake_Ridge = [];mySelect.options[mySelect.options.length] = new Option("Bristow schools",'all=Bristow'); mySelect.options[mySelect.options.length] = new Option("Catharpin schools",'all=Catharpin'); mySelect.options[mySelect.options.length] = new Option("Dale City schools",'all=Dale_City'); mySelect.options[mySelect.options.length] = new Option("Dumfries schools",'all=Dumfries'); mySelect.options[mySelect.options.length] = new Option("Gainesville schools",'all=Gainesville'); mySelect.options[mySelect.options.length] = new Option("Lake Ridge schools",'all=Lake_Ridge'); mySelect.options[mySelect.options.length] = new Option("Manassas schools",'all=Manassas'); mySelect.options[mySelect.options.length] = new Option("Triangle schools",'all=Triangle'); mySelect.options[mySelect.options.length] = new Option("Woodbridge schools",'all=Woodbridge'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Woodbridge[Woodbridge.length] = createMarker(new GPoint(-77.30305600,38.65736800),"
Academy Day Care
13420 Minnieville Rd
Woodbridge, VA 22192
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Academy Day Care",'Woodbridge=' + Woodbridge.length); Manassas[Manassas.length] = createMarker(new GPoint(-77.48424200,38.75422900),"
All Saints Catholic School
9294 Stonewall Road
Manassas, VA 20110
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("All Saints Catholic School",'Manassas=' + Manassas.length); Woodbridge[Woodbridge.length] = createMarker(new GPoint(-77.32364000,38.66192900),"
Bethel Christian School
3713 Pennington Lane
Woodbridge, VA 22192
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bethel Christian School",'Woodbridge=' + Woodbridge.length); Triangle[Triangle.length] = createMarker(new GPoint(-77.18350000,38.77460000),"
Calvary Christian School
4345 Inn Street
Triangle, VA 22172
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Calvary Christian School",'Triangle=' + Triangle.length); Woodbridge[Woodbridge.length] = createMarker(new GPoint(-77.25865000,38.66263000),"
Cardinal Montessori School
1424 G Street
Woodbridge, VA 22191
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Cardinal Montessori School",'Woodbridge=' + Woodbridge.length); Manassas[Manassas.length] = createMarker(new GPoint(-77.52371400,38.73853400),"
Chesterbrook Academy - Manassas
10951 Samuel Trexler Drive
Manassas, VA 20110
Co-ed school, K-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Chesterbrook Academy - Manassas",'Manassas=' + Manassas.length); Woodbridge[Woodbridge.length] = createMarker(new GPoint(-77.27927200,38.67511300),"
Children's World Learning Center
12781 Harbor Drive
Woodbridge, VA 22192
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Children's World Learning Center",'Woodbridge=' + Woodbridge.length); Manassas[Manassas.length] = createMarker(new GPoint(-77.51061800,38.78896400),"
Children's World Learning Centers
10496 Sudley Manor Drive
Manassas, VA 20109
Co-ed school, K-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Children's World Learning Centers",'Manassas=' + Manassas.length); Bristow[Bristow.length] = createMarker(new GPoint(-77.55995500,38.73939400),"
Childrens World Braemar #090
12121 Caithness Circle
Bristow, VA 20136
school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Childrens World Braemar #090",'Bristow=' + Bristow.length); Woodbridge[Woodbridge.length] = createMarker(new GPoint(-77.30178300,38.64764300),"
Christ Chapel Academy
13909 Smoketown Road
Woodbridge, VA 22192
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Christ Chapel Academy",'Woodbridge=' + Woodbridge.length); Dumfries[Dumfries.length] = createMarker(new GPoint(-77.34699600,38.62528800),"
Clairmont School And Child Care Center
3551 Waterway Drive
Dumfries, VA 22025
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Clairmont School And Child Care Center",'Dumfries=' + Dumfries.length); Woodbridge[Woodbridge.length] = createMarker(new GPoint(-77.30762300,38.65567300),"
Cloverdale School
13506 Minnieville Road
Woodbridge, VA 22192
Co-ed school, PK-2
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Cloverdale School",'Woodbridge=' + Woodbridge.length); Dale_City[Dale_City.length] = createMarker(new GPoint(-77.35956700,38.64848300),"
Dale City Christian Church Cdc & Academy
14022 Lindendale Road
Dale City, VA 22193
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Dale City Christian Church Cdc & Academy",'Dale_City=' + Dale_City.length); Woodbridge[Woodbridge.length] = createMarker(new GPoint(-77.25569700,38.66132600),"
Edelen's Montessori Learning Center
1337 Horner Road
Woodbridge, VA 22191
Co-ed school, PK-1
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Edelen's Montessori Learning Center",'Woodbridge=' + Woodbridge.length); Manassas[Manassas.length] = createMarker(new GPoint(-77.45014000,38.78268200),"
Emmanuel Christian School
8302 Spruce Street
Manassas, VA 20111
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Emmanuel Christian School",'Manassas=' + Manassas.length); Dale_City[Dale_City.length] = createMarker(new GPoint(-77.30567100,38.62918200),"
Evangel Christian School
14836 N Ashdale Ave
Dale City, VA 22193
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Evangel Christian School",'Dale_City=' + Dale_City.length); Manassas[Manassas.length] = createMarker(new GPoint(-77.49611700,38.77756000),"
Fairmont Christian Preparatory School
8225 Barrett Drive
Manassas, VA 20109
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Fairmont Christian Preparatory School",'Manassas=' + Manassas.length); Catharpin[Catharpin.length] = createMarker(new GPoint(-77.57179500,38.85433700),"
First Steps Preschool
4671 Sudley Road
Catharpin, VA 20143
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("First Steps Preschool",'Catharpin=' + Catharpin.length); Manassas[Manassas.length] = createMarker(new GPoint(-77.50974900,38.80072900),"
Good Shepherd Academy
10501 Balls Ford Road
Manassas, VA 20109
Co-ed school, K-7
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Good Shepherd Academy",'Manassas=' + Manassas.length); Manassas[Manassas.length] = createMarker(new GPoint(-77.48438100,38.77982800),"
Greater Mt Calvary Christian Preschool & Academy
9514 Westmoreland Avenue
Manassas, VA 20110
Co-ed school, PK-3
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Greater Mt Calvary Christian Preschool & Academy",'Manassas=' + Manassas.length); Woodbridge[Woodbridge.length] = createMarker(new GPoint(-77.37836100,38.63584200),"
Heritage Christian School
14510 Spriggs Road
Woodbridge, VA 22193
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Heritage Christian School",'Woodbridge=' + Woodbridge.length); Dale_City[Dale_City.length] = createMarker(new GPoint(-77.32016000,38.64560400),"
Holy Family Catholic School
14160 Ferndale Road
Dale City, VA 22193
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Holy Family Catholic School",'Dale_City=' + Dale_City.length); Dale_City[Dale_City.length] = createMarker(new GPoint(-77.33408300,38.66682600),"
Jewels And Jems
13163 Center Point
Dale City, VA 22193
Co-ed school, PK-2
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Jewels And Jems",'Dale_City=' + Dale_City.length); Dumfries[Dumfries.length] = createMarker(new GPoint(-77.31073900,38.58167400),"
La Petite Academy - Dumfries
17040 Jefferson Davis Highway
Dumfries, VA 22026
Co-ed school, NS-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("La Petite Academy - Dumfries",'Dumfries=' + Dumfries.length); Woodbridge[Woodbridge.length] = createMarker(new GPoint(-77.30381500,38.65224600),"
La Petite Academy-smoketown Rd
13850 Smoketown Road
Woodbridge, VA 22192
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("La Petite Academy-smoketown Rd",'Woodbridge=' + Woodbridge.length); Bristow[Bristow.length] = createMarker(new GPoint(-77.56664800,38.74997700),"
Linton Hall School
9535 Linton Hall Road
Bristow, VA 20136
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Linton Hall School",'Bristow=' + Bristow.length); Gainesville[Gainesville.length] = createMarker(new GPoint(-77.59861800,38.77601400),"
Minnieland At Bridlewood
8299 Harness Shop Road
Gainesville, VA 20155
Co-ed school, NS-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Minnieland At Bridlewood",'Gainesville=' + Gainesville.length); Woodbridge[Woodbridge.length] = createMarker(new GPoint(-77.26262200,38.67269600),"
Minnieland At Yarbrough/lake R
1511 Old Bridge Road
Woodbridge, VA 22192
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Minnieland At Yarbrough/lake R",'Woodbridge=' + Woodbridge.length); Woodbridge[Woodbridge.length] = createMarker(new GPoint(-77.32709600,38.65000600),"
Minnieland Of Dale City
13923 Minnieville Road
Woodbridge, VA 22193
Co-ed school, NS-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Minnieland Of Dale City",'Woodbridge=' + Woodbridge.length); Woodbridge[Woodbridge.length] = createMarker(new GPoint(-77.30131200,38.64472600),"
Morning Star Child Development Center
14001 Smoketown Road
Woodbridge, VA 22192
Co-ed school, PK-3
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Morning Star Child Development Center",'Woodbridge=' + Woodbridge.length); Manassas[Manassas.length] = createMarker(new GPoint(-77.46565200,38.78982200),"
Noahs Ark Christian Preschool
8904 Yorkshire Lane
Manassas, VA 20111
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Noahs Ark Christian Preschool",'Manassas=' + Manassas.length); Dumfries[Dumfries.length] = createMarker(new GPoint(-77.33004100,38.56129500),"
Open Door Apostolic Christian Academy
17948 Fraley Blvd
Dumfries, VA 22026
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Open Door Apostolic Christian Academy",'Dumfries=' + Dumfries.length); Woodbridge[Woodbridge.length] = createMarker(new GPoint(-77.25886200,38.66098800),"
Peter Pan Day School
1431 F Street
Woodbridge, VA 22191
Co-ed school, PK-KG
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Peter Pan Day School",'Woodbridge=' + Woodbridge.length); Lake_Ridge[Lake_Ridge.length] = createMarker(new GPoint(-77.31453600,38.68686700),"
Prince William Academy
3480 Commission Court
Lake Ridge, VA 22192
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Prince William Academy",'Lake_Ridge=' + Lake_Ridge.length); Dumfries[Dumfries.length] = createMarker(new GPoint(-77.33017600,38.56392000),"
Richard Milburn High School
Po Box 810
Dumfries, VA 22026
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Richard Milburn High School",'Dumfries=' + Dumfries.length); Woodbridge[Woodbridge.length] = createMarker(new GPoint(-77.26672300,38.62840300),"
Riverview Baptist Day School
1722 Florida Ave
Woodbridge, VA 22191
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Riverview Baptist Day School",'Woodbridge=' + Woodbridge.length); Woodbridge[Woodbridge.length] = createMarker(new GPoint(-77.25747100,38.65319600),"
St. Thomas Aquinas Regional School
13750 Marys Way
Woodbridge, VA 22191
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Thomas Aquinas Regional School",'Woodbridge=' + Woodbridge.length); Triangle[Triangle.length] = createMarker(new GPoint(-77.32951000,38.54401600),"
St Francis Of Assisi School
18825 Fuller Hts Road
Triangle, VA 22172
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Francis Of Assisi School",'Triangle=' + Triangle.length); Woodbridge[Woodbridge.length] = createMarker(new GPoint(-77.26531900,38.64972400),"
St John Neumann School
13900 Church Hill Drive
Woodbridge, VA 22191
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St John Neumann School",'Woodbridge=' + Woodbridge.length); Triangle[Triangle.length] = createMarker(new GPoint(-77.34380000,38.55360000),"
Star Bethlehem Christian Academy
Po Box 409 19068 Bethlehem Church Road
Triangle, VA 22172
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Star Bethlehem Christian Academy",'Triangle=' + Triangle.length); Manassas[Manassas.length] = createMarker(new GPoint(-77.49630700,38.77702800),"
Tabernacle Baptist Academy
8275 Barrett Dr
Manassas, VA 20109
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Tabernacle Baptist Academy",'Manassas=' + Manassas.length); Woodbridge[Woodbridge.length] = createMarker(new GPoint(-77.26204200,38.66231300),"
Trinity Temple Preschool
13403 Baxter Street
Woodbridge, VA 22191
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Trinity Temple Preschool",'Woodbridge=' + Woodbridge.length); Gainesville[Gainesville.length] = createMarker(new GPoint(-77.61573900,38.81076600),"
Wonderland Child Care Center
14421 Newbern Loop
Gainesville, VA 20155
Co-ed school, PK-KG
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Wonderland Child Care Center",'Gainesville=' + Gainesville.length); Bristow[Bristow.length] = createMarker(new GPoint(-77.54808000,38.73847900),"
Youth For Tomorrow
11835 Hazel Circle Drive
Bristow, VA 20136
Co-ed school, 7-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Youth For Tomorrow",'Bristow=' + Bristow.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/////3/' + showArray); map.removeOverlays(Bristow); map.removeOverlays(Catharpin); map.removeOverlays(Dale_City); map.removeOverlays(Dumfries); map.removeOverlays(Gainesville); map.removeOverlays(Lake_Ridge); map.removeOverlays(Manassas); map.removeOverlays(Triangle); map.removeOverlays(Woodbridge); 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(Woodbridge);map.removeOverlays(Bristow); map.removeOverlays(Catharpin); map.removeOverlays(Dale_City); map.removeOverlays(Dumfries); map.removeOverlays(Gainesville); map.removeOverlays(Lake_Ridge); map.removeOverlays(Manassas); map.removeOverlays(Triangle); map.removeOverlays(Woodbridge); map.addOverlays(Bristow); centerByArray(Bristow, false, false); cntMarker += Bristow.length; map.addOverlays(Catharpin); centerByArray(Catharpin, false, false); cntMarker += Catharpin.length; map.addOverlays(Dale_City); centerByArray(Dale_City, false, false); cntMarker += Dale_City.length; map.addOverlays(Dumfries); centerByArray(Dumfries, false, false); cntMarker += Dumfries.length; map.addOverlays(Gainesville); centerByArray(Gainesville, false, false); cntMarker += Gainesville.length; map.addOverlays(Lake_Ridge); centerByArray(Lake_Ridge, false, false); cntMarker += Lake_Ridge.length; map.addOverlays(Manassas); centerByArray(Manassas, false, false); cntMarker += Manassas.length; map.addOverlays(Triangle); centerByArray(Triangle, false, false); cntMarker += Triangle.length; map.addOverlays(Woodbridge); centerByArray(Woodbridge, false, false); cntMarker += Woodbridge.length; centerByArray(Woodbridge,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=3&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; }