function addMarkers(){ mySelect = document.getElementById('selection'); Staten_Island = [];mySelect.options[mySelect.options.length] = new Option("Staten Island schools",'all=Staten_Island'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Staten_Island[Staten_Island.length] = createMarker(new GPoint(-74.08566000,40.59686100),"
Academy Of St Dorothy
1305 Hylan Blvd
Staten Island, NY 10305
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Academy Of St Dorothy",'Staten_Island=' + Staten_Island.length); Staten_Island[Staten_Island.length] = createMarker(new GPoint(-74.12612600,40.62800700),"
Blessed Sacrament School
830 Delafield Avenue
Staten Island, NY 10310
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Blessed Sacrament School",'Staten_Island=' + Staten_Island.length); Staten_Island[Staten_Island.length] = createMarker(new GPoint(-74.09131500,40.63116100),"
Building Blocks Montessori School
55 Forest Avenue
Staten Island, NY 10301
Co-ed school, PK-4
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Building Blocks Montessori School",'Staten_Island=' + Staten_Island.length); Staten_Island[Staten_Island.length] = createMarker(new GPoint(-74.10421300,40.64522700),"
Childrens Harbor Montessori School
1000 Richmond Ter
Staten Island, NY 10301
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Childrens Harbor Montessori School",'Staten_Island=' + Staten_Island.length); Staten_Island[Staten_Island.length] = createMarker(new GPoint(-74.07705500,40.64291100),"
Childrens Life Christian Academy
120 Stuyvesant Place
Staten Island, NY 10301
Co-ed school, 1-2
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Childrens Life Christian Academy",'Staten_Island=' + Staten_Island.length); Staten_Island[Staten_Island.length] = createMarker(new GPoint(-74.14850100,40.63336100),"
Eden II School
150 Granite Avenue
Staten Island, NY 10304
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Eden II School",'Staten_Island=' + Staten_Island.length); Staten_Island[Staten_Island.length] = createMarker(new GPoint(-74.13108000,40.61441700),"
El Bethel Christian Academy
900 Jewett Avenue
Staten Island, NY 10314
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("El Bethel Christian Academy",'Staten_Island=' + Staten_Island.length); Staten_Island[Staten_Island.length] = createMarker(new GPoint(-74.16768500,40.55272500),"
Eltingville Lutheran School
300 Genesee Avenue
Staten Island, NY 10312
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Eltingville Lutheran School",'Staten_Island=' + Staten_Island.length); Staten_Island[Staten_Island.length] = createMarker(new GPoint(-74.22993600,40.52440800),"
Gateway Academy
200 Boscombe Avenue
Staten Island, NY 10309
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Gateway Academy",'Staten_Island=' + Staten_Island.length); Staten_Island[Staten_Island.length] = createMarker(new GPoint(-74.07615600,40.59597100),"
Holy Rosary Elementary School
100 Jerome Avenue
Staten Island, NY 10305
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Holy Rosary Elementary School",'Staten_Island=' + Staten_Island.length); Staten_Island[Staten_Island.length] = createMarker(new GPoint(-74.08281300,40.62429700),"
Immaculate Conception School
104 Gordon Street
Staten Island, NY 10304
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Immaculate Conception School",'Staten_Island=' + Staten_Island.length); Staten_Island[Staten_Island.length] = createMarker(new GPoint(-74.15027600,40.61503000),"
Jewish Foundation School
400 Caswell Avenue
Staten Island, NY 10314
Co-ed school, 5-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Jewish Foundation School",'Staten_Island=' + Staten_Island.length); Staten_Island[Staten_Island.length] = createMarker(new GPoint(-74.14024900,40.60241600),"
Jewish Foundation School-ecc
835 Forest Hill Road
Staten Island, NY 10314
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Jewish Foundation School-ecc",'Staten_Island=' + Staten_Island.length); Staten_Island[Staten_Island.length] = createMarker(new GPoint(-74.08537100,40.63467300),"
Miraj Islamic School
307 Victory Blvd
Staten Island, NY 10301
Co-ed school, PK-11
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Miraj Islamic School",'Staten_Island=' + Staten_Island.length); Staten_Island[Staten_Island.length] = createMarker(new GPoint(-74.08537200,40.63471300),"
Mi'raj Islamic School
307 Victory Boulevard
Staten Island, NY 10301
Co-ed school, PK-3
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mi'raj Islamic School",'Staten_Island=' + Staten_Island.length); Staten_Island[Staten_Island.length] = createMarker(new GPoint(-74.11471100,40.57152100),"
New Dorp Christian Academy
259 Rose Avenue
Staten Island, NY 10306
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("New Dorp Christian Academy",'Staten_Island=' + Staten_Island.length); Staten_Island[Staten_Island.length] = createMarker(new GPoint(-74.08823000,40.62937400),"
Notre Dame Academy Elementary School
78 Howard Avenue
Staten Island, NY 10301
All-girls school, PK-8
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Notre Dame Academy Elementary School",'Staten_Island=' + Staten_Island.length); Staten_Island[Staten_Island.length] = createMarker(new GPoint(-74.16281000,40.54122200),"
Oakdale Academy
366 Oakdale Street
Staten Island, NY 10312
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Oakdale Academy",'Staten_Island=' + Staten_Island.length); Staten_Island[Staten_Island.length] = createMarker(new GPoint(-74.15269400,40.60884700),"
Oakdale Academy Campus
2734 Victory Blvd
Staten Island, NY 10314
Co-ed school, PK-1
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Oakdale Academy Campus",'Staten_Island=' + Staten_Island.length); Staten_Island[Staten_Island.length] = createMarker(new GPoint(-74.24313200,40.50938700),"
Our Lady Help Of Christians
23 Summit Street
Staten Island, NY 10307
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Our Lady Help Of Christians",'Staten_Island=' + Staten_Island.length); Staten_Island[Staten_Island.length] = createMarker(new GPoint(-74.08632800,40.63148300),"
Our Lady Of Good Counsel
42 Austin Place
Staten Island, NY 10304
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Our Lady Of Good Counsel",'Staten_Island=' + Staten_Island.length); Staten_Island[Staten_Island.length] = createMarker(new GPoint(-74.12554100,40.63317400),"
Our Lady Of Mt Carmel-st Benedicta School
285 Clove Road
Staten Island, NY 10310
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Our Lady Of Mt Carmel-st Benedicta School",'Staten_Island=' + Staten_Island.length); Staten_Island[Staten_Island.length] = createMarker(new GPoint(-74.11810500,40.57621700),"
Our Lady Queen Of Peace School
22 Steele Ave
Staten Island, NY 10306
Co-ed school, NS-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Our Lady Queen Of Peace School",'Staten_Island=' + Staten_Island.length); Staten_Island[Staten_Island.length] = createMarker(new GPoint(-74.19010300,40.53294700),"
Our Lady Star Of The Sea
5411 Amboy Road
Staten Island, NY 10312
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Our Lady Star Of The Sea",'Staten_Island=' + Staten_Island.length); Staten_Island[Staten_Island.length] = createMarker(new GPoint(-74.15027600,40.61503000),"
Rabbi Jacob Joseph School
400 Caswell Avenue
Staten Island, NY 10314
All-girls school, 1-8
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Rabbi Jacob Joseph School",'Staten_Island=' + Staten_Island.length); Staten_Island[Staten_Island.length] = createMarker(new GPoint(-74.13755700,40.57299100),"
Rabbi Jacob Joseph School For Boys
3495 Richmond Road
Staten Island, NY 10306
All-boys school, K-8
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Rabbi Jacob Joseph School For Boys",'Staten_Island=' + Staten_Island.length); Staten_Island[Staten_Island.length] = createMarker(new GPoint(-74.11409900,40.63357900),"
Sacred Heart School
301 N Burgher Avenue
Staten Island, NY 10310
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sacred Heart School",'Staten_Island=' + Staten_Island.length); Staten_Island[Staten_Island.length] = createMarker(new GPoint(-74.09683800,40.59076400),"
St. Ann School
125 Cromwell Avenue
Staten Island, NY 10304
Co-ed school, NS-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Ann School",'Staten_Island=' + Staten_Island.length); Staten_Island[Staten_Island.length] = createMarker(new GPoint(-74.06763200,40.61589700),"
St. Mary's School
1124 Bay Street
Staten Island, NY 10305
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Mary's School",'Staten_Island=' + Staten_Island.length); Staten_Island[Staten_Island.length] = createMarker(new GPoint(-74.13953000,40.57248700),"
St. Patrick School
3560 Richmond Road
Staten Island, NY 10306
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Patrick School",'Staten_Island=' + Staten_Island.length); Staten_Island[Staten_Island.length] = createMarker(new GPoint(-74.09784800,40.64131600),"
St. Paul's School
129 Clinton Avenue
Staten Island, NY 10301
Co-ed school, NS-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Paul's School",'Staten_Island=' + Staten_Island.length); Staten_Island[Staten_Island.length] = createMarker(new GPoint(-74.14356900,40.62796800),"
St. Roch School
465 Villa Ave
Staten Island, NY 10302
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Roch School",'Staten_Island=' + Staten_Island.length); Staten_Island[Staten_Island.length] = createMarker(new GPoint(-74.09045200,40.60697400),"
St. Sylvester School
884 Targee Street
Staten Island, NY 10304
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Sylvester School",'Staten_Island=' + Staten_Island.length); Staten_Island[Staten_Island.length] = createMarker(new GPoint(-74.21027100,40.52644800),"
Ss Joseph & Thomas School
50 Maguire Avenue
Staten Island, NY 10309
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ss Joseph & Thomas School",'Staten_Island=' + Staten_Island.length); Staten_Island[Staten_Island.length] = createMarker(new GPoint(-74.14708900,40.63014300),"
St Adalbert School
355 Morningstar Road
Staten Island, NY 10303
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Adalbert School",'Staten_Island=' + Staten_Island.length); Staten_Island[Staten_Island.length] = createMarker(new GPoint(-74.11828800,40.56395500),"
St Charles School
200 Penn Avenue
Staten Island, NY 10306
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Charles School",'Staten_Island=' + Staten_Island.length); Staten_Island[Staten_Island.length] = createMarker(new GPoint(-74.10859200,40.58183300),"
St Christopher School
15 Lisbon Place
Staten Island, NY 10306
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Christopher School",'Staten_Island=' + Staten_Island.length); Staten_Island[Staten_Island.length] = createMarker(new GPoint(-74.15083300,40.54672800),"
St Clare School
151 Lindenwood Road
Staten Island, NY 10308
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Clare School",'Staten_Island=' + Staten_Island.length); Staten_Island[Staten_Island.length] = createMarker(new GPoint(-74.06866800,40.60223400),"
St John Villa Academy-elem
57 Cleveland Place
Staten Island, NY 10305
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St John Villa Academy-elem",'Staten_Island=' + Staten_Island.length); Staten_Island[Staten_Island.length] = createMarker(new GPoint(-74.12157300,40.61111400),"
St Johns Lutheran School
663 Manor Road
Staten Island, NY 10314
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Johns Lutheran School",'Staten_Island=' + Staten_Island.length); Staten_Island[Staten_Island.length] = createMarker(new GPoint(-74.07201800,40.61447200),"
St Joseph Parochial School
139 Saint Marys Avenue
Staten Island, NY 10305
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Joseph Parochial School",'Staten_Island=' + Staten_Island.length); Staten_Island[Staten_Island.length] = createMarker(new GPoint(-74.09473200,40.57173400),"
St Margaret Mary School
556 Lincoln Avenue
Staten Island, NY 10306
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Margaret Mary School",'Staten_Island=' + Staten_Island.length); Staten_Island[Staten_Island.length] = createMarker(new GPoint(-74.08314100,40.64769100),"
St Peter's Es
300 Richmond Ter
Staten Island, NY 10301
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Peter's Es",'Staten_Island=' + Staten_Island.length); Staten_Island[Staten_Island.length] = createMarker(new GPoint(-74.13094700,40.60483800),"
St Rita School
30 Wellbrook Avenue
Staten Island, NY 10314
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Rita School",'Staten_Island=' + Staten_Island.length); Staten_Island[Staten_Island.length] = createMarker(new GPoint(-74.15130000,40.60420000),"
St Teresa School
1632 Victory Blvd Staten Islan
Staten Island, NY 10314
Co-ed school, 5-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Teresa School",'Staten_Island=' + Staten_Island.length); Staten_Island[Staten_Island.length] = createMarker(new GPoint(-74.11045900,40.59335600),"
Staten Island Academy
715 Todt Hill Road
Staten Island, NY 10304
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Staten Island Academy",'Staten_Island=' + Staten_Island.length); Staten_Island[Staten_Island.length] = createMarker(new GPoint(-74.13626800,40.61243600),"
Staten Island Montessori School
2187 Victory Blvd
Staten Island, NY 10314
Co-ed school, PK-KG
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Staten Island Montessori School",'Staten_Island=' + Staten_Island.length); Staten_Island[Staten_Island.length] = createMarker(new GPoint(-74.15178800,40.56721000),"
The Tanglewood School
15 Tanglewood Drive
Staten Island, NY 10308
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Tanglewood School",'Staten_Island=' + Staten_Island.length); Staten_Island[Staten_Island.length] = createMarker(new GPoint(-74.08098500,40.63046000),"
Trinity Lutheran School
309 Saint Pauls Avenue
Staten Island, NY 10304
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Trinity Lutheran School",'Staten_Island=' + Staten_Island.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/////1/' + showArray); map.removeOverlays(Staten_Island); 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(Staten_Island);map.removeOverlays(Staten_Island); map.addOverlays(Staten_Island); centerByArray(Staten_Island, false, false); cntMarker += Staten_Island.length; centerByArray(Staten_Island,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=1&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; }