function addMarkers(){ mySelect = document.getElementById('selection'); Ada = [];Alpena = [];Allendale = [];Ann_Arbor = [];Auburn = [];Auburn_Hills = [];Adrian = [];Allen_Park = [];Armada = [];Attica = [];Athens = [];Alma = [];Algonac = [];mySelect.options[mySelect.options.length] = new Option("Ada schools",'all=Ada'); mySelect.options[mySelect.options.length] = new Option("Adrian schools",'all=Adrian'); mySelect.options[mySelect.options.length] = new Option("Algonac schools",'all=Algonac'); mySelect.options[mySelect.options.length] = new Option("Allen Park schools",'all=Allen_Park'); mySelect.options[mySelect.options.length] = new Option("Allendale schools",'all=Allendale'); mySelect.options[mySelect.options.length] = new Option("Alma schools",'all=Alma'); mySelect.options[mySelect.options.length] = new Option("Alpena schools",'all=Alpena'); mySelect.options[mySelect.options.length] = new Option("Ann Arbor schools",'all=Ann_Arbor'); mySelect.options[mySelect.options.length] = new Option("Armada schools",'all=Armada'); mySelect.options[mySelect.options.length] = new Option("Athens schools",'all=Athens'); mySelect.options[mySelect.options.length] = new Option("Attica schools",'all=Attica'); mySelect.options[mySelect.options.length] = new Option("Auburn schools",'all=Auburn'); mySelect.options[mySelect.options.length] = new Option("Auburn Hills schools",'all=Auburn_Hills'); Ada[Ada.length] = createMarker(new GPoint(-85.51601000,42.94921500),"
Ada Christian School
6206 Ada Drive Se
Ada, MI 49301
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Alpena[Alpena.length] = createMarker(new GPoint(-83.42834000,45.06515300),"
All Saints Catholic School
500 N. Second Avenue
Alpena, MI 49707
Co-ed school, PK-6
[ View School Profile ]
",iconGr); Allendale[Allendale.length] = createMarker(new GPoint(-85.94331400,42.97211800),"
Allendale Christian School
6370 Lake Michigan Drive
Allendale, MI 49401
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Alpena[Alpena.length] = createMarker(new GPoint(-83.46308300,45.04705800),"
Alpena Christian School
500 S Brooke St
Alpena, MI 49707
Co-ed school, PK-6
[ View School Profile ]
",iconGr); Ann_Arbor[Ann_Arbor.length] = createMarker(new GPoint(-83.74912900,42.27277800),"
Ann Arbor Academy
111 East Mosley Street
Ann Arbor, MI 48104
Co-ed school, 2-12
[ View School Profile ]
",iconGr); Ann_Arbor[Ann_Arbor.length] = createMarker(new GPoint(-83.71031400,42.24466300),"
Ann Arbor Adventist Elementary School
2796 Packard Street
Ann Arbor, MI 48108
Co-ed school, 2-5
[ View School Profile ]
",iconGr); Ann_Arbor[Ann_Arbor.length] = createMarker(new GPoint(-83.75111200,42.35399700),"
Ann Arbor Christian School
5500 Whitmore Lake Road
Ann Arbor, MI 48105
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Ann_Arbor[Ann_Arbor.length] = createMarker(new GPoint(-83.70463800,42.26290900),"
Ann Arbor Hills Child Development Center
2775 Bedford Road
Ann Arbor, MI 48104
Co-ed school, PK-2
[ View School Profile ]
",iconGr); Auburn[Auburn.length] = createMarker(new GPoint(-84.07029200,43.60363700),"
Auburn Area Catholic School
114 West Midland Road
Auburn, MI 48611
Co-ed school, PK-5
[ View School Profile ]
",iconGr); Auburn_Hills[Auburn_Hills.length] = createMarker(new GPoint(-83.22053400,42.67112100),"
Auburn Hills Christian School
Po 4386 Auburn Hills
Auburn Hills, MI 48321
Co-ed school, PK-12
[ View School Profile ]
",iconGr); Auburn_Hills[Auburn_Hills.length] = createMarker(new GPoint(-83.22053400,42.67112100),"
Baldwin Road Church Academy
Po Box 210580
Auburn Hills, MI 48321
Co-ed school, 1-10
[ View School Profile ]
",iconGr); Adrian[Adrian.length] = createMarker(new GPoint(-84.04721310,41.90000480),"
Berean Baptist Academy
751 W Maumee Street
Adrian, MI 49221
Co-ed school, K-12
[ View School Profile ]
",iconGr); Allen_Park[Allen_Park.length] = createMarker(new GPoint(-83.21090700,42.24245000),"
Cabrini High School
15305 Wick Road
Allen Park, MI 48101
Co-ed school, PK-12
[ View School Profile ]
",iconGr); Armada[Armada.length] = createMarker(new GPoint(-82.90740000,42.84600000),"
Calvary Baptist Church School
Po Box 310
Armada, MI 48005
Co-ed school, 1-11
[ View School Profile ]
",iconGr); Ann_Arbor[Ann_Arbor.length] = createMarker(new GPoint(-83.83262500,42.28765100),"
Christian Montessori School Of Ann Arbor
5225 Jackson Road
Ann Arbor, MI 48103
Co-ed school, PK-9
[ View School Profile ]
",iconGr); Ann_Arbor[Ann_Arbor.length] = createMarker(new GPoint(-83.73172500,42.25388000),"
Clonlara School
1289 Jewett
Ann Arbor, MI 48104
Co-ed school, NS-NS
[ View School Profile ]
",iconGr); Attica[Attica.length] = createMarker(new GPoint(-83.16970500,43.05867100),"
Country Day Academy Ltd
Po Box 93 4452 Imlay City Road
Attica, MI 48412
Co-ed school, K-12
[ View School Profile ]
",iconGr); Ann_Arbor[Ann_Arbor.length] = createMarker(new GPoint(-83.83900800,42.29976800),"
Daycroft Montessori Elementary School
1095 N Zeeb Road
Ann Arbor, MI 48103
Co-ed school, PK-6
[ View School Profile ]
",iconGr); Ann_Arbor[Ann_Arbor.length] = createMarker(new GPoint(-83.83900800,42.29976800),"
Daycroft Montessori School
1095 N Zeeb Road
Ann Arbor, MI 48103
Co-ed school, PK-6
[ View School Profile ]
",iconGr); Ann_Arbor[Ann_Arbor.length] = createMarker(new GPoint(-83.77976900,42.27181100),"
Discovery Center Of Ann Arbor
775 S Maple Road
Ann Arbor, MI 48103
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); Ann_Arbor[Ann_Arbor.length] = createMarker(new GPoint(-83.75014900,42.27760600),"
Doughty Montessori School
416 S Ashley Street
Ann Arbor, MI 48103
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); Ann_Arbor[Ann_Arbor.length] = createMarker(new GPoint(-83.83606300,42.25457900),"
Emerson School
5425 Scio Church Road
Ann Arbor, MI 48103
Co-ed school, K-8
[ View School Profile ]
",iconGr); Athens[Athens.length] = createMarker(new GPoint(-85.29357900,42.05773000),"
Factoryville Christian School
33650 Factoryville Road
Athens, MI 49011
Co-ed school, PK-12
[ View School Profile ]
",iconGr); Ann_Arbor[Ann_Arbor.length] = createMarker(new GPoint(-83.67231200,42.31193000),"
Fr Gabriel Richard High School
4333 Whitehall Drive
Ann Arbor, MI 48105
Co-ed school, 9-12
[ View School Profile ]
",iconGr); Ann_Arbor[Ann_Arbor.length] = createMarker(new GPoint(-83.65877200,42.31899000),"
Go Like The Wind Montessori School
3540 Dixboro Lane
Ann Arbor, MI 48105
Co-ed school, NS-9
[ View School Profile ]
",iconGr); Alma[Alma.length] = createMarker(new GPoint(-84.67835200,43.37766200),"
Good Shepherd Early Childhood Center
270 Purdy Drive
Alma, MI 48801
Co-ed school, PK-K
[ View School Profile ]
",iconGr); Auburn[Auburn.length] = createMarker(new GPoint(-84.07413700,43.59916300),"
Grace Lutheran School
303 Ruth Street
Auburn, MI 48611
Co-ed school, K-8
[ View School Profile ]
",iconGr); Ann_Arbor[Ann_Arbor.length] = createMarker(new GPoint(-83.68980800,42.29840400),"
Green House Montessori School
3613 Green Brier Blvd
Ann Arbor, MI 48105
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); Ann_Arbor[Ann_Arbor.length] = createMarker(new GPoint(-83.67975800,42.28518000),"
Greenhills School
850 Greenhills Drive
Ann Arbor, MI 48105
Co-ed school, 6-12
[ View School Profile ]
",iconGr); Auburn_Hills[Auburn_Hills.length] = createMarker(new GPoint(-83.25005200,42.66053200),"
Havenwyck School
1525 University
Auburn Hills, MI 48326
Co-ed school, -
[ View School Profile ]
",iconGr); Ann_Arbor[Ann_Arbor.length] = createMarker(new GPoint(-83.72247800,42.23884100),"
Hebrew Day School of Ann Arbor
2937 Birch Hollow Dr
Ann Arbor, MI 48108
Co-ed school, KG-5
[ View School Profile ]
",iconGr); Auburn_Hills[Auburn_Hills.length] = createMarker(new GPoint(-83.25044200,42.67096300),"
Heritage Christian School
2024 Pontiac Road
Auburn Hills, MI 48326
Co-ed school, PK-12
[ View School Profile ]
",iconGr); Alpena[Alpena.length] = createMarker(new GPoint(-83.45135300,45.08376300),"
Immanuel Lutheran School
355 Wilson Street
Alpena, MI 49707
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Allen_Park[Allen_Park.length] = createMarker(new GPoint(-83.19885900,42.26798900),"
Inter-city Baptist School
4700 Allen Road
Allen Park, MI 48101
Co-ed school, K-12
[ View School Profile ]
",iconGr); Allen_Park[Allen_Park.length] = createMarker(new GPoint(-83.21838600,42.27475500),"
J B Day Nursery And Kindergart
17505 Russell
Allen Park, MI 48101
Co-ed school, K-K
[ View School Profile ]
",iconGr); Ann_Arbor[Ann_Arbor.length] = createMarker(new GPoint(-83.74668400,42.28543000),"
Jack And Jill Learning Center
216 Beakes St
Ann Arbor, MI 48104
Co-ed school, PK-K
[ View School Profile ]
",iconGr); Adrian[Adrian.length] = createMarker(new GPoint(-84.07912900,41.90565100),"
Lenawee Christian School
111 Wolf Creek Hwy.
Adrian, MI 49221
Co-ed school, PK-12
[ View School Profile ]
",iconGr); Ann_Arbor[Ann_Arbor.length] = createMarker(new GPoint(-83.79920000,42.29124000),"
Little Folks Corner
4850 Dexter Road
Ann Arbor, MI 48103
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); Ann_Arbor[Ann_Arbor.length] = createMarker(new GPoint(-83.71138400,42.24456300),"
Little Lamb Nursery & Kindergarten
2794 Packard Street
Ann Arbor, MI 48108
Co-ed school, PK-K
[ View School Profile ]
",iconGr); Ann_Arbor[Ann_Arbor.length] = createMarker(new GPoint(-83.71330000,42.30166500),"
Michigan Islamic Academy
2301 Plymouth Road
Ann Arbor, MI 48105
Co-ed school, PK-11
[ View School Profile ]
",iconGr); Ann_Arbor[Ann_Arbor.length] = createMarker(new GPoint(-83.70743300,42.30557300),"
Modern Montessori & Nursery
2250 Nixon Road
Ann Arbor, MI 48105
Co-ed school, PK-K
[ View School Profile ]
",iconGr); Allen_Park[Allen_Park.length] = createMarker(new GPoint(-83.19272200,42.26953700),"
Montessori Child Center Of Allen
4141 Laurence Avenue
Allen Park, MI 48101
Co-ed school, PK-6
[ View School Profile ]
",iconGr); Allen_Park[Allen_Park.length] = createMarker(new GPoint(-83.22034100,42.27309700),"
Mt Hope Lutheran School
5323 Southfield Road
Allen Park, MI 48101
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Ann_Arbor[Ann_Arbor.length] = createMarker(new GPoint(-83.63323100,42.33328300),"
Oak Trails School
6561 Warren Rd
Ann Arbor, MI 48105
Co-ed school, PK-K
[ View School Profile ]
",iconGr); Auburn_Hills[Auburn_Hills.length] = createMarker(new GPoint(-83.23133500,42.68889300),"
Oakland Christian School
3075 Shimmons Road
Auburn Hills, MI 48326
Co-ed school, PK-12
[ View School Profile ]
",iconGr); Armada[Armada.length] = createMarker(new GPoint(-82.89332300,42.84267100),"
Our Saviour Lutheran School
22511 West Main St
Armada, MI 48005
Co-ed school, K-8
[ View School Profile ]
",iconGr); Ann_Arbor[Ann_Arbor.length] = createMarker(new GPoint(-83.70583000,42.30242000),"
Parke Place
2800 Plymouth Road
Ann Arbor, MI 48105
Co-ed school, PK-K
[ View School Profile ]
",iconGr); Ann_Arbor[Ann_Arbor.length] = createMarker(new GPoint(-83.74988500,42.28356600),"
Peach Tree Montessori International
319 N Ashley Street
Ann Arbor, MI 48103
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); Ann_Arbor[Ann_Arbor.length] = createMarker(new GPoint(-83.68555100,42.24526600),"
Perry Nursery School Of Ann Arbor
3770 Packard Street
Ann Arbor, MI 48108
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); Ann_Arbor[Ann_Arbor.length] = createMarker(new GPoint(-83.77247500,42.31506300),"
Rudolf Steiner School
2775 Newport Road
Ann Arbor, MI 48103
Co-ed school, K-12
[ View School Profile ]
",iconGr); Algonac[Algonac.length] = createMarker(new GPoint(-82.53391700,42.61967100),"
St. Catherine Elementary School
1106 St Clair Blvd
Algonac, MI 48001
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Allen_Park[Allen_Park.length] = createMarker(new GPoint(-83.21088300,42.24283700),"
St. Frances Cabrini Elementary School
15300 Wick Rd
Allen Park, MI 48101
Co-ed school, NS-8
[ View School Profile ]
",iconGr); Adrian[Adrian.length] = createMarker(new GPoint(-84.01275700,41.90533000),"
St. Joseph Academy & Montessori Children's House
1267 E Siena Heights Drive
Adrian, MI 49221
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Ann_Arbor[Ann_Arbor.length] = createMarker(new GPoint(-83.68244600,42.27968100),"
St. Paul Lutheran School
495 Earhart Rd
Ann Arbor, MI 48105
Co-ed school, NS-8
[ View School Profile ]
",iconGr); Ann_Arbor[Ann_Arbor.length] = createMarker(new GPoint(-83.74146100,42.28551500),"
St. Thomas Elementary School
540 Elizabeth Street
Ann Arbor, MI 48104
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Ann_Arbor[Ann_Arbor.length] = createMarker(new GPoint(-83.87612500,42.25230400),"
Salem Lutheran School
2095 Strieter Road
Ann Arbor, MI 48103
Co-ed school, PK-7
[ View School Profile ]
",iconGr); Ann_Arbor[Ann_Arbor.length] = createMarker(new GPoint(-83.68224900,42.31836100),"
Shepherd Montessori Center
24 Frank Lloyd Wright Drive
Ann Arbor, MI 48105
Co-ed school, PK-K
[ View School Profile ]
",iconGr); Allen_Park[Allen_Park.length] = createMarker(new GPoint(-83.21089200,42.24280400),"
St Frances Cabrini Elementary & Middle School
15300 Wick Road
Allen Park, MI 48101
Co-ed school, K-8
[ View School Profile ]
",iconGr); Ann_Arbor[Ann_Arbor.length] = createMarker(new GPoint(-83.71670000,42.26071700),"
St Francis Of Assisi Catholic School
2270 East Stadium Blvd
Ann Arbor, MI 48104
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Alma[Alma.length] = createMarker(new GPoint(-84.66385500,43.38033700),"
St Mary School
220 W Downie Street
Alma, MI 48801
Co-ed school, PK-6
[ View School Profile ]
",iconGr); Ada[Ada.length] = createMarker(new GPoint(-85.41162000,43.03979400),"
St Patrick Elementary School
4333 Parnell Avenue Ne
Ada, MI 49301
Co-ed school, K-8
[ View School Profile ]
",iconGr); Adrian[Adrian.length] = createMarker(new GPoint(-84.05834200,41.89098100),"
St Stephen Lutheran School
632 S Madison Street
Adrian, MI 49221
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Ann_Arbor[Ann_Arbor.length] = createMarker(new GPoint(-83.71029800,42.25786900),"
Summers-Knoll School
2015 Manchester Rd
Ann Arbor, MI 48104
Co-ed school, K-6
[ View School Profile ]
",iconGr); Ann_Arbor[Ann_Arbor.length] = createMarker(new GPoint(-83.77242400,42.25010900),"
Tutor Time Childcare Learning Center
2380 Oak Valley Drive
Ann Arbor, MI 48103
Co-ed school, PK-K
[ View School Profile ]
",iconGr); Ann_Arbor[Ann_Arbor.length] = createMarker(new GPoint(-83.70790300,42.28783700),"
U Of M Hospital Child Care Center
2601 Glazier
Ann Arbor, MI 48105
Co-ed school, PK-K
[ View School Profile ]
",iconGr); Ann_Arbor[Ann_Arbor.length] = createMarker(new GPoint(-83.72060000,42.26450000),"
U Of M Hospital Kindergarten
1001 E Huron U Reformed Church
Ann Arbor, MI 48104
Co-ed school, PK-KG
[ View School Profile ]
",iconGr); Auburn[Auburn.length] = createMarker(new GPoint(-84.11020700,43.68256600),"
Zion Lutheran School
1557 Seidlers Road
Auburn, MI 48611
Co-ed school, PK-8
[ View School Profile ]
",iconGr); } // 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(Ada); map.removeOverlays(Adrian); map.removeOverlays(Algonac); map.removeOverlays(Allen_Park); map.removeOverlays(Allendale); map.removeOverlays(Alma); map.removeOverlays(Alpena); map.removeOverlays(Ann_Arbor); map.removeOverlays(Armada); map.removeOverlays(Athens); map.removeOverlays(Attica); map.removeOverlays(Auburn); map.removeOverlays(Auburn_Hills); 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(Ada);map.removeOverlays(Ada); map.removeOverlays(Adrian); map.removeOverlays(Algonac); map.removeOverlays(Allen_Park); map.removeOverlays(Allendale); map.removeOverlays(Alma); map.removeOverlays(Alpena); map.removeOverlays(Ann_Arbor); map.removeOverlays(Armada); map.removeOverlays(Athens); map.removeOverlays(Attica); map.removeOverlays(Auburn); map.removeOverlays(Auburn_Hills); map.addOverlays(Ada); centerByArray(Ada, false, false); cntMarker += Ada.length; map.addOverlays(Adrian); centerByArray(Adrian, false, false); cntMarker += Adrian.length; map.addOverlays(Algonac); centerByArray(Algonac, false, false); cntMarker += Algonac.length; map.addOverlays(Allen_Park); centerByArray(Allen_Park, false, false); cntMarker += Allen_Park.length; map.addOverlays(Allendale); centerByArray(Allendale, false, false); cntMarker += Allendale.length; map.addOverlays(Alma); centerByArray(Alma, false, false); cntMarker += Alma.length; map.addOverlays(Alpena); centerByArray(Alpena, false, false); cntMarker += Alpena.length; map.addOverlays(Ann_Arbor); centerByArray(Ann_Arbor, false, false); cntMarker += Ann_Arbor.length; map.addOverlays(Armada); centerByArray(Armada, false, false); cntMarker += Armada.length; map.addOverlays(Athens); centerByArray(Athens, false, false); cntMarker += Athens.length; map.addOverlays(Attica); centerByArray(Attica, false, false); cntMarker += Attica.length; map.addOverlays(Auburn); centerByArray(Auburn, false, false); cntMarker += Auburn.length; map.addOverlays(Auburn_Hills); centerByArray(Auburn_Hills, false, false); cntMarker += Auburn_Hills.length; centerByArray(Ada,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; }