function addMarkers() { mySelect = document.getElementById('selection'); Falls_Church = [];Falls_Church[Falls_Church.length] = createMarker(new GPoint(-77.14420319,38.85221863),"
Baileys Elementary School
6111 Knollwood Dr
Falls Church, VA 22041

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Baileys Elementary School",'Falls_Church=' + Falls_Church.length); Falls_Church[Falls_Church.length] = createMarker(new GPoint(-77.18049622,38.85509109),"
Beech Tree Elementary School
3401 Beech Tree Ln
Falls Church, VA 22042

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Beech Tree Elementary School",'Falls_Church=' + Falls_Church.length); Falls_Church[Falls_Church.length] = createMarker(new GPoint(-77.16829681,38.83791733),"
Belvedere Elementary School
6540 Columbia Pike
Falls Church, VA 22041

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Belvedere Elementary School",'Falls_Church=' + Falls_Church.length); Falls_Church[Falls_Church.length] = createMarker(new GPoint(-77.20182800,38.85768890),"
Community Based Education
7423 Camp Alger Ave
Falls Church, VA 22042

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Community Based Education",'Falls_Church=' + Falls_Church.length); Falls_Church[Falls_Church.length] = createMarker(new GPoint(-77.21158600,38.90742874),"
Davis Vocational Center
7731 Leesburg Pike
Falls Church, VA 22043

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Davis Vocational Center",'Falls_Church=' + Falls_Church.length); Falls_Church[Falls_Church.length] = createMarker(new GPoint(-77.17785645,38.84909821),"
Devonshire Ps Home Resource
2831 Graham Rd.
Falls Church, VA 22042

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Devonshire Ps Home Resource",'Falls_Church=' + Falls_Church.length); Falls_Church[Falls_Church.length] = createMarker(new GPoint(-77.30626678,38.84714127),"
Elementary Sp Ed Center
8115 Gatehouse Rd
Falls Church, VA 22042

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Elementary Sp Ed Center",'Falls_Church=' + Falls_Church.length); Falls_Church[Falls_Church.length] = createMarker(new GPoint(-77.20847321,38.86384964),"
Falls Church High School
7521 Jaguar Trail
Falls Church, VA 22042

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Falls Church High School",'Falls_Church=' + Falls_Church.length); Falls_Church[Falls_Church.length] = createMarker(new GPoint(-77.19192505,38.89580154),"
George Mason High School
7124 Leesburg Pike
Falls Church, VA 22043

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("George Mason High School",'Falls_Church=' + Falls_Church.length); Falls_Church[Falls_Church.length] = createMarker(new GPoint(-77.19192505,38.89580154),"
George Mason Middle School
7130 Leesburg Pike
Falls Church, VA 22043

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("George Mason Middle School",'Falls_Church=' + Falls_Church.length); Falls_Church[Falls_Church.length] = createMarker(new GPoint(-77.12866974,38.85647202),"
Glen Forest Elementary School
5829 Glen Forest Dr
Falls Church, VA 22041

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Glen Forest Elementary School",'Falls_Church=' + Falls_Church.length); Falls_Church[Falls_Church.length] = createMarker(new GPoint(-77.19499207,38.86765671),"
Graham Road Elementary School
3036 Graham Rd
Falls Church, VA 22042

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Graham Road Elementary School",'Falls_Church=' + Falls_Church.length); Falls_Church[Falls_Church.length] = createMarker(new GPoint(-77.17282867,38.90351486),"
Haycock Elementary School
6616 Haycock Rd
Falls Church, VA 22043

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Haycock Elementary School",'Falls_Church=' + Falls_Church.length); Falls_Church[Falls_Church.length] = createMarker(new GPoint(-77.19075775,38.87535477),"
Interagency Alt Elem. Ctr.
Co Fairfax Co Public Schls
Falls Church, VA 22042

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Interagency Alt Elem. Ctr.",'Falls_Church=' + Falls_Church.length); Falls_Church[Falls_Church.length] = createMarker(new GPoint(-77.19075775,38.87535477),"
Interagency Alt. Sec. Center
2831 Graham Rd
Falls Church, VA 22042

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Interagency Alt. Sec. Center",'Falls_Church=' + Falls_Church.length); Falls_Church[Falls_Church.length] = createMarker(new GPoint(-77.22772980,38.86857986),"
Jackson Middle School
3020 Gallows Rd
Falls Church, VA 22042

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Jackson Middle School",'Falls_Church=' + Falls_Church.length); Falls_Church[Falls_Church.length] = createMarker(new GPoint(-77.19503784,38.90308762),"
Lemon Road Elementary School
7230 Idylwood Rd
Falls Church, VA 22043

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lemon Road Elementary School",'Falls_Church=' + Falls_Church.length); Falls_Church[Falls_Church.length] = createMarker(new GPoint(-77.17314148,38.91164017),"
Longfellow Middle School
2000 Westmoreland St
Falls Church, VA 22043

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Longfellow Middle School",'Falls_Church=' + Falls_Church.length); Falls_Church[Falls_Church.length] = createMarker(new GPoint(-77.21158600,38.90742874),"
Marshall High School
7731 Leesburg Pike
Falls Church, VA 22043

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Marshall High School",'Falls_Church=' + Falls_Church.length); Falls_Church[Falls_Church.length] = createMarker(new GPoint(-77.18062592,38.89562225),"
Mt. Daniel Elementary School
2328 N Oak St
Falls Church, VA 22046

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Mt. Daniel Elementary School",'Falls_Church=' + Falls_Church.length); Falls_Church[Falls_Church.length] = createMarker(new GPoint(-77.22626400,38.85926600),"
Northern Va Mental Health
3302 Gallows Rd
Falls Church, VA 22042

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Northern Va Mental Health",'Falls_Church=' + Falls_Church.length); Falls_Church[Falls_Church.length] = createMarker(new GPoint(-77.20447540,38.91628265),"
Pimmit Hills Alternative High School
7510 Lisle Ave
Falls Church, VA 22043

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Pimmit Hills Alternative High School",'Falls_Church=' + Falls_Church.length); Falls_Church[Falls_Church.length] = createMarker(new GPoint(-77.20730591,38.87192917),"
Pine Spring Elementary School
7607 Willow Ln
Falls Church, VA 22042

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Pine Spring Elementary School",'Falls_Church=' + Falls_Church.length); Falls_Church[Falls_Church.length] = createMarker(new GPoint(-77.20551300,38.88956451),"
Shrevewood Elementary School
7525 Shreve Rd
Falls Church, VA 22043

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Shrevewood Elementary School",'Falls_Church=' + Falls_Church.length); Falls_Church[Falls_Church.length] = createMarker(new GPoint(-77.16924286,38.85580444),"
Sleepy Hollow Elementary School
3333 Sleepy Hollow Rd
Falls Church, VA 22044

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Sleepy Hollow Elementary School",'Falls_Church=' + Falls_Church.length); Falls_Church[Falls_Church.length] = createMarker(new GPoint(-77.15124512,38.85729218),"
Stuart High School
3301 Peace Valley Ln
Falls Church, VA 22044

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Stuart High School",'Falls_Church=' + Falls_Church.length); Falls_Church[Falls_Church.length] = createMarker(new GPoint(-77.18418121,38.88363647),"
Thomas Jefferson Elementary School
601 S Oak St
Falls Church, VA 22046

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Thomas Jefferson Elementary School",'Falls_Church=' + Falls_Church.length); Falls_Church[Falls_Church.length] = createMarker(new GPoint(-77.19851685,38.87964630),"
Timber Lane Elementary School
2737 West St
Falls Church, VA 22046

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Timber Lane Elementary School",'Falls_Church=' + Falls_Church.length); Falls_Church[Falls_Church.length] = createMarker(new GPoint(-77.20413971,38.91904068),"
Westgate Elementary School
7500 Magarity Rd
Falls Church, VA 22043

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Westgate Elementary School",'Falls_Church=' + Falls_Church.length); Falls_Church[Falls_Church.length] = createMarker(new GPoint(-77.18367767,38.86354446),"
Westlawn Elementary School
3200 Westley Rd
Falls Church, VA 22042

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Westlawn Elementary School",'Falls_Church=' + Falls_Church.length); Falls_Church[Falls_Church.length] = createMarker(new GPoint(-77.21417236,38.85229874),"
Woodburn Elementary School
3401 Hemlock Dr
Falls Church, VA 22042

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Woodburn Elementary School",'Falls_Church=' + Falls_Church.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(Falls_Church); 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(Falls_Church);map.removeOverlays(Falls_Church); map.addOverlays(Falls_Church); centerByArray(Falls_Church, false, false); cntMarker += Falls_Church.length; centerByArray(Falls_Church,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'); } }