function addMarkers() { mySelect = document.getElementById('selection'); Macon = [];Lizella = [];mySelect.options[mySelect.options.length] = new Option("Lizella schools",'all=Lizella'); mySelect.options[mySelect.options.length] = new Option("Macon schools",'all=Macon'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Macon[Macon.length] = createMarker(new GPoint(-83.65933990,32.83414841),"
Alexander Ii Magnet School
1156 College Street
Macon, GA 31201

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Alexander Ii Magnet School",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.60308075,32.85973740),"
Appling Middle School
1210 Shurling Drive
Macon, GA 31211

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Appling Middle School",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.67122650,32.82006454),"
Ballard Hudson Middle School
1780 Anthony Road
Macon, GA 31204

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Ballard Hudson Middle School",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.70400238,32.78828430),"
Barden Elementary School
2521 Anderson Drive
Macon, GA 31206

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Barden Elementary School",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.56873322,32.81388855),"
Bernd Elementary School
4160 Ocmulgee East Boulevard
Macon, GA 31217

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Bernd Elementary School",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.62339400,32.84884500),"
Bibb County Learning Center
180 Emery Highway
Macon, GA 31210

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bibb County Learning Center",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.68486023,32.85266113),"
Brookdale Elementary School
3600 Brookdale Avenue
Macon, GA 31204

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Brookdale Elementary School",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.65226746,32.79845810),"
Bruce Elementary School
3660 Houston Avenue
Macon, GA 31206

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Bruce Elementary School",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.61294300,32.85337900),"
Burdell Elementary School
972 Fort Hill Street
Macon, GA 31217

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Burdell Elementary School",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.70763397,32.77743530),"
Burghard Elementary School
6020 Bloomfield Road
Macon, GA 31206

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Burghard Elementary School",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.64431000,32.81959915),"
Burke Elementary School
2051 Second Street
Macon, GA 31201

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Burke Elementary School",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.69393158,32.84915161),"
Butler Early Childhood Center
3705 Earl Street
Macon, GA 31204

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Butler Early Childhood Center",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.75588989,32.87966156),"
Carter Elementary School
5910 Zebulon Road
Macon, GA 31210

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Carter Elementary School",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.65580750,32.83608627),"
Central High School
2155 Napier Avenue
Macon, GA 31204

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Central High School",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.60054779,32.85956192),"
Danforth Primary School
1301 Shurling Drive
Macon, GA 31211

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Danforth Primary School",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.66924600,32.84715000),"
Georgia Academy For Blind
2895 Vineville Avenue
Macon, GA 31204

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Georgia Academy For Blind",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.66253662,32.82496643),"
Hamilton Elementary School
1870 Pio Nono Avenue
Macon, GA 31204

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Hamilton Elementary School",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.67932129,32.82213593),"
Hartley Elementary School
2230 Anthony Road
Macon, GA 31204

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Hartley Elementary School",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.68578339,32.72326660),"
Heard Elementary School
6515 Houston Road
Macon, GA 31216

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Heard Elementary School",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.75539398,32.84516144),"
Heritage Elementary School
6050 Thomaston Road
Macon, GA 31220

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Heritage Elementary School",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.77093500,32.90098900),"
Howard Middle School
6600 Forsyth Road
Macon, GA 31210

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Howard Middle School",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.60768890,32.85973740),"
Hunt/burdell Elementary School
990 Shurling Drive
Macon, GA 31211

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Hunt/burdell Elementary School",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.65176392,32.82013702),"
Ingram/pye Elementary School
855 Anthony Road
Macon, GA 31204

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Ingram/pye Elementary School",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.59649658,32.86531067),"
Jones Elementary School
2350 Alandale Drive
Macon, GA 31211

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Jones Elementary School",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.70227814,32.81200027),"
Joseph N. Neel Academy
2840 Hollis Road
Macon, GA 31206

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Joseph N. Neel Academy",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.69477844,32.89077377),"
Lane Elementary School
990 Newport Road
Macon, GA 31210

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lane Elementary School",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.68237500,32.89534500),"
Macon Behavior Health System
3500 Riverside Drive
Macon, GA 31210

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Macon Behavior Health System",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.55938300,32.82993000),"
Macon Regional Youth Detention Center
4156 Riggins Mill Road
Macon, GA 31201

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Macon Regional Youth Detention Center",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.55842100,32.82941500),"
Macon Youth Development Campus
4160 Riggins Mill Road
Macon, GA 31217

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Macon Youth Development Campus",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.60054779,32.85956192),"
Martin Luther King Elementary School
1307 Shurling Drive
Macon, GA 31211

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Martin Luther King Elementary School",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.67347717,32.80613708),"
Mcevoy Middle School
1751 Williamson Road
Macon, GA 31206

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Mcevoy Middle School",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.68555300,32.86305900),"
Middle Georgia Psychoeducational Program
3769 Ridge Avenue
Macon, GA 31204

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Middle Georgia Psychoeducational Program",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.65676117,32.84019089),"
Miller Magnet Middle School
751 Hendley Street
Macon, GA 31204

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Miller Magnet Middle School",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.71356201,32.81386185),"
Morgan Elementary School
4901 Faubus Road
Macon, GA 31204

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Morgan Elementary School",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.71356201,32.81386185),"
Morgan Magnet School
4901 Faubus Avenue
Macon, GA 31206

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Morgan Magnet School",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.61948395,32.86699295),"
Northeast High School
1646 Upper River Road
Macon, GA 31211

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Northeast High School",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.69373322,32.73764420),"
Porter Elementary School
5802 School Road
Macon, GA 31216

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Porter Elementary School",'Macon=' + Macon.length); Lizella[Lizella.length] = createMarker(new GPoint(-83.81501770,32.80541229),"
Redding Elementary School
8062 Eisenhower Parkway
Lizella, GA 31052

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Redding Elementary School",'Lizella=' + Lizella.length); Macon[Macon.length] = createMarker(new GPoint(-83.70227814,32.81200027),"
Renaissance Academy
1065 Anthony Road
Macon, GA 31204

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Renaissance Academy",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.69279480,32.79585648),"
Rice Elementary School
3750 Jessie Rice Street
Macon, GA 31206

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Rice Elementary School",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.68995667,32.83406448),"
Riley Elementary School
3522 Greenbriar Road
Macon, GA 31204

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Riley Elementary School",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.70227814,32.81200027),"
Rutland High School
6250 Skipper Road
Macon, GA 31216

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Rutland High School",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.70227814,32.81200027),"
Rutland Middle School
6260 Skipper Road
Macon, GA 31206

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Rutland Middle School",'Macon=' + Macon.length); Lizella[Lizella.length] = createMarker(new GPoint(-83.76400757,32.74988174),"
Skyview Elementary School
5700 Fulton Mill Road
Lizella, GA 31052

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Skyview Elementary School",'Lizella=' + Lizella.length); Macon[Macon.length] = createMarker(new GPoint(-83.65820312,32.81992722),"
Southeast High School
1070 Anthony Road
Macon, GA 31204

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Southeast High School",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.67472839,32.80951691),"
Southwest High School
1730 Canterbury Road
Macon, GA 31206

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Southwest High School",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.71915436,32.90400314),"
Springdale Elementary School
4965 Northside Drive
Macon, GA 31210

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Springdale Elementary School",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.66213226,32.86782837),"
Taylor At Tinsley Elementary School
709 Pierce Avenue
Macon, GA 31204

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Taylor At Tinsley Elementary School",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.67812347,32.87696457),"
Taylor Elementary School
2976 Crestline Drive
Macon, GA 31204

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Taylor Elementary School",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.70227814,32.81200027),"
Teen Parent Center
456 Bay Street
Macon, GA 31201

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Teen Parent Center",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.72148895,32.83567047),"
Union Elementary School
4831 Mamie Carter Blvd.
Macon, GA 31210

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Union Elementary School",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.65534210,32.84519958),"
Vineville Academy
2260 Vineville Avenue
Macon, GA 31204

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Vineville Academy",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.74513245,32.82678223),"
Weaver Middle School
2570 Heath Road
Macon, GA 31206

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Weaver Middle School",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.65873718,32.79141235),"
Weir Elementary School
1180 Rocky Creek Road
Macon, GA 31206

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Weir Elementary School",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.74565887,32.81690979),"
Westside High School
2851 Heath Road
Macon, GA 31206

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Westside High School",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.64517975,32.85586929),"
William S. Hutchings Career Center
2004 Riverside Drive
Macon, GA 31204

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("William S. Hutchings Career Center",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.64659882,32.84527969),"
Williams Elementary School
325 Pursley Street
Macon, GA 31201

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Williams Elementary School",'Macon=' + Macon.length); Macon[Macon.length] = createMarker(new GPoint(-83.66180420,32.83482361),"
Winship Magnet School
2560 Beech Avenue
Macon, GA 31204

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Winship Magnet School",'Macon=' + Macon.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,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(Lizella); map.removeOverlays(Macon); 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(Macon);map.removeOverlays(Lizella); map.removeOverlays(Macon); map.addOverlays(Lizella); centerByArray(Lizella, false, false); cntMarker += Lizella.length; map.addOverlays(Macon); centerByArray(Macon, false, false); cntMarker += Macon.length; centerByArray(Macon,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'); } }