function addMarkers() { mySelect = document.getElementById('selection'); Hartford = [];Hartford[Hartford.length] = createMarker(new GPoint(-72.70678711,41.74064636),"
A. I. Prince Vocational School
500 Brookfield St.
Hartford, CT 06106

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("A. I. Prince Vocational School",'Hartford=' + Hartford.length); Hartford[Hartford.length] = createMarker(new GPoint(-72.67593384,41.77219009),"
Barnard-brown School
1304 Main St.
Hartford, CT 06103

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Barnard-brown School",'Hartford=' + Hartford.length); Hartford[Hartford.length] = createMarker(new GPoint(-72.70724487,41.73310852),"
Batchelder School
757 New Britain Ave.
Hartford, CT 06106

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Batchelder School",'Hartford=' + Hartford.length); Hartford[Hartford.length] = createMarker(new GPoint(-72.69787598,41.74923325),"
Breakthrough Charter School
111 Hillside Avenue
Hartford, CT 06106

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Breakthrough Charter School",'Hartford=' + Hartford.length); Hartford[Hartford.length] = createMarker(new GPoint(-72.70175934,41.79151917),"
Breakthrough Magnet School
121 Cornwall St.
Hartford, CT 06112

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Breakthrough Magnet School",'Hartford=' + Hartford.length); Hartford[Hartford.length] = createMarker(new GPoint(-72.67338562,41.74762344),"
Bulkeley High School
300 Wethersfield Ave.
Hartford, CT 06114

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bulkeley High School",'Hartford=' + Hartford.length); Hartford[Hartford.length] = createMarker(new GPoint(-72.69013977,41.76150131),"
Burns School
195 Putnam St.
Hartford, CT 06106

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Burns School",'Hartford=' + Hartford.length); Hartford[Hartford.length] = createMarker(new GPoint(-72.67303467,41.74485397),"
Burr School
400 Wethersfield Ave.
Hartford, CT 06114

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Burr School",'Hartford=' + Hartford.length); Hartford[Hartford.length] = createMarker(new GPoint(-72.66795349,41.75856400),"
C. R. E. C.
111 Charter Oak Avenue
Hartford, CT 06106

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("C. R. E. C.",'Hartford=' + Hartford.length); Hartford[Hartford.length] = createMarker(new GPoint(-72.67261900,41.76831500),"
Capitol Preparatory Magnet School
950 Main Street
Hartford, CT 06103

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Capitol Preparatory Magnet School",'Hartford=' + Hartford.length); Hartford[Hartford.length] = createMarker(new GPoint(-72.67735291,41.78704834),"
Clark School
75 Clark St.
Hartford, CT 06120

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Clark School",'Hartford=' + Hartford.length); Hartford[Hartford.length] = createMarker(new GPoint(-72.68053436,41.73473358),"
Dr. Joseph Belizzi Middle School
215 South St.
Hartford, CT 06114

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Dr. Joseph Belizzi Middle School",'Hartford=' + Hartford.length); Hartford[Hartford.length] = createMarker(new GPoint(-72.67290497,41.75930023),"
Dr. Ramon E. Betances School
42 Charter Oak Ave.
Hartford, CT 06106

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Dr. Ramon E. Betances School",'Hartford=' + Hartford.length); Hartford[Hartford.length] = createMarker(new GPoint(-72.67183685,41.74010086),"
Dwight School
585 Wethersfield St.
Hartford, CT 06114

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Dwight School",'Hartford=' + Hartford.length); Hartford[Hartford.length] = createMarker(new GPoint(-72.70747375,41.79164124),"
Fisher School
280 Plainfield St.
Hartford, CT 06112

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Fisher School",'Hartford=' + Hartford.length); Hartford[Hartford.length] = createMarker(new GPoint(-72.69676971,41.78439713),"
Fox Middle School
305 Greenfield St.
Hartford, CT 06112

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Fox Middle School",'Hartford=' + Hartford.length); Hartford[Hartford.length] = createMarker(new GPoint(-72.70090100,41.76557800),"
Greater Hartford Classical
55 Forest Street
Hartford, CT 06105

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Greater Hartford Classical",'Hartford=' + Hartford.length); Hartford[Hartford.length] = createMarker(new GPoint(-72.66076660,41.79246140),"
Hartford Community Correctional Center
177 Weston St.
Hartford, CT 06120

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Hartford Community Correctional Center",'Hartford=' + Hartford.length); Hartford[Hartford.length] = createMarker(new GPoint(-72.68684387,41.75120544),"
Hartford Magnet Middle School
53 Vernon St.
Hartford, CT 06106

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Hartford Magnet Middle School",'Hartford=' + Hartford.length); Hartford[Hartford.length] = createMarker(new GPoint(-72.68905400,41.77144000),"
Hartford Public High School
55 Forest St.
Hartford, CT 06105

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Hartford Public High School",'Hartford=' + Hartford.length); Hartford[Hartford.length] = createMarker(new GPoint(-72.68201447,41.76052475),"
Hartford Transitional Learning Academy
150 Tower Avenue
Hartford, CT 06120

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Hartford Transitional Learning Academy",'Hartford=' + Hartford.length); Hartford[Hartford.length] = createMarker(new GPoint(-72.68186700,41.75935400),"
Hartford Transitional Learning Academy (seco
110 Washington Street
Hartford, CT 06106

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Hartford Transitional Learning Academy (seco",'Hartford=' + Hartford.length); Hartford[Hartford.length] = createMarker(new GPoint(-72.70124054,41.74078751),"
Hooker School
200 Sherbrooke Ave.
Hartford, CT 06106

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Hooker School",'Hartford=' + Hartford.length); Hartford[Hartford.length] = createMarker(new GPoint(-72.69760895,41.79142761),"
Jumoke Academy
250 Blue Hills Ave.
Hartford, CT 06112

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Jumoke Academy",'Hartford=' + Hartford.length); Hartford[Hartford.length] = createMarker(new GPoint(-72.69380188,41.73500824),"
Kennelly School
180 White St.
Hartford, CT 06114

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Kennelly School",'Hartford=' + Hartford.length); Hartford[Hartford.length] = createMarker(new GPoint(-72.66493225,41.75503159),"
Kinsella School
65 Van Block Ave.
Hartford, CT 06106

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Kinsella School",'Hartford=' + Hartford.length); Hartford[Hartford.length] = createMarker(new GPoint(-72.70034027,41.76340103),"
Little Owls Learning Center
55 Forest St.
Hartford, CT 06105

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Little Owls Learning Center",'Hartford=' + Hartford.length); Hartford[Hartford.length] = createMarker(new GPoint(-72.68101501,41.74655533),"
M. D. Fox Elementary School
470 Maple Ave.
Hartford, CT 06114

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("M. D. Fox Elementary School",'Hartford=' + Hartford.length); Hartford[Hartford.length] = createMarker(new GPoint(-72.69546509,41.78540421),"
M. L. King School
25 Ridgefield St.
Hartford, CT 06112

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("M. L. King School",'Hartford=' + Hartford.length); Hartford[Hartford.length] = createMarker(new GPoint(-72.69787598,41.74923325),"
Mcdonough School
111 Hillside Ave.
Hartford, CT 06106

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Mcdonough School",'Hartford=' + Hartford.length); Hartford[Hartford.length] = createMarker(new GPoint(-72.68837738,41.78265762),"
Milner School
104 Vine St.
Hartford, CT 06112

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Milner School",'Hartford=' + Hartford.length); Hartford[Hartford.length] = createMarker(new GPoint(-72.68697357,41.74943924),"
Montessori Magnet School
1460 Broad St.
Hartford, CT 06106

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Montessori Magnet School",'Hartford=' + Hartford.length); Hartford[Hartford.length] = createMarker(new GPoint(-72.69813538,41.74639893),"
Moylan School
101 Catherine St.
Hartford, CT 06106

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Moylan School",'Hartford=' + Hartford.length); Hartford[Hartford.length] = createMarker(new GPoint(-72.67417908,41.73067474),"
Naylor School
639 Franklin Ave.
Hartford, CT 06114

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Naylor School",'Hartford=' + Hartford.length); Hartford[Hartford.length] = createMarker(new GPoint(-72.70724487,41.75702286),"
Parkville Community Elementary School
1755 Park St.
Hartford, CT 06106

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Parkville Community Elementary School",'Hartford=' + Hartford.length); Hartford[Hartford.length] = createMarker(new GPoint(-72.68149567,41.77432251),"
Quirk Middle School
85 Edwards St.
Hartford, CT 06120

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Quirk Middle School",'Hartford=' + Hartford.length); Hartford[Hartford.length] = createMarker(new GPoint(-72.70005798,41.79581833),"
Rawson School
260 Holcomb St.
Hartford, CT 06112

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Rawson School",'Hartford=' + Hartford.length); Hartford[Hartford.length] = createMarker(new GPoint(-72.68933868,41.75873184),"
Sanchez School
176 Babcock St.
Hartford, CT 06106

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Sanchez School",'Hartford=' + Hartford.length); Hartford[Hartford.length] = createMarker(new GPoint(-72.67642975,41.77764130),"
Sand School
1750 Main St.
Hartford, CT 06120

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Sand School",'Hartford=' + Hartford.length); Hartford[Hartford.length] = createMarker(new GPoint(-72.68174744,41.79474258),"
Simpson-waverly School
55 Waverly St.
Hartford, CT 06112

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Simpson-waverly School",'Hartford=' + Hartford.length); Hartford[Hartford.length] = createMarker(new GPoint(-72.68877411,41.76396561),"
Special Education Program
410 Capitol Ave.
Hartford, CT 06134

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Special Education Program",'Hartford=' + Hartford.length); Hartford[Hartford.length] = createMarker(new GPoint(-72.67832184,41.76732254),"
Sport And Medical Sciences Academy
275 Asylum St.
Hartford, CT 06103

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sport And Medical Sciences Academy",'Hartford=' + Hartford.length); Hartford[Hartford.length] = createMarker(new GPoint(-72.68803406,41.76810074),"
Sports Science Academy
338 Asylum Street
Hartford, CT 06105

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sports Science Academy",'Hartford=' + Hartford.length); Hartford[Hartford.length] = createMarker(new GPoint(-72.70388794,41.80410004),"
Twain School
395 Lyme St.
Hartford, CT 06112

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Twain School",'Hartford=' + Hartford.length); Hartford[Hartford.length] = createMarker(new GPoint(-72.70589400,41.77460700),"
University High School
1265 Asylum Street
Hartford, CT 06103

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("University High School",'Hartford=' + Hartford.length); Hartford[Hartford.length] = createMarker(new GPoint(-72.70605469,41.80006790),"
Weaver High School
415 Granby St.
Hartford, CT 06112

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Weaver High School",'Hartford=' + Hartford.length); Hartford[Hartford.length] = createMarker(new GPoint(-72.71149445,41.76886368),"
Webster School
5 Cone St.
Hartford, CT 06105

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Webster School",'Hartford=' + Hartford.length); Hartford[Hartford.length] = createMarker(new GPoint(-72.69502258,41.77065277),"
West Middle School
927 Asylum Ave.
Hartford, CT 06105

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("West Middle School",'Hartford=' + Hartford.length); Hartford[Hartford.length] = createMarker(new GPoint(-72.67683411,41.79495239),"
Wish School
350 Barbour St.
Hartford, CT 06120

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Wish School",'Hartford=' + Hartford.length); map.removeOverlays(Hartford); setTimeout(function(){map.addOverlays(Hartford)},1000); maxLng = -72.66076660; maxLat = 41.80410004; minLng = -72.71149445; minLat = 41.73067474; 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(Hartford); 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(Hartford);map.removeOverlays(Hartford); map.addOverlays(Hartford); centerByArray(Hartford, false, false); cntMarker += Hartford.length; centerByArray(Hartford,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'); } }