function addMarkers(){ mySelect = document.getElementById('selection'); Monsey = [];Monsey[Monsey.length] = createMarker(new GPoint(-74.07994000,41.11848000),"
Adolph Schreiber Hebrew Academy
70 Highview Road
Monsey, NY 10952
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Adolph Schreiber Hebrew Academy",'Monsey=' + Monsey.length); Monsey[Monsey.length] = createMarker(new GPoint(-74.09467900,41.09770000),"
Ateres Bais Yaakov Academy Of Rockland
236 Cherry Lane
Monsey, NY 10952
All-girls school, PK-10
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Ateres Bais Yaakov Academy Of Rockland",'Monsey=' + Monsey.length); Monsey[Monsey.length] = createMarker(new GPoint(-74.07620000,41.11650000),"
Bais Malka Girls School Of Belz
Po Box 977
Monsey, NY 10952
All-girls school, PK-12
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Bais Malka Girls School Of Belz",'Monsey=' + Monsey.length); Monsey[Monsey.length] = createMarker(new GPoint(-74.06904800,41.11581200),"
Bais Shifra Miriam
Po Box 682
Monsey, NY 10952
All-girls school, 5-8
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Bais Shifra Miriam",'Monsey=' + Monsey.length); Monsey[Monsey.length] = createMarker(new GPoint(-74.07774300,41.11578500),"
Bais Yaakov Of Ramapo
16 Hershel Terrace
Monsey, NY 10952
All-girls school, 9-12
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Bais Yaakov Of Ramapo",'Monsey=' + Monsey.length); Monsey[Monsey.length] = createMarker(new GPoint(-74.08282900,41.12849300),"
Bais Yaakov Of Spring Valley
11 Smolley Drive
Monsey, NY 10952
All-girls school, 9-12
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Bais Yaakov Of Spring Valley",'Monsey=' + Monsey.length); Monsey[Monsey.length] = createMarker(new GPoint(-74.07352600,41.11572500),"
Bas Mikroh Girls School
28 West Maple Avenue
Monsey, NY 10952
All-girls school, KG-8
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Bas Mikroh Girls School",'Monsey=' + Monsey.length); Monsey[Monsey.length] = createMarker(new GPoint(-74.07620000,41.11650000),"
Beth Esther D'satmar
Po Box 188
Monsey, NY 10952
All-girls school, PK-12
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Beth Esther D'satmar",'Monsey=' + Monsey.length); Monsey[Monsey.length] = createMarker(new GPoint(-74.07640000,41.11600000),"
Beth Rochel School
Po Box 302 145 Saddle River Road
Monsey, NY 10952
All-girls school, 12-12
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Beth Rochel School",'Monsey=' + Monsey.length); Monsey[Monsey.length] = createMarker(new GPoint(-74.07689600,41.11618700),"
Bnos Esther Pupa
Po Box 978
Monsey, NY 10952
All-girls school, NS-12
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Bnos Esther Pupa",'Monsey=' + Monsey.length); Monsey[Monsey.length] = createMarker(new GPoint(-74.06972400,41.12585200),"
Bnos Yisroel Girls' School Of Viznitz
1 School Ter
Monsey, NY 10952
All-girls school, K-12
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Bnos Yisroel Girls' School Of Viznitz",'Monsey=' + Monsey.length); Monsey[Monsey.length] = createMarker(new GPoint(-74.07689600,41.11618700),"
Cheder Chabad Of Monsey
Po Box 1164
Monsey, NY 10952
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Cheder Chabad Of Monsey",'Monsey=' + Monsey.length); Monsey[Monsey.length] = createMarker(new GPoint(-74.07515900,41.13627100),"
Congregation Ateres Tzvi
230 Viola Road
Monsey, NY 10952
All-boys school, PK-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Congregation Ateres Tzvi",'Monsey=' + Monsey.length); Monsey[Monsey.length] = createMarker(new GPoint(-74.06636700,41.13496200),"
Congregation Mesifta Ohr Hatal
244 Rt 306
Monsey, NY 10952
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Congregation Mesifta Ohr Hatal",'Monsey=' + Monsey.length); Monsey[Monsey.length] = createMarker(new GPoint(-74.06021300,41.11678900),"
Congregation Ohr Yitzchok
174 Maple Avenue
Monsey, NY 10952
All-boys school, K-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Congregation Ohr Yitzchok",'Monsey=' + Monsey.length); Monsey[Monsey.length] = createMarker(new GPoint(-74.07690000,41.11640000),"
Mesivta Beth Shraga
Po Box 412
Monsey, NY 10952
All-boys school, 9-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Mesivta Beth Shraga",'Monsey=' + Monsey.length); Monsey[Monsey.length] = createMarker(new GPoint(-74.07690000,41.11640000),"
Mesivta Ohr Naftoli
Po Box 516
Monsey, NY 10952
All-boys school, 9-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Mesivta Ohr Naftoli",'Monsey=' + Monsey.length); Monsey[Monsey.length] = createMarker(new GPoint(-74.06912300,41.12299400),"
Mesivta Ziev Hatorah
63 Blauvelt Road
Monsey, NY 10952
All-boys school, 6-10
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Mesivta Ziev Hatorah",'Monsey=' + Monsey.length); Monsey[Monsey.length] = createMarker(new GPoint(-74.07689600,41.11618700),"
Shaarei Arazim Of Monsey
Po Box 523
Monsey, NY 10952
All-boys school, 9-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Shaarei Arazim Of Monsey",'Monsey=' + Monsey.length); Monsey[Monsey.length] = createMarker(new GPoint(-74.07689600,41.11618700),"
Talmud Torah Of Bobov
Po Box 220
Monsey, NY 10952
All-boys school, PK-6
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Talmud Torah Of Bobov",'Monsey=' + Monsey.length); Monsey[Monsey.length] = createMarker(new GPoint(-74.07689600,41.11618700),"
Toras Chaim
Po Box 1112
Monsey, NY 10952
All-boys school, 10-10
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Toras Chaim",'Monsey=' + Monsey.length); Monsey[Monsey.length] = createMarker(new GPoint(-74.07620000,41.11650000),"
V'yoel Moshe D'satmar
206 Viola Road-po Box 188
Monsey, NY 10952
All-boys school, PK-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("V'yoel Moshe D'satmar",'Monsey=' + Monsey.length); Monsey[Monsey.length] = createMarker(new GPoint(-74.07689600,41.11618700),"
Yeshiva Bais Hachinuch
Po Box 991
Monsey, NY 10952
All-boys school, 2-8
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Yeshiva Bais Hachinuch",'Monsey=' + Monsey.length); Monsey[Monsey.length] = createMarker(new GPoint(-74.07690000,41.11640000),"
Yeshiva Beth David School
Po Box 136 22 West Maple
Monsey, NY 10952
All-boys school, 1-10
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Yeshiva Beth David School",'Monsey=' + Monsey.length); Monsey[Monsey.length] = createMarker(new GPoint(-74.07624800,41.13604400),"
Yeshiva Beth Mikroh
221 Viola Road
Monsey, NY 10952
All-boys school, K-8
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Yeshiva Beth Mikroh",'Monsey=' + Monsey.length); Monsey[Monsey.length] = createMarker(new GPoint(-74.07422600,41.10758000),"
Yeshiva Derech Emes
133 Route 59
Monsey, NY 10952
school, PK-10
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Yeshiva Derech Emes",'Monsey=' + Monsey.length); Monsey[Monsey.length] = createMarker(new GPoint(-74.07280800,41.10181000),"
Yeshiva Gedola Of South Monsey
10 Algonquin Circle
Monsey, NY 10952
All-boys school, 9-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Yeshiva Gedola Of South Monsey",'Monsey=' + Monsey.length); Monsey[Monsey.length] = createMarker(new GPoint(-74.07624800,41.13604400),"
Yeshiva H S Of Monsey
221 Viola Rd
Monsey, NY 10952
All-boys school, 9-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Yeshiva H S Of Monsey",'Monsey=' + Monsey.length); Monsey[Monsey.length] = createMarker(new GPoint(-74.06788300,41.11610900),"
Yeshiva Of Spring Valley
230 Maple Avenue
Monsey, NY 10952
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Yeshiva Of Spring Valley",'Monsey=' + Monsey.length); Monsey[Monsey.length] = createMarker(new GPoint(-74.06159900,41.11665100),"
Yeshiva Shaar Ephraim
5 Acer Ct
Monsey, NY 10952
All-boys school, 9-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Yeshiva Shaar Ephraim",'Monsey=' + Monsey.length); Monsey[Monsey.length] = createMarker(new GPoint(-74.07094300,41.11538600),"
Yeshiva Visnitz School
15 Elyon Rd Box 446
Monsey, NY 10952
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Yeshiva Visnitz School",'Monsey=' + Monsey.length); Monsey[Monsey.length] = createMarker(new GPoint(-74.07689600,41.11618700),"
Yeshivas Toras Chaim
Po Box 1112
Monsey, NY 10952
All-boys school, 10-10
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Yeshivas Toras Chaim",'Monsey=' + Monsey.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(Monsey); 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(Monsey);map.removeOverlays(Monsey); map.addOverlays(Monsey); centerByArray(Monsey, false, false); cntMarker += Monsey.length; centerByArray(Monsey,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; }