function addMarkers(){ mySelect = document.getElementById('selection'); Alpharetta = [];Atlanta = [];Augusta = [];Bainbridge = [];Dacula = [];Dalton = [];Decatur = [];Douglasville = [];East_Point = [];Hinesville = [];La_Grange = [];Lake_Park = [];Loganville = [];Norcross = [];Peachtree_City = [];Quitman = [];Savannah = [];Stillmore = [];Thomasville = [];Tifton = [];Waynesboro = [];Winston = [];mySelect.options[mySelect.options.length] = new Option("Alpharetta schools",'all=Alpharetta'); mySelect.options[mySelect.options.length] = new Option("Atlanta schools",'all=Atlanta'); mySelect.options[mySelect.options.length] = new Option("Augusta schools",'all=Augusta'); mySelect.options[mySelect.options.length] = new Option("Bainbridge schools",'all=Bainbridge'); mySelect.options[mySelect.options.length] = new Option("Dacula schools",'all=Dacula'); mySelect.options[mySelect.options.length] = new Option("Dalton schools",'all=Dalton'); mySelect.options[mySelect.options.length] = new Option("Decatur schools",'all=Decatur'); mySelect.options[mySelect.options.length] = new Option("Douglasville schools",'all=Douglasville'); mySelect.options[mySelect.options.length] = new Option("East Point schools",'all=East_Point'); mySelect.options[mySelect.options.length] = new Option("Hinesville schools",'all=Hinesville'); mySelect.options[mySelect.options.length] = new Option("La Grange schools",'all=La_Grange'); mySelect.options[mySelect.options.length] = new Option("Lake Park schools",'all=Lake_Park'); mySelect.options[mySelect.options.length] = new Option("Loganville schools",'all=Loganville'); mySelect.options[mySelect.options.length] = new Option("Norcross schools",'all=Norcross'); mySelect.options[mySelect.options.length] = new Option("Peachtree City schools",'all=Peachtree_City'); mySelect.options[mySelect.options.length] = new Option("Quitman schools",'all=Quitman'); mySelect.options[mySelect.options.length] = new Option("Savannah schools",'all=Savannah'); mySelect.options[mySelect.options.length] = new Option("Stillmore schools",'all=Stillmore'); mySelect.options[mySelect.options.length] = new Option("Thomasville schools",'all=Thomasville'); mySelect.options[mySelect.options.length] = new Option("Tifton schools",'all=Tifton'); mySelect.options[mySelect.options.length] = new Option("Waynesboro schools",'all=Waynesboro'); mySelect.options[mySelect.options.length] = new Option("Winston schools",'all=Winston'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Alpharetta[Alpharetta.length] = createMarker(new GPoint(-84.29240600,34.06564900),"
Cre'me De La Creme
11675 Haynes Bridge Road
Alpharetta, GA 30004
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Cre'me De La Creme",'Alpharetta=' + Alpharetta.length); Atlanta[Atlanta.length] = createMarker(new GPoint(-84.38587400,33.76439300),"
Canterbury School
360 Peachtree St NE
Atlanta, GA 30308
Co-ed school, NS-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Canterbury School",'Atlanta=' + Atlanta.length); Atlanta[Atlanta.length] = createMarker(new GPoint(-84.38692000,33.83022700),"
The Cathedral Preschool
2744 Peachtree Road Nw
Atlanta, GA 30305
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Cathedral Preschool",'Atlanta=' + Atlanta.length); Atlanta[Atlanta.length] = createMarker(new GPoint(-84.40160000,33.75473700),"
Mount Vernon Baptist Church Academy
441 Martin Luther King Jr Drive Nw
Atlanta, GA 30313
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mount Vernon Baptist Church Academy",'Atlanta=' + Atlanta.length); Atlanta[Atlanta.length] = createMarker(new GPoint(-84.42230000,33.86230000),"
St Annes Day School
3098 Saint Annes Lane Nw
Atlanta, GA 30327
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Annes Day School",'Atlanta=' + Atlanta.length); Atlanta[Atlanta.length] = createMarker(new GPoint(-84.50873800,33.69839000),"
Ben Hill Umc Christian Academy
2099 Fairburn Road Sw
Atlanta, GA 30331
Co-ed school, K-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ben Hill Umc Christian Academy",'Atlanta=' + Atlanta.length); Atlanta[Atlanta.length] = createMarker(new GPoint(-84.42560700,33.75816500),"
The Edelman Center
350 Spelman Lane Sw Box 89
Atlanta, GA 30314
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Edelman Center",'Atlanta=' + Atlanta.length); Augusta[Augusta.length] = createMarker(new GPoint(-82.08871400,33.48285200),"
Montessori School Of Augusta
3615 Wheeler Road
Augusta, GA 30909
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Montessori School Of Augusta",'Augusta=' + Augusta.length); Bainbridge[Bainbridge.length] = createMarker(new GPoint(-84.55623800,30.91650600),"
Morningside Cwe
1303 Vada Rd
Bainbridge, GA 31717
Co-ed school, PK-KG
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Morningside Cwe",'Bainbridge=' + Bainbridge.length); Dacula[Dacula.length] = createMarker(new GPoint(-83.89002500,34.02640200),"
Child's World
3206 Fence Road
Dacula, GA 30019
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Child's World",'Dacula=' + Dacula.length); Dalton[Dalton.length] = createMarker(new GPoint(-84.97107300,34.75423700),"
Rock Hill School
506 Highland Drive
Dalton, GA 30720
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Rock Hill School",'Dalton=' + Dalton.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.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); Douglasville[Douglasville.length] = createMarker(new GPoint(-84.72968500,33.74082700),"
Sunbrook Academy At Creekside
6029 Professional Parkway
Douglasville, GA 30134
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sunbrook Academy At Creekside",'Douglasville=' + Douglasville.length); East_Point[East_Point.length] = createMarker(new GPoint(-84.47740200,33.66441100),"
Mount Olive Early Learning Center
3366 Mt Olive Road
East Point, GA 30344
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mount Olive Early Learning Center",'East_Point=' + East_Point.length); Hinesville[Hinesville.length] = createMarker(new GPoint(-81.59612700,31.84893000),"
Fumc Preschool And Kindergarten
100 Memorial Drive
Hinesville, GA 31313
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Fumc Preschool And Kindergarten",'Hinesville=' + Hinesville.length); La_Grange[La_Grange.length] = createMarker(new GPoint(-85.03797800,33.03936300),"
First United Methodist - Elc
401 Broad Street
La Grange, GA 30240
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("First United Methodist - Elc",'La_Grange=' + La_Grange.length); Lake_Park[Lake_Park.length] = createMarker(new GPoint(-83.24086200,30.70210500),"
Apostolic Christian Training
4202 Loch Laurel Road
Lake Park, GA 31636
Co-ed school, K-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Apostolic Christian Training",'Lake_Park=' + Lake_Park.length); Loganville[Loganville.length] = createMarker(new GPoint(-83.86602300,33.82826400),"
Bright Beginnings Preschool
680 Tom Brewer Road
Loganville, GA 30052
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bright Beginnings Preschool",'Loganville=' + Loganville.length); Norcross[Norcross.length] = createMarker(new GPoint(-84.21955400,33.97815800),"
Creme De La Creme
4785 Peachtree Corners Circle
Norcross, GA 30092
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Creme De La Creme",'Norcross=' + Norcross.length); Peachtree_City[Peachtree_City.length] = createMarker(new GPoint(-84.57090300,33.41454200),"
St Andrew's Preschool And Kindergarten
316 N Peachtree Parkway
Peachtree City, GA 30269
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Andrew's Preschool And Kindergarten",'Peachtree_City=' + Peachtree_City.length); Quitman[Quitman.length] = createMarker(new GPoint(-83.55457900,30.77950900),"
First Baptist Kindergarten
Po Box 569
Quitman, GA 31643
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("First Baptist Kindergarten",'Quitman=' + Quitman.length); Savannah[Savannah.length] = createMarker(new GPoint(-81.10895700,32.03952000),"
Emmanuel Christian School
114 W 61st St
Savannah, GA 31405
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Emmanuel Christian School",'Savannah=' + Savannah.length); Savannah[Savannah.length] = createMarker(new GPoint(-81.11509200,32.04838300),"
West Side Academy
907 W 52nd Street
Savannah, GA 31405
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("West Side Academy",'Savannah=' + Savannah.length); Stillmore[Stillmore.length] = createMarker(new GPoint(-82.21540000,32.44080000),"
David Emanuel Academy
None
Stillmore, GA 30464
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("David Emanuel Academy",'Stillmore=' + Stillmore.length); Thomasville[Thomasville.length] = createMarker(new GPoint(-84.04890000,30.75900000),"
St Thomas Episcopal School
Po Box 33
Thomasville, GA 31799
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Thomas Episcopal School",'Thomasville=' + Thomasville.length); Tifton[Tifton.length] = createMarker(new GPoint(-83.53655500,31.47767900),"
Mother Goose Kindergarten
2609 Camellia Drive
Tifton, GA 31793
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mother Goose Kindergarten",'Tifton=' + Tifton.length); Tifton[Tifton.length] = createMarker(new GPoint(-83.50957400,31.47276300),"
Northside Baptist Weekday Education Program
302 20th Street W
Tifton, GA 31794
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Northside Baptist Weekday Education Program",'Tifton=' + Tifton.length); Waynesboro[Waynesboro.length] = createMarker(new GPoint(-82.01535400,33.09024500),"
Marie's Creative Kids Kindergarten
Po Box 6 838 Blakeney Street
Waynesboro, GA 30830
Co-ed school, K-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Marie's Creative Kids Kindergarten",'Waynesboro=' + Waynesboro.length); Winston[Winston.length] = createMarker(new GPoint(-84.81751700,33.72957600),"
Winston Academy Child Care Center
7425 Bankhead Highway
Winston, GA 30187
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Winston Academy Child Care Center",'Winston=' + Winston.length); map.removeOverlays(Alpharetta); map.removeOverlays(Atlanta); map.removeOverlays(Augusta); map.removeOverlays(Bainbridge); map.removeOverlays(Dacula); map.removeOverlays(Dalton); map.removeOverlays(Decatur); map.removeOverlays(Douglasville); map.removeOverlays(East_Point); map.removeOverlays(Hinesville); map.removeOverlays(La_Grange); map.removeOverlays(Lake_Park); map.removeOverlays(Loganville); map.removeOverlays(Norcross); map.removeOverlays(Peachtree_City); map.removeOverlays(Quitman); map.removeOverlays(Savannah); map.removeOverlays(Stillmore); map.removeOverlays(Thomasville); map.removeOverlays(Tifton); map.removeOverlays(Waynesboro); map.removeOverlays(Winston); setTimeout(function(){map.addOverlays(Alpharetta)},1000); setTimeout(function(){map.addOverlays(Atlanta)},1000); setTimeout(function(){map.addOverlays(Augusta)},1000); setTimeout(function(){map.addOverlays(Bainbridge)},1000); setTimeout(function(){map.addOverlays(Dacula)},1000); setTimeout(function(){map.addOverlays(Dalton)},1000); setTimeout(function(){map.addOverlays(Decatur)},1000); setTimeout(function(){map.addOverlays(Douglasville)},1000); setTimeout(function(){map.addOverlays(East_Point)},1000); setTimeout(function(){map.addOverlays(Hinesville)},1000); setTimeout(function(){map.addOverlays(La_Grange)},1000); setTimeout(function(){map.addOverlays(Lake_Park)},1000); setTimeout(function(){map.addOverlays(Loganville)},1000); setTimeout(function(){map.addOverlays(Norcross)},1000); setTimeout(function(){map.addOverlays(Peachtree_City)},1000); setTimeout(function(){map.addOverlays(Quitman)},1000); setTimeout(function(){map.addOverlays(Savannah)},1000); setTimeout(function(){map.addOverlays(Stillmore)},1000); setTimeout(function(){map.addOverlays(Thomasville)},1000); setTimeout(function(){map.addOverlays(Tifton)},1000); setTimeout(function(){map.addOverlays(Waynesboro)},1000); setTimeout(function(){map.addOverlays(Winston)},1000); maxLng = -81.10895700; maxLat = 34.75423700; minLng = -85.03797800; minLat = 30.70210500; 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,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(Alpharetta); map.removeOverlays(Atlanta); map.removeOverlays(Augusta); map.removeOverlays(Bainbridge); map.removeOverlays(Dacula); map.removeOverlays(Dalton); map.removeOverlays(Decatur); map.removeOverlays(Douglasville); map.removeOverlays(East_Point); map.removeOverlays(Hinesville); map.removeOverlays(La_Grange); map.removeOverlays(Lake_Park); map.removeOverlays(Loganville); map.removeOverlays(Norcross); map.removeOverlays(Peachtree_City); map.removeOverlays(Quitman); map.removeOverlays(Savannah); map.removeOverlays(Stillmore); map.removeOverlays(Thomasville); map.removeOverlays(Tifton); map.removeOverlays(Waynesboro); map.removeOverlays(Winston); 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(Alpharetta);map.removeOverlays(Alpharetta); map.removeOverlays(Atlanta); map.removeOverlays(Augusta); map.removeOverlays(Bainbridge); map.removeOverlays(Dacula); map.removeOverlays(Dalton); map.removeOverlays(Decatur); map.removeOverlays(Douglasville); map.removeOverlays(East_Point); map.removeOverlays(Hinesville); map.removeOverlays(La_Grange); map.removeOverlays(Lake_Park); map.removeOverlays(Loganville); map.removeOverlays(Norcross); map.removeOverlays(Peachtree_City); map.removeOverlays(Quitman); map.removeOverlays(Savannah); map.removeOverlays(Stillmore); map.removeOverlays(Thomasville); map.removeOverlays(Tifton); map.removeOverlays(Waynesboro); map.removeOverlays(Winston); map.addOverlays(Alpharetta); centerByArray(Alpharetta, false, false); cntMarker += Alpharetta.length; map.addOverlays(Atlanta); centerByArray(Atlanta, false, false); cntMarker += Atlanta.length; map.addOverlays(Augusta); centerByArray(Augusta, false, false); cntMarker += Augusta.length; map.addOverlays(Bainbridge); centerByArray(Bainbridge, false, false); cntMarker += Bainbridge.length; map.addOverlays(Dacula); centerByArray(Dacula, false, false); cntMarker += Dacula.length; map.addOverlays(Dalton); centerByArray(Dalton, false, false); cntMarker += Dalton.length; map.addOverlays(Decatur); centerByArray(Decatur, false, false); cntMarker += Decatur.length; map.addOverlays(Douglasville); centerByArray(Douglasville, false, false); cntMarker += Douglasville.length; map.addOverlays(East_Point); centerByArray(East_Point, false, false); cntMarker += East_Point.length; map.addOverlays(Hinesville); centerByArray(Hinesville, false, false); cntMarker += Hinesville.length; map.addOverlays(La_Grange); centerByArray(La_Grange, false, false); cntMarker += La_Grange.length; map.addOverlays(Lake_Park); centerByArray(Lake_Park, false, false); cntMarker += Lake_Park.length; map.addOverlays(Loganville); centerByArray(Loganville, false, false); cntMarker += Loganville.length; map.addOverlays(Norcross); centerByArray(Norcross, false, false); cntMarker += Norcross.length; map.addOverlays(Peachtree_City); centerByArray(Peachtree_City, false, false); cntMarker += Peachtree_City.length; map.addOverlays(Quitman); centerByArray(Quitman, false, false); cntMarker += Quitman.length; map.addOverlays(Savannah); centerByArray(Savannah, false, false); cntMarker += Savannah.length; map.addOverlays(Stillmore); centerByArray(Stillmore, false, false); cntMarker += Stillmore.length; map.addOverlays(Thomasville); centerByArray(Thomasville, false, false); cntMarker += Thomasville.length; map.addOverlays(Tifton); centerByArray(Tifton, false, false); cntMarker += Tifton.length; map.addOverlays(Waynesboro); centerByArray(Waynesboro, false, false); cntMarker += Waynesboro.length; map.addOverlays(Winston); centerByArray(Winston, false, false); cntMarker += Winston.length; centerByArray(Alpharetta,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=2&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; }