function addMarkers() { mySelect = document.getElementById('selection'); Jacksonville = [];Jacksonville[Jacksonville.length] = createMarker(new GPoint(-81.67539978,30.36538887),"
A. Philip Randolph Academies High School
1157 Golfair Boulevard
Jacksonville, FL 32209

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("A. Philip Randolph Academies High School",'Jacksonville=' + Jacksonville.length); Jacksonville[Jacksonville.length] = createMarker(new GPoint(-81.69998932,30.37736702),"
Carter G. Woodson Elementary School
2334 Butler Street
Jacksonville, FL 32209

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Carter G. Woodson Elementary School",'Jacksonville=' + Jacksonville.length); Jacksonville[Jacksonville.length] = createMarker(new GPoint(-81.66683960,30.34554863),"
Darnell Cookman Middle School
1701 N Davis Street
Jacksonville, FL 32209

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Darnell Cookman Middle School",'Jacksonville=' + Jacksonville.length); Jacksonville[Jacksonville.length] = createMarker(new GPoint(-81.70047760,30.35473633),"
Duval Halfway House
2335 W 18th Street P4
Jacksonville, FL 32209

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Duval Halfway House",'Jacksonville=' + Jacksonville.length); Jacksonville[Jacksonville.length] = createMarker(new GPoint(-81.68532562,30.33771515),"
Eugene J. Butler Middle School
900 Acorn Street
Jacksonville, FL 32209

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Eugene J. Butler Middle School",'Jacksonville=' + Jacksonville.length); Jacksonville[Jacksonville.length] = createMarker(new GPoint(-81.71082306,30.36955643),"
George Washington Carver Elementary School
2854 W 45th Street
Jacksonville, FL 32209

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("George Washington Carver Elementary School",'Jacksonville=' + Jacksonville.length); Jacksonville[Jacksonville.length] = createMarker(new GPoint(-81.70047760,30.35473633),"
Grand Park Career Center
2335 W 18th Street
Jacksonville, FL 32209

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Grand Park Career Center",'Jacksonville=' + Jacksonville.length); Jacksonville[Jacksonville.length] = createMarker(new GPoint(-81.68721771,30.34826279),"
James Weldon Johnson Middle School
1840 W 9th Street
Jacksonville, FL 32209

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("James Weldon Johnson Middle School",'Jacksonville=' + Jacksonville.length); Jacksonville[Jacksonville.length] = createMarker(new GPoint(-81.67076111,30.33899689),"
John E. Ford Elementary School
1137 Cleveland Street
Jacksonville, FL 32209

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("John E. Ford Elementary School",'Jacksonville=' + Jacksonville.length); Jacksonville[Jacksonville.length] = createMarker(new GPoint(-81.67003632,30.34703255),"
Mt. Herman Ese Center
1741 Francis Street
Jacksonville, FL 32209

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mt. Herman Ese Center",'Jacksonville=' + Jacksonville.length); Jacksonville[Jacksonville.length] = createMarker(new GPoint(-81.69365692,30.37146378),"
Northwestern Middle School
2100 W 45th Street
Jacksonville, FL 32209

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Northwestern Middle School",'Jacksonville=' + Jacksonville.length); Jacksonville[Jacksonville.length] = createMarker(new GPoint(-81.70047760,30.35473633),"
Pretrial Detention Facility
2335 W 18th Street
Jacksonville, FL 32209

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Pretrial Detention Facility",'Jacksonville=' + Jacksonville.length); Jacksonville[Jacksonville.length] = createMarker(new GPoint(-81.69036865,30.35283661),"
R. V. Daniels Elementary School
1951 W 15th Street
Jacksonville, FL 32209

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("R. V. Daniels Elementary School",'Jacksonville=' + Jacksonville.length); Jacksonville[Jacksonville.length] = createMarker(new GPoint(-81.72720337,30.38007164),"
Rufus E. Payne Elementary School
6725 Hema Road
Jacksonville, FL 32209

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Rufus E. Payne Elementary School",'Jacksonville=' + Jacksonville.length); Jacksonville[Jacksonville.length] = createMarker(new GPoint(-81.68589783,30.37153244),"
Saint Clair Evans Academy
5443 Moncrief Road
Jacksonville, FL 32209

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Saint Clair Evans Academy",'Jacksonville=' + Jacksonville.length); Jacksonville[Jacksonville.length] = createMarker(new GPoint(-81.67210700,30.36531100),"
School Of Integrated Academics And Technology
4811 Payne Stewart Drive
Jacksonville, FL 32209

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("School Of Integrated Academics And Technology",'Jacksonville=' + Jacksonville.length); Jacksonville[Jacksonville.length] = createMarker(new GPoint(-81.68871307,30.33923912),"
Smart Pope Livingston Elementary School
1128 Barber Street
Jacksonville, FL 32209

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Smart Pope Livingston Elementary School",'Jacksonville=' + Jacksonville.length); Jacksonville[Jacksonville.length] = createMarker(new GPoint(-81.67271423,30.35153770),"
Stanton College Preparatory
1149 W 13th Street
Jacksonville, FL 32209

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Stanton College Preparatory",'Jacksonville=' + Jacksonville.length); Jacksonville[Jacksonville.length] = createMarker(new GPoint(-81.68914795,30.35143661),"
Susie E. Tolbert Elementary School
1925 W 13th Street
Jacksonville, FL 32209

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Susie E. Tolbert Elementary School",'Jacksonville=' + Jacksonville.length); Jacksonville[Jacksonville.length] = createMarker(new GPoint(-81.69520569,30.33728409),"
West Jacksonville Elementary School
2115 Commonwealth Avenue
Jacksonville, FL 32209

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("West Jacksonville Elementary School",'Jacksonville=' + Jacksonville.length); Jacksonville[Jacksonville.length] = createMarker(new GPoint(-81.70791626,30.38207054),"
William M. Raines High School
3663 Raines Avenue
Jacksonville, FL 32209

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("William M. Raines High School",'Jacksonville=' + Jacksonville.length); Jacksonville[Jacksonville.length] = createMarker(new GPoint(-81.70047760,30.35473633),"
Youth Development Center
2335 W 18th Street,p4
Jacksonville, FL 32209

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Youth Development Center",'Jacksonville=' + Jacksonville.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(Jacksonville); 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(Jacksonville);map.removeOverlays(Jacksonville); map.addOverlays(Jacksonville); centerByArray(Jacksonville, false, false); cntMarker += Jacksonville.length; centerByArray(Jacksonville,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'); } }