function addMarkers() { mySelect = document.getElementById('selection'); Pensacola = [];Pensacola[Pensacola.length] = createMarker(new GPoint(-87.23334503,30.42445564),"
A. A. Dixon Elementary School (inact
1201 N H St
Pensacola, FL 32501

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("A. A. Dixon Elementary School (inact",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.18214417,30.42635536),"
A. K. Suter School
501 Pickens Avenue
Pensacola, FL 32503

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("A. K. Suter School",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.20407867,30.42376518),"
A. V. Clubbs Center (formerly N.b. C
1100 E Cervantes Street
Pensacola, FL 32501

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("A. V. Clubbs Center (formerly N.b. C",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.20407867,30.42376518),"
A. V. Clubbs Center (formerly N. B. Cook Elementary School
1100 E Cervantes St
Pensacola, FL 32501

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("A. V. Clubbs Center (formerly N. B. Cook Elementary School",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.24388885,30.41866302),"
Allie Yniestra Elementary School
2315 W Jackson Street
Pensacola, FL 32505

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Allie Yniestra Elementary School",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.30613708,30.46840668),"
Bellview Elementary School
4425 Bellview Avenue
Pensacola, FL 32526

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Bellview Elementary School",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.30253601,30.46372795),"
Bellview Middle School
6201 Mobile Highway
Pensacola, FL 32526

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Bellview Middle School",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.38116455,30.52816582),"
Beulah Academy Of Science
5805 Beulah Church Road
Pensacola, FL 32526

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Beulah Academy Of Science",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.35659027,30.50576973),"
Beulah Elementary School
6201 Helms Road
Pensacola, FL 32526

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Beulah Elementary School",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.35718536,30.38644409),"
Blue Angels Elementary School
1551 Dog Track Road
Pensacola, FL 32507

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Blue Angels Elementary School",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.24025726,30.46182823),"
Brentwood Elementary School
4820 N Palafox Street
Pensacola, FL 32505

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Brentwood Elementary School",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.24178314,30.48456764),"
Brentwood Middle School
201 Hancock Lane
Pensacola, FL 32503

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Brentwood Middle School",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.22530365,30.44948959),"
Brown Barge Middle School
151 E Fairfield Drive
Pensacola, FL 32503

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Brown Barge Middle School",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.25843811,30.43125725),"
Brownsville Middle School
3700 W Avery Street
Pensacola, FL 32505

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Brownsville Middle School",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.24250031,30.44081879),"
C. A. Weis Elementary School
2701 N Q Street
Pensacola, FL 32505

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("C. A. Weis Elementary School",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.28387800,30.43213200),"
Capstone Academy
4901 West Fairfield Drive
Pensacola, FL 32505

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Capstone Academy",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.19425964,30.46183395),"
Cordova Park Elementary School
2250 Semur Road
Pensacola, FL 32503

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Cordova Park Elementary School",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.20739900,30.45146000),"
County Administrative Annex
30 E Texar Drive
Pensacola, FL 32503

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("County Administrative Annex",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.23334503,30.42445564),"
Dixon Center
1201 N H Street
Pensacola, FL 32503

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Dixon Center",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.28467560,30.39293289),"
E Seal Center
216 Hawthorn Drive
Pensacola, FL 32507

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("E Seal Center",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.26844788,30.40609360),"
Edgewater Elementary School
100 Boeing Street
Pensacola, FL 32507

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Edgewater Elementary School",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.25014496,30.51784515),"
Ensley Elementary School
501 E Johnson Avenue
Pensacola, FL 32514

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Ensley Elementary School",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.36558533,30.32758522),"
Escambia Bay Marine Institute
10605 Gulf Beach Highway
Pensacola, FL 32507

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Escambia Bay Marine Institute",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.30007172,30.42675018),"
Escambia High School
1310 N 65th Avenue
Pensacola, FL 32506

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Escambia High School",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.23685455,30.44163704),"
Escambia Juvenile Detention
1800 St. Mary Avenue
Pensacola, FL 32501

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Escambia Juvenile Detention",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.22376251,30.44605255),"
Escambia School District Jail Program
30 E Texar Drive
Pensacola, FL 32503

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Escambia School District Jail Program",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.27014160,30.54956055),"
Escambia Westgate Center
10050 Ashton Brosnaham Dr
Pensacola, FL 32534

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Escambia Westgate Center",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.21787262,30.51388931),"
Ferry Pass Elementary School
8310 N Davis Highway
Pensacola, FL 32514

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Ferry Pass Elementary School",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.19712830,30.51274109),"
Ferry Pass Middle School
8355 Yancey Avenue
Pensacola, FL 32514

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Ferry Pass Middle School",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.23078156,30.41038132),"
George S. Hallmark Elementary School
115 South E Street
Pensacola, FL 32501

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("George S. Hallmark Elementary School",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.28985596,30.48644066),"
George Stone Area Vocational-technical Center
2400 Longleaf Dr
Pensacola, FL 32526

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("George Stone Area Vocational-technical Center",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.21208954,30.43224335),"
Gulf Coast High School (formerly Ac
1805 North 6th Avenue
Pensacola, FL 32503

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Gulf Coast High School (formerly Ac",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.40795135,30.34671593),"
Hellen Caro Elementary School
12551 Meadson Road
Pensacola, FL 32506

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Hellen Caro Elementary School",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.22376251,30.44605255),"
Hospital & Homebound
30 E Texar Drive
Pensacola, FL 32503

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Hospital & Homebound",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.20536804,30.48807144),"
J. H. Workman Middle School
6299 Lanier Ave
Pensacola, FL 32504

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("J. H. Workman Middle School",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.25053406,30.41935158),"
Jackie Harris Pyramid School
1408 E Blount Street
Pensacola, FL 32503

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Jackie Harris Pyramid School",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.40298462,30.34303856),"
Jim C. Bailey Middle School
4110 Bauer Road
Pensacola, FL 32506

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Jim C. Bailey Middle School",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.26979065,30.54783630),"
L. D. Mcarthur Elementary School
330 E Ten Mile Road
Pensacola, FL 32534

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("L. D. Mcarthur Elementary School",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.23302460,30.43166351),"
Lakeview Dropout Prevention
1221 W Lakeview Avenue
Pensacola, FL 32501

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lakeview Dropout Prevention",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.23295593,30.43093681),"
Lakeview Special Education
1200 W Avery, Building B
Pensacola, FL 32501

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lakeview Special Education",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.27823639,30.50644875),"
Lincoln Park Elementary School
7600 Kershaw Drive
Pensacola, FL 32571

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lincoln Park Elementary School",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.29814148,30.48665619),"
Longleaf Elementary School
2600 Longleaf Drive
Pensacola, FL 32526

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Longleaf Elementary School",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.23433685,30.43871117),"
Mcmillian Learning Center
1403 St Josephs Avenue
Pensacola, FL 32501

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Mcmillian Learning Center",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.25831604,30.45350647),"
Montclair Elementary School
820 Massachusetts Avenue
Pensacola, FL 32505

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Montclair Elementary School",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.29602051,30.42432976),"
Myrtle Grove Elementary School
6115 Lillian Highway
Pensacola, FL 32506

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Myrtle Grove Elementary School",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.20358276,30.42882729),"
N. B. Cook Elementary School
1310 N 12th Avenue
Pensacola, FL 32503

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("N. B. Cook Elementary School",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.28965759,30.38859749),"
Navy Point Elementary School
1321 Patton Drive
Pensacola, FL 32507

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Navy Point Elementary School",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.20752716,30.44966888),"
O. J. Semmes Montessori Academy
1250 E Texar Drive
Pensacola, FL 32503

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("O. J. Semmes Montessori Academy",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.21806000,30.41235200),"
O.a.s.i.s High School Preparatory Academy
215 W Garden St
Pensacola, FL 32502

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("O.a.s.i.s High School Preparatory Academy",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.25911713,30.43161774),"
Oakcrest Elementary School
1820 Hollywood Avenue
Pensacola, FL 32505

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Oakcrest Elementary School",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.19737244,30.47744751),"
Pace Center For Girls
1201 College Boulevard
Pensacola, FL 32504

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Pace Center For Girls",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.21714783,30.42044067),"
Pace Program
Je Hall Center
Pensacola, FL 32503

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Pace Program",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-81.91243300,28.03175600),"
Pensacola Boy's Base School
1thompson Avenue
Pensacola, FL 32511

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Pensacola Boy's Base School",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.22493744,30.43353081),"
Pensacola High School
500 W Maxwell Street
Pensacola, FL 32501

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Pensacola High School",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.21403503,30.45484352),"
Petree Pre-k (inactiv
916 E Fairfield Dr
Pensacola, FL 32503

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Petree Pre-k (inactiv",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.29385376,30.48657036),"
Pine Forest High School
2500 Longleaf Drive
Pensacola, FL 32526

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Pine Forest High School",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.28459167,30.54200935),"
Pine Meadow Elementary School
10001 Omar Avenue
Pensacola, FL 32534

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Pine Meadow Elementary School",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.34212494,30.36087799),"
Pleasant Grove Elementary School
3000 Owen Bell Lane
Pensacola, FL 32507

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Pleasant Grove Elementary School",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.26993561,30.55370522),"
R. C. Lipscomb Elementary School
10200 Ashton Brosnaham Dr
Pensacola, FL 32534

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("R. C. Lipscomb Elementary School",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.20545959,30.48575020),"
Reinherdt Holm Elementary School
6101 Lanier Drive
Pensacola, FL 32504

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Reinherdt Holm Elementary School",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.19828033,30.43256569),"
Ruby J. Gainer Charter School
P. O. Box 19014
Pensacola, FL 32523

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ruby J. Gainer Charter School",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.17647552,30.48988152),"
Scenic Heights Elementary School
3801 Cherry Laurel Drive
Pensacola, FL 32504

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Scenic Heights Elementary School",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.28952789,30.43706322),"
Sherwood Elementary School
501 Cherokee Trail
Pensacola, FL 32506

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Sherwood Elementary School",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.21239471,30.43414307),"
Spencer Bibbs Elementary School
2005 N 6th Avenue
Pensacola, FL 32503

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Spencer Bibbs Elementary School",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.24743652,30.49673653),"
W. J. Woodham High School
150 E Burgess Road
Pensacola, FL 32503

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("W. J. Woodham High School",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.27813721,30.39052963),"
Warrington Elementary School
220 N Navy Boulevard
Pensacola, FL 32507

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Warrington Elementary School",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.27386475,30.40259743),"
Warrington Middle School
450 S Old Corry Field Rd
Pensacola, FL 32507

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Warrington Middle School",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.21281433,30.48188400),"
Washington Senior High School
6000 College Parkway
Pensacola, FL 32504

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Washington Senior High School",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.27021027,30.49189568),"
Wedgewood Middle School
3420 W Pinestead Road
Pensacola, FL 32505

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Wedgewood Middle School",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.28985596,30.48644066),"
West Florida High School/technical
2400 Longleaf Drive
Pensacola, FL 32526

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("West Florida High School/technical",'Pensacola=' + Pensacola.length); Pensacola[Pensacola.length] = createMarker(new GPoint(-87.28188324,30.42022514),"
West Pensacola Elementary School
801 N 49th Avenue
Pensacola, FL 32506

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("West Pensacola Elementary School",'Pensacola=' + Pensacola.length); maxLng = -81.91243300; maxLat = 30.55370522; minLng = -87.40795135; minLat = 28.03175600; 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(Pensacola); 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(Pensacola);map.removeOverlays(Pensacola); map.addOverlays(Pensacola); centerByArray(Pensacola, false, false); cntMarker += Pensacola.length; centerByArray(Pensacola,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'); } }