function addMarkers(){ mySelect = document.getElementById('selection'); Rockville = [];Rockville[Rockville.length] = createMarker(new GPoint(-77.20795400,39.09743700),"
Academy Primary School & Child Development Center
10109 Darnestown Road
Rockville, MD 20850
Co-ed school, NS-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Academy Primary School & Child Development Center",'Rockville=' + Rockville.length); Rockville[Rockville.length] = createMarker(new GPoint(-77.11100100,39.12044800),"
Camp Olympia Country Day School and Summer Sports Camp
5511 Muncaster Mill Road
Rockville, MD 20855
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Camp Olympia Country Day School and Summer Sports Camp",'Rockville=' + Rockville.length); Rockville[Rockville.length] = createMarker(new GPoint(-77.12627600,39.05523800),"
Charles E Smith Jewish Day School
1901 E Jefferson Street
Rockville, MD 20852
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Charles E Smith Jewish Day School",'Rockville=' + Rockville.length); Rockville[Rockville.length] = createMarker(new GPoint(-77.09034600,39.09139800),"
The Children's Learning Center Inc
4511 Bestor Drive
Rockville, MD 20853
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Children's Learning Center Inc",'Rockville=' + Rockville.length); Rockville[Rockville.length] = createMarker(new GPoint(-77.15297600,39.08298800),"
Christ Episcopal School
109 S Washington Street
Rockville, MD 20850
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Christ Episcopal School",'Rockville=' + Rockville.length); Rockville[Rockville.length] = createMarker(new GPoint(-77.11373200,39.08146200),"
Community School Of Md
751 Twinbrook Parkway
Rockville, MD 20851
Co-ed school, Ungraded
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Community School Of Md",'Rockville=' + Rockville.length); Rockville[Rockville.length] = createMarker(new GPoint(-77.15392900,39.09782900),"
Community School Of Md @ Jacks
932 Hungerford Drive 40a
Rockville, MD 20850
Co-ed school, Ungraded
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Community School Of Md @ Jacks",'Rockville=' + Rockville.length); Rockville[Rockville.length] = createMarker(new GPoint(-77.16216400,39.09138800),"
Early Childhood Center
100 Welsh Park Drive
Rockville, MD 20850
Co-ed school, NS-NS
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Early Childhood Center",'Rockville=' + Rockville.length); Rockville[Rockville.length] = createMarker(new GPoint(-77.12014200,39.04846600),"
Executive Child Development Center
6006 Executive Boulevard
Rockville, MD 20852
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Executive Child Development Center",'Rockville=' + Rockville.length); Rockville[Rockville.length] = createMarker(new GPoint(-77.11983900,39.04834400),"
Foundation Schools
6000 Executive Blvd Suite 605
Rockville, MD 20852
Co-ed school, 1-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Foundation Schools",'Rockville=' + Rockville.length); Rockville[Rockville.length] = createMarker(new GPoint(-77.09948200,39.07132300),"
The Frost School
4915 Aspen Hill Road
Rockville, MD 20853
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Frost School",'Rockville=' + Rockville.length); Rockville[Rockville.length] = createMarker(new GPoint(-77.12424900,39.05283700),"
Ganon Gil Preschool
6125 Montrose Road
Rockville, MD 20852
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ganon Gil Preschool",'Rockville=' + Rockville.length); Rockville[Rockville.length] = createMarker(new GPoint(-77.17127100,39.09407800),"
Georgetown Hill Early Chilhood
850 Nelson Street
Rockville, MD 20850
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Georgetown Hill Early Chilhood",'Rockville=' + Rockville.length); Rockville[Rockville.length] = createMarker(new GPoint(-77.16960100,39.03133900),"
Georgetown Hill Early School
850 Nelson Street
Rockville, MD 20850
Co-ed school, PK-2
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Georgetown Hill Early School",'Rockville=' + Rockville.length); Rockville[Rockville.length] = createMarker(new GPoint(-77.12355600,39.07676300),"
Good Shepherd Montessori School
1605 Veirs Mill Road
Rockville, MD 20851
Co-ed school, NS-3
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Good Shepherd Montessori School",'Rockville=' + Rockville.length); Rockville[Rockville.length] = createMarker(new GPoint(-77.13188900,39.04898500),"
Green Acres School
11701 Danville Drive
Rockville, MD 20852
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Green Acres School",'Rockville=' + Rockville.length); Rockville[Rockville.length] = createMarker(new GPoint(-77.11608500,39.08744600),"
Hebrew Day Institute
2200 Baltimore Road
Rockville, MD 20851
Co-ed school, K-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Hebrew Day Institute",'Rockville=' + Rockville.length); Rockville[Rockville.length] = createMarker(new GPoint(-77.16156600,39.04673200),"
Ivymount School
11614 Seven Locks Road
Rockville, MD 20854
Co-ed school, Ungraded
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ivymount School",'Rockville=' + Rockville.length); Rockville[Rockville.length] = createMarker(new GPoint(-77.20356300,39.09893600),"
Katherine Thomas School
9975 Medical Center Drive
Rockville, MD 20850
Co-ed school, PK-10
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Katherine Thomas School",'Rockville=' + Rockville.length); Rockville[Rockville.length] = createMarker(new GPoint(-77.09903600,39.04811600),"
Lourie Center School Of The Reginald S Lourie Center
12301 Academy Way
Rockville, MD 20852
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lourie Center School Of The Reginald S Lourie Center",'Rockville=' + Rockville.length); Rockville[Rockville.length] = createMarker(new GPoint(-77.09947600,39.07394100),"
Melvin J Berman Hebrew Academy
13300 Arctic Avenue
Rockville, MD 20853
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Melvin J Berman Hebrew Academy",'Rockville=' + Rockville.length); Rockville[Rockville.length] = createMarker(new GPoint(-77.10557800,39.05346200),"
Montrose Christian School
5100 Randolph Road
Rockville, MD 20852
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Montrose Christian School",'Rockville=' + Rockville.length); Rockville[Rockville.length] = createMarker(new GPoint(-77.11423800,39.05333600),"
Montrose School Llc Ctr For Optimal Learning
5721 Randolph Road
Rockville, MD 20852
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Montrose School Llc Ctr For Optimal Learning",'Rockville=' + Rockville.length); Rockville[Rockville.length] = createMarker(new GPoint(-77.08908700,39.11251400),"
Norbeck Montessori Center
4500 Muncaster Mill Rd
Rockville, MD 20853
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Norbeck Montessori Center",'Rockville=' + Rockville.length); Rockville[Rockville.length] = createMarker(new GPoint(-77.21882900,39.08655000),"
Primary Montessori Day School
14138 Travilah Road
Rockville, MD 20850
Co-ed school, PK-2
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Primary Montessori Day School",'Rockville=' + Rockville.length); Rockville[Rockville.length] = createMarker(new GPoint(-77.20091600,39.10019800),"
The Ridge School Of Montgomery County
14901 Broschart Road
Rockville, MD 20850
Co-ed school, 6-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Ridge School Of Montgomery County",'Rockville=' + Rockville.length); Rockville[Rockville.length] = createMarker(new GPoint(-77.17031300,39.08321300),"
Rockville Nursery School & Kindergarten
301 Adclare Road
Rockville, MD 20850
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Rockville Nursery School & Kindergarten",'Rockville=' + Rockville.length); Rockville[Rockville.length] = createMarker(new GPoint(-77.13522900,39.05372200),"
St. Elizabeth Elementary School
917 Montrose Road
Rockville, MD 20852
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Elizabeth Elementary School",'Rockville=' + Rockville.length); Rockville[Rockville.length] = createMarker(new GPoint(-77.09485300,39.06470800),"
St. Jude Catholic School
4820 Walbridge Street
Rockville, MD 20853
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Jude Catholic School",'Rockville=' + Rockville.length); Rockville[Rockville.length] = createMarker(new GPoint(-77.14346700,39.08107300),"
St. Marys Elementary School
600 Veirs Mill Road
Rockville, MD 20852
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Marys Elementary School",'Rockville=' + Rockville.length); Rockville[Rockville.length] = createMarker(new GPoint(-77.16949800,39.08523800),"
WEE Center, FBC Rockville
55 Adclare Road
Rockville, MD 20850
Co-ed school, PK-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("WEE Center, FBC Rockville",'Rockville=' + Rockville.length); Rockville[Rockville.length] = createMarker(new GPoint(-77.10242200,39.04908700),"
White Flint Children's House
11810 Parklawn Drive
Rockville, MD 20852
Co-ed school, NS-KG
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("White Flint Children's House",'Rockville=' + Rockville.length); Rockville[Rockville.length] = createMarker(new GPoint(-77.11186000,39.04561100),"
White Flint Country Day
11545 Rockville Pike
Rockville, MD 20852
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("White Flint Country Day",'Rockville=' + Rockville.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//////' + showArray); map.removeOverlays(Rockville); 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(Rockville);map.removeOverlays(Rockville); map.addOverlays(Rockville); centerByArray(Rockville, false, false); cntMarker += Rockville.length; centerByArray(Rockville,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=&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; }