function addMarkers(){ mySelect = document.getElementById('selection'); Saint_Petersburg = [];Clearwater = [];Dunedin = [];Palm_Harbor = [];Pinellas_Park = [];Largo = [];St_Petersburg = [];Safety_Harbor = [];Seminole = [];Oldsmar = [];mySelect.options[mySelect.options.length] = new Option("Clearwater schools",'all=Clearwater'); mySelect.options[mySelect.options.length] = new Option("Dunedin schools",'all=Dunedin'); mySelect.options[mySelect.options.length] = new Option("Largo schools",'all=Largo'); mySelect.options[mySelect.options.length] = new Option("Oldsmar schools",'all=Oldsmar'); mySelect.options[mySelect.options.length] = new Option("Palm Harbor schools",'all=Palm_Harbor'); mySelect.options[mySelect.options.length] = new Option("Pinellas Park schools",'all=Pinellas_Park'); mySelect.options[mySelect.options.length] = new Option("Safety Harbor schools",'all=Safety_Harbor'); mySelect.options[mySelect.options.length] = new Option("Saint Petersburg schools",'all=Saint_Petersburg'); mySelect.options[mySelect.options.length] = new Option("Seminole schools",'all=Seminole'); mySelect.options[mySelect.options.length] = new Option("St Petersburg schools",'all=St_Petersburg'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Saint_Petersburg[Saint_Petersburg.length] = createMarker(new GPoint(-82.74552400,27.77749200),"
Admiral Farragut Academy
501 Park Street N
Saint Petersburg, FL 33710
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Admiral Farragut Academy",'Saint_Petersburg=' + Saint_Petersburg.length); Clearwater[Clearwater.length] = createMarker(new GPoint(-82.73874500,27.90950200),"
Allendale Academy Private School
7208 Amhurst Way
Clearwater, FL 33764
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Allendale Academy Private School",'Clearwater=' + Clearwater.length); Dunedin[Dunedin.length] = createMarker(new GPoint(-82.77991300,28.05091500),"
Anchor Academy
2636 Bayshore Blvd
Dunedin, FL 34698
Co-ed school, 6-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Anchor Academy",'Dunedin=' + Dunedin.length); Clearwater[Clearwater.length] = createMarker(new GPoint(-82.80056900,27.96560500),"
Astra Sailing Academy
Po Box 638
Clearwater, FL 33757
Co-ed school, 1-9
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Astra Sailing Academy",'Clearwater=' + Clearwater.length); Clearwater[Clearwater.length] = createMarker(new GPoint(-82.70911600,27.96691900),"
Calvary Christian High School
110 N. McMullen Booth Road
Clearwater, FL 33759
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Calvary Christian High School",'Clearwater=' + Clearwater.length); Saint_Petersburg[Saint_Petersburg.length] = createMarker(new GPoint(-82.62177000,27.82845300),"
Canterbury School Of Florida
990 62nd Avenue NE
Saint Petersburg, FL 33702
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Canterbury School Of Florida",'Saint_Petersburg=' + Saint_Petersburg.length); Saint_Petersburg[Saint_Petersburg.length] = createMarker(new GPoint(-82.62177000,27.82845300),"
Canterbury School Of Florida, Inc.
990 62nd Avenue NE
Saint Petersburg, FL 33702
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Canterbury School Of Florida, Inc.",'Saint_Petersburg=' + Saint_Petersburg.length); Palm_Harbor[Palm_Harbor.length] = createMarker(new GPoint(-82.73949600,28.08124800),"
Center Academy
34054 Us Highway 19 N
Palm Harbor, FL 34684
Co-ed school, 4-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Center Academy",'Palm_Harbor=' + Palm_Harbor.length); Pinellas_Park[Pinellas_Park.length] = createMarker(new GPoint(-82.73056900,27.85007000),"
Center Academy
6710 86th Avenue North
Pinellas Park, FL 33782
Co-ed school, 6-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Center Academy",'Pinellas_Park=' + Pinellas_Park.length); Largo[Largo.length] = createMarker(new GPoint(-82.75970000,27.90610000),"
Center For Enhanced Learning
10225 Ulmerton Rd 12b
Largo, FL 33771
Co-ed school, 10-10
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Center For Enhanced Learning",'Largo=' + Largo.length); Clearwater[Clearwater.length] = createMarker(new GPoint(-82.72971300,27.91860200),"
Church Of Scientology Cadet School
16432 Us Hwy 19 N
Clearwater, FL 33764
Co-ed school, 1-9
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Church Of Scientology Cadet School",'Clearwater=' + Clearwater.length); Pinellas_Park[Pinellas_Park.length] = createMarker(new GPoint(-82.70168600,27.84301200),"
Classical Christian School for the Arts
4981 78th Ave
Pinellas Park, FL 33781
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Classical Christian School for the Arts",'Pinellas_Park=' + Pinellas_Park.length); Clearwater[Clearwater.length] = createMarker(new GPoint(-82.79559600,27.96808300),"
Clearwater Academy International
801 Drew Street
Clearwater, FL 33755
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Clearwater Academy International",'Clearwater=' + Clearwater.length); Clearwater[Clearwater.length] = createMarker(new GPoint(-82.72314200,27.93109900),"
Clearwater Central Catholic High School
2750 Haines Bayshore Road
Clearwater, FL 33760
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Clearwater Central Catholic High School",'Clearwater=' + Clearwater.length); Largo[Largo.length] = createMarker(new GPoint(-82.81993000,27.87793100),"
Country Day School
11499 Vonn Road
Largo, FL 33774
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Country Day School",'Largo=' + Largo.length); Clearwater[Clearwater.length] = createMarker(new GPoint(-82.72427900,27.99060800),"
The Depaul School For Dyslexia
2747 Sunset Point Road
Clearwater, FL 33759
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Depaul School For Dyslexia",'Clearwater=' + Clearwater.length); Dunedin[Dunedin.length] = createMarker(new GPoint(-82.75930300,28.04503100),"
Dunedin Academy Prep School
1408 County Road 1
Dunedin, FL 34698
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Dunedin Academy Prep School",'Dunedin=' + Dunedin.length); St_Petersburg[St_Petersburg.length] = createMarker(new GPoint(-82.64497000,27.76433700),"
Elim Seventh Day Adventist School
801 6th Ave S.
St Petersburg, FL 33701
Co-ed school, KG-9
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Elim Seventh Day Adventist School",'St_Petersburg=' + St_Petersburg.length); Pinellas_Park[Pinellas_Park.length] = createMarker(new GPoint(-82.70869900,27.83943700),"
First Baptist Christian School
5495 Park Blvd.
Pinellas Park, FL 33781
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("First Baptist Christian School",'Pinellas_Park=' + Pinellas_Park.length); Safety_Harbor[Safety_Harbor.length] = createMarker(new GPoint(-82.70548800,28.01224600),"
Fl Sheriffs Youth Ranch Learning C
3180 Enterprise Road East
Safety Harbor, FL 34695
Co-ed school, 5-10
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Fl Sheriffs Youth Ranch Learning C",'Safety_Harbor=' + Safety_Harbor.length); Saint_Petersburg[Saint_Petersburg.length] = createMarker(new GPoint(-82.68080500,27.77895800),"
Ford Christian Academy
3470 7th Avenue N
Saint Petersburg, FL 33713
Co-ed school, 1-9
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ford Christian Academy",'Saint_Petersburg=' + Saint_Petersburg.length); Pinellas_Park[Pinellas_Park.length] = createMarker(new GPoint(-82.72255700,27.82811400),"
Grace Christian School
6300 62nd Ave North
Pinellas Park, FL 34665
Co-ed school, 1-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Grace Christian School",'Pinellas_Park=' + Pinellas_Park.length); Pinellas_Park[Pinellas_Park.length] = createMarker(new GPoint(-82.70252900,27.84286000),"
Heritage Private School System
P.o. Box 565
Pinellas Park, FL 33780
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Heritage Private School System",'Pinellas_Park=' + Pinellas_Park.length); Palm_Harbor[Palm_Harbor.length] = createMarker(new GPoint(-82.73869900,28.07406700),"
Huntington Learning Center
33223 Us Highway 19 North
Palm Harbor, FL 34684
Co-ed school, 4-11
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Huntington Learning Center",'Palm_Harbor=' + Palm_Harbor.length); Largo[Largo.length] = createMarker(new GPoint(-82.81354600,27.88228900),"
Indian Rocks Christian School
12685 Ulmerton Road
Largo, FL 33774
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Indian Rocks Christian School",'Largo=' + Largo.length); Saint_Petersburg[Saint_Petersburg.length] = createMarker(new GPoint(-82.77936100,27.82143700),"
Keswick Christian School
10101 54th Avenue N
Saint Petersburg, FL 33708
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Keswick Christian School",'Saint_Petersburg=' + Saint_Petersburg.length); Clearwater[Clearwater.length] = createMarker(new GPoint(-82.75934700,27.98976300),"
Lakeside Christian School
1897 Sunset Point Road
Clearwater, FL 33765
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lakeside Christian School",'Clearwater=' + Clearwater.length); Clearwater[Clearwater.length] = createMarker(new GPoint(-82.74420000,28.00270000),"
Life Christian Academy
1532 Chateaux Deville Ct
Clearwater, FL 33743
Co-ed school, KG-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Life Christian Academy",'Clearwater=' + Clearwater.length); Largo[Largo.length] = createMarker(new GPoint(-82.73755700,27.90116300),"
Life Christian Academy
7100 142nd Ave. North
Largo, FL 33771
Co-ed school, KG-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Life Christian Academy",'Largo=' + Largo.length); Seminole[Seminole.length] = createMarker(new GPoint(-82.81977100,27.84219600),"
Lighthouse Christian School
7633 131st Street
Seminole, FL 33776
Co-ed school, 1-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lighthouse Christian School",'Seminole=' + Seminole.length); Clearwater[Clearwater.length] = createMarker(new GPoint(-82.75623700,27.94043200),"
The Little School
211 Orangewood Avenue
Clearwater, FL 33755
Co-ed school, 8-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Little School",'Clearwater=' + Clearwater.length); Saint_Petersburg[Saint_Petersburg.length] = createMarker(new GPoint(-82.68375400,27.81564000),"
New Creation Academy
4800 37th Street N
Saint Petersburg, FL 33714
Co-ed school, PK-11
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("New Creation Academy",'Saint_Petersburg=' + Saint_Petersburg.length); Saint_Petersburg[Saint_Petersburg.length] = createMarker(new GPoint(-82.74629500,27.82892100),"
Northside Christian School
7777 62nd Avenue North
Saint Petersburg, FL 33709
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Northside Christian School",'Saint_Petersburg=' + Saint_Petersburg.length); Oldsmar[Oldsmar.length] = createMarker(new GPoint(-82.65393200,28.03367100),"
Oldsmar Christian School
650 Burbank Road
Oldsmar, FL 34677
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Oldsmar Christian School",'Oldsmar=' + Oldsmar.length); Palm_Harbor[Palm_Harbor.length] = createMarker(new GPoint(-82.75925700,28.07346300),"
Palm Harbor Preparatory
1522 Ohio Ave
Palm Harbor, FL 34683
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Palm Harbor Preparatory",'Palm_Harbor=' + Palm_Harbor.length); Saint_Petersburg[Saint_Petersburg.length] = createMarker(new GPoint(-82.73615700,27.70565600),"
Pinellas Marine Institute
3101 Gulf Boulevard
Saint Petersburg, FL 33706
Co-ed school, 7-11
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Pinellas Marine Institute",'Saint_Petersburg=' + Saint_Petersburg.length); Saint_Petersburg[Saint_Petersburg.length] = createMarker(new GPoint(-82.60158500,27.81077300),"
The School Of The Immaculata
1790 Delaware Avenue Ne
Saint Petersburg, FL 33703
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The School Of The Immaculata",'Saint_Petersburg=' + Saint_Petersburg.length); Saint_Petersburg[Saint_Petersburg.length] = createMarker(new GPoint(-82.63434500,27.81845300),"
Shorecrest Preparatory School
5101 1st Street NE
Saint Petersburg, FL 33703
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Shorecrest Preparatory School",'Saint_Petersburg=' + Saint_Petersburg.length); Palm_Harbor[Palm_Harbor.length] = createMarker(new GPoint(-82.74722200,28.07921900),"
Spring Valley School
2109 Nebraska Avenue
Palm Harbor, FL 34683
Co-ed school, NS-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Spring Valley School",'Palm_Harbor=' + Palm_Harbor.length); Saint_Petersburg[Saint_Petersburg.length] = createMarker(new GPoint(-82.69374000,27.81913200),"
Wellington Schools Of Pinellas County
5175 45th Street North
Saint Petersburg, FL 33714
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Wellington Schools Of Pinellas County",'Saint_Petersburg=' + Saint_Petersburg.length); Palm_Harbor[Palm_Harbor.length] = createMarker(new GPoint(-82.74774600,28.08379600),"
Westlake Christian School
1551 Belcher Road
Palm Harbor, FL 34683
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Westlake Christian School",'Palm_Harbor=' + Palm_Harbor.length); Largo[Largo.length] = createMarker(new GPoint(-82.79953100,27.88029800),"
Westside Christian School
11633 Walsingham Road
Largo, FL 33774
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Westside Christian School",'Largo=' + Largo.length); Clearwater[Clearwater.length] = createMarker(new GPoint(-82.79346700,27.94249900),"
Woodlawn Community Academy
845 Woodlawn Street
Clearwater, FL 33756
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Woodlawn Community Academy",'Clearwater=' + Clearwater.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,11); /* 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/////2/' + showArray); map.removeOverlays(Clearwater); map.removeOverlays(Dunedin); map.removeOverlays(Largo); map.removeOverlays(Oldsmar); map.removeOverlays(Palm_Harbor); map.removeOverlays(Pinellas_Park); map.removeOverlays(Safety_Harbor); map.removeOverlays(Saint_Petersburg); map.removeOverlays(Seminole); map.removeOverlays(St_Petersburg); 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(Saint_Petersburg);map.removeOverlays(Clearwater); map.removeOverlays(Dunedin); map.removeOverlays(Largo); map.removeOverlays(Oldsmar); map.removeOverlays(Palm_Harbor); map.removeOverlays(Pinellas_Park); map.removeOverlays(Safety_Harbor); map.removeOverlays(Saint_Petersburg); map.removeOverlays(Seminole); map.removeOverlays(St_Petersburg); map.addOverlays(Clearwater); centerByArray(Clearwater, false, false); cntMarker += Clearwater.length; map.addOverlays(Dunedin); centerByArray(Dunedin, false, false); cntMarker += Dunedin.length; map.addOverlays(Largo); centerByArray(Largo, false, false); cntMarker += Largo.length; map.addOverlays(Oldsmar); centerByArray(Oldsmar, false, false); cntMarker += Oldsmar.length; map.addOverlays(Palm_Harbor); centerByArray(Palm_Harbor, false, false); cntMarker += Palm_Harbor.length; map.addOverlays(Pinellas_Park); centerByArray(Pinellas_Park, false, false); cntMarker += Pinellas_Park.length; map.addOverlays(Safety_Harbor); centerByArray(Safety_Harbor, false, false); cntMarker += Safety_Harbor.length; map.addOverlays(Saint_Petersburg); centerByArray(Saint_Petersburg, false, false); cntMarker += Saint_Petersburg.length; map.addOverlays(Seminole); centerByArray(Seminole, false, false); cntMarker += Seminole.length; map.addOverlays(St_Petersburg); centerByArray(St_Petersburg, false, false); cntMarker += St_Petersburg.length; centerByArray(Saint_Petersburg,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'); //window.open('/map.php?type=1&schools=&school_level=2&radius=&zipcode=&school_type_search=&school_type_code='); } } function createMarker(point, label, icon) { var marker = new GMarker(point, icon); var html = label; GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml(html); }); return marker; }