function addMarkers() { mySelect = document.getElementById('selection'); Savannah = [];Savannah[Savannah.length] = createMarker(new GPoint(-81.05608368,32.05889893),"
Adult Education
3609 Hopkins Street
Savannah, GA 31405

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Adult Education",'Savannah=' + Savannah.length); Savannah[Savannah.length] = createMarker(new GPoint(-81.11509705,31.99620056),"
Bartlett Middle School
207 Montgomery Crossroads
Savannah, GA 31406

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Bartlett Middle School",'Savannah=' + Savannah.length); Savannah[Savannah.length] = createMarker(new GPoint(-81.12616730,32.08600998),"
Bartow Elementary School
1804 Stratford Street
Savannah, GA 31401

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Bartow Elementary School",'Savannah=' + Savannah.length); Savannah[Savannah.length] = createMarker(new GPoint(-81.11560822,32.05352783),"
Beach High School
3001 Hopkins Street
Savannah, GA 31405

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Beach High School",'Savannah=' + Savannah.length); Savannah[Savannah.length] = createMarker(new GPoint(-81.12471008,32.06387711),"
Butler Elementary School
1909 Cynthia Street
Savannah, GA 31401

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Butler Elementary School",'Savannah=' + Savannah.length); Savannah[Savannah.length] = createMarker(new GPoint(-81.09722300,32.01114500),"
Chatham Community School
1149 Cornell Avenue
Savannah, GA 31406

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Chatham Community School",'Savannah=' + Savannah.length); Savannah[Savannah.length] = createMarker(new GPoint(-81.12515900,32.06302700),"
Coastal Georgia Comprehensive Academy
2001 Cynthia Street
Savannah, GA 31405

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Coastal Georgia Comprehensive Academy",'Savannah=' + Savannah.length); Savannah[Savannah.length] = createMarker(new GPoint(-81.00833893,32.03787613),"
Coastal Middle School
170 Whitemarsh Island Road
Savannah, GA 31410

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Coastal Middle School",'Savannah=' + Savannah.length); Savannah[Savannah.length] = createMarker(new GPoint(-81.11592200,32.04741100),"
Derenne Middle School
1009 Clinch Street
Savannah, GA 31405

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Derenne Middle School",'Savannah=' + Savannah.length); Savannah[Savannah.length] = createMarker(new GPoint(-81.08707428,32.07043839),"
East Broad Street Elementary School
400 East Broad Street
Savannah, GA 31401

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("East Broad Street Elementary School",'Savannah=' + Savannah.length); Savannah[Savannah.length] = createMarker(new GPoint(-81.09876251,32.04687500),"
Ellis Elementary School
220 East 49th Street
Savannah, GA 31405

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Ellis Elementary School",'Savannah=' + Savannah.length); Savannah[Savannah.length] = createMarker(new GPoint(-81.10569000,32.06776810),"
Gadsden Elementary School
919 May Street
Savannah, GA 31401

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Gadsden Elementary School",'Savannah=' + Savannah.length); Savannah[Savannah.length] = createMarker(new GPoint(-81.10325623,32.07492828),"
Garrison Elementary School
649 West Jones Street
Savannah, GA 31415

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Garrison Elementary School",'Savannah=' + Savannah.length); Savannah[Savannah.length] = createMarker(new GPoint(-81.22746277,31.97261047),"
Georgetown Elementary School
1516 King George Boulevard
Savannah, GA 31419

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Georgetown Elementary School",'Savannah=' + Savannah.length); Savannah[Savannah.length] = createMarker(new GPoint(-81.18536377,32.04695129),"
Gould Elementary School
4910 Pineland Drive
Savannah, GA 31405

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Gould Elementary School",'Savannah=' + Savannah.length); Savannah[Savannah.length] = createMarker(new GPoint(-81.12272644,32.03578949),"
Haven Elementary School
5111 Dillion Avenue
Savannah, GA 31405

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Haven Elementary School",'Savannah=' + Savannah.length); Savannah[Savannah.length] = createMarker(new GPoint(-81.10343933,32.01766968),"
Heard Elementary School
414 Lee Boulevard
Savannah, GA 31405

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Heard Elementary School",'Savannah=' + Savannah.length); Savannah[Savannah.length] = createMarker(new GPoint(-81.10551453,31.97762489),"
Hesse Elementary School
9116 Whitfield Avenue
Savannah, GA 31406

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Hesse Elementary School",'Savannah=' + Savannah.length); Savannah[Savannah.length] = createMarker(new GPoint(-81.11490631,32.05580521),"
Hodge Elementary School
1101 West Victory Drive
Savannah, GA 31401

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Hodge Elementary School",'Savannah=' + Savannah.length); Savannah[Savannah.length] = createMarker(new GPoint(-80.98481750,32.01066589),"
Howard Elementary School
115 Wilmington Island Road
Savannah, GA 31410

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Howard Elementary School",'Savannah=' + Savannah.length); Savannah[Savannah.length] = createMarker(new GPoint(-81.08500671,32.06507111),"
Hubert Middle School
768 Grant Street
Savannah, GA 31401

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Hubert Middle School",'Savannah=' + Savannah.length); Savannah[Savannah.length] = createMarker(new GPoint(-81.00616455,32.04386139),"
Islands Elementary School
4595 U.s. Highway 80 East
Savannah, GA 31410

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Islands Elementary School",'Savannah=' + Savannah.length); Savannah[Savannah.length] = createMarker(new GPoint(-81.06472778,31.97928429),"
Isle Of Hope Elementary School
100 Parkersburg Road
Savannah, GA 31406

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Isle Of Hope Elementary School",'Savannah=' + Savannah.length); Savannah[Savannah.length] = createMarker(new GPoint(-81.10240936,32.03695297),"
Jacob G. Smith Elementary School
210 Lamara Drive
Savannah, GA 31405

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Jacob G. Smith Elementary School",'Savannah=' + Savannah.length); Savannah[Savannah.length] = createMarker(new GPoint(-81.08229065,32.02128220),"
Jenkins High School
1800 East Derenne Avenue
Savannah, GA 31406

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Jenkins High School",'Savannah=' + Savannah.length); Savannah[Savannah.length] = createMarker(new GPoint(-81.06060791,32.03174973),"
Johnson High School
3012 Sunset Blvd
Savannah, GA 31404

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Johnson High School",'Savannah=' + Savannah.length); Savannah[Savannah.length] = createMarker(new GPoint(-81.13907623,31.99205399),"
Largo-tibet Elementary School
430 Tibet Avenue
Savannah, GA 31406

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Largo-tibet Elementary School",'Savannah=' + Savannah.length); Savannah[Savannah.length] = createMarker(new GPoint(-81.08100891,32.02399445),"
Low Elementary School
15 Blue Ridge Avenue
Savannah, GA 31404

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Low Elementary School",'Savannah=' + Savannah.length); Savannah[Savannah.length] = createMarker(new GPoint(-81.00952148,32.04015350),"
Marshpoint Elementary School
135 Whitemarsh Island Road.
Savannah, GA 31410

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Marshpoint Elementary School",'Savannah=' + Savannah.length); Savannah[Savannah.length] = createMarker(new GPoint(-81.07075500,32.03382111),"
Myers Middle School
2025 East 52nd Street
Savannah, GA 31404

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Myers Middle School",'Savannah=' + Savannah.length); Savannah[Savannah.length] = createMarker(new GPoint(-81.05608368,32.05889893),"
Oatland Island Elementary Intervention Program
711 Sandtown Road
Savannah, GA 31410

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Oatland Island Elementary Intervention Program",'Savannah=' + Savannah.length); Savannah[Savannah.length] = createMarker(new GPoint(-81.11309814,32.07367325),"
Oglethorpe Academy
707 Stiles Avenue
Savannah, GA 31401

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Oglethorpe Academy",'Savannah=' + Savannah.length); Savannah[Savannah.length] = createMarker(new GPoint(-81.11430359,32.03100586),"
Pulaski Elementary School
5330 Montgomery Street
Savannah, GA 31405

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Pulaski Elementary School",'Savannah=' + Savannah.length); Savannah[Savannah.length] = createMarker(new GPoint(-81.05608368,32.05889893),"
Riley Learning Center
1108 East Anderson Street
Savannah, GA 31404

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Riley Learning Center",'Savannah=' + Savannah.length); Savannah[Savannah.length] = createMarker(new GPoint(-81.09353638,32.04695892),"
Savannah Arts Academy
500 Washington Avenue
Savannah, GA 31405

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Savannah Arts Academy",'Savannah=' + Savannah.length); Savannah[Savannah.length] = createMarker(new GPoint(-81.05608368,32.05889893),"
Savannah Corporate Academies
10 East Broughton Street
Savannah, GA 31401

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Savannah Corporate Academies",'Savannah=' + Savannah.length); Savannah[Savannah.length] = createMarker(new GPoint(-81.05938721,32.06353378),"
Savannah High School
400 Pennsylvania Avenue
Savannah, GA 31404

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Savannah High School",'Savannah=' + Savannah.length); Savannah[Savannah.length] = createMarker(new GPoint(-81.16618700,32.06154700),"
Savannah Regional Youth Detention Center
191 Carl Griffin Drive
Savannah, GA 31405

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Savannah Regional Youth Detention Center",'Savannah=' + Savannah.length); Savannah[Savannah.length] = createMarker(new GPoint(-81.06600189,32.06247330),"
Shuman Middle School
415 Goebel Avenue
Savannah, GA 31404

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Shuman Middle School",'Savannah=' + Savannah.length); Savannah[Savannah.length] = createMarker(new GPoint(-81.26220703,31.99714851),"
Southwest Elementary School
6020 Ogeechee Road
Savannah, GA 31419

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Southwest Elementary School",'Savannah=' + Savannah.length); Savannah[Savannah.length] = createMarker(new GPoint(-81.26342010,31.99695396),"
Southwest Middle School
6030 Ogeechee Road
Savannah, GA 31419

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Southwest Middle School",'Savannah=' + Savannah.length); Savannah[Savannah.length] = createMarker(new GPoint(-81.07779694,32.06520081),"
Spencer Elementary School
Bouhan And Reirdon Streets
Savannah, GA 31404

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Spencer Elementary School",'Savannah=' + Savannah.length); Savannah[Savannah.length] = createMarker(new GPoint(-81.05608368,32.05889893),"
Tapp Program
101 Wheathill Road
Savannah, GA 31408

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Tapp Program",'Savannah=' + Savannah.length); Savannah[Savannah.length] = createMarker(new GPoint(-81.13991547,32.09576797),"
Tompkins Middle School
50 Market Street
Savannah, GA 31408

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Tompkins Middle School",'Savannah=' + Savannah.length); Savannah[Savannah.length] = createMarker(new GPoint(-81.12773895,31.99128342),"
White Bluff Elementary School
9902 White Bluff Road
Savannah, GA 31406

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("White Bluff Elementary School",'Savannah=' + Savannah.length); Savannah[Savannah.length] = createMarker(new GPoint(-81.05079651,32.06761932),"
Whitney Elementary School
2 Laura Street
Savannah, GA 31404

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Whitney Elementary School",'Savannah=' + Savannah.length); Savannah[Savannah.length] = createMarker(new GPoint(-81.14442444,31.97393608),"
Windsor Forest Elementary School
414 Briarcliff Road
Savannah, GA 31419

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Windsor Forest Elementary School",'Savannah=' + Savannah.length); Savannah[Savannah.length] = createMarker(new GPoint(-81.15074921,31.97675323),"
Windsor Forest High School
12419 Largo Drive
Savannah, GA 31419

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Windsor Forest High School",'Savannah=' + Savannah.length); map.removeOverlays(Savannah); setTimeout(function(){map.addOverlays(Savannah)},1000); maxLng = -80.98481750; maxLat = 32.09576797; minLng = -81.26342010; minLat = 31.97261047; 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(Savannah); 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(Savannah);map.removeOverlays(Savannah); map.addOverlays(Savannah); centerByArray(Savannah, false, false); cntMarker += Savannah.length; centerByArray(Savannah,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'); } }