function addMarkers(){ mySelect = document.getElementById('selection'); Ann_Arbor = [];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); mySelect.options[mySelect.options.length] = new Option("Ann Arbor Academy",'Ann_Arbor=' + Ann_Arbor.length); 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); mySelect.options[mySelect.options.length] = new Option("Ann Arbor Adventist Elementary School",'Ann_Arbor=' + Ann_Arbor.length); 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); mySelect.options[mySelect.options.length] = new Option("Ann Arbor Christian School",'Ann_Arbor=' + Ann_Arbor.length); 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); mySelect.options[mySelect.options.length] = new Option("Ann Arbor Hills Child Development Center",'Ann_Arbor=' + Ann_Arbor.length); 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); mySelect.options[mySelect.options.length] = new Option("Christian Montessori School Of Ann Arbor",'Ann_Arbor=' + Ann_Arbor.length); 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); mySelect.options[mySelect.options.length] = new Option("Clonlara School",'Ann_Arbor=' + Ann_Arbor.length); 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); mySelect.options[mySelect.options.length] = new Option("Daycroft Montessori Elementary School",'Ann_Arbor=' + Ann_Arbor.length); 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); mySelect.options[mySelect.options.length] = new Option("Daycroft Montessori School",'Ann_Arbor=' + Ann_Arbor.length); 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); mySelect.options[mySelect.options.length] = new Option("Discovery Center Of Ann Arbor",'Ann_Arbor=' + Ann_Arbor.length); 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); mySelect.options[mySelect.options.length] = new Option("Doughty Montessori School",'Ann_Arbor=' + Ann_Arbor.length); 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); mySelect.options[mySelect.options.length] = new Option("Emerson School",'Ann_Arbor=' + Ann_Arbor.length); 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); mySelect.options[mySelect.options.length] = new Option("Fr Gabriel Richard High School",'Ann_Arbor=' + Ann_Arbor.length); 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); mySelect.options[mySelect.options.length] = new Option("Go Like The Wind Montessori School",'Ann_Arbor=' + Ann_Arbor.length); 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); mySelect.options[mySelect.options.length] = new Option("Green House Montessori School",'Ann_Arbor=' + Ann_Arbor.length); 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); mySelect.options[mySelect.options.length] = new Option("Greenhills School",'Ann_Arbor=' + Ann_Arbor.length); 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); mySelect.options[mySelect.options.length] = new Option("Hebrew Day School of Ann Arbor",'Ann_Arbor=' + Ann_Arbor.length); 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); mySelect.options[mySelect.options.length] = new Option("Jack And Jill Learning Center",'Ann_Arbor=' + Ann_Arbor.length); 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); mySelect.options[mySelect.options.length] = new Option("Little Folks Corner",'Ann_Arbor=' + Ann_Arbor.length); 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); mySelect.options[mySelect.options.length] = new Option("Little Lamb Nursery & Kindergarten",'Ann_Arbor=' + Ann_Arbor.length); 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); mySelect.options[mySelect.options.length] = new Option("Michigan Islamic Academy",'Ann_Arbor=' + Ann_Arbor.length); 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); mySelect.options[mySelect.options.length] = new Option("Modern Montessori & Nursery",'Ann_Arbor=' + Ann_Arbor.length); 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); mySelect.options[mySelect.options.length] = new Option("Oak Trails School",'Ann_Arbor=' + Ann_Arbor.length); 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); mySelect.options[mySelect.options.length] = new Option("Parke Place",'Ann_Arbor=' + Ann_Arbor.length); 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); mySelect.options[mySelect.options.length] = new Option("Peach Tree Montessori International",'Ann_Arbor=' + Ann_Arbor.length); 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); mySelect.options[mySelect.options.length] = new Option("Perry Nursery School Of Ann Arbor",'Ann_Arbor=' + Ann_Arbor.length); 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); mySelect.options[mySelect.options.length] = new Option("Rudolf Steiner School",'Ann_Arbor=' + Ann_Arbor.length); 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); mySelect.options[mySelect.options.length] = new Option("St. Paul Lutheran School",'Ann_Arbor=' + Ann_Arbor.length); 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); mySelect.options[mySelect.options.length] = new Option("St. Thomas Elementary School",'Ann_Arbor=' + Ann_Arbor.length); 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); mySelect.options[mySelect.options.length] = new Option("Salem Lutheran School",'Ann_Arbor=' + Ann_Arbor.length); 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); mySelect.options[mySelect.options.length] = new Option("Shepherd Montessori Center",'Ann_Arbor=' + Ann_Arbor.length); 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); mySelect.options[mySelect.options.length] = new Option("St Francis Of Assisi Catholic School",'Ann_Arbor=' + Ann_Arbor.length); 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); mySelect.options[mySelect.options.length] = new Option("Summers-Knoll School",'Ann_Arbor=' + Ann_Arbor.length); 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); mySelect.options[mySelect.options.length] = new Option("Tutor Time Childcare Learning Center",'Ann_Arbor=' + Ann_Arbor.length); 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); mySelect.options[mySelect.options.length] = new Option("U Of M Hospital Child Care Center",'Ann_Arbor=' + Ann_Arbor.length); 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); mySelect.options[mySelect.options.length] = new Option("U Of M Hospital Kindergarten",'Ann_Arbor=' + Ann_Arbor.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(Ann_Arbor); 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(Ann_Arbor);map.removeOverlays(Ann_Arbor); map.addOverlays(Ann_Arbor); centerByArray(Ann_Arbor, false, false); cntMarker += Ann_Arbor.length; centerByArray(Ann_Arbor,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; }