function addMarkers() { mySelect = document.getElementById('selection'); Valparaiso = [];Crestview = [];Fort_Walton_Beach = [];Baker = [];Niceville = [];Eglin_Afb = [];Shalimar = [];Destin = [];Ft_Walton = [];Mary_Esther = [];Laurel_Hill = [];mySelect.options[mySelect.options.length] = new Option("Baker schools",'all=Baker'); mySelect.options[mySelect.options.length] = new Option("Crestview schools",'all=Crestview'); mySelect.options[mySelect.options.length] = new Option("Destin schools",'all=Destin'); mySelect.options[mySelect.options.length] = new Option("Eglin Afb schools",'all=Eglin_Afb'); mySelect.options[mySelect.options.length] = new Option("Fort Walton Beach schools",'all=Fort_Walton_Beach'); mySelect.options[mySelect.options.length] = new Option("Ft Walton schools",'all=Ft_Walton'); mySelect.options[mySelect.options.length] = new Option("Laurel Hill schools",'all=Laurel_Hill'); mySelect.options[mySelect.options.length] = new Option("Mary Esther schools",'all=Mary_Esther'); mySelect.options[mySelect.options.length] = new Option("Niceville schools",'all=Niceville'); mySelect.options[mySelect.options.length] = new Option("Shalimar schools",'all=Shalimar'); mySelect.options[mySelect.options.length] = new Option("Valparaiso schools",'all=Valparaiso'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Valparaiso[Valparaiso.length] = createMarker(new GPoint(-86.48999023,30.49356270),"
Addie R. Lewis Middle School
281 Mississippi Avenue
Valparaiso, FL 32580

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Addie R. Lewis Middle School",'Valparaiso=' + Valparaiso.length); Crestview[Crestview.length] = createMarker(new GPoint(-86.52940369,30.69650078),"
Adjudicated Youth Facility
4448 Straight Line Road
Crestview, FL 32539

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Adjudicated Youth Facility",'Crestview=' + Crestview.length); Fort_Walton_Beach[Fort_Walton_Beach.length] = createMarker(new GPoint(-86.63194275,30.45352936),"
Adolescent Substance Abuse
1015 Mar Walt Drive
Fort Walton Beach, FL 32547

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Adolescent Substance Abuse",'Fort_Walton_Beach=' + Fort_Walton_Beach.length); Fort_Walton_Beach[Fort_Walton_Beach.length] = createMarker(new GPoint(-86.63913727,30.41388893),"
Annette P. Edwins Elementary School
7 Wright Parkway Sw
Fort Walton Beach, FL 32548

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Annette P. Edwins Elementary School",'Fort_Walton_Beach=' + Fort_Walton_Beach.length); Crestview[Crestview.length] = createMarker(new GPoint(-86.61479950,30.71372795),"
Antioch Elementary School
4700 Whitehurst Lane
Crestview, FL 32536

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Antioch Elementary School",'Crestview=' + Crestview.length); Baker[Baker.length] = createMarker(new GPoint(-86.67937469,30.79336929),"
Baker School
1369 14th Street
Baker, FL 32531

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Baker School",'Baker=' + Baker.length); Niceville[Niceville.length] = createMarker(new GPoint(-86.41822815,30.48968124),"
Bluewater Elementary School
4545 Range Road
Niceville, FL 32578

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Bluewater Elementary School",'Niceville=' + Niceville.length); Crestview[Crestview.length] = createMarker(new GPoint(-86.57598700,30.78051200),"
Bob Sikes Elementary School
425 Adams Drive
Crestview, FL 32536

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Bob Sikes Elementary School",'Crestview=' + Crestview.length); Niceville[Niceville.length] = createMarker(new GPoint(-86.47566223,30.52309036),"
C. W. Ruckel Middle School
201 North Partin Drive
Niceville, FL 32578

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("C. W. Ruckel Middle School",'Niceville=' + Niceville.length); Eglin_Afb[Eglin_Afb.length] = createMarker(new GPoint(-86.55232239,30.46413994),"
Cherokee Elementary School
2850 Gaffney Road
Eglin Afb, FL 32542

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Cherokee Elementary School",'Eglin_Afb=' + Eglin_Afb.length); Fort_Walton_Beach[Fort_Walton_Beach.length] = createMarker(new GPoint(-86.61466900,30.40420000),"
Choctawatchee Academy
110 Racetrack Road Nw
Fort Walton Beach, FL 32548

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Choctawatchee Academy",'Fort_Walton_Beach=' + Fort_Walton_Beach.length); Fort_Walton_Beach[Fort_Walton_Beach.length] = createMarker(new GPoint(-86.61863708,30.44933701),"
Choctawhatchee Senior High School
110 Racetrack Road, Nw
Fort Walton Beach, FL 32547

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Choctawhatchee Senior High School",'Fort_Walton_Beach=' + Fort_Walton_Beach.length); Shalimar[Shalimar.length] = createMarker(new GPoint(-86.57868195,30.44826317),"
Clifford Meigs Middle School
150 Richbourg Avenue
Shalimar, FL 32579

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Clifford Meigs Middle School",'Shalimar=' + Shalimar.length); Crestview[Crestview.length] = createMarker(new GPoint(-86.55915833,30.78805161),"
Crestview Senior High School
1250 N Ferdon Boulevard
Crestview, FL 32536

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Crestview Senior High School",'Crestview=' + Crestview.length); Crestview[Crestview.length] = createMarker(new GPoint(-86.55915833,30.78805161),"
Crestview Vocational-technical Center
1250 N Ferdon Boulevard
Crestview, FL 32536

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Crestview Vocational-technical Center",'Crestview=' + Crestview.length); Crestview[Crestview.length] = createMarker(new GPoint(-86.57077789,30.76164055),"
Crestview Vocational-technical Center (inactive 8
1304 N. Ferndon Boulevard
Crestview, FL 32536

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Crestview Vocational-technical Center (inactive 8",'Crestview=' + Crestview.length); Crestview[Crestview.length] = createMarker(new GPoint(-86.56094360,30.79478645),"
Davidson Middle School
6261 Old Bethel Road
Crestview, FL 32536

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Davidson Middle School",'Crestview=' + Crestview.length); Destin[Destin.length] = createMarker(new GPoint(-86.49152374,30.40216255),"
Destin Elementary School
630 Kelly Street
Destin, FL 32541

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Destin Elementary School",'Destin=' + Destin.length); Destin[Destin.length] = createMarker(new GPoint(-86.42242432,30.39682961),"
Destin Middle School/regatta Bay
689 Regatta Bay Boulevard
Destin, FL 32541

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Destin Middle School/regatta Bay",'Destin=' + Destin.length); Fort_Walton_Beach[Fort_Walton_Beach.length] = createMarker(new GPoint(-86.59751892,30.41992188),"
Elliott Point Elementary School
301 Hughes Avenue
Fort Walton Beach, FL 32548

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Elliott Point Elementary School",'Fort_Walton_Beach=' + Fort_Walton_Beach.length); Crestview[Crestview.length] = createMarker(new GPoint(-86.57152900,30.75003100),"
Emerald Coast Career Institute N
461 W School Ave
Crestview, FL 32536

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Emerald Coast Career Institute N",'Crestview=' + Crestview.length); Ft_Walton[Ft_Walton.length] = createMarker(new GPoint(-86.66778700,30.42454300),"
Emerald Coast Career Institute S
720 Love Joy Rd
Ft. Walton, FL 32548

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Emerald Coast Career Institute S",'Ft_Walton=' + Ft_Walton.length); Fort_Walton_Beach[Fort_Walton_Beach.length] = createMarker(new GPoint(-86.60591888,30.41043663),"
Emerald Coast Marine Institute
207 4th Street
Fort Walton Beach, FL 32548

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Emerald Coast Marine Institute",'Fort_Walton_Beach=' + Fort_Walton_Beach.length); Fort_Walton_Beach[Fort_Walton_Beach.length] = createMarker(new GPoint(-86.60646057,30.40645599),"
Exceptional Student Education (ina
120 Lowery Place, S.e.
Fort Walton Beach, FL 32548

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Exceptional Student Education (ina",'Fort_Walton_Beach=' + Fort_Walton_Beach.length); Mary_Esther[Mary_Esther.length] = createMarker(new GPoint(-86.72837830,30.41223717),"
Florosa Elementary School
1700 Highway 98 West
Mary Esther, FL 32569

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Florosa Elementary School",'Mary_Esther=' + Mary_Esther.length); Fort_Walton_Beach[Fort_Walton_Beach.length] = createMarker(new GPoint(-86.63945770,30.41296387),"
Fort Walton Beach High School
400 Hollywood Boulevard S
Fort Walton Beach, FL 32548

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Fort Walton Beach High School",'Fort_Walton_Beach=' + Fort_Walton_Beach.length); Fort_Walton_Beach[Fort_Walton_Beach.length] = createMarker(new GPoint(-86.63945770,30.41296387),"
Fort Walton Beach Success Academy (formerly Ft. W
400 Hollywood Blvd., Sw
Fort Walton Beach, FL 32548

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Fort Walton Beach Success Academy (formerly Ft. W",'Fort_Walton_Beach=' + Fort_Walton_Beach.length); Crestview[Crestview.length] = createMarker(new GPoint(-86.57150269,30.74986267),"
Gulf Coast Residential Care
461 School Avenue
Crestview, FL 32536

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Gulf Coast Residential Care",'Crestview=' + Crestview.length); Crestview[Crestview.length] = createMarker(new GPoint(-86.52940369,30.69650078),"
Gulf Coast Youth Academy
4448 Straight Line Road
Crestview, FL 32539

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Gulf Coast Youth Academy",'Crestview=' + Crestview.length); Niceville[Niceville.length] = createMarker(new GPoint(-86.46158600,30.51433754),"
James E. Plew Elementary School
220 Pine Avenue
Niceville, FL 32578

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("James E. Plew Elementary School",'Niceville=' + Niceville.length); Fort_Walton_Beach[Fort_Walton_Beach.length] = createMarker(new GPoint(-86.60916901,30.45801163),"
Kenwood Elementary School
15 Eagle Street, Ne
Fort Walton Beach, FL 32547

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Kenwood Elementary School",'Fort_Walton_Beach=' + Fort_Walton_Beach.length); Crestview[Crestview.length] = createMarker(new GPoint(-86.56893921,30.77013779),"
Lance C. Richbourg Middle School
500 Alabama Avenue
Crestview, FL 32536

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Lance C. Richbourg Middle School",'Crestview=' + Crestview.length); Laurel_Hill[Laurel_Hill.length] = createMarker(new GPoint(-86.46186066,30.95935822),"
Laurel Hill School
8078 4th Street
Laurel Hill, FL 32567

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Laurel Hill School",'Laurel_Hill=' + Laurel_Hill.length); Fort_Walton_Beach[Fort_Walton_Beach.length] = createMarker(new GPoint(-86.65173340,30.42175484),"
Liza Jackson Preparatory School
546 Mary Esther Cut Off
Fort Walton Beach, FL 32548

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Liza Jackson Preparatory School",'Fort_Walton_Beach=' + Fort_Walton_Beach.length); Shalimar[Shalimar.length] = createMarker(new GPoint(-86.58177948,30.46084023),"
Longwood Elementary School
50 Holly Avenue
Shalimar, FL 32579

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Longwood Elementary School",'Shalimar=' + Shalimar.length); Niceville[Niceville.length] = createMarker(new GPoint(-86.49342346,30.52662468),"
Lula J. Edge Elementary School
300 N Highway 85
Niceville, FL 32578

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lula J. Edge Elementary School",'Niceville=' + Niceville.length); Mary_Esther[Mary_Esther.length] = createMarker(new GPoint(-86.65818024,30.40968895),"
Mary Esther Elementary School
320 Miracle Strip Parkway
Mary Esther, FL 32569

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Mary Esther Elementary School",'Mary_Esther=' + Mary_Esther.length); Fort_Walton_Beach[Fort_Walton_Beach.length] = createMarker(new GPoint(-86.63352203,30.42006302),"
Max Bruner, Junior Middle School
322 Holmes Boulevard, Nw
Fort Walton Beach, FL 32548

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Max Bruner, Junior Middle School",'Fort_Walton_Beach=' + Fort_Walton_Beach.length); Niceville[Niceville.length] = createMarker(new GPoint(-86.47800446,30.51882172),"
Niceville Senior High School
800 E John Sims Parkway
Niceville, FL 32578

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Niceville Senior High School",'Niceville=' + Niceville.length); Crestview[Crestview.length] = createMarker(new GPoint(-86.57102400,30.76183000),"
North Okaloosa Institute
1250 N Ferdon Blvd
Crestview, FL 32536

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("North Okaloosa Institute",'Crestview=' + Crestview.length); Crestview[Crestview.length] = createMarker(new GPoint(-86.56894684,30.76884842),"
Northwood Elementary School
501 4th Avenue Nw
Crestview, FL 32536

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Northwood Elementary School",'Crestview=' + Crestview.length); Fort_Walton_Beach[Fort_Walton_Beach.length] = createMarker(new GPoint(-86.60144043,30.40683746),"
Nw Florida Ballet Academie Elementary School
310 Perry Avenue S.e.
Fort Walton Beach, FL 32548

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Nw Florida Ballet Academie Elementary School",'Fort_Walton_Beach=' + Fort_Walton_Beach.length); Eglin_Afb[Eglin_Afb.length] = createMarker(new GPoint(-86.53749847,30.47125244),"
Oak Hill Elementary School
101 Chinquapin Drive
Eglin Afb, FL 32542

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Oak Hill Elementary School",'Eglin_Afb=' + Eglin_Afb.length); Fort_Walton_Beach[Fort_Walton_Beach.length] = createMarker(new GPoint(-86.60916138,30.44525146),"
Ocean City Elementary School
720 Essex Road
Fort Walton Beach, FL 32547

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Ocean City Elementary School",'Fort_Walton_Beach=' + Fort_Walton_Beach.length); Fort_Walton_Beach[Fort_Walton_Beach.length] = createMarker(new GPoint(-86.62544250,30.46576118),"
Okaloosa Academy
81 Roberts Boulevard
Fort Walton Beach, FL 32548

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Okaloosa Academy",'Fort_Walton_Beach=' + Fort_Walton_Beach.length); Fort_Walton_Beach[Fort_Walton_Beach.length] = createMarker(new GPoint(-86.61411285,30.46735764),"
Okaloosa Applied Technical Center
1976 Lewis Turner Bouleva
Fort Walton Beach, FL 32547

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Okaloosa Applied Technical Center",'Fort_Walton_Beach=' + Fort_Walton_Beach.length); Fort_Walton_Beach[Fort_Walton_Beach.length] = createMarker(new GPoint(-86.61466900,30.40420000),"
Okaloosa County Superintendent's Office
9120 Lowery Place, Se
Fort Walton Beach, FL 32548

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Okaloosa County Superintendent's Office",'Fort_Walton_Beach=' + Fort_Walton_Beach.length); Crestview[Crestview.length] = createMarker(new GPoint(-86.52940369,30.69650078),"
Okaloosa Regional Detention Center
4448 Straight Line Road
Crestview, FL 32539

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Okaloosa Regional Detention Center",'Crestview=' + Crestview.length); Crestview[Crestview.length] = createMarker(new GPoint(-86.52940369,30.69650078),"
Okaloosa Youth Academy
4448 Straight Line Road
Crestview, FL 32539

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Okaloosa Youth Academy",'Crestview=' + Crestview.length); Crestview[Crestview.length] = createMarker(new GPoint(-86.52940369,30.69650078),"
Okaloosa Youth Development Center
4448 Straight Line Road
Crestview, FL 32539

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Okaloosa Youth Development Center",'Crestview=' + Crestview.length); Niceville[Niceville.length] = createMarker(new GPoint(-86.47343000,30.53472600),"
Owcc Collegiate Charter High School
100 College Boulevard
Niceville, FL 32578

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Owcc Collegiate Charter High School",'Niceville=' + Niceville.length); Shalimar[Shalimar.length] = createMarker(new GPoint(-86.57517242,30.44944191),"
Shalimar Elementary School
1350 Joe Martin Circle
Shalimar, FL 32579

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Shalimar Elementary School",'Shalimar=' + Shalimar.length); Fort_Walton_Beach[Fort_Walton_Beach.length] = createMarker(new GPoint(-86.63756561,30.42043686),"
Silver Sands-excep. Children
349 Holmes Boulevard, Nw
Fort Walton Beach, FL 32548

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Silver Sands-excep. Children",'Fort_Walton_Beach=' + Fort_Walton_Beach.length); Crestview[Crestview.length] = createMarker(new GPoint(-86.56437683,30.75381660),"
Southside Elementary School
650 S Pearl Street
Crestview, FL 32539

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Southside Elementary School",'Crestview=' + Crestview.length); Valparaiso[Valparaiso.length] = createMarker(new GPoint(-86.50256300,30.51301500),"
Valparaiso Elementary School
379 Edge Avenue
Valparaiso, FL 32580

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Valparaiso Elementary School",'Valparaiso=' + Valparaiso.length); Fort_Walton_Beach[Fort_Walton_Beach.length] = createMarker(new GPoint(-86.62186432,30.44897079),"
W. C. Pryor Middle School
201 Racetrack Road Nw
Fort Walton Beach, FL 32547

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("W. C. Pryor Middle School",'Fort_Walton_Beach=' + Fort_Walton_Beach.length); Fort_Walton_Beach[Fort_Walton_Beach.length] = createMarker(new GPoint(-86.66779327,30.42436218),"
W. E. Combs School
720 Lovejoy Road, Nw
Fort Walton Beach, FL 32548

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("W. E. Combs School",'Fort_Walton_Beach=' + Fort_Walton_Beach.length); Crestview[Crestview.length] = createMarker(new GPoint(-86.54348755,30.77269363),"
Walker Elementary School
2988 Stillwell Boulevard
Crestview, FL 32539

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Walker Elementary School",'Crestview=' + Crestview.length); Fort_Walton_Beach[Fort_Walton_Beach.length] = createMarker(new GPoint(-86.63130188,30.43633652),"
Wright Elementary School
305 Lang Road
Fort Walton Beach, FL 32547

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Wright Elementary School",'Fort_Walton_Beach=' + Fort_Walton_Beach.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(Baker); map.removeOverlays(Crestview); map.removeOverlays(Destin); map.removeOverlays(Eglin_Afb); map.removeOverlays(Fort_Walton_Beach); map.removeOverlays(Ft_Walton); map.removeOverlays(Laurel_Hill); map.removeOverlays(Mary_Esther); map.removeOverlays(Niceville); map.removeOverlays(Shalimar); map.removeOverlays(Valparaiso); 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(Valparaiso);map.removeOverlays(Baker); map.removeOverlays(Crestview); map.removeOverlays(Destin); map.removeOverlays(Eglin_Afb); map.removeOverlays(Fort_Walton_Beach); map.removeOverlays(Ft_Walton); map.removeOverlays(Laurel_Hill); map.removeOverlays(Mary_Esther); map.removeOverlays(Niceville); map.removeOverlays(Shalimar); map.removeOverlays(Valparaiso); map.addOverlays(Baker); centerByArray(Baker, false, false); cntMarker += Baker.length; map.addOverlays(Crestview); centerByArray(Crestview, false, false); cntMarker += Crestview.length; map.addOverlays(Destin); centerByArray(Destin, false, false); cntMarker += Destin.length; map.addOverlays(Eglin_Afb); centerByArray(Eglin_Afb, false, false); cntMarker += Eglin_Afb.length; map.addOverlays(Fort_Walton_Beach); centerByArray(Fort_Walton_Beach, false, false); cntMarker += Fort_Walton_Beach.length; map.addOverlays(Ft_Walton); centerByArray(Ft_Walton, false, false); cntMarker += Ft_Walton.length; map.addOverlays(Laurel_Hill); centerByArray(Laurel_Hill, false, false); cntMarker += Laurel_Hill.length; map.addOverlays(Mary_Esther); centerByArray(Mary_Esther, false, false); cntMarker += Mary_Esther.length; map.addOverlays(Niceville); centerByArray(Niceville, false, false); cntMarker += Niceville.length; map.addOverlays(Shalimar); centerByArray(Shalimar, false, false); cntMarker += Shalimar.length; map.addOverlays(Valparaiso); centerByArray(Valparaiso, false, false); cntMarker += Valparaiso.length; centerByArray(Valparaiso,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'); } }