function addMarkers(){ mySelect = document.getElementById('selection'); Buffalo = [];Buffalo[Buffalo.length] = createMarker(new GPoint(-78.90293700,42.95691900),"
All Saints
127 Chadduck Ave
Buffalo, NY 14207
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("All Saints",'Buffalo=' + Buffalo.length); Buffalo[Buffalo.length] = createMarker(new GPoint(-78.81865200,42.84800600),"
Bishop Timon-st Jude High School
601 Mckinley Parkway
Buffalo, NY 14220
All-boys school, 9-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Bishop Timon-st Jude High School",'Buffalo=' + Buffalo.length); Buffalo[Buffalo.length] = createMarker(new GPoint(-78.87531300,42.92423000),"
Buffalo Seminary
205 Bidwell Parkway
Buffalo, NY 14222
All-girls school, 9-12
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Buffalo Seminary",'Buffalo=' + Buffalo.length); Buffalo[Buffalo.length] = createMarker(new GPoint(-78.86927600,42.91617400),"
Canisius High School
1180 Delaware Avenue
Buffalo, NY 14209
All-boys school, 9-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Canisius High School",'Buffalo=' + Buffalo.length); Buffalo[Buffalo.length] = createMarker(new GPoint(-78.82482000,42.95191300),"
Cantalician Center For Learnin
3233 Main Street
Buffalo, NY 14214
Co-ed school, NS-NS
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Cantalician Center For Learnin",'Buffalo=' + Buffalo.length); Buffalo[Buffalo.length] = createMarker(new GPoint(-78.86980400,42.91275700),"
Catholic Academy West Buffalo
1069 Delaware Avenue
Buffalo, NY 14209
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Catholic Academy West Buffalo",'Buffalo=' + Buffalo.length); Buffalo[Buffalo.length] = createMarker(new GPoint(-78.84908600,42.88930400),"
Catholic Central School
1955 Genesee Street
Buffalo, NY 14211
Co-ed school, 6-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Catholic Central School",'Buffalo=' + Buffalo.length); Buffalo[Buffalo.length] = createMarker(new GPoint(-78.79923700,42.93201000),"
Charles Grandison Finney High School
260 Eggert Road
Buffalo, NY 14215
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Charles Grandison Finney High School",'Buffalo=' + Buffalo.length); Buffalo[Buffalo.length] = createMarker(new GPoint(-78.85990600,42.98991700),"
Covenant Academy
345 Mcconkey Drive
Buffalo, NY 14223
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Covenant Academy",'Buffalo=' + Buffalo.length); Buffalo[Buffalo.length] = createMarker(new GPoint(-78.83288600,42.89924500),"
Darul Ullom Al Madania
182 Sobieski Street
Buffalo, NY 14212
Co-ed school, PK-10
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Darul Ullom Al Madania",'Buffalo=' + Buffalo.length); Buffalo[Buffalo.length] = createMarker(new GPoint(-78.81597100,42.92635900),"
Dayspring Christian Academy
104 Dorris Avenue
Buffalo, NY 14215
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Dayspring Christian Academy",'Buffalo=' + Buffalo.length); Buffalo[Buffalo.length] = createMarker(new GPoint(-78.86144000,42.94273700),"
Elmwood-franklin School
104 New Amsterdam Avenue
Buffalo, NY 14216
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Elmwood-franklin School",'Buffalo=' + Buffalo.length); Buffalo[Buffalo.length] = createMarker(new GPoint(-78.83911200,42.90044000),"
Eva L. Jeltz Christian Academy
993 Fillmore Avenue
Buffalo, NY 14211
Co-ed school, KG-7
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Eva L. Jeltz Christian Academy",'Buffalo=' + Buffalo.length); Buffalo[Buffalo.length] = createMarker(new GPoint(-78.85381200,42.90081800),"
Greater Refuge Temple Christian Academy
943 Jefferson Avenue
Buffalo, NY 14204
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Greater Refuge Temple Christian Academy",'Buffalo=' + Buffalo.length); Buffalo[Buffalo.length] = createMarker(new GPoint(-78.83586800,42.94825600),"
Holy Angels Academy High School
24 Shoshone Drive
Buffalo, NY 14214
All-girls school, 9-12
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Holy Angels Academy High School",'Buffalo=' + Buffalo.length); Buffalo[Buffalo.length] = createMarker(new GPoint(-78.82535500,42.84709100),"
Holy Family School
920 Tifft St
Buffalo, NY 14220
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Holy Family School",'Buffalo=' + Buffalo.length); Buffalo[Buffalo.length] = createMarker(new GPoint(-78.86606200,42.94678300),"
Holy Spirit School
85 Dakota St
Buffalo, NY 14216
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Holy Spirit School",'Buffalo=' + Buffalo.length); Buffalo[Buffalo.length] = createMarker(new GPoint(-78.81206600,42.84539700),"
Mount Mercy Academy
88 Red Jacket Parkway
Buffalo, NY 14220
All-girls school, 9-12
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Mount Mercy Academy",'Buffalo=' + Buffalo.length); Buffalo[Buffalo.length] = createMarker(new GPoint(-78.85266600,42.92679700),"
Mt St Joseph Academy
2064 Main Street
Buffalo, NY 14208
Co-ed school, PK-7
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mt St Joseph Academy",'Buffalo=' + Buffalo.length); Buffalo[Buffalo.length] = createMarker(new GPoint(-78.87511300,42.91553700),"
Nardin Academy
700 W Ferry Street
Buffalo, NY 14222
Co-ed school, PK-3
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Nardin Academy",'Buffalo=' + Buffalo.length); Buffalo[Buffalo.length] = createMarker(new GPoint(-78.87374600,42.91763700),"
Nardin Academy Elementary School
135 Cleveland Avenue
Buffalo, NY 14222
Co-ed school, 1-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Nardin Academy Elementary School",'Buffalo=' + Buffalo.length); Buffalo[Buffalo.length] = createMarker(new GPoint(-78.87353300,42.91761000),"
Nardin Academy High School
135 Cleveland Avenue
Buffalo, NY 14222
All-girls school, 9-12
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Nardin Academy High School",'Buffalo=' + Buffalo.length); Buffalo[Buffalo.length] = createMarker(new GPoint(-78.85604400,42.94126600),"
Nichols School
1250 Amherst Street
Buffalo, NY 14216
Co-ed school, 5-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Nichols School",'Buffalo=' + Buffalo.length); Buffalo[Buffalo.length] = createMarker(new GPoint(-78.88819600,42.93812200),"
Our Lady Of Black Rock School
16 Germain Street
Buffalo, NY 14207
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Our Lady Of Black Rock School",'Buffalo=' + Buffalo.length); Buffalo[Buffalo.length] = createMarker(new GPoint(-78.82693900,42.85651200),"
St. Agatha School
65 Abbott Road
Buffalo, NY 14220
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Agatha School",'Buffalo=' + Buffalo.length); Buffalo[Buffalo.length] = createMarker(new GPoint(-78.82052300,42.83813700),"
St. Ambrose
260 Okell St
Buffalo, NY 14220
Co-ed school, NS-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Ambrose",'Buffalo=' + Buffalo.length); Buffalo[Buffalo.length] = createMarker(new GPoint(-78.78822900,42.89534900),"
St. Andrew School
111 Crocker Avenue
Buffalo, NY 14212
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Andrew School",'Buffalo=' + Buffalo.length); Buffalo[Buffalo.length] = createMarker(new GPoint(-78.86457900,42.89522200),"
St. John Christian Academy
833 Michigan Ave
Buffalo, NY 14203
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. John Christian Academy",'Buffalo=' + Buffalo.length); Buffalo[Buffalo.length] = createMarker(new GPoint(-78.82374800,42.95292000),"
St. Joseph School University He
3275 Main Street
Buffalo, NY 14214
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Joseph School University He",'Buffalo=' + Buffalo.length); Buffalo[Buffalo.length] = createMarker(new GPoint(-78.84959100,42.95872000),"
St. Joseph's Collegiate Institute
845 Kenmore Avenue
Buffalo, NY 14223
All-boys school, 9-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("St. Joseph's Collegiate Institute",'Buffalo=' + Buffalo.length); Buffalo[Buffalo.length] = createMarker(new GPoint(-78.85652100,42.94756300),"
St. Margaret School
1395 Hertel Ave
Buffalo, NY 14216
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Margaret School",'Buffalo=' + Buffalo.length); Buffalo[Buffalo.length] = createMarker(new GPoint(-78.83991100,42.95279200),"
St. Rose Of Lima Elementary School
201 Winston Road
Buffalo, NY 14216
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Rose Of Lima Elementary School",'Buffalo=' + Buffalo.length); Buffalo[Buffalo.length] = createMarker(new GPoint(-78.84028600,42.88854300),"
St. Stanislaus School
128 Wilson St
Buffalo, NY 14212
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Stanislaus School",'Buffalo=' + Buffalo.length); Buffalo[Buffalo.length] = createMarker(new GPoint(-78.81177900,42.85766600),"
St. Teresa School
16 Hayden St
Buffalo, NY 14210
school, -
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Teresa School",'Buffalo=' + Buffalo.length); Buffalo[Buffalo.length] = createMarker(new GPoint(-78.80705200,42.88743700),"
St Agnes School
188 Ludington Street
Buffalo, NY 14206
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Agnes School",'Buffalo=' + Buffalo.length); Buffalo[Buffalo.length] = createMarker(new GPoint(-78.80284600,42.87193700),"
St Bernard Elementary School
1988 Clinton Street
Buffalo, NY 14206
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Bernard Elementary School",'Buffalo=' + Buffalo.length); Buffalo[Buffalo.length] = createMarker(new GPoint(-78.85373900,42.97310400),"
St John The Baptist School
1085 Englewood Avenue
Buffalo, NY 14223
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St John The Baptist School",'Buffalo=' + Buffalo.length); Buffalo[Buffalo.length] = createMarker(new GPoint(-78.84893800,42.93968700),"
St Mark Elementary School
399 Woodward Avenue
Buffalo, NY 14214
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Mark Elementary School",'Buffalo=' + Buffalo.length); Buffalo[Buffalo.length] = createMarker(new GPoint(-78.80641200,42.83375100),"
St Martin Of Tours School
1125 Abbott Road
Buffalo, NY 14220
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Martin Of Tours School",'Buffalo=' + Buffalo.length); Buffalo[Buffalo.length] = createMarker(new GPoint(-78.81473300,42.85081900),"
St Thomas Aquinas Elementary School
20 Athol Street
Buffalo, NY 14220
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Thomas Aquinas Elementary School",'Buffalo=' + Buffalo.length); Buffalo[Buffalo.length] = createMarker(new GPoint(-78.85935000,42.88116400),"
Sts Columba-brigid Montessori School
75 Hickory Street
Buffalo, NY 14204
Co-ed school, PK-1
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sts Columba-brigid Montessori School",'Buffalo=' + Buffalo.length); Buffalo[Buffalo.length] = createMarker(new GPoint(-78.80668200,42.91896300),"
Turner/carroll
185 Lang Avenue
Buffalo, NY 14215
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Turner/carroll",'Buffalo=' + Buffalo.length); Buffalo[Buffalo.length] = createMarker(new GPoint(-78.87285500,42.90393900),"
Westminster Early Childhood Pr
724 Delaware Avenue
Buffalo, NY 14209
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Westminster Early Childhood Pr",'Buffalo=' + Buffalo.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(Buffalo); 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(Buffalo);map.removeOverlays(Buffalo); map.addOverlays(Buffalo); centerByArray(Buffalo, false, false); cntMarker += Buffalo.length; centerByArray(Buffalo,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; }