function addMarkers() { mySelect = document.getElementById('selection'); Decatur = [];Decatur[Decatur.length] = createMarker(new GPoint(-84.22393036,33.74264908),"
Atherton Elementary School
1674 Atherton Drive
Decatur, GA 30035

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Atherton Elementary School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.24116516,33.69052124),"
Bob Mathis Elementary School
3505 Boring Road
Decatur, GA 30034

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Bob Mathis Elementary School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.26840973,33.83910370),"
Briarlake Elementary School
3590 Lavista Road
Decatur, GA 30033

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Briarlake Elementary School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.22101593,33.72074127),"
Canby Lane Elementary School
4150 Green Hawk Trail
Decatur, GA 30035

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Canby Lane Elementary School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.29180908,33.68633652),"
Cedar Grove Middle School
2300 Wildcat Road
Decatur, GA 30034

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Cedar Grove Middle School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.21938324,33.67930222),"
Chapel Hill Elementary School
3536 Radcliff Boulevard
Decatur, GA 30034

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Chapel Hill Elementary School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.21526337,33.67855453),"
Chapel Hill Middle School
3535 Dogwood Farm Road
Decatur, GA 30034

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Chapel Hill Middle School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.29729462,33.78188324),"
Clairemont Elementary School
155 Erie Avenue
Decatur, GA 30030

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Clairemont Elementary School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.29626465,33.75675964),"
College Heights Elementary School
917 South Mcdonough Street
Decatur, GA 30030

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("College Heights Elementary School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.25803375,33.71933746),"
Columbia Elementary School
3230 Columbia Woods Drive
Decatur, GA 30032

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Columbia Elementary School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.25179291,33.72834778),"
Columbia High School
2106 Columbia Drive
Decatur, GA 30032

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Columbia High School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.25176239,33.69837570),"
Columbia Middle School
3001 Columbia Drive
Decatur, GA 30035

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Columbia Middle School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.28789520,33.82836151),"
Coralwood Education Center
2477 Coralwood Drive
Decatur, GA 30033

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Coralwood Education Center",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.20240021,33.72135925),"
Decatur High School
310 North Mcdonough Street
Decatur, GA 30030

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Decatur High School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.27976100,33.80058100),"
Dekalb Community School
1833 Lawrenceville Hwy
Decatur, GA 30033

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Dekalb Community School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.20304108,33.71976089),"
Dekalb High School Of Technology, South Campus
3303 Panthersville Road
Decatur, GA 30030

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Dekalb High School Of Technology, South Campus",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.27932300,33.69052800),"
Dekalb Regional Youth Detention Center
2946 Clifton Springs Road
Decatur, GA 30034

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Dekalb Regional Youth Detention Center",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.21723175,33.70940018),"
Dekalb Transition School
2670 Old Wesley Chapel Road
Decatur, GA 30034

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Dekalb Transition School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.29492187,33.77457047),"
Fairington Elementary School
5505 Philip Bradley Drive
Decatur, GA 30038

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Fairington Elementary School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.28426361,33.70593643),"
Flat Shoals Elementary School
3226 Flat Shoals Road
Decatur, GA 30034

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Flat Shoals Elementary School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.27126312,33.76768875),"
Forrest Hills Elementary School
923 Forrest Boulevard
Decatur, GA 30030

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Forrest Hills Elementary School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.23381042,33.75126266),"
Glen Haven Elementary School
1402 Austin Drive
Decatur, GA 30032

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Glen Haven Elementary School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.29008484,33.77583694),"
Glennwood Elementary School
440 East Ponce De Leon Avenue
Decatur, GA 30030

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Glennwood Elementary School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.27232361,33.75222778),"
Hooper Alexander Elementary School
3414 Memorial Drive
Decatur, GA 30032

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Hooper Alexander Elementary School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.25605011,33.77297592),"
International Community Charter
3260 Covington Highway
Decatur, GA 30032

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("International Community Charter",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.28430176,33.71543884),"
Kelley Lake Elementary School
2590 Kelly Lake Road
Decatur, GA 30032

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Kelley Lake Elementary School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.26589203,33.74426651),"
Knollwood Elementary School
3039 Santa Monica Drive
Decatur, GA 30032

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Knollwood Elementary School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.27683258,33.81552887),"
Laurel Ridge Elementary School
1215 Balsam Drive
Decatur, GA 30033

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Laurel Ridge Elementary School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.30792999,33.72713470),"
Leslie J. Steele Elementary School
2162 Second Avenue
Decatur, GA 30032

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Leslie J. Steele Elementary School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.20251465,33.73269272),"
Mary Mcleod Bethune Middle School
5200 Covington Hwy.
Decatur, GA 30035

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Mary Mcleod Bethune Middle School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.26189423,33.80466461),"
Mclendon Elementary School
3169 Hollywood Drive
Decatur, GA 30033

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Mclendon Elementary School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.29883575,33.71784210),"
Mcnair Middle School
2190 Wallingford Drive
Decatur, GA 30032

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Mcnair Middle School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.28951263,33.80193710),"
Medlock Elementary School
2418 Wood Trail Lane
Decatur, GA 30033

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Medlock Elementary School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.25294495,33.75503540),"
Midway Elementary School
3318 Midway Road
Decatur, GA 30032

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Midway Elementary School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.18206024,33.72442627),"
Miller Grove Middle School
2215 Miller Road
Decatur, GA 30035

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Miller Grove Middle School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.22676849,33.66756821),"
Narvie Harris Elementary School
3981 Mcgill Drive
Decatur, GA 30034

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Narvie Harris Elementary School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.30536652,33.75602722),"
Oakhurst At Fifth Avenue Elementary School
101 Fifth Avenue
Decatur, GA 30030

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Oakhurst At Fifth Avenue Elementary School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.30590057,33.76449966),"
Oakhurst Elementary School
175 Mead Road
Decatur, GA 30030

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Oakhurst Elementary School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.26801000,33.68069500),"
Oakview Elementary School
3574 Oakvale Road
Decatur, GA 30034

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Oakview Elementary School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.24673462,33.74853897),"
Peachcrest Elementary School
1530 Joy Lane
Decatur, GA 30032

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Peachcrest Elementary School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.22409058,33.70368576),"
Rainbow Elementary School
2801 Kelley Chapel Road
Decatur, GA 30034

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Rainbow Elementary School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.29938507,33.76858902),"
Renfroe Middle School
220 West College Avenue
Decatur, GA 30030

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Renfroe Middle School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.27230835,33.81868744),"
Shamrock Middle School
3100 Mount Olive Drive
Decatur, GA 30033

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Shamrock Middle School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.24789429,33.73266602),"
Snapfinger Elementary School
1365 Snapfinger Road
Decatur, GA 30032

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Snapfinger Elementary School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.22285461,33.70250320),"
Southwest Dekalb High School
2863 Kelley Chapel Road
Decatur, GA 30034

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Southwest Dekalb High School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.29435730,33.72580719),"
Tilson Elementary School
2100 Bixler Circle
Decatur, GA 30032

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Tilson Elementary School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.27983856,33.72765350),"
Toney Elementary School
2701 Oakland Terrace
Decatur, GA 30032

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Toney Elementary School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.23790741,33.74633789),"
Towers High School
3919 Brookcrest Circle
Decatur, GA 30032

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Towers High School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.25923157,33.72821045),"
Wadsworth Elementary School
2084 Green Forrest Drive
Decatur, GA 30032

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Wadsworth Elementary School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.30609131,33.78285599),"
Westchester Elementary School
758 Scott Boulevard
Decatur, GA 30030

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Westchester Elementary School",'Decatur=' + Decatur.length); Decatur[Decatur.length] = createMarker(new GPoint(-84.29003143,33.76591110),"
Winnona Park Elementary School
510 Avery Street
Decatur, GA 30030

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Winnona Park Elementary School",'Decatur=' + Decatur.length); maxLng = -84.18206024; maxLat = 33.83910370; minLng = -84.30792999; minLat = 33.66756821; reCenterMap(); } // 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,10); /* 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'); } }