function addMarkers(){ mySelect = document.getElementById('selection'); Clearwater = [];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); Clearwater[Clearwater.length] = createMarker(new GPoint(-82.71699700,27.90081700),"
Annsworth Montessori Academy
5990 142 Ave N
Clearwater, FL 33520
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Annsworth Montessori Academy",'Clearwater=' + Clearwater.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.80399700,27.93505100),"
Belleair Montessori Academy
905 Ponce De Leon Blvd
Clearwater, FL 33756
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Belleair Montessori 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); Clearwater[Clearwater.length] = createMarker(new GPoint(-82.75464400,27.99522300),"
Christ The Lord Lutheran School
2045 N Hercules Avenue
Clearwater, FL 33763
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Christ The Lord Lutheran School",'Clearwater=' + Clearwater.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); 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); Clearwater[Clearwater.length] = createMarker(new GPoint(-82.77776700,27.94966300),"
Clearwater Junior Academy
1435 Lakeview Road
Clearwater, FL 33756
Co-ed school, 2-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Clearwater Junior Academy",'Clearwater=' + Clearwater.length); Clearwater[Clearwater.length] = createMarker(new GPoint(-82.70930800,27.98720600),"
Countryside Christian Academy
1850 N Mcmullen Booth Road
Clearwater, FL 33759
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Countryside Christian Academy",'Clearwater=' + Clearwater.length); Clearwater[Clearwater.length] = createMarker(new GPoint(-82.76160900,27.96782800),"
Delphi Academy
1831 Drew St
Clearwater, FL 33765
Co-ed school, PK-9
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Delphi Academy",'Clearwater=' + Clearwater.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); Clearwater[Clearwater.length] = createMarker(new GPoint(-82.76774400,27.94253700),"
First Lutheran School
1644 Nursery Road
Clearwater, FL 33756
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("First Lutheran School",'Clearwater=' + Clearwater.length); Clearwater[Clearwater.length] = createMarker(new GPoint(-82.74381700,28.02323700),"
Guardian Angels Catholic School
2270 Evans Road
Clearwater, FL 33763
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Guardian Angels Catholic School",'Clearwater=' + Clearwater.length); Clearwater[Clearwater.length] = createMarker(new GPoint(-82.77524400,27.97928300),"
Highland Christian Academy
1301 N Highland Avenue
Clearwater, FL 33755
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Highland Christian Academy",'Clearwater=' + Clearwater.length); Clearwater[Clearwater.length] = createMarker(new GPoint(-82.79145100,27.93382900),"
Kids First Christian Preschool & Kindergarten
1739 S Martin Luther King Jr Ave
Clearwater, FL 33756
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Kids First Christian Preschool & Kindergarten",'Clearwater=' + Clearwater.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); 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); Clearwater[Clearwater.length] = createMarker(new GPoint(-82.78108200,27.97867200),"
Northbay Christian Academy
13214 Royal George Avenue
Clearwater, FL 33755
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Northbay Christian Academy",'Clearwater=' + Clearwater.length); Clearwater[Clearwater.length] = createMarker(new GPoint(-82.77487900,27.93266200),"
Pinellas County Jewish Day School
1775 S Highland Avenue
Clearwater, FL 33756
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Pinellas County Jewish Day School",'Clearwater=' + Clearwater.length); Clearwater[Clearwater.length] = createMarker(new GPoint(-82.70880500,28.01843400),"
Safety Harbor Montessori Academy
2669 McMullen Booth Rd
Clearwater, FL 33761
Co-ed school, NS-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Safety Harbor Montessori Academy",'Clearwater=' + Clearwater.length); Clearwater[Clearwater.length] = createMarker(new GPoint(-82.77951600,27.96189800),"
St. Cecelia Interparochial School
400 S Hillcrest Avenue
Clearwater, FL 33756
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Cecelia Interparochial School",'Clearwater=' + Clearwater.length); Clearwater[Clearwater.length] = createMarker(new GPoint(-82.75785400,27.93832000),"
Saint Paul's School
1600 St. Pauls Drive
Clearwater, FL 33764
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Saint Paul's School",'Clearwater=' + Clearwater.length); Clearwater[Clearwater.length] = createMarker(new GPoint(-82.75994400,27.94219700),"
Shepherd's Care Learning Center
1875 Nursery Road
Clearwater, FL 33764
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Shepherd's Care Learning Center",'Clearwater=' + Clearwater.length); Clearwater[Clearwater.length] = createMarker(new GPoint(-82.74602500,27.96695100),"
Skycrest Christian School
129 North Belcher Road
Clearwater, FL 33765
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Skycrest Christian School",'Clearwater=' + Clearwater.length); Clearwater[Clearwater.length] = createMarker(new GPoint(-82.74738500,27.97130600),"
Suncoast Christian School
2177 Ne Coachman Road
Clearwater, FL 33765
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Suncoast Christian School",'Clearwater=' + Clearwater.length); Clearwater[Clearwater.length] = createMarker(new GPoint(-82.78009500,27.99015300),"
Sunset Point Christian School
1390 Sunset Point Rd
Clearwater, FL 32755
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sunset Point Christian School",'Clearwater=' + Clearwater.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//////' + showArray); map.removeOverlays(Clearwater); 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(Clearwater);map.removeOverlays(Clearwater); map.addOverlays(Clearwater); centerByArray(Clearwater, false, false); cntMarker += Clearwater.length; centerByArray(Clearwater,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=&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; }