function addMarkers(){ mySelect = document.getElementById('selection'); Columbia = [];Savage = [];Clarksville = [];Marriottsville = [];Ellicott_City = [];Glenwood = [];Woodbine = [];Fulton = [];Laurel = [];Mount_Airy = [];Elkridge = [];Cooksville = [];mySelect.options[mySelect.options.length] = new Option("Clarksville schools",'all=Clarksville'); mySelect.options[mySelect.options.length] = new Option("Columbia schools",'all=Columbia'); mySelect.options[mySelect.options.length] = new Option("Cooksville schools",'all=Cooksville'); mySelect.options[mySelect.options.length] = new Option("Elkridge schools",'all=Elkridge'); mySelect.options[mySelect.options.length] = new Option("Ellicott City schools",'all=Ellicott_City'); mySelect.options[mySelect.options.length] = new Option("Fulton schools",'all=Fulton'); mySelect.options[mySelect.options.length] = new Option("Glenwood schools",'all=Glenwood'); mySelect.options[mySelect.options.length] = new Option("Laurel schools",'all=Laurel'); mySelect.options[mySelect.options.length] = new Option("Marriottsville schools",'all=Marriottsville'); mySelect.options[mySelect.options.length] = new Option("Mount Airy schools",'all=Mount_Airy'); mySelect.options[mySelect.options.length] = new Option("Savage schools",'all=Savage'); mySelect.options[mySelect.options.length] = new Option("Woodbine schools",'all=Woodbine'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Columbia[Columbia.length] = createMarker(new GPoint(-76.87041600,39.19237600),"
Atholton Adventist Academy
6520 Martin Road
Columbia, MD 21044
Co-ed school, PK-10
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Atholton Adventist Academy",'Columbia=' + Columbia.length); Columbia[Columbia.length] = createMarker(new GPoint(-76.84724700,39.20935400),"
Bet Yeladim Inc
5885 Robert Oliver Place
Columbia, MD 21045
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bet Yeladim Inc",'Columbia=' + Columbia.length); Savage[Savage.length] = createMarker(new GPoint(-76.82080000,39.13800000),"
Bethel Christian Academy
Po Box 406
Savage, MD 20763
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bethel Christian Academy",'Savage=' + Savage.length); Columbia[Columbia.length] = createMarker(new GPoint(-76.88647800,39.20962800),"
Bright Stars Learning Academy
5890 Cedar Lane
Columbia, MD 21044
Co-ed school, K-1
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bright Stars Learning Academy",'Columbia=' + Columbia.length); Clarksville[Clarksville.length] = createMarker(new GPoint(-76.94500400,39.20644900),"
Brookfield Christian School
6347 Ten Oaks Road
Clarksville, MD 21029
Co-ed school, PK-1
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Brookfield Christian School",'Clarksville=' + Clarksville.length); Columbia[Columbia.length] = createMarker(new GPoint(-76.86542700,39.22230300),"
Bryant Woods Montessori Childrens House
10449 Green Mountain Circle
Columbia, MD 21044
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bryant Woods Montessori Childrens House",'Columbia=' + Columbia.length); Columbia[Columbia.length] = createMarker(new GPoint(-76.81445300,39.20693700),"
Celebration Christian Academy
6080 Foreland Garth
Columbia, MD 21045
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Celebration Christian Academy",'Columbia=' + Columbia.length); Marriottsville[Marriottsville.length] = createMarker(new GPoint(-76.90055200,39.30006300),"
Chapelgate Christian Academy
2600 Marriottsville Road
Marriottsville, MD 21104
Co-ed school, 6-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Chapelgate Christian Academy",'Marriottsville=' + Marriottsville.length); Columbia[Columbia.length] = createMarker(new GPoint(-76.84636200,39.21368800),"
Children S House Montessori
9660 Basket Ring Rd
Columbia, MD 21045
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Children S House Montessori",'Columbia=' + Columbia.length); Columbia[Columbia.length] = createMarker(new GPoint(-76.81384500,39.22787800),"
Children's World Learning Center
8835 Centre Pk. Dr.
Columbia, MD 21045
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Children's World Learning Center",'Columbia=' + Columbia.length); Columbia[Columbia.length] = createMarker(new GPoint(-76.81962300,39.22710500),"
Childrens Manor School
9008 Red Branch Road
Columbia, MD 21045
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Childrens Manor School",'Columbia=' + Columbia.length); Columbia[Columbia.length] = createMarker(new GPoint(-76.80347500,39.18307300),"
Children's Discovery Center
7195 Columbia Gateway Drive
Columbia, MD 21046
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Children's Discovery Center",'Columbia=' + Columbia.length); Ellicott_City[Ellicott_City.length] = createMarker(new GPoint(-76.81043100,39.24901800),"
Children's Manor Montessori
4465 Montgomery Road
Ellicott City, MD 21043
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Children's Manor Montessori",'Ellicott_City=' + Ellicott_City.length); Columbia[Columbia.length] = createMarker(new GPoint(-76.87162300,39.17847400),"
Columbia Academy
10350 Old Columbia Road
Columbia, MD 21046
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Columbia Academy",'Columbia=' + Columbia.length); Columbia[Columbia.length] = createMarker(new GPoint(-76.87571600,39.22270600),"
Columbia Montessori School
10508 Marble Faun Lane
Columbia, MD 21044
Co-ed school, PK-1
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Columbia Montessori School",'Columbia=' + Columbia.length); Glenwood[Glenwood.length] = createMarker(new GPoint(-77.02839500,39.28717600),"
Cornerstone Academy Of Glenwood
3060 Washington Road, Route 97
Glenwood, MD 21738
Co-ed school, 3-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Cornerstone Academy Of Glenwood",'Glenwood=' + Glenwood.length); Ellicott_City[Ellicott_City.length] = createMarker(new GPoint(-76.82656000,39.28120800),"
Crossroads Adventist School
3291 Saint Johns Lane
Ellicott City, MD 21042
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Crossroads Adventist School",'Ellicott_City=' + Ellicott_City.length); Ellicott_City[Ellicott_City.length] = createMarker(new GPoint(-76.83253200,39.27241600),"
Ellicott City Children's House
3604 Chatham Road
Ellicott City, MD 21042
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ellicott City Children's House",'Ellicott_City=' + Ellicott_City.length); Columbia[Columbia.length] = createMarker(new GPoint(-76.86362200,39.20053700),"
Gan Israel Day School
770 Howes Lane
Columbia, MD 21044
Co-ed school, PK-4
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Gan Israel Day School",'Columbia=' + Columbia.length); Ellicott_City[Ellicott_City.length] = createMarker(new GPoint(-76.95448400,39.25670800),"
Glenelg Country School
12793 Folly Quarter Road
Ellicott City, MD 21042
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Glenelg Country School",'Ellicott_City=' + Ellicott_City.length); Woodbine[Woodbine.length] = createMarker(new GPoint(-77.02799900,39.32019000),"
Glenwood Country Day School
14785 Bushy Park Road
Woodbine, MD 21797
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Glenwood Country Day School",'Woodbine=' + Woodbine.length); Marriottsville[Marriottsville.length] = createMarker(new GPoint(-76.89479500,39.30799200),"
Goddard School In Marriottsville, The
2200 Brighten Run Court
Marriottsville, MD 21104
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Goddard School In Marriottsville, The",'Marriottsville=' + Marriottsville.length); Marriottsville[Marriottsville.length] = createMarker(new GPoint(-76.89492200,39.30790900),"
The Goddard School of Marriottsville
2200 Brighton Run Court
Marriottsville, MD 21104
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Goddard School of Marriottsville",'Marriottsville=' + Marriottsville.length); Columbia[Columbia.length] = createMarker(new GPoint(-76.81569900,39.23262400),"
Goddard School, The
8866 Columbia 100 Parkway
Columbia, MD 21045
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Goddard School, The",'Columbia=' + Columbia.length); Columbia[Columbia.length] = createMarker(new GPoint(-76.88101000,39.19349500),"
Goddard School, The
9100 Quarterstaff Road
Columbia, MD 21044
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Goddard School, The",'Columbia=' + Columbia.length); Fulton[Fulton.length] = createMarker(new GPoint(-76.94100900,39.17661600),"
High Road Academy
12350 Hall Shop Road
Fulton, MD 20759
Co-ed school, 4-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("High Road Academy",'Fulton=' + Fulton.length); Columbia[Columbia.length] = createMarker(new GPoint(-76.84979100,39.20235700),"
Julia Brown Montessori School
9760 Owen Brown Road
Columbia, MD 21045
Co-ed school, PK-3
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Julia Brown Montessori School",'Columbia=' + Columbia.length); Laurel[Laurel.length] = createMarker(new GPoint(-76.84011300,39.10999100),"
Julia Brown Montessori Schools
9450 Madison Avenue
Laurel, MD 20723
Co-ed school, PK-3
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Julia Brown Montessori Schools",'Laurel=' + Laurel.length); Ellicott_City[Ellicott_City.length] = createMarker(new GPoint(-76.86280500,39.28194000),"
The Kid's Place
3264 Corporate Ct
Ellicott City, MD 21042
Co-ed school, PK-KG
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Kid's Place",'Ellicott_City=' + Ellicott_City.length); Columbia[Columbia.length] = createMarker(new GPoint(-76.87694500,39.21567500),"
Kindercare
10820 Little Patuxent Parkway
Columbia, MD 21044
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Kindercare",'Columbia=' + Columbia.length); Ellicott_City[Ellicott_City.length] = createMarker(new GPoint(-76.80104100,39.27766500),"
Linwood Center
3421 Martha Bush Drive
Ellicott City, MD 21043
Co-ed school, 3-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Linwood Center",'Ellicott_City=' + Ellicott_City.length); Columbia[Columbia.length] = createMarker(new GPoint(-76.86575300,39.22233700),"
Lornwood Day Care & Gifted Center
10453 Green Mountain Circle
Columbia, MD 21044
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lornwood Day Care & Gifted Center",'Columbia=' + Columbia.length); Columbia[Columbia.length] = createMarker(new GPoint(-76.84399700,39.18574000),"
Lornwood School
7246 Cradlerock Wy
Columbia, MD 21045
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lornwood School",'Columbia=' + Columbia.length); Columbia[Columbia.length] = createMarker(new GPoint(-76.82020800,39.23248800),"
Love Of Learning Montessori School
9151 Rumsey Road
Columbia, MD 21045
Co-ed school, PK-4
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Love Of Learning Montessori School",'Columbia=' + Columbia.length); Mount_Airy[Mount_Airy.length] = createMarker(new GPoint(-77.09643000,39.34864700),"
Mount Airy Christian Academy
16700 Old Frederick Road
Mount Airy, MD 21771
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mount Airy Christian Academy",'Mount_Airy=' + Mount_Airy.length); Ellicott_City[Ellicott_City.length] = createMarker(new GPoint(-76.76953100,39.23836100),"
Our Lady Of Perpetual Help School
4801 Ilchester Road
Ellicott City, MD 21043
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Our Lady Of Perpetual Help School",'Ellicott_City=' + Ellicott_City.length); Marriottsville[Marriottsville.length] = createMarker(new GPoint(-76.89526000,39.33576500),"
Peter Pan Learning Center
1260 Driver Road
Marriottsville, MD 21104
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Peter Pan Learning Center",'Marriottsville=' + Marriottsville.length); Laurel[Laurel.length] = createMarker(new GPoint(-76.82772200,39.11141800),"
Phillips School - Laurel
8920 Whiskey Bottom Road
Laurel, MD 20723
Co-ed school, 4-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Phillips School - Laurel",'Laurel=' + Laurel.length); Ellicott_City[Ellicott_City.length] = createMarker(new GPoint(-76.82971400,39.28339600),"
Resurrection-St. Paul School
3155 Paulskirk Drive
Ellicott City, MD 21042
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Resurrection-St. Paul School",'Ellicott_City=' + Ellicott_City.length); Elkridge[Elkridge.length] = createMarker(new GPoint(-76.71562300,39.21076500),"
St. Augustine
5990 Old Washington Road
Elkridge, MD 21075
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Augustine",'Elkridge=' + Elkridge.length); Clarksville[Clarksville.length] = createMarker(new GPoint(-76.94333200,39.20431600),"
St. Louis School
12500 Clarksville Pike
Clarksville, MD 21029
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Louis School",'Clarksville=' + Clarksville.length); Ellicott_City[Ellicott_City.length] = createMarker(new GPoint(-76.82996800,39.27268100),"
St Johns Parish Day School
9130 Frederick Road
Ellicott City, MD 21042
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Johns Parish Day School",'Ellicott_City=' + Ellicott_City.length); Ellicott_City[Ellicott_City.length] = createMarker(new GPoint(-76.77396000,39.23220200),"
Trinity School
4985 Ilchester Road
Ellicott City, MD 21043
Co-ed school, NS-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Trinity School",'Ellicott_City=' + Ellicott_City.length); Cooksville[Cooksville.length] = createMarker(new GPoint(-77.00381200,39.31925200),"
Woodmont Academy
2000 Woodmont Lane
Cooksville, MD 21723
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Woodmont Academy",'Cooksville=' + Cooksville.length); Columbia[Columbia.length] = createMarker(new GPoint(-76.81962300,39.22710500),"
Young Care Inc
9008 Red Branch Rd
Columbia, MD 21045
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Young Care Inc",'Columbia=' + Columbia.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/////1/' + showArray); map.removeOverlays(Clarksville); map.removeOverlays(Columbia); map.removeOverlays(Cooksville); map.removeOverlays(Elkridge); map.removeOverlays(Ellicott_City); map.removeOverlays(Fulton); map.removeOverlays(Glenwood); map.removeOverlays(Laurel); map.removeOverlays(Marriottsville); map.removeOverlays(Mount_Airy); map.removeOverlays(Savage); map.removeOverlays(Woodbine); 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(Columbia);map.removeOverlays(Clarksville); map.removeOverlays(Columbia); map.removeOverlays(Cooksville); map.removeOverlays(Elkridge); map.removeOverlays(Ellicott_City); map.removeOverlays(Fulton); map.removeOverlays(Glenwood); map.removeOverlays(Laurel); map.removeOverlays(Marriottsville); map.removeOverlays(Mount_Airy); map.removeOverlays(Savage); map.removeOverlays(Woodbine); map.addOverlays(Clarksville); centerByArray(Clarksville, false, false); cntMarker += Clarksville.length; map.addOverlays(Columbia); centerByArray(Columbia, false, false); cntMarker += Columbia.length; map.addOverlays(Cooksville); centerByArray(Cooksville, false, false); cntMarker += Cooksville.length; map.addOverlays(Elkridge); centerByArray(Elkridge, false, false); cntMarker += Elkridge.length; map.addOverlays(Ellicott_City); centerByArray(Ellicott_City, false, false); cntMarker += Ellicott_City.length; map.addOverlays(Fulton); centerByArray(Fulton, false, false); cntMarker += Fulton.length; map.addOverlays(Glenwood); centerByArray(Glenwood, false, false); cntMarker += Glenwood.length; map.addOverlays(Laurel); centerByArray(Laurel, false, false); cntMarker += Laurel.length; map.addOverlays(Marriottsville); centerByArray(Marriottsville, false, false); cntMarker += Marriottsville.length; map.addOverlays(Mount_Airy); centerByArray(Mount_Airy, false, false); cntMarker += Mount_Airy.length; map.addOverlays(Savage); centerByArray(Savage, false, false); cntMarker += Savage.length; map.addOverlays(Woodbine); centerByArray(Woodbine, false, false); cntMarker += Woodbine.length; centerByArray(Columbia,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=1&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; }