function addMarkers(){ mySelect = document.getElementById('selection'); Washington = [];mySelect.options[mySelect.options.length] = new Option("Washington schools",'all=Washington'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Washington[Washington.length] = createMarker(new GPoint(-77.02668800,38.98220800),"
Academia De La Recta Porta Icds
7614 Georgia Avenue Nw
Washington, DC 20012
Co-ed school, K-11
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Academia De La Recta Porta Icds",'Washington=' + Washington.length); Washington[Washington.length] = createMarker(new GPoint(-77.03478300,38.95203700),"
Academy For Ideal Education
1501 Gallatin Street Nw
Washington, DC 20011
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Academy For Ideal Education",'Washington=' + Washington.length); Washington[Washington.length] = createMarker(new GPoint(-77.00287800,38.93918700),"
Archbishop Carroll High School
4300 Harewood Road Ne
Washington, DC 20017
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Archbishop Carroll High School",'Washington=' + Washington.length); Washington[Washington.length] = createMarker(new GPoint(-77.06849100,38.91672400),"
British School Of Washington
2001 Wisconsin Avenue NW
Washington, DC 20007
Co-ed school, NS-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("British School Of Washington",'Washington=' + Washington.length); Washington[Washington.length] = createMarker(new GPoint(-77.00671000,38.91573700),"
City Lights
62 T St Ne
Washington, DC 20002
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("City Lights",'Washington=' + Washington.length); Washington[Washington.length] = createMarker(new GPoint(-76.94879700,38.86835500),"
Dupont Park Adventist School
3942 Alabama Avenue Se
Washington, DC 20020
Co-ed school, PK-10
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Dupont Park Adventist School",'Washington=' + Washington.length); Washington[Washington.length] = createMarker(new GPoint(-77.06226300,38.94213200),"
Edmund Burke School
4101 Connecticut Avenue, NW
Washington, DC 20008
Co-ed school, 6-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Edmund Burke School",'Washington=' + Washington.length); Washington[Washington.length] = createMarker(new GPoint(-77.04183500,38.90839600),"
Emerson Preparatory School
1324 18th Street Nw
Washington, DC 20036
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Emerson Preparatory School",'Washington=' + Washington.length); Washington[Washington.length] = createMarker(new GPoint(-77.02827500,38.91482900),"
F L O C Learning Center
1816 12th St Nw
Washington, DC 20009
Co-ed school, Ungraded
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("F L O C Learning Center",'Washington=' + Washington.length); Washington[Washington.length] = createMarker(new GPoint(-77.08864000,38.92046900),"
The Field School
2301 Foxhall Rd Nw
Washington, DC 20007
Co-ed school, 7-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Field School",'Washington=' + Washington.length); Washington[Washington.length] = createMarker(new GPoint(-77.08593300,38.90863000),"
Georgetown Day School
4530 Macarthur Blvd Nw
Washington, DC 20007
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Georgetown Day School",'Washington=' + Washington.length); Washington[Washington.length] = createMarker(new GPoint(-77.06927500,38.90929700),"
Georgetown Visitation School
1524 35th Street Nw
Washington, DC 20007
All-girls school, 9-12
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Georgetown Visitation School",'Washington=' + Washington.length); Washington[Washington.length] = createMarker(new GPoint(-77.01166000,38.90140400),"
Gonzaga College High School
19 Eye Street NW
Washington, DC 20001
All-boys school, 9-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Gonzaga College High School",'Washington=' + Washington.length); Washington[Washington.length] = createMarker(new GPoint(-77.03468200,38.95433500),"
Ideal Alternative School
702 15th Street Ne
Washington, DC 20002
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ideal Alternative School",'Washington=' + Washington.length); Washington[Washington.length] = createMarker(new GPoint(-77.03350100,38.95092400),"
Kingsbury Day School
5000 14th Street NW
Washington, DC 20011
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Kingsbury Day School",'Washington=' + Washington.length); Washington[Washington.length] = createMarker(new GPoint(-77.00272400,38.94023900),"
Kirov Academy Of Ballet
4301 Harewood Rd N E
Washington, DC 20017
Co-ed school, 7-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Kirov Academy Of Ballet",'Washington=' + Washington.length); Washington[Washington.length] = createMarker(new GPoint(-77.05949100,38.92885700),"
Maret School
3000 Cathedral Avenue Nw
Washington, DC 20008
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Maret School",'Washington=' + Washington.length); Washington[Washington.length] = createMarker(new GPoint(-77.08930000,38.94180000),"
National Cathedral School
Mount Saint Albans
Washington, DC 20016
All-girls school, 4-12
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("National Cathedral School",'Washington=' + Washington.length); Washington[Washington.length] = createMarker(new GPoint(-77.01377600,38.96503700),"
National Children's Center
6200 Second Street Nw
Washington, DC 20011
Co-ed school, NS-NS
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("National Children's Center",'Washington=' + Washington.length); Washington[Washington.length] = createMarker(new GPoint(-77.03667500,38.94942200),"
Parkmont School
4842 16th Street Nw
Washington, DC 20011
Co-ed school, 6-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Parkmont School",'Washington=' + Washington.length); Washington[Washington.length] = createMarker(new GPoint(-77.07773200,38.94400500),"
Psychiatric Inst Of Washington
4228 Wisconsin Av N W
Washington, DC 20016
Co-ed school, NS-NS
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Psychiatric Inst Of Washington",'Washington=' + Washington.length); Washington[Washington.length] = createMarker(new GPoint(-76.97920000,38.94446900),"
Rhema Christian Center School
1825 Michigan Ave Ne
Washington, DC 20018
Co-ed school, Ungraded
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Rhema Christian Center School",'Washington=' + Washington.length); Washington[Washington.length] = createMarker(new GPoint(-77.08930000,38.94180000),"
St. Albans School
Mount St Alban
Washington, DC 20016
All-boys school, 5-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("St. Albans School",'Washington=' + Washington.length); Washington[Washington.length] = createMarker(new GPoint(-77.05426500,38.96128000),"
St. Johns College High School
2607 Military Road Nw
Washington, DC 20015
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Johns College High School",'Washington=' + Washington.length); Washington[Washington.length] = createMarker(new GPoint(-77.08339000,38.95656300),"
St. Johns Community Services
5151 Wisconson Ave Nw Suite 400
Washington, DC 20016
Co-ed school, NS-NS
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Johns Community Services",'Washington=' + Washington.length); Washington[Washington.length] = createMarker(new GPoint(-77.02492000,38.93278600),"
Sankofa Fie
770 Park Road Nw
Washington, DC 20010
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sankofa Fie",'Washington=' + Washington.length); Washington[Washington.length] = createMarker(new GPoint(-77.07455800,38.93909700),"
Sidwell Friends School
3825 Wisconsin Ave, N.w.
Washington, DC 20016
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sidwell Friends School",'Washington=' + Washington.length); Washington[Washington.length] = createMarker(new GPoint(-76.98550900,38.94440500),"
St Anselm's Abbey School
4501 S Dakota Avenue Ne
Washington, DC 20017
All-boys school, 6-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("St Anselm's Abbey School",'Washington=' + Washington.length); Washington[Washington.length] = createMarker(new GPoint(-77.02007800,38.90468200),"
Sunrise Academy
1130 6th Street Nw
Washington, DC 20001
All-boys school, 3-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Sunrise Academy",'Washington=' + Washington.length); Washington[Washington.length] = createMarker(new GPoint(-77.02311900,38.91046000),"
Ujamaa School
1554 Eighth St., Nw
Washington, DC 20001
Co-ed school, NS-NS
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ujamaa School",'Washington=' + Washington.length); Washington[Washington.length] = createMarker(new GPoint(-77.00280800,38.94020000),"
Universal Ballet Academy
4301 Harewood Road Ne
Washington, DC 20017
Co-ed school, 6-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Universal Ballet Academy",'Washington=' + Washington.length); Washington[Washington.length] = createMarker(new GPoint(-77.06214400,38.93336300),"
Washington International School
3100 Macomb Street Nw
Washington, DC 20008
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Washington International School",'Washington=' + Washington.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/////2/' + showArray); map.removeOverlays(Washington); 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(Washington);map.removeOverlays(Washington); map.addOverlays(Washington); centerByArray(Washington, false, false); cntMarker += Washington.length; centerByArray(Washington,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=2&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; }