function addMarkers() { mySelect = document.getElementById('selection'); Burbank = [];Burbank[Burbank.length] = createMarker(new GPoint(-118.35166931,34.18096161),"
Burbank (luther) Middle School
3700 West Jeffries Ave.
Burbank, CA 91505

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Burbank (luther) Middle School",'Burbank=' + Burbank.length); Burbank[Burbank.length] = createMarker(new GPoint(-118.31492615,34.18761444),"
Burbank High School
902 North Third St.
Burbank, CA 91502

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Burbank High School",'Burbank=' + Burbank.length); Burbank[Burbank.length] = createMarker(new GPoint(-118.33073425,34.16389847),"
Burbank Usd Community Day
223 East Santa Anita.
Burbank, CA 91502

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Burbank Usd Community Day",'Burbank=' + Burbank.length); Burbank[Burbank.length] = createMarker(new GPoint(-118.32721710,34.17036057),"
Burroughs High School
1920 Clark Ave.
Burbank, CA 91506

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Burroughs High School",'Burbank=' + Burbank.length); Burbank[Burbank.length] = createMarker(new GPoint(-118.32031250,34.17367935),"
Disney (walt) Elementary School
1220 West Orange Grove Ave.
Burbank, CA 91506

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Disney (walt) Elementary School",'Burbank=' + Burbank.length); Burbank[Burbank.length] = createMarker(new GPoint(-118.33336639,34.17840195),"
Edison (thomas) Elementary School
2110 West Chestnut St.
Burbank, CA 91506

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Edison (thomas) Elementary School",'Burbank=' + Burbank.length); Burbank[Burbank.length] = createMarker(new GPoint(-118.30715179,34.19037628),"
Emerson (ralph) Elementary School
720 East Cypress Ave.
Burbank, CA 91501

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Emerson (ralph) Elementary School",'Burbank=' + Burbank.length); Burbank[Burbank.length] = createMarker(new GPoint(-118.34607697,34.18088150),"
Harte (bret) Elementary School
3200 West Jeffries Ave.
Burbank, CA 91505

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Harte (bret) Elementary School",'Burbank=' + Burbank.length); Burbank[Burbank.length] = createMarker(new GPoint(-118.33291626,34.21623993),"
Jefferson (thomas) Elementary School
1900 North Sixth St.
Burbank, CA 91504

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Jefferson (thomas) Elementary School",'Burbank=' + Burbank.length); Burbank[Burbank.length] = createMarker(new GPoint(-118.31722260,34.16530991),"
Jordan (david Starr) Middle School
420 South Mariposa St.
Burbank, CA 91506

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Jordan (david Starr) Middle School",'Burbank=' + Burbank.length); Burbank[Burbank.length] = createMarker(new GPoint(-118.34372711,34.16560364),"
Magnolia Park (special Ed)
827 Avon St.
Burbank, CA 91505

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Magnolia Park (special Ed)",'Burbank=' + Burbank.length); Burbank[Burbank.length] = createMarker(new GPoint(-118.30986786,34.16680145),"
Mckinley (william) Elementary School
349 West Valencia Ave.
Burbank, CA 91506

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Mckinley (william) Elementary School",'Burbank=' + Burbank.length); Burbank[Burbank.length] = createMarker(new GPoint(-118.29726410,34.18331909),"
Miller (joaquin) Elementary School
720 East Providencia Ave.
Burbank, CA 91501

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Miller (joaquin) Elementary School",'Burbank=' + Burbank.length); Burbank[Burbank.length] = createMarker(new GPoint(-118.33186340,34.18643570),"
Monterey High Continuation School
1915 Monterey Ave.
Burbank, CA 91506

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Monterey High Continuation School",'Burbank=' + Burbank.length); Burbank[Burbank.length] = createMarker(new GPoint(-118.31140900,34.19495392),"
Muir (john) Middle School
1111 North Kenneth Rd.
Burbank, CA 91504

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Muir (john) Middle School",'Burbank=' + Burbank.length); Burbank[Burbank.length] = createMarker(new GPoint(-118.13890076,34.14749908),"
Options For Youth-burbank Charter
1701 West Verdugo
Burbank, CA 91506

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Options For Youth-burbank Charter",'Burbank=' + Burbank.length); Burbank[Burbank.length] = createMarker(new GPoint(-118.34484100,34.18875885),"
Providencia Elementary School
1919 North Ontario St.
Burbank, CA 91505

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Providencia Elementary School",'Burbank=' + Burbank.length); Burbank[Burbank.length] = createMarker(new GPoint(-118.34460449,34.16577148),"
Roosevelt (theodore) Elementary School
850 North Cordova St.
Burbank, CA 91505

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Roosevelt (theodore) Elementary School",'Burbank=' + Burbank.length); Burbank[Burbank.length] = createMarker(new GPoint(-118.33843994,34.15891266),"
Stevenson (r.l.) Elementary School
3333 Oak St.
Burbank, CA 91505

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Stevenson (r.l.) Elementary School",'Burbank=' + Burbank.length); Burbank[Burbank.length] = createMarker(new GPoint(-118.33553314,34.19808578),"
Washington (george) Elementary School
2322 North Lincoln St.
Burbank, CA 91504

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