function addMarkers(){ mySelect = document.getElementById('selection'); Huntsville = [];Huntsville[Huntsville.length] = createMarker(new GPoint(-86.68797200,34.80078600),"
Calvary Baptist Academy
126 Douglass Road Nw
Huntsville, AL 35806
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Calvary Baptist Academy",'Huntsville=' + Huntsville.length); Huntsville[Huntsville.length] = createMarker(new GPoint(-86.59334500,34.76120300),"
Care To Learn School
2901 Pike Avenue Nw
Huntsville, AL 35810
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Care To Learn School",'Huntsville=' + Huntsville.length); Huntsville[Huntsville.length] = createMarker(new GPoint(-86.64889600,34.72633700),"
Catholic High School
4810 Bradford Drive Nw
Huntsville, AL 35805
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Catholic High School",'Huntsville=' + Huntsville.length); Huntsville[Huntsville.length] = createMarker(new GPoint(-86.70343800,34.73263800),"
Childrens House Of Montessori
2605 Leeman Ferry Road Sw
Huntsville, AL 35801
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Childrens House Of Montessori",'Huntsville=' + Huntsville.length); Huntsville[Huntsville.length] = createMarker(new GPoint(-86.57235600,34.65719100),"
Community Fellowship Baptist Preparatory
7905 Logan Drive
Huntsville, AL 35802
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Community Fellowship Baptist Preparatory",'Huntsville=' + Huntsville.length); Huntsville[Huntsville.length] = createMarker(new GPoint(-86.68769900,34.75752400),"
The Country Day School
1699 Old Monrovia Road
Huntsville, AL 35806
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Country Day School",'Huntsville=' + Huntsville.length); Huntsville[Huntsville.length] = createMarker(new GPoint(-86.59911200,34.76825200),"
First Baptist Child Development Center & Academy
3509 Blue Spring Road Nw
Huntsville, AL 35810
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("First Baptist Child Development Center & Academy",'Huntsville=' + Huntsville.length); Huntsville[Huntsville.length] = createMarker(new GPoint(-86.58436900,34.69845600),"
Grace Lutheran School
3321 Memorial Parkway Sw
Huntsville, AL 35801
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Grace Lutheran School",'Huntsville=' + Huntsville.length); Huntsville[Huntsville.length] = createMarker(new GPoint(-86.61676600,34.77714900),"
Heritage Christian School
3911 Pulaski Pike Nw
Huntsville, AL 35810
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Heritage Christian School",'Huntsville=' + Huntsville.length); Huntsville[Huntsville.length] = createMarker(new GPoint(-86.60190600,34.73449100),"
Holy Family Parochial School
2300 Beasley Avenue Nw
Huntsville, AL 35816
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Holy Family Parochial School",'Huntsville=' + Huntsville.length); Huntsville[Huntsville.length] = createMarker(new GPoint(-86.57277200,34.69104500),"
Holy Spirit School
619 Airport Road Sw
Huntsville, AL 35802
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Holy Spirit School",'Huntsville=' + Huntsville.length); Huntsville[Huntsville.length] = createMarker(new GPoint(-86.58552200,34.72012800),"
Huntsville Achievement School
406 12 Governors Drive Sw
Huntsville, AL 35801
Co-ed school, 1-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Huntsville Achievement School",'Huntsville=' + Huntsville.length); Huntsville[Huntsville.length] = createMarker(new GPoint(-86.69162100,34.74326500),"
Huntsville Christian Academy
175 West Park Loop
Huntsville, AL 35806
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Huntsville Christian Academy",'Huntsville=' + Huntsville.length); Huntsville[Huntsville.length] = createMarker(new GPoint(-86.64636600,34.74693700),"
Islamic Academy Of Huntsville
1645 Sparkman Dr Nw
Huntsville, AL 35816
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Islamic Academy Of Huntsville",'Huntsville=' + Huntsville.length); Huntsville[Huntsville.length] = createMarker(new GPoint(-86.64573300,34.76924600),"
Janice Mitchell Isbell Academy, Inc.
3213 LODGE RD NW
Huntsville, AL 35810
Co-ed school, 6-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Janice Mitchell Isbell Academy, Inc.",'Huntsville=' + Huntsville.length); Huntsville[Huntsville.length] = createMarker(new GPoint(-86.56515300,34.64683700),"
Latham Kindergarten And Preschool
109 Weatherly Road Se
Huntsville, AL 35803
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Latham Kindergarten And Preschool",'Huntsville=' + Huntsville.length); Huntsville[Huntsville.length] = createMarker(new GPoint(-86.55811800,34.68986200),"
Mayfair Child Development Center
1095 Carl T Jones Drive Se
Huntsville, AL 35802
Co-ed school, NS-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mayfair Child Development Center",'Huntsville=' + Huntsville.length); Huntsville[Huntsville.length] = createMarker(new GPoint(-86.57776600,34.71355100),"
The Montessori Learning Center
2334 Pansy Street Sw
Huntsville, AL 35801
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Montessori Learning Center",'Huntsville=' + Huntsville.length); Huntsville[Huntsville.length] = createMarker(new GPoint(-86.53838200,34.66340800),"
Montessori School Of Huntsville #1
15975 Chaney Thompson Road Se
Huntsville, AL 35803
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Montessori School Of Huntsville #1",'Huntsville=' + Huntsville.length); Huntsville[Huntsville.length] = createMarker(new GPoint(-86.59203800,34.69759500),"
Mrs Rondas Montessori School
3102 Leeman Ferry Road Sw
Huntsville, AL 35801
Co-ed school, PK-1
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mrs Rondas Montessori School",'Huntsville=' + Huntsville.length); Huntsville[Huntsville.length] = createMarker(new GPoint(-86.58610000,34.73020000),"
Oakwood Academy/elementary
Box 30108, 7000 Adventist Blvd
Huntsville, AL 35896
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Oakwood Academy/elementary",'Huntsville=' + Huntsville.length); Huntsville[Huntsville.length] = createMarker(new GPoint(-86.66057200,34.75574700),"
Oakwood Adventist Academy K-8
5380 Oakwood Road
Huntsville, AL 35896
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Oakwood Adventist Academy K-8",'Huntsville=' + Huntsville.length); Huntsville[Huntsville.length] = createMarker(new GPoint(-86.55849500,34.70528600),"
Randolph School
1005 Drake Avenue Se
Huntsville, AL 35802
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Randolph School",'Huntsville=' + Huntsville.length); Huntsville[Huntsville.length] = createMarker(new GPoint(-86.58241500,34.69897200),"
Schola Maxima
3348 L And N Drive Sw
Huntsville, AL 35801
Co-ed school, 1-4
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Schola Maxima",'Huntsville=' + Huntsville.length); Huntsville[Huntsville.length] = createMarker(new GPoint(-86.75903200,34.64706300),"
Uaw Daimlerchrysler Child Dev
100 Jetplex Blvd.
Huntsville, AL 35824
Co-ed school, PK-KG
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Uaw Daimlerchrysler Child Dev",'Huntsville=' + Huntsville.length); Huntsville[Huntsville.length] = createMarker(new GPoint(-86.56193500,34.79279700),"
Union Chapel Christian Academy
315 Winchester Road NE
Huntsville, AL 35811
Co-ed school, KG-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Union Chapel Christian Academy",'Huntsville=' + Huntsville.length); Huntsville[Huntsville.length] = createMarker(new GPoint(-86.56226700,34.79278800),"
Union Chapel Mb Church Child Development Center
315 Winchester Road Ne A
Huntsville, AL 35811
Co-ed school, K-3
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Union Chapel Mb Church Child Development Center",'Huntsville=' + Huntsville.length); Huntsville[Huntsville.length] = createMarker(new GPoint(-86.63975500,34.72756200),"
University Preschool Learning Center
4711 Holmes Avenue Nw
Huntsville, AL 35816
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("University Preschool Learning Center",'Huntsville=' + Huntsville.length); Huntsville[Huntsville.length] = createMarker(new GPoint(-86.62101500,34.72760900),"
Valley Fellowship Christian Academy
3616 Holmes Ave Nw
Huntsville, AL 35816
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Valley Fellowship Christian Academy",'Huntsville=' + Huntsville.length); Huntsville[Huntsville.length] = createMarker(new GPoint(-86.58496000,34.72912000),"
Westminster Christian Academy
Post Office Box 5680
Huntsville, AL 35814
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Westminster Christian Academy",'Huntsville=' + Huntsville.length); Huntsville[Huntsville.length] = createMarker(new GPoint(-86.56800300,34.67527000),"
Whitesburg Baptist Weekday Early Education
6806 Whitesburg Drive S
Huntsville, AL 35802
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Whitesburg Baptist Weekday Early Education",'Huntsville=' + Huntsville.length); Huntsville[Huntsville.length] = createMarker(new GPoint(-86.56799200,34.67507800),"
Whitesburg Christian Academy
6806 Whitesburg Drive S
Huntsville, AL 35802
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Whitesburg Christian Academy",'Huntsville=' + Huntsville.length); Huntsville[Huntsville.length] = createMarker(new GPoint(-86.53913200,34.66727600),"
Willowbrook Baptist Kindergarten
7625 Bailey Cove Road Se
Huntsville, AL 35802
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Willowbrook Baptist Kindergarten",'Huntsville=' + Huntsville.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(Huntsville); 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(Huntsville);map.removeOverlays(Huntsville); map.addOverlays(Huntsville); centerByArray(Huntsville, false, false); cntMarker += Huntsville.length; centerByArray(Huntsville,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; }