function addMarkers(){ mySelect = document.getElementById('selection'); Manchester = [];Manchester[Manchester.length] = createMarker(new GPoint(-71.45802700,42.95154900),"
A Little Folks School House Too
1700 Brown Avenue
Manchester, NH 03103
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("A Little Folks School House Too",'Manchester=' + Manchester.length); Manchester[Manchester.length] = createMarker(new GPoint(-71.45802700,42.95154900),"
A Little Folks School House-goffs Falls
1700 Brown Avenue
Manchester, NH 03103
Co-ed school, PK-2
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("A Little Folks School House-goffs Falls",'Manchester=' + Manchester.length); Manchester[Manchester.length] = createMarker(new GPoint(-71.47145700,42.98965700),"
Alpha Bits Learning Center
333 Allard Drive
Manchester, NH 03102
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Alpha Bits Learning Center",'Manchester=' + Manchester.length); Manchester[Manchester.length] = createMarker(new GPoint(-71.42521900,42.97956400),"
Child Guidance Early Learning Center
75 Talbot Street
Manchester, NH 03109
Co-ed school, K-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Child Guidance Early Learning Center",'Manchester=' + Manchester.length); Manchester[Manchester.length] = createMarker(new GPoint(-71.48110600,43.01915400),"
Childrens World Learning Cnt
1066 Front St
Manchester, NH 03102
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Childrens World Learning Cnt",'Manchester=' + Manchester.length); Manchester[Manchester.length] = createMarker(new GPoint(-71.45984400,43.03459600),"
The Derryfield School
2108 River Road
Manchester, NH 03104
Co-ed school, 6-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Derryfield School",'Manchester=' + Manchester.length); Manchester[Manchester.length] = createMarker(new GPoint(-71.44091900,42.97993700),"
End Of The Rainbow
870 Hayward Street
Manchester, NH 03103
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("End Of The Rainbow",'Manchester=' + Manchester.length); Manchester[Manchester.length] = createMarker(new GPoint(-71.47970300,42.97240400),"
Growing Years The
130 Harvell Street
Manchester, NH 03102
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Growing Years The",'Manchester=' + Manchester.length); Manchester[Manchester.length] = createMarker(new GPoint(-71.41779600,42.97213900),"
Holycross Early Childhood Center
420 Island Pond Road
Manchester, NH 03109
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Holycross Early Childhood Center",'Manchester=' + Manchester.length); Manchester[Manchester.length] = createMarker(new GPoint(-71.45657300,42.99914300),"
Jewish Federation Preschool
698 Beech Street
Manchester, NH 03104
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Jewish Federation Preschool",'Manchester=' + Manchester.length); Manchester[Manchester.length] = createMarker(new GPoint(-71.46858800,42.97316200),"
Kids Inn Of Manchester
1 Sundial Avenue Suite 117
Manchester, NH 03103
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Kids Inn Of Manchester",'Manchester=' + Manchester.length); Manchester[Manchester.length] = createMarker(new GPoint(-71.45195400,42.93144700),"
Little Frogs & Polliwogs
3011 Brown Avenue
Manchester, NH 03103
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Little Frogs & Polliwogs",'Manchester=' + Manchester.length); Manchester[Manchester.length] = createMarker(new GPoint(-71.46660300,43.01363700),"
Mount Saint Mary Academy
2291 Elm Street
Manchester, NH 03104
Co-ed school, NS-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mount Saint Mary Academy",'Manchester=' + Manchester.length); Manchester[Manchester.length] = createMarker(new GPoint(-71.45791700,42.96087400),"
Mount Zion Christian Schools
132 Titus Avenue
Manchester, NH 03103
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mount Zion Christian Schools",'Manchester=' + Manchester.length); Manchester[Manchester.length] = createMarker(new GPoint(-71.45814500,42.99373700),"
Nfi - Midway Shelter
136 Lowell Street
Manchester, NH 03104
All-boys school, 7-11
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Nfi - Midway Shelter",'Manchester=' + Manchester.length); Manchester[Manchester.length] = createMarker(new GPoint(-71.40868000,42.97677900),"
Noah's Ark Child Care Center
491 East Industrial Park Drive
Manchester, NH 03109
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Noah's Ark Child Care Center",'Manchester=' + Manchester.length); Manchester[Manchester.length] = createMarker(new GPoint(-71.43378700,42.96449900),"
On The Brighter Side
501 S Porter Street
Manchester, NH 03103
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("On The Brighter Side",'Manchester=' + Manchester.length); Manchester[Manchester.length] = createMarker(new GPoint(-71.42746600,42.97419400),"
Robert B Jolicoeur School
1 Mammoth Road
Manchester, NH 03109
Co-ed school, 6-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Robert B Jolicoeur School",'Manchester=' + Manchester.length); Manchester[Manchester.length] = createMarker(new GPoint(-71.44518700,42.97691100),"
St. Anthony School
148 Belmont Street
Manchester, NH 03103
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Anthony School",'Manchester=' + Manchester.length); Manchester[Manchester.length] = createMarker(new GPoint(-71.47241200,42.98171100),"
St. Benedict Academy
85 3rd Street
Manchester, NH 03102
Co-ed school, K-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Benedict Academy",'Manchester=' + Manchester.length); Manchester[Manchester.length] = createMarker(new GPoint(-71.45758700,42.98957000),"
St. Casimir School
456 Union Street
Manchester, NH 03103
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Casimir School",'Manchester=' + Manchester.length); Manchester[Manchester.length] = createMarker(new GPoint(-71.45276000,43.00579600),"
St. Catherine School
206 North Street
Manchester, NH 03104
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Catherine School",'Manchester=' + Manchester.length); Manchester[Manchester.length] = createMarker(new GPoint(-71.45960800,42.99455000),"
St. Joseph Regional Jr High School
460 Pine Street
Manchester, NH 03104
Co-ed school, 7-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Joseph Regional Jr High School",'Manchester=' + Manchester.length); Manchester[Manchester.length] = createMarker(new GPoint(-71.45521100,42.98631600),"
St Augustin Preschool
383 Beech Street
Manchester, NH 03103
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Augustin Preschool",'Manchester=' + Manchester.length); Manchester[Manchester.length] = createMarker(new GPoint(-71.47718700,42.99193700),"
St Marie Child Care Center
133 Wayne Street
Manchester, NH 03102
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Marie Child Care Center",'Manchester=' + Manchester.length); Manchester[Manchester.length] = createMarker(new GPoint(-71.48336200,42.99496300),"
St Peters Home School
300 Kelley Street
Manchester, NH 03102
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Peters Home School",'Manchester=' + Manchester.length); Manchester[Manchester.length] = createMarker(new GPoint(-71.43336200,42.99749500),"
Trinity High School
581 Bridge Street
Manchester, NH 03104
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Trinity High School",'Manchester=' + Manchester.length); Manchester[Manchester.length] = createMarker(new GPoint(-71.46778200,42.98956600),"
Wee Play School
200 Bedford Street
Manchester, NH 03101
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Wee Play School",'Manchester=' + Manchester.length); Manchester[Manchester.length] = createMarker(new GPoint(-71.46409800,42.99206300),"
Ymca Child Care Center
30 Mechanic Street
Manchester, NH 03101
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ymca Child Care Center",'Manchester=' + Manchester.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(Manchester); 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(Manchester);map.removeOverlays(Manchester); map.addOverlays(Manchester); centerByArray(Manchester, false, false); cntMarker += Manchester.length; centerByArray(Manchester,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; }