function addMarkers() { mySelect = document.getElementById('selection'); New_Haven = [];New_Haven[New_Haven.length] = createMarker(new GPoint(-72.90393829,41.31402588),"
Amistad Academy
407 James St.
New Haven, CT 06513

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Amistad Academy",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.95243073,41.31027985),"
Barnard School
170 Derby Ave.
New Haven, CT 06511

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Barnard School",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.95400238,41.32561874),"
Beecher School
100 Jewell St.
New Haven, CT 06511

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Beecher School",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.88999939,41.30087662),"
Benjamin Jepson Magnet School
375 Quinnipiac Ave.
New Haven, CT 06513

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Benjamin Jepson Magnet School",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.87575531,41.32293701),"
Betsy Ross Arts Magnet School
150 Kimberly Ave.
New Haven, CT 06519

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Betsy Ross Arts Magnet School",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.86993408,41.32707977),"
Bishop Woods School
1481 Quinnipiac Ave.
New Haven, CT 06513

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Bishop Woods School",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.93660700,41.31714100),"
Celentano School
185 Goffe St.
New Haven, CT 06511

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Celentano School",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.89934540,41.30879593),"
Christopher Columbus Academy
255 Blatchley Ave.
New Haven, CT 06513

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Christopher Columbus Academy",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.94548798,41.34963989),"
Clarence Rogers School
199 Wilmot Rd.
New Haven, CT 06511

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Clarence Rogers School",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.93834686,41.29759598),"
Clemente Leadership Academy
360 Columbus Ave.
New Haven, CT 06519

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Clemente Leadership Academy",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.89261627,41.31856155),"
Clinton Avenue School
293 Clinton Ave.
New Haven, CT 06513

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Clinton Avenue School",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.95864868,41.33936691),"
Common Ground High School
358 Springside Ave.
New Haven, CT 06515

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Common Ground High School",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.91462708,41.30360031),"
Conte/west Hills Magnet Elementary School
511 Chapel St.
New Haven, CT 06511

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Conte/west Hills Magnet Elementary School",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.91893768,41.31271744),"
Cooperative High School
444 Orange St.
New Haven, CT 06511

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Cooperative High School",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.97404480,41.32849884),"
Davis 21st Century Magnet Elementary School
35 Davis St.
New Haven, CT 06515

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Davis 21st Century Magnet Elementary School",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.93902600,41.30999300),"
Dwight Early Childhood Program
1324 Chapel Street
New Haven, CT 06511

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Dwight Early Childhood Program",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.95994568,41.32769775),"
Early Learning Center
495 Blake St.
New Haven, CT 06515

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Early Learning Center",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.90805054,41.31933212),"
East Rock Global Studies Magnet Elementary School
133 Nash St.
New Haven, CT 06511

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("East Rock Global Studies Magnet Elementary School",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.96017456,41.31753540),"
Edgewood School
737 Edgewood Ave.
New Haven, CT 06515

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Edgewood School",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.88787800,41.29958300),"
Elm City College Preparatory School
403 James Street
New Haven, CT 06513

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Elm City College Preparatory School",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.89486694,41.30909729),"
Fair Haven Middle School
164 Grand Ave.
New Haven, CT 06513

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Fair Haven Middle School",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.94681800,41.33097600),"
Hamden Transition Academy
501 Crescent Street
New Haven, CT 06515

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Hamden Transition Academy",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.92581940,41.29938126),"
Headstart Elementary School
54 Meadow St.
New Haven, CT 06515

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Headstart Elementary School",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.92301178,41.30129623),"
High School In Community
176 Water St.
New Haven, CT 06511

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("High School In Community",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.93548584,41.29532623),"
Hill Central School
140 Dewitt St.
New Haven, CT 06519

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Hill Central School",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.91714478,41.30448914),"
Hill Regional Career High School
140 Legion Ave.
New Haven, CT 06519

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Hill Regional Career High School",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.93569946,41.29520035),"
Homebound
140 Dewitt Street
New Haven, CT 06519

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Homebound",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.93392181,41.31893158),"
Isadore Wexler School
209 Dixwell Avenue
New Haven, CT 06511

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Isadore Wexler School",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.94255066,41.32889557),"
J. Robinson Middle School
150 Fournier Street
New Haven, CT 06511

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("J. Robinson Middle School",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.93808746,41.32271576),"
James Hillhouse High School
480 Sherman Parkway
New Haven, CT 06511

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("James Hillhouse High School",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.90279900,41.30516000),"
John S. Martinez School
100 James Street
New Haven, CT 06513

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("John S. Martinez School",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.94528198,41.34954071),"
Katherine Brennan School
200 Wilmot Rd.
New Haven, CT 06515

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Katherine Brennan School",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.93044281,41.33149719),"
Lincoln-bassett School
130 Bassett St.
New Haven, CT 06511

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lincoln-bassett School",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-82.46405029,28.23285675),"
Martin Luther King School
580 Dixwell Avenue
New Haven, CT 06511

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Martin Luther King School",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.96839905,41.32960129),"
Metropolitan Business High School
495 Blake St.
New Haven, CT 06515

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Metropolitan Business High School",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.93569946,41.29520035),"
Microsociety Magnet School
103 Hallock Ave.
New Haven, CT 06519

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Microsociety Magnet School",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.92166138,41.30870438),"
Museum Lab School
22 Wall Street
New Haven, CT 06511

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Museum Lab School",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.87560272,41.27769852),"
Nathan Hale School
480 Townsend Ave.
New Haven, CT 06512

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Nathan Hale School",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.92272949,41.32557297),"
New Haven Academy
130b Leeder Hill Rd.
New Haven, CT 06517

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("New Haven Academy",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.94084930,41.31606293),"
New Haven Community Correctional Center
245 Whalley Ave.
New Haven, CT 06530

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("New Haven Community Correctional Center",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.93906403,41.29759598),"
Polly T Mccabe Center
390 Columbus Ave.
New Haven, CT 06519

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Polly T Mccabe Center",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.93151855,41.30116653),"
Prince School
22 Gold St.
New Haven, CT 06519

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Prince School",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.88288879,41.30896378),"
Quinnipiac School
185 Barnes Ave.
New Haven, CT 06513

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Quinnipiac School",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.92875671,41.30730820),"
Riverside Educational Academy
560 Ella Grasso Blvd.
New Haven, CT 06519

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Riverside Educational Academy",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.87734400,41.32352600),"
Ross/woodward School
185 Barnes Avenue
New Haven, CT 06513

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Ross/woodward School",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.96595764,41.32711029),"
Sheridan Communications And Technology Magnet Middle School
191 Fountain St.
New Haven, CT 06515

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Sheridan Communications And Technology Magnet Middle School",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.92871857,41.28210831),"
Sound School
60 South Water St.
New Haven, CT 06519

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sound School",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.88504791,41.30789566),"
Strong Traditional Magnet Academy
69 Grand Ave.
New Haven, CT 06513

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Strong Traditional Magnet Academy",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.93836975,41.31164932),"
Timothy Dwight School
130 Edgewood Ave.
New Haven, CT 06511

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Timothy Dwight School",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.94268036,41.31299591),"
Troup Middle School
259 Edgewood Avenue
New Haven, CT 06120

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Troup Middle School",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.94141388,41.29289627),"
Truman School
311 Valley St.
New Haven, CT 06515

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Truman School",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.93534851,41.32291031),"
Urban Youth Center Elementary School
806 Orchard St.
New Haven, CT 06511

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Urban Youth Center Elementary School",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.93524933,41.33508682),"
Urban Youth Center Middle School
800 Dixwell Ave.
New Haven, CT 06511

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Urban Youth Center Middle School",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.94264984,41.30599594),"
Vincent E. Mauro School
130 Orchard St.
New Haven, CT 06511

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Vincent E. Mauro School",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.93055725,41.30145645),"
Welch Annex School
49 Prince St.
New Haven, CT 06519

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Welch Annex School",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.93392181,41.31893158),"
Wexler/grant School
55 Foote St.
New Haven, CT 06511

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Wexler/grant School",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.90904236,41.32421112),"
Wilbur Cross High School
181 Mitchell Dr.
New Haven, CT 06511

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Wilbur Cross High School",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.89299011,41.28987885),"
Woodward School
185 Barnes Ave..
New Haven, CT 06513

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Woodward School",'New_Haven=' + New_Haven.length); New_Haven[New_Haven.length] = createMarker(new GPoint(-72.91386414,41.32396317),"
Worthington Hooker School
180 Canner St.
New Haven, CT 06511

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Worthington Hooker School",'New_Haven=' + New_Haven.length); maxLng = -72.86993408; maxLat = 41.34963989; minLng = -82.46405029; minLat = 28.23285675; 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,10); /* 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(New_Haven); 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(New_Haven);map.removeOverlays(New_Haven); map.addOverlays(New_Haven); centerByArray(New_Haven, false, false); cntMarker += New_Haven.length; centerByArray(New_Haven,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'); } }