function addMarkers() { mySelect = document.getElementById('selection'); Lynn_Haven = [];Panama_City = [];Panama_City_Beach = [];Southport = [];Tyndall_Afb = [];Youngstown = [];mySelect.options[mySelect.options.length] = new Option("Lynn Haven schools",'all=Lynn_Haven'); mySelect.options[mySelect.options.length] = new Option("Panama City schools",'all=Panama_City'); mySelect.options[mySelect.options.length] = new Option("Panama City Beach schools",'all=Panama_City_Beach'); mySelect.options[mySelect.options.length] = new Option("Southport schools",'all=Southport'); mySelect.options[mySelect.options.length] = new Option("Tyndall Afb schools",'all=Tyndall_Afb'); mySelect.options[mySelect.options.length] = new Option("Youngstown schools",'all=Youngstown'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Lynn_Haven[Lynn_Haven.length] = createMarker(new GPoint(-85.64542000,30.21128900),"
A. Crawford Mosley High School
501 Mosley Drive
Lynn Haven, FL 32444

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("A. Crawford Mosley High School",'Lynn_Haven=' + Lynn_Haven.length); Panama_City[Panama_City.length] = createMarker(new GPoint(-85.64863586,30.16776657),"
A. D. Harris High School
819 E 11th Street
Panama City, FL 32401

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("A. D. Harris High School",'Panama_City=' + Panama_City.length); Panama_City_Beach[Panama_City_Beach.length] = createMarker(new GPoint(-85.82019043,30.20145607),"
Arnold High School
550 Alf Coleman Road
Panama City Beach, FL 32407

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Arnold High School",'Panama_City_Beach=' + Panama_City_Beach.length); Panama_City[Panama_City.length] = createMarker(new GPoint(-85.42179871,30.49130058),"
Bay Co. Behavioral Health Center
11712 Van Doren Ln
Panama City, FL 32438

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bay Co. Behavioral Health Center",'Panama_City=' + Panama_City.length); Panama_City[Panama_City.length] = createMarker(new GPoint(-85.66033400,30.15987000),"
Bay County Sheriff's Boot Camp
0456 E 11th Street
Panama City, FL 32401

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bay County Sheriff's Boot Camp",'Panama_City=' + Panama_City.length); Panama_City[Panama_City.length] = createMarker(new GPoint(-85.66033400,30.15987000),"
Bay County Superintendent's Office
01311 Balboa Avenue
Panama City, FL 32401

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bay County Superintendent's Office",'Panama_City=' + Panama_City.length); Panama_City[Panama_City.length] = createMarker(new GPoint(-85.66031647,30.15710068),"
Bay Detention Center
450 E 1th Street
Panama City, FL 32401

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bay Detention Center",'Panama_City=' + Panama_City.length); Panama_City[Panama_City.length] = createMarker(new GPoint(-85.66028595,30.16466331),"
Bay Haven Charter Academy
2501 Hawks Landing Blvd
Panama City, FL 32405

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Bay Haven Charter Academy",'Panama_City=' + Panama_City.length); Panama_City[Panama_City.length] = createMarker(new GPoint(-85.66028900,30.16467400),"
Bay Haven Charter Middle School
922 Harrison Ave
Panama City, FL 32401

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Bay Haven Charter Middle School",'Panama_City=' + Panama_City.length); Panama_City[Panama_City.length] = createMarker(new GPoint(-85.66022491,30.16971016),"
Bay High School
1200 Harrison Avenue
Panama City, FL 32401

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bay High School",'Panama_City=' + Panama_City.length); Panama_City[Panama_City.length] = createMarker(new GPoint(-85.68950653,30.40041542),"
Bozeman Learning Center
13410 Highway 77
Panama City, FL 32409

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bozeman Learning Center",'Panama_City=' + Panama_City.length); Panama_City[Panama_City.length] = createMarker(new GPoint(-85.56938934,30.15303612),"
Callaway Elementary School
7115 E Highway 22
Panama City, FL 32404

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Callaway Elementary School",'Panama_City=' + Panama_City.length); Panama_City[Panama_City.length] = createMarker(new GPoint(-85.62214661,30.17481041),"
Cedar Grove Elementary School
2826 E 15th Street
Panama City, FL 32405

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Cedar Grove Elementary School",'Panama_City=' + Panama_City.length); Panama_City[Panama_City.length] = createMarker(new GPoint(-85.65881700,30.16819200),"
Chautauqua Charter School
1118 Magnolia Ave
Panama City, FL 32401

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Chautauqua Charter School",'Panama_City=' + Panama_City.length); Panama_City[Panama_City.length] = createMarker(new GPoint(-85.67855300,30.17532100),"
Emerald Bay Academy
1515 June Ave
Panama City, FL 32401

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Emerald Bay Academy",'Panama_City=' + Panama_City.length); Panama_City[Panama_City.length] = createMarker(new GPoint(-85.61650085,30.15992165),"
Everitt Middle School
608 School Avenue
Panama City, FL 32401

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Everitt Middle School",'Panama_City=' + Panama_City.length); Panama_City[Panama_City.length] = createMarker(new GPoint(-85.67539215,30.17180634),"
Exceptional Student Education
1311 Balboa Avenue
Panama City, FL 32401

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Exceptional Student Education",'Panama_City=' + Panama_City.length); Panama_City[Panama_City.length] = createMarker(new GPoint(-85.64943695,30.20262146),"
Haney Technical High School
3016 Highway 77
Panama City, FL 32405

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Haney Technical High School",'Panama_City=' + Panama_City.length); Panama_City[Panama_City.length] = createMarker(new GPoint(-85.67228699,30.20421028),"
Hiland Park Elementary School
2507 East Baldwin Road
Panama City, FL 32405

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Hiland Park Elementary School",'Panama_City=' + Panama_City.length); Panama_City_Beach[Panama_City_Beach.length] = createMarker(new GPoint(-85.84475708,30.19908714),"
Hutchison Beach Elementary School
12900 Middle Beach Road
Panama City Beach, FL 32407

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Hutchison Beach Elementary School",'Panama_City_Beach=' + Panama_City_Beach.length); Panama_City[Panama_City.length] = createMarker(new GPoint(-85.66729736,30.16790581),"
Jinks Middle School
600 W 11th Street
Panama City, FL 32401

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Jinks Middle School",'Panama_City=' + Panama_City.length); Panama_City[Panama_City.length] = createMarker(new GPoint(-85.70861053,30.18264580),"
Lucille Moore Elementary School
1900 Michigan Avenue
Panama City, FL 32405

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lucille Moore Elementary School",'Panama_City=' + Panama_City.length); Lynn_Haven[Lynn_Haven.length] = createMarker(new GPoint(-85.65091705,30.24533653),"
Lynn Haven Elementary School
301 W 9th Street
Lynn Haven, FL 32444

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lynn Haven Elementary School",'Lynn_Haven=' + Lynn_Haven.length); Panama_City[Panama_City.length] = createMarker(new GPoint(-85.69108582,30.17585182),"
Margaret K. Lewis Exceptional School
1527 Lincoln Avenue
Panama City, FL 32405

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Margaret K. Lewis Exceptional School",'Panama_City=' + Panama_City.length); Panama_City[Panama_City.length] = createMarker(new GPoint(-85.64546204,30.14593124),"
Merriam Cherry Street Elementary School
1125 Cherry Street
Panama City, FL 32401

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Merriam Cherry Street Elementary School",'Panama_City=' + Panama_City.length); Panama_City[Panama_City.length] = createMarker(new GPoint(-85.56741333,30.23918152),"
Merritt Brown Middle School
5044 Merritt Brown Way
Panama City, FL 32404

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Merritt Brown Middle School",'Panama_City=' + Panama_City.length); Panama_City[Panama_City.length] = createMarker(new GPoint(-85.62517548,30.14869881),"
Millville Elementary School
203 N East Avenue
Panama City, FL 32401

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Millville Elementary School",'Panama_City=' + Panama_City.length); Lynn_Haven[Lynn_Haven.length] = createMarker(new GPoint(-85.65592957,30.23028946),"
Mowat Middle School
1903 W Highway 390
Lynn Haven, FL 32444

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Mowat Middle School",'Lynn_Haven=' + Lynn_Haven.length); Panama_City[Panama_City.length] = createMarker(new GPoint(-85.64556122,30.20440102),"
New Horizons Learning Center
3100 Minnesota Avenue
Panama City, FL 32405

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("New Horizons Learning Center",'Panama_City=' + Panama_City.length); Panama_City[Panama_City.length] = createMarker(new GPoint(-85.67670441,30.18253326),"
Northside Elementary School
2001 Northside Drive
Panama City, FL 32405

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Northside Elementary School",'Panama_City=' + Panama_City.length); Panama_City[Panama_City.length] = createMarker(new GPoint(-85.68948364,30.16991425),"
Oakland Terrace Elementary School
2010 W 12th Street
Panama City, FL 32401

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Oakland Terrace Elementary School",'Panama_City=' + Panama_City.length); Panama_City[Panama_City.length] = createMarker(new GPoint(-85.63761139,30.16633606),"
Oscar Patterson Elementary Magnet
1025 Redwood Avenue
Panama City, FL 32401

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Oscar Patterson Elementary Magnet",'Panama_City=' + Panama_City.length); Panama_City[Panama_City.length] = createMarker(new GPoint(-85.66044617,30.15194130),"
Panama City Marine Institute
200 E Beach Drive
Panama City, FL 32401

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Panama City Marine Institute",'Panama_City=' + Panama_City.length); Panama_City[Panama_City.length] = createMarker(new GPoint(-85.59965515,30.13547325),"
Parker Elementary School
640 S Highway 22 - A
Panama City, FL 32404

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Parker Elementary School",'Panama_City=' + Panama_City.length); Panama_City_Beach[Panama_City_Beach.length] = createMarker(new GPoint(-85.76296997,30.17167664),"
Patronis Elementary School
7400 Patronis Drive
Panama City Beach, FL 32408

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Patronis Elementary School",'Panama_City_Beach=' + Panama_City_Beach.length); Panama_City[Panama_City.length] = createMarker(new GPoint(-85.64168549,30.16774178),"
Rosenwald Middle School
924 Bay Avenue
Panama City, FL 32401

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Rosenwald Middle School",'Panama_City=' + Panama_City.length); Panama_City[Panama_City.length] = createMarker(new GPoint(-85.61648560,30.16668892),"
Rutherford High School
1000 School Avenue
Panama City, FL 32401

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Rutherford High School",'Panama_City=' + Panama_City.length); Panama_City[Panama_City.length] = createMarker(new GPoint(-85.70154572,30.17542267),"
Saint Andrew School
3001 W 15th Street
Panama City, FL 32401

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Saint Andrew School",'Panama_City=' + Panama_City.length); Panama_City[Panama_City.length] = createMarker(new GPoint(-85.60952300,30.14976200),"
Shaw Adult Center
162 Detroit Avenue
Panama City, FL 32401

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Shaw Adult Center",'Panama_City=' + Panama_City.length); Southport[Southport.length] = createMarker(new GPoint(-85.64112091,30.28772545),"
Southport Elementary School
1835 Bridge Street
Southport, FL 32409

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Southport Elementary School",'Southport=' + Southport.length); Panama_City[Panama_City.length] = createMarker(new GPoint(-85.61650848,30.15733719),"
Springfield Elementary School
520 School Avenue
Panama City, FL 32401

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Springfield Elementary School",'Panama_City=' + Panama_City.length); Panama_City_Beach[Panama_City_Beach.length] = createMarker(new GPoint(-85.84912109,30.21041679),"
Surfside Middle School
300 Nautilus Street
Panama City Beach, FL 32413

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Surfside Middle School",'Panama_City_Beach=' + Panama_City_Beach.length); Panama_City_Beach[Panama_City_Beach.length] = createMarker(new GPoint(-85.82840300,30.20503000),"
Tapestry Park Charter School
410 Lyndell Lane
Panama City Beach, FL 32407

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Tapestry Park Charter School",'Panama_City_Beach=' + Panama_City_Beach.length); Panama_City[Panama_City.length] = createMarker(new GPoint(-85.62441400,30.17488000),"
Tom P. Haney Vocational-technical Center
3016 Hwy 77
Panama City, FL 32405

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Tom P. Haney Vocational-technical Center",'Panama_City=' + Panama_City.length); Panama_City[Panama_City.length] = createMarker(new GPoint(-85.56423950,30.24082756),"
Tommy Smith Elementary School
5044 Tommy Smith Drive
Panama City, FL 32404

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Tommy Smith Elementary School",'Panama_City=' + Panama_City.length); Tyndall_Afb[Tyndall_Afb.length] = createMarker(new GPoint(-85.59125519,30.07015038),"
Tyndall Elementary School
7800 Tyndall Parkway
Tyndall Afb, FL 32403

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Tyndall Elementary School",'Tyndall_Afb=' + Tyndall_Afb.length); Youngstown[Youngstown.length] = createMarker(new GPoint(-85.44669342,30.36666489),"
Waller Elementary School
11332 Highway 388
Youngstown, FL 32466

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Waller Elementary School",'Youngstown=' + Youngstown.length); Panama_City_Beach[Panama_City_Beach.length] = createMarker(new GPoint(-85.86116791,30.28930855),"
West Bay Elementary School
14813 School Drive
Panama City Beach, FL 32413

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