function addMarkers() { mySelect = document.getElementById('selection'); Hollywood = [];Hollywood[Hollywood.length] = createMarker(new GPoint(-80.22386932,26.02076721),"
Apollo Middle School
6800 Arthur Street
Hollywood, FL 33024

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Apollo Middle School",'Hollywood=' + Hollywood.length); Hollywood[Hollywood.length] = createMarker(new GPoint(-80.15184021,26.04196739),"
Attucks Middle School
3500 N 22nd Avenue
Hollywood, FL 33020

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Attucks Middle School",'Hollywood=' + Hollywood.length); Hollywood[Hollywood.length] = createMarker(new GPoint(-80.15523529,26.04448509),"
Bethune Mary M Elementary School
2400 Meade Street
Hollywood, FL 33020

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Bethune Mary M Elementary School",'Hollywood=' + Hollywood.length); Hollywood[Hollywood.length] = createMarker(new GPoint(-80.23217010,26.01686859),"
Boulevard Heights Elementary School
7201 Johnson Street
Hollywood, FL 33024

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Boulevard Heights Elementary School",'Hollywood=' + Hollywood.length); Hollywood[Hollywood.length] = createMarker(new GPoint(-80.16107178,25.99996758),"
Colbert Elementary School
2701 Plunkett Street
Hollywood, FL 33020

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Colbert Elementary School",'Hollywood=' + Hollywood.length); Hollywood[Hollywood.length] = createMarker(new GPoint(-80.22657013,26.03246689),"
Driftwood Elementary School
2700 Nw 69th Avenue
Hollywood, FL 33024

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Driftwood Elementary School",'Hollywood=' + Hollywood.length); Hollywood[Hollywood.length] = createMarker(new GPoint(-80.22967529,26.03370285),"
Driftwood Middle School
2751 Nw 70th Terrace
Hollywood, FL 33024

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Driftwood Middle School",'Hollywood=' + Hollywood.length); Hollywood[Hollywood.length] = createMarker(new GPoint(-80.24196700,26.03610200),"
Early Beginnings Academy West
7676 Davie Rd Ext
Hollywood, FL 33024

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Early Beginnings Academy West",'Hollywood=' + Hollywood.length); Hollywood[Hollywood.length] = createMarker(new GPoint(-80.29236603,26.03170395),"
Embassy Creek Elementary School
10905 Se Lake Boulevard
Hollywood, FL 33026

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Embassy Creek Elementary School",'Hollywood=' + Hollywood.length); Hollywood[Hollywood.length] = createMarker(new GPoint(-80.14164200,26.01715700),"
Florida Intercultural Academy
1704 Buchanan St
Hollywood, FL 33020

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Florida Intercultural Academy",'Hollywood=' + Hollywood.length); Hollywood[Hollywood.length] = createMarker(new GPoint(-80.14123000,26.01068300),"
Hollywood Academy Of Arts & Science
1720 Harrison Street
Hollywood, FL 33020

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Hollywood Academy Of Arts & Science",'Hollywood=' + Hollywood.length); Hollywood[Hollywood.length] = createMarker(new GPoint(-80.16008400,26.01040300),"
Hollywood Academy Of Arts And Science Middle Schoo
1720 Harrison St
Hollywood, FL 33020

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Hollywood Academy Of Arts And Science Middle Schoo",'Hollywood=' + Hollywood.length); Hollywood[Hollywood.length] = createMarker(new GPoint(-80.14116669,26.00796890),"
Hollywood Central Elementary School
1700 Monroe Street
Hollywood, FL 33020

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Hollywood Central Elementary School",'Hollywood=' + Hollywood.length); Hollywood[Hollywood.length] = createMarker(new GPoint(-80.17926788,26.02516747),"
Hollywood Hills Elementary School
3501 Taft Street
Hollywood, FL 33021

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Hollywood Hills Elementary School",'Hollywood=' + Hollywood.length); Hollywood[Hollywood.length] = createMarker(new GPoint(-80.19922638,26.04678154),"
Hollywood Hills High School
5400 Stirling Road
Hollywood, FL 33021

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Hollywood Hills High School",'Hollywood=' + Hollywood.length); Hollywood[Hollywood.length] = createMarker(new GPoint(-80.22766876,26.01706886),"
Hollywood Park Elementary School
901 N 69 Way
Hollywood, FL 33024

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Hollywood Park Elementary School",'Hollywood=' + Hollywood.length); Hollywood[Hollywood.length] = createMarker(new GPoint(-80.21901703,26.00986862),"
Mcarthur High School
6501 Hollywood Boulevard
Hollywood, FL 33024

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mcarthur High School",'Hollywood=' + Hollywood.length); Hollywood[Hollywood.length] = createMarker(new GPoint(-80.16086578,25.99734879),"
Mcnicol Middle School
1602 S 27th Avenue
Hollywood, FL 33020

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Mcnicol Middle School",'Hollywood=' + Hollywood.length); Hollywood[Hollywood.length] = createMarker(new GPoint(-80.16316986,26.02402496),"
Oakridge Elementary School
1507 N 28th Avenue
Hollywood, FL 33020

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Oakridge Elementary School",'Hollywood=' + Hollywood.length); Hollywood[Hollywood.length] = createMarker(new GPoint(-80.18987274,26.00461006),"
Orange Brook Elementary School
715 S 46th Avenue
Hollywood, FL 33021

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Orange Brook Elementary School",'Hollywood=' + Hollywood.length); Hollywood[Hollywood.length] = createMarker(new GPoint(-80.15137100,26.01627100),"
Paragon Academy Of Technology
2210 Pierce Street
Hollywood, FL 33020

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Paragon Academy Of Technology",'Hollywood=' + Hollywood.length); Hollywood[Hollywood.length] = createMarker(new GPoint(-80.21782684,26.03926659),"
Quest Center
6401 Charleston Street
Hollywood, FL 33024

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Quest Center",'Hollywood=' + Hollywood.length); Hollywood[Hollywood.length] = createMarker(new GPoint(-80.19572449,26.03063583),"
Sheridan Hills Elementary School
5001 Thomas Street
Hollywood, FL 33021

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Sheridan Hills Elementary School",'Hollywood=' + Hollywood.length); Hollywood[Hollywood.length] = createMarker(new GPoint(-80.22917175,26.01696777),"
Sheridan Park Elementary School
2310 N 70th Terrace
Hollywood, FL 33024

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Sheridan Park Elementary School",'Hollywood=' + Hollywood.length); Hollywood[Hollywood.length] = createMarker(new GPoint(-80.19847870,26.03246689),"
Sheridan Technical Center
5400 Sheridan Street
Hollywood, FL 33021

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sheridan Technical Center",'Hollywood=' + Hollywood.length); Hollywood[Hollywood.length] = createMarker(new GPoint(-80.14356995,26.02816772),"
South Broward High School
1901 N Federal Highway
Hollywood, FL 33020

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("South Broward High School",'Hollywood=' + Hollywood.length); Hollywood[Hollywood.length] = createMarker(new GPoint(-80.19966888,26.04676628),"
Stirling Elementary School
5500 Stirling Road
Hollywood, FL 33021

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Stirling Elementary School",'Hollywood=' + Hollywood.length); Hollywood[Hollywood.length] = createMarker(new GPoint(-80.21376801,26.01016808),"
West Hollywood Elementary School
6301 Hollywood Boulevard
Hollywood, FL 33024

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