function addMarkers(){ mySelect = document.getElementById('selection'); Decatur = [];Decatur[Decatur.length] = createMarker(new GPoint(-84.22006900,33.74599800),"
All Star Kids Academy
4518 Covington Highway
Decatur, GA 30035
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("All Star Kids Academy",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.28446200,33.82548100),"
Arbor Montessori
2998 Lavista Road
Decatur, GA 30033
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Arbor Montessori",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.25128200,33.76424100),"
Becker Adventist School
3561 Covington Highway
Decatur, GA 30032
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Becker Adventist School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.30068300,33.70772600),"
Cambridge Academy
2780 Flat Shoals Road
Decatur, GA 30034
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Cambridge Academy",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.23336900,33.68343200),"
Cathedral Academy
4650 Flat Shoals Parkway
Decatur, GA 30034
Co-ed school, PK-9
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Cathedral Academy",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.19295100,33.73065300),"
Choice Academy Child Care Center
5440 Covington Highway
Decatur, GA 30035
Co-ed school, PK-1
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Choice Academy Child Care Center",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.29648600,33.77870900),"
The Community School
308 Clairemont Avenue
Decatur, GA 30030
Co-ed school, 7-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Community School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.29301000,33.70584700),"
Creative Beginnings Academy
2982 Flat Shoals Road
Decatur, GA 30034
Co-ed school, PK-2
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Creative Beginnings Academy",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.29251600,33.77572100),"
Decatur First Umc Weekday Childrens Ministries
300 E Ponce De Leon Avenue
Decatur, GA 30030
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Decatur First Umc Weekday Childrens Ministries",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.28746200,33.78942000),"
Decatur Montessori
1429 Church Street
Decatur, GA 30030
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Decatur Montessori",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.29463900,33.77446300),"
Decatur Presbyterian Children's Community
205 Sycamore Street
Decatur, GA 30030
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Decatur Presbyterian Children's Community",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.25146200,33.75785300),"
Focus Learning & Enrichment Academy
3435 Midway Road
Decatur, GA 30032
All-boys school, 2-8
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Focus Learning & Enrichment Academy",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.27723200,33.76130100),"
Friends School Of Atlanta
862 Columbia Drive
Decatur, GA 30030
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Friends School Of Atlanta",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.20725300,33.68531000),"
Green Pastures Christian School
5455 Flat Shoals Parkway
Decatur, GA 30034
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Green Pastures Christian School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.17316000,33.70921700),"
The Kingdom Group
5271 Snapfinger Woods Drive
Decatur, GA 30035
Co-ed school, PK-3
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Kingdom Group",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.22134800,33.70730600),"
Love Thy Children Christian Learning Center
4164 Rainbow Drive
Decatur, GA 30034
Co-ed school, PK-2
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Love Thy Children Christian Learning Center",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.29246300,33.76051800),"
Lullwater School Inc
705 South Candler Street
Decatur, GA 30030
Co-ed school, 1-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lullwater School Inc",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.25756300,33.72797600),"
Miller Preparatory Academy For
2135 Shamrock Drive
Decatur, GA 30032
All-boys school, 3-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Miller Preparatory Academy For",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.26953900,33.79367000),"
Montessori School At Emory
3021 North Decatur Rd
Decatur, GA 30033
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Montessori School At Emory",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.25176200,33.70034100),"
Rainbow Park Baptist Church School
2941 Columbia Drive
Decatur, GA 30034
Co-ed school, 1-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Rainbow Park Baptist Church School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.30566700,33.77367600),"
St. Thomas More School
630 W Ponce De Leon Avenue
Decatur, GA 30030
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Thomas More School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.29243000,33.70548200),"
Sola Scriptura Lutheran School
2999 Flat Shoals Road
Decatur, GA 30034
Co-ed school, KG-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sola Scriptura Lutheran School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.29112500,33.72765300),"
Ss Peter Claver Regional Catholic School
2560 Tilson Road
Decatur, GA 30032
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ss Peter Claver Regional Catholic School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.28084000,33.76249300),"
The Waldorf School Of Atlanta
827 Kirk Road
Decatur, GA 30030
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Waldorf School Of Atlanta",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.25986600,33.74447100),"
Wee Wisdom Day Nursery & Kindergarten
1535 Columbia Drive
Decatur, GA 30032
Co-ed school, PK-1
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Wee Wisdom Day Nursery & Kindergarten",'Decatur=' + Decatur.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(Decatur); 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(Decatur);map.removeOverlays(Decatur); map.addOverlays(Decatur); centerByArray(Decatur, false, false); cntMarker += Decatur.length; centerByArray(Decatur,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; }