function addMarkers(){ mySelect = document.getElementById('selection'); Baltimore = [];Owings_Mills = [];Potomac = [];Gaithersburg = [];Arnold = [];Cockeysville = [];Rockville = [];Hagerstown = [];California = [];Gambrills = [];Eldersburg = [];Columbia = [];Waldorf = [];Hyattsville = [];Cumberland = [];Oxon_Hill = [];Middletown = [];Takoma_Park = [];Pasadena = [];Gwynn_Oak = [];Linthicum = [];Annapolis = [];Silver_Spring = [];Laurel = [];Ellicott_City = [];Towson = [];Bethesda = [];mySelect.options[mySelect.options.length] = new Option("Annapolis schools",'all=Annapolis'); mySelect.options[mySelect.options.length] = new Option("Arnold schools",'all=Arnold'); mySelect.options[mySelect.options.length] = new Option("Baltimore schools",'all=Baltimore'); mySelect.options[mySelect.options.length] = new Option("Bethesda schools",'all=Bethesda'); mySelect.options[mySelect.options.length] = new Option("California schools",'all=California'); mySelect.options[mySelect.options.length] = new Option("Cockeysville schools",'all=Cockeysville'); mySelect.options[mySelect.options.length] = new Option("Columbia schools",'all=Columbia'); mySelect.options[mySelect.options.length] = new Option("Cumberland schools",'all=Cumberland'); mySelect.options[mySelect.options.length] = new Option("Eldersburg schools",'all=Eldersburg'); mySelect.options[mySelect.options.length] = new Option("Ellicott City schools",'all=Ellicott_City'); mySelect.options[mySelect.options.length] = new Option("Gaithersburg schools",'all=Gaithersburg'); mySelect.options[mySelect.options.length] = new Option("Gambrills schools",'all=Gambrills'); mySelect.options[mySelect.options.length] = new Option("Gwynn Oak schools",'all=Gwynn_Oak'); mySelect.options[mySelect.options.length] = new Option("Hagerstown schools",'all=Hagerstown'); mySelect.options[mySelect.options.length] = new Option("Hyattsville schools",'all=Hyattsville'); mySelect.options[mySelect.options.length] = new Option("Laurel schools",'all=Laurel'); mySelect.options[mySelect.options.length] = new Option("Linthicum schools",'all=Linthicum'); mySelect.options[mySelect.options.length] = new Option("Middletown schools",'all=Middletown'); mySelect.options[mySelect.options.length] = new Option("Owings Mills schools",'all=Owings_Mills'); mySelect.options[mySelect.options.length] = new Option("Oxon Hill schools",'all=Oxon_Hill'); mySelect.options[mySelect.options.length] = new Option("Pasadena schools",'all=Pasadena'); mySelect.options[mySelect.options.length] = new Option("Potomac schools",'all=Potomac'); mySelect.options[mySelect.options.length] = new Option("Rockville schools",'all=Rockville'); mySelect.options[mySelect.options.length] = new Option("Silver Spring schools",'all=Silver_Spring'); mySelect.options[mySelect.options.length] = new Option("Takoma Park schools",'all=Takoma_Park'); mySelect.options[mySelect.options.length] = new Option("Towson schools",'all=Towson'); mySelect.options[mySelect.options.length] = new Option("Waldorf schools",'all=Waldorf'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Baltimore[Baltimore.length] = createMarker(new GPoint(-76.62302700,39.35144300),"
A Child S Place
4701 N Charles Street
Baltimore, MD 21210
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("A Child S Place",'Baltimore=' + Baltimore.length); Owings_Mills[Owings_Mills.length] = createMarker(new GPoint(-76.78866100,39.39455700),"
A Small World
4506 Painters Mill Road
Owings Mills, MD 21117
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("A Small World",'Owings_Mills=' + Owings_Mills.length); Potomac[Potomac.length] = createMarker(new GPoint(-77.18752300,39.05895200),"
Academy Child Development Cent
9201 Falls Chapel Way
Potomac, MD 20854
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Academy Child Development Cent",'Potomac=' + Potomac.length); Gaithersburg[Gaithersburg.length] = createMarker(new GPoint(-77.23836200,39.10161800),"
Academy Child Development Center At Dofief
15001 Dufief Drive
Gaithersburg, MD 20878
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Academy Child Development Center At Dofief",'Gaithersburg=' + Gaithersburg.length); Arnold[Arnold.length] = createMarker(new GPoint(-76.49811800,39.03433700),"
Asbury Community Christian Preschool
78 Church Road
Arnold, MD 21012
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Asbury Community Christian Preschool",'Arnold=' + Arnold.length); Cockeysville[Cockeysville.length] = createMarker(new GPoint(-76.64466800,39.49322800),"
Ashland Preschool Center
116 Ashland Road
Cockeysville, MD 21030
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ashland Preschool Center",'Cockeysville=' + Cockeysville.length); Arnold[Arnold.length] = createMarker(new GPoint(-76.52204600,39.04434000),"
Chesapeake Academy
1185 Baltimore Annapolis Blvd
Arnold, MD 21012
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Chesapeake Academy",'Arnold=' + Arnold.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); Baltimore[Baltimore.length] = createMarker(new GPoint(-76.62513800,39.36517300),"
Church Of The Redeemer Day School
5603 N Charles Street
Baltimore, MD 21210
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Church Of The Redeemer Day School",'Baltimore=' + Baltimore.length); Hagerstown[Hagerstown.length] = createMarker(new GPoint(-77.72801900,39.71542400),"
Citicorp Family Center
14629 Citicorp Drive
Hagerstown, MD 21742
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Citicorp Family Center",'Hagerstown=' + Hagerstown.length); California[California.length] = createMarker(new GPoint(-76.49801900,38.29348100),"
The Creative Beginnings School
22840 Three Notch Road
California, MD 20619
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Creative Beginnings School",'California=' + California.length); Gambrills[Gambrills.length] = createMarker(new GPoint(-76.68759600,39.02725200),"
Daily Discoveries And The Discovery School
1041 Rt 3n
Gambrills, MD 21054
Co-ed school, PK-1
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Daily Discoveries And The Discovery School",'Gambrills=' + Gambrills.length); Owings_Mills[Owings_Mills.length] = createMarker(new GPoint(-76.74780400,39.39644900),"
Day Timers Early Learning Center
9199 Reisterstown Road
Owings Mills, MD 21117
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Day Timers Early Learning Center",'Owings_Mills=' + Owings_Mills.length); Baltimore[Baltimore.length] = createMarker(new GPoint(-76.61861300,39.29879900),"
Downtown Baltimore Childcare Inc.
806 Park Avenue
Baltimore, MD 21201
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Downtown Baltimore Childcare Inc.",'Baltimore=' + Baltimore.length); Gaithersburg[Gaithersburg.length] = createMarker(new GPoint(-77.18649100,39.12750900),"
Epworth Preschool And Kindergarten
9008 Rosemont Drive
Gaithersburg, MD 20877
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Epworth Preschool And Kindergarten",'Gaithersburg=' + Gaithersburg.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); Baltimore[Baltimore.length] = createMarker(new GPoint(-76.61794100,39.33500200),"
First English Preschool And Kindergarten
3807 N Charles Street
Baltimore, MD 21218
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("First English Preschool And Kindergarten",'Baltimore=' + Baltimore.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.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); Eldersburg[Eldersburg.length] = createMarker(new GPoint(-76.92427100,39.39711900),"
Goddard School Of Eldersburg, The
2028 Liberty Road
Eldersburg, MD 21784
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Goddard School Of Eldersburg, The",'Eldersburg=' + Eldersburg.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); Waldorf[Waldorf.length] = createMarker(new GPoint(-76.91402200,38.60521600),"
Good Shepherd Education Center
305 Smallwood Drive
Waldorf, MD 20602
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Good Shepherd Education Center",'Waldorf=' + Waldorf.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); Baltimore[Baltimore.length] = createMarker(new GPoint(-76.61017700,39.36186600),"
Govans Presbyterian Preschool
5826 York Road
Baltimore, MD 21212
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Govans Presbyterian Preschool",'Baltimore=' + Baltimore.length); Baltimore[Baltimore.length] = createMarker(new GPoint(-76.62458600,39.36053700),"
Grace United Methodist Preschool
5407 N Charles Street
Baltimore, MD 21210
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Grace United Methodist Preschool",'Baltimore=' + Baltimore.length); Hyattsville[Hyattsville.length] = createMarker(new GPoint(-76.96510000,38.96350000),"
Greenwood School
6525 Belcrest Road G90
Hyattsville, MD 20782
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Greenwood School",'Hyattsville=' + Hyattsville.length); Hagerstown[Hagerstown.length] = createMarker(new GPoint(-77.72237700,39.63952900),"
Hagerstown Childrens School
141 S Potomac Street
Hagerstown, MD 21740
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Hagerstown Childrens School",'Hagerstown=' + Hagerstown.length); Hagerstown[Hagerstown.length] = createMarker(new GPoint(-77.66545600,39.62801300),"
Hcc Children's Learning Center
11400 Robinwood Drive
Hagerstown, MD 21742
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Hcc Children's Learning Center",'Hagerstown=' + Hagerstown.length); Cumberland[Cumberland.length] = createMarker(new GPoint(-78.76471200,39.65529500),"
Humpty Dumpty Learning Center
217 N Centre Street
Cumberland, MD 21502
Co-ed school, NS-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Humpty Dumpty Learning Center",'Cumberland=' + Cumberland.length); Baltimore[Baltimore.length] = createMarker(new GPoint(-76.60024200,39.34348200),"
Ivey League Learning Center, Inc.
1009 E 43rd Street
Baltimore, MD 21212
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ivey League Learning Center, Inc.",'Baltimore=' + Baltimore.length); Oxon_Hill[Oxon_Hill.length] = createMarker(new GPoint(-76.97643300,38.80511700),"
Kiddie Academy Of Oxon Hill
6031 Oxon Hill Road
Oxon Hill, MD 20745
Co-ed school, K-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Kiddie Academy Of Oxon Hill",'Oxon_Hill=' + Oxon_Hill.length); Waldorf[Waldorf.length] = createMarker(new GPoint(-76.93560000,38.61909300),"
Kindercare Learning Center
2011 Smallwood Drive W
Waldorf, MD 20603
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Kindercare Learning Center",'Waldorf=' + Waldorf.length); Middletown[Middletown.length] = createMarker(new GPoint(-77.59040400,39.48309700),"
Lucy School
9117 Frostown Road
Middletown, MD 21769
Co-ed school, NS-2
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lucy School",'Middletown=' + Middletown.length); Middletown[Middletown.length] = createMarker(new GPoint(-77.50923600,39.42990600),"
Middletown United Methodist Preschool & Kdgn
7108 Fern Circle
Middletown, MD 21769
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Middletown United Methodist Preschool & Kdgn",'Middletown=' + Middletown.length); Gaithersburg[Gaithersburg.length] = createMarker(new GPoint(-77.21915700,39.13336000),"
Nist Child Care Center
100 Bureau Drive Mailstop 1926
Gaithersburg, MD 20899
Co-ed school, K-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Nist Child Care Center",'Gaithersburg=' + Gaithersburg.length); Takoma_Park[Takoma_Park.length] = createMarker(new GPoint(-76.99139700,38.97752900),"
Our Lady Of Sorrows School
1010 Larch Avenue
Takoma Park, MD 20912
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Our Lady Of Sorrows School",'Takoma_Park=' + Takoma_Park.length); Pasadena[Pasadena.length] = createMarker(new GPoint(-76.51541300,39.13223900),"
Pasadena Child Care and Homework Center
8896 Fort Smallwood Road
Pasadena, MD 21122
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Pasadena Child Care and Homework Center",'Pasadena=' + Pasadena.length); Gwynn_Oak[Gwynn_Oak.length] = createMarker(new GPoint(-76.69782100,39.31021200),"
Phyllis Wheatley Education Center
2221 Wheatley Drive
Gwynn Oak, MD 21207
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Phyllis Wheatley Education Center",'Gwynn_Oak=' + Gwynn_Oak.length); Linthicum[Linthicum.length] = createMarker(new GPoint(-76.67853300,39.19987800),"
Quala Care Child Center Inc
920 Andover Road
Linthicum, MD 21090
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Quala Care Child Center Inc",'Linthicum=' + Linthicum.length); Gaithersburg[Gaithersburg.length] = createMarker(new GPoint(-77.23378100,39.13011300),"
Quince Orchard Kindercare
18000 Sioux Lane
Gaithersburg, MD 20878
Co-ed school, K-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Quince Orchard Kindercare",'Gaithersburg=' + Gaithersburg.length); Annapolis[Annapolis.length] = createMarker(new GPoint(-76.48404700,38.93956700),"
St. Anne's School of Annapolis
3112 Arundel On The Bay Road
Annapolis, MD 21403
Co-ed school, NS-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Anne's School of Annapolis",'Annapolis=' + Annapolis.length); Silver_Spring[Silver_Spring.length] = createMarker(new GPoint(-76.98226100,39.01089900),"
St. Camillus School & Early Childhood Learning Center
1500 Saint Camillus Drive
Silver Spring, MD 20903
Co-ed school, NS-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Camillus School & Early Childhood Learning Center",'Silver_Spring=' + Silver_Spring.length); Silver_Spring[Silver_Spring.length] = createMarker(new GPoint(-77.06889900,39.04864500),"
St. Catherine Laboure School
11811 Claridge Road
Silver Spring, MD 20902
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Catherine Laboure School",'Silver_Spring=' + Silver_Spring.length); Laurel[Laurel.length] = createMarker(new GPoint(-76.85590900,39.10896000),"
St. Mary Of The Mills School
106 Saint Marys Place
Laurel, MD 20707
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Mary Of The Mills School",'Laurel=' + Laurel.length); Pasadena[Pasadena.length] = createMarker(new GPoint(-76.56688600,39.10039200),"
Severna Park Children's Centre
144 Ritchie Highway
Pasadena, MD 21122
Co-ed school, K-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Severna Park Children's Centre",'Pasadena=' + Pasadena.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); Hagerstown[Hagerstown.length] = createMarker(new GPoint(-77.72961900,39.63395900),"
Surrey Child Care Center
535 Summit Avenue
Hagerstown, MD 21740
Co-ed school, K-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Surrey Child Care Center",'Hagerstown=' + Hagerstown.length); Towson[Towson.length] = createMarker(new GPoint(-76.61145200,39.40035900),"
Towson Presbyterian Kindergarten & Nursery
400 W Chesapeake Avenue
Towson, MD 21204
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Towson Presbyterian Kindergarten & Nursery",'Towson=' + Towson.length); Bethesda[Bethesda.length] = createMarker(new GPoint(-77.10099900,38.96298000),"
Washington Episcopal School
5600 Little Falls Parkway
Bethesda, MD 20816
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Washington Episcopal School",'Bethesda=' + Bethesda.length); map.removeOverlays(Annapolis); map.removeOverlays(Arnold); map.removeOverlays(Baltimore); map.removeOverlays(Bethesda); map.removeOverlays(California); map.removeOverlays(Cockeysville); map.removeOverlays(Columbia); map.removeOverlays(Cumberland); map.removeOverlays(Eldersburg); map.removeOverlays(Ellicott_City); map.removeOverlays(Gaithersburg); map.removeOverlays(Gambrills); map.removeOverlays(Gwynn_Oak); map.removeOverlays(Hagerstown); map.removeOverlays(Hyattsville); map.removeOverlays(Laurel); map.removeOverlays(Linthicum); map.removeOverlays(Middletown); map.removeOverlays(Owings_Mills); map.removeOverlays(Oxon_Hill); map.removeOverlays(Pasadena); map.removeOverlays(Potomac); map.removeOverlays(Rockville); map.removeOverlays(Silver_Spring); map.removeOverlays(Takoma_Park); map.removeOverlays(Towson); map.removeOverlays(Waldorf); setTimeout(function(){map.addOverlays(Annapolis)},1000); setTimeout(function(){map.addOverlays(Arnold)},1000); setTimeout(function(){map.addOverlays(Baltimore)},1000); setTimeout(function(){map.addOverlays(Bethesda)},1000); setTimeout(function(){map.addOverlays(California)},1000); setTimeout(function(){map.addOverlays(Cockeysville)},1000); setTimeout(function(){map.addOverlays(Columbia)},1000); setTimeout(function(){map.addOverlays(Cumberland)},1000); setTimeout(function(){map.addOverlays(Eldersburg)},1000); setTimeout(function(){map.addOverlays(Ellicott_City)},1000); setTimeout(function(){map.addOverlays(Gaithersburg)},1000); setTimeout(function(){map.addOverlays(Gambrills)},1000); setTimeout(function(){map.addOverlays(Gwynn_Oak)},1000); setTimeout(function(){map.addOverlays(Hagerstown)},1000); setTimeout(function(){map.addOverlays(Hyattsville)},1000); setTimeout(function(){map.addOverlays(Laurel)},1000); setTimeout(function(){map.addOverlays(Linthicum)},1000); setTimeout(function(){map.addOverlays(Middletown)},1000); setTimeout(function(){map.addOverlays(Owings_Mills)},1000); setTimeout(function(){map.addOverlays(Oxon_Hill)},1000); setTimeout(function(){map.addOverlays(Pasadena)},1000); setTimeout(function(){map.addOverlays(Potomac)},1000); setTimeout(function(){map.addOverlays(Rockville)},1000); setTimeout(function(){map.addOverlays(Silver_Spring)},1000); setTimeout(function(){map.addOverlays(Takoma_Park)},1000); setTimeout(function(){map.addOverlays(Towson)},1000); setTimeout(function(){map.addOverlays(Waldorf)},1000); maxLng = -76.48404700; maxLat = 39.71542400; minLng = -78.76471200; minLat = 38.29348100; reCenterMap(); } // 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(Annapolis); map.removeOverlays(Arnold); map.removeOverlays(Baltimore); map.removeOverlays(Bethesda); map.removeOverlays(California); map.removeOverlays(Cockeysville); map.removeOverlays(Columbia); map.removeOverlays(Cumberland); map.removeOverlays(Eldersburg); map.removeOverlays(Ellicott_City); map.removeOverlays(Gaithersburg); map.removeOverlays(Gambrills); map.removeOverlays(Gwynn_Oak); map.removeOverlays(Hagerstown); map.removeOverlays(Hyattsville); map.removeOverlays(Laurel); map.removeOverlays(Linthicum); map.removeOverlays(Middletown); map.removeOverlays(Owings_Mills); map.removeOverlays(Oxon_Hill); map.removeOverlays(Pasadena); map.removeOverlays(Potomac); map.removeOverlays(Rockville); map.removeOverlays(Silver_Spring); map.removeOverlays(Takoma_Park); map.removeOverlays(Towson); map.removeOverlays(Waldorf); 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(Baltimore);map.removeOverlays(Annapolis); map.removeOverlays(Arnold); map.removeOverlays(Baltimore); map.removeOverlays(Bethesda); map.removeOverlays(California); map.removeOverlays(Cockeysville); map.removeOverlays(Columbia); map.removeOverlays(Cumberland); map.removeOverlays(Eldersburg); map.removeOverlays(Ellicott_City); map.removeOverlays(Gaithersburg); map.removeOverlays(Gambrills); map.removeOverlays(Gwynn_Oak); map.removeOverlays(Hagerstown); map.removeOverlays(Hyattsville); map.removeOverlays(Laurel); map.removeOverlays(Linthicum); map.removeOverlays(Middletown); map.removeOverlays(Owings_Mills); map.removeOverlays(Oxon_Hill); map.removeOverlays(Pasadena); map.removeOverlays(Potomac); map.removeOverlays(Rockville); map.removeOverlays(Silver_Spring); map.removeOverlays(Takoma_Park); map.removeOverlays(Towson); map.removeOverlays(Waldorf); map.addOverlays(Annapolis); centerByArray(Annapolis, false, false); cntMarker += Annapolis.length; map.addOverlays(Arnold); centerByArray(Arnold, false, false); cntMarker += Arnold.length; map.addOverlays(Baltimore); centerByArray(Baltimore, false, false); cntMarker += Baltimore.length; map.addOverlays(Bethesda); centerByArray(Bethesda, false, false); cntMarker += Bethesda.length; map.addOverlays(California); centerByArray(California, false, false); cntMarker += California.length; map.addOverlays(Cockeysville); centerByArray(Cockeysville, false, false); cntMarker += Cockeysville.length; map.addOverlays(Columbia); centerByArray(Columbia, false, false); cntMarker += Columbia.length; map.addOverlays(Cumberland); centerByArray(Cumberland, false, false); cntMarker += Cumberland.length; map.addOverlays(Eldersburg); centerByArray(Eldersburg, false, false); cntMarker += Eldersburg.length; map.addOverlays(Ellicott_City); centerByArray(Ellicott_City, false, false); cntMarker += Ellicott_City.length; map.addOverlays(Gaithersburg); centerByArray(Gaithersburg, false, false); cntMarker += Gaithersburg.length; map.addOverlays(Gambrills); centerByArray(Gambrills, false, false); cntMarker += Gambrills.length; map.addOverlays(Gwynn_Oak); centerByArray(Gwynn_Oak, false, false); cntMarker += Gwynn_Oak.length; map.addOverlays(Hagerstown); centerByArray(Hagerstown, false, false); cntMarker += Hagerstown.length; map.addOverlays(Hyattsville); centerByArray(Hyattsville, false, false); cntMarker += Hyattsville.length; map.addOverlays(Laurel); centerByArray(Laurel, false, false); cntMarker += Laurel.length; map.addOverlays(Linthicum); centerByArray(Linthicum, false, false); cntMarker += Linthicum.length; map.addOverlays(Middletown); centerByArray(Middletown, false, false); cntMarker += Middletown.length; map.addOverlays(Owings_Mills); centerByArray(Owings_Mills, false, false); cntMarker += Owings_Mills.length; map.addOverlays(Oxon_Hill); centerByArray(Oxon_Hill, false, false); cntMarker += Oxon_Hill.length; map.addOverlays(Pasadena); centerByArray(Pasadena, false, false); cntMarker += Pasadena.length; map.addOverlays(Potomac); centerByArray(Potomac, false, false); cntMarker += Potomac.length; map.addOverlays(Rockville); centerByArray(Rockville, false, false); cntMarker += Rockville.length; map.addOverlays(Silver_Spring); centerByArray(Silver_Spring, false, false); cntMarker += Silver_Spring.length; map.addOverlays(Takoma_Park); centerByArray(Takoma_Park, false, false); cntMarker += Takoma_Park.length; map.addOverlays(Towson); centerByArray(Towson, false, false); cntMarker += Towson.length; map.addOverlays(Waldorf); centerByArray(Waldorf, false, false); cntMarker += Waldorf.length; centerByArray(Baltimore,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///12644,12644,12067,12149,12039,12182,12222,12259,12311,12323,35413,12836,12776,12073,12303,12370,12301,12685,12044,12239,35071,35072,35070,12569,12185,12330,35417,12758,12327,12704,35659,32478,12468,12040,12215,12409,12411,12617,12042,12168,12241,12285,12291,12870,12652,12653,12548,12809,12867,12415,/all'); //window.open('/map.php?type=2&schools=12644,12644,12067,12149,12039,12182,12222,12259,12311,12323,35413,12836,12776,12073,12303,12370,12301,12685,12044,12239,35071,35072,35070,12569,12185,12330,35417,12758,12327,12704,35659,32478,12468,12040,12215,12409,12411,12617,12042,12168,12241,12285,12291,12870,12652,12653,12548,12809,12867,12415,&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; }