function addMarkers(){ mySelect = document.getElementById('selection'); North_Port = [];Sarasota = [];Venice = [];Nokomis = [];Englewood = [];mySelect.options[mySelect.options.length] = new Option("Englewood schools",'all=Englewood'); mySelect.options[mySelect.options.length] = new Option("Nokomis schools",'all=Nokomis'); mySelect.options[mySelect.options.length] = new Option("North Port schools",'all=North_Port'); mySelect.options[mySelect.options.length] = new Option("Sarasota schools",'all=Sarasota'); mySelect.options[mySelect.options.length] = new Option("Venice schools",'all=Venice'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); North_Port[North_Port.length] = createMarker(new GPoint(-82.23303400,27.04226100),"
Active Learning Academy, Inc.
14503 S Tamiami Trail
North Port, FL 34287
Co-ed school, KG-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Active Learning Academy, Inc.",'North_Port=' + North_Port.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.52204500,27.33802100),"
Agape Christian School
150 N Shade Avenue
Sarasota, FL 34237
Co-ed school, 1-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Agape Christian School",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.48105300,27.32906300),"
Ascension Lutheran School
800 Mcintosh Road
Sarasota, FL 34232
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ascension Lutheran School",'Sarasota=' + Sarasota.length); Venice[Venice.length] = createMarker(new GPoint(-82.40077300,27.11321300),"
Auburn Road Presbyterian Academy
642 N Auburn Road
Venice, FL 34292
Co-ed school, 3-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Auburn Road Presbyterian Academy",'Venice=' + Venice.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.49791400,27.30812900),"
Brickhouse Academy
3552 Webber Street
Sarasota, FL 34239
Co-ed school, 3-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Brickhouse Academy",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.49423900,27.35824800),"
Calvary Chapel School, Inc.
3800 27th Parkway
Sarasota, FL 34235
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Calvary Chapel School, Inc.",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.52573500,27.32747200),"
Chesterbrook Academy
845 S. School Ave.
Sarasota, FL 34237
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Chesterbrook Academy",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.45594900,27.26578400),"
Closing The Gap School
5989 Approach Road
Sarasota, FL 34238
Co-ed school, 2-9
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Closing The Gap School",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.48148400,27.33756500),"
Dreams Are Free School at Bishop Nevins Academy
4380 Fruitville Road
Sarasota, FL 34232
Co-ed school, 1-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Dreams Are Free School at Bishop Nevins Academy",'Sarasota=' + Sarasota.length); Venice[Venice.length] = createMarker(new GPoint(-82.44821300,27.10193700),"
Epiphany Cathedral School
316 Sarasota Street
Venice, FL 34285
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Epiphany Cathedral School",'Venice=' + Venice.length); Nokomis[Nokomis.length] = createMarker(new GPoint(-82.45562400,27.12466300),"
European Academy Of Early Education
239 Albee Road W
Nokomis, FL 34275
Co-ed school, PK-1
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("European Academy Of Early Education",'Nokomis=' + Nokomis.length); Englewood[Englewood.length] = createMarker(new GPoint(-82.33704700,26.96133500),"
Heritage Christian Academy
75 Pine Street
Englewood, FL 34223
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Heritage Christian Academy",'Englewood=' + Englewood.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.51178300,27.29893700),"
Incarnation Catholic School
2911 Bee Ridge Road
Sarasota, FL 34239
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Incarnation Catholic School",'Sarasota=' + Sarasota.length); Venice[Venice.length] = createMarker(new GPoint(-82.41440200,27.05982000),"
International Montessori Academy
1975 S. Tamiami Trail
Venice, FL 34293
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("International Montessori Academy",'Venice=' + Venice.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.47858500,27.33776200),"
Julie Rohr Academy
4466 Fruitville Road
Sarasota, FL 34232
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Julie Rohr Academy",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.48074500,27.33522700),"
Kanner Academy
133 Mcintosh Road
Sarasota, FL 34232
Co-ed school, 5-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Kanner Academy",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.52930000,27.30270000),"
Morningstar Learning Center
Po Box 5502
Sarasota, FL 34277
Co-ed school, K-11
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Morningstar Learning Center",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.50917400,27.38707000),"
Narrow Way Academy
3011 61st Street
Sarasota, FL 34243
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Narrow Way Academy",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.46528000,27.27669900),"
New Gate School
5237 Ashton Road
Sarasota, FL 34233
Co-ed school, NS-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("New Gate School",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.56084900,27.28619500),"
Out-of-Door Academy
444 Reid Street
Sarasota, FL 34242
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Out-of-Door Academy",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.49734400,27.32380700),"
Palm Grove Mennonite School
1087 Beneva Rd.
Sarasota, FL 34232
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Palm Grove Mennonite School",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.46055300,27.27941700),"
Prew Academy
5020 Fielding Lane
Sarasota, FL 34233
Co-ed school, 6-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Prew Academy",'Sarasota=' + Sarasota.length); North_Port[North_Port.length] = createMarker(new GPoint(-82.23465600,27.04675000),"
Queen Of Angels Academy
5412 Conestoga Street
North Port, FL 34291
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Queen Of Angels Academy",'North_Port=' + North_Port.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.48148400,27.33756500),"
St. Marthas School
4380 Fruitville Road
Sarasota, FL 34232
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Marthas School",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.46015900,27.32323700),"
Sarasota Christian School
5415 Bahia Vista Street
Sarasota, FL 34232
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sarasota Christian School",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.46444500,27.27139500),"
Sarasota Lutheran School
5651 Honore Avenue
Sarasota, FL 34233
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sarasota Lutheran School",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.53060500,27.26573200),"
The Sarasota Waldorf School
1900 Meadowood Street
Sarasota, FL 34231
Co-ed school, PK-2
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Sarasota Waldorf School",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.50301000,27.34873700),"
Shepherd S Hill Christian School
3333 12th Street
Sarasota, FL 34237
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Shepherd S Hill Christian School",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.49862300,27.29865900),"
Sonhaven Preparatory Academy
3560 Bee Ridge Road
Sarasota, FL 34239
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sonhaven Preparatory Academy",'Sarasota=' + Sarasota.length); Venice[Venice.length] = createMarker(new GPoint(-82.42965200,27.07858400),"
The Study Center, Inc.
1501 Tamiami Trail S 501
Venice, FL 34285
Co-ed school, 3-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Study Center, Inc.",'Venice=' + Venice.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.46371400,27.32683700),"
Sunnyside Mennonite School
901 Honore Avenue
Sarasota, FL 34232
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sunnyside Mennonite School",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.48710800,27.38103700),"
The Tabernacle Christian School
4141 Desoto Road
Sarasota, FL 34235
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Tabernacle Christian School",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.50585400,27.36727800),"
Teddy Bear Montessori School
3805 N Lockwood Ridge Road
Sarasota, FL 34234
Co-ed school, PK-KG
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Teddy Bear Montessori School",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.51420400,27.32426400),"
Temple Beth Sholom Schools: Goldie Feldman Academy & Justin Lee Wiesner Preschool
1050 S Tuttle Ave
Sarasota, FL 34237
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Temple Beth Sholom Schools: Goldie Feldman Academy & Justin Lee Wiesner Preschool",'Sarasota=' + Sarasota.length); Venice[Venice.length] = createMarker(new GPoint(-82.38375600,27.07895400),"
Venice Christian School
1200 Center Road
Venice, FL 34292
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Venice Christian School",'Venice=' + Venice.length); Venice[Venice.length] = createMarker(new GPoint(-82.40336800,27.05189400),"
Venice Sda Christian Elementary School
2375 Seaboard Avenue
Venice, FL 34293
Co-ed school, 1-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Venice Sda Christian Elementary School",'Venice=' + Venice.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.53962900,27.33888000),"
The West Coast School
Po Box 49168
Sarasota, FL 34230
Co-ed school, 2-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The West Coast School",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.53115400,27.33985300),"
West Coast School Human Dev
403 N Washington Blvd
Sarasota, FL 34236
Co-ed school, 5-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("West Coast School Human Dev",'Sarasota=' + Sarasota.length); Sarasota[Sarasota.length] = createMarker(new GPoint(-82.48261600,27.29163700),"
West Florida Christian School
4311 Wilkinson Road
Sarasota, FL 34233
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("West Florida Christian School",'Sarasota=' + Sarasota.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/////1/' + showArray); map.removeOverlays(Englewood); map.removeOverlays(Nokomis); map.removeOverlays(North_Port); map.removeOverlays(Sarasota); map.removeOverlays(Venice); 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(North_Port);map.removeOverlays(Englewood); map.removeOverlays(Nokomis); map.removeOverlays(North_Port); map.removeOverlays(Sarasota); map.removeOverlays(Venice); map.addOverlays(Englewood); centerByArray(Englewood, false, false); cntMarker += Englewood.length; map.addOverlays(Nokomis); centerByArray(Nokomis, false, false); cntMarker += Nokomis.length; map.addOverlays(North_Port); centerByArray(North_Port, false, false); cntMarker += North_Port.length; map.addOverlays(Sarasota); centerByArray(Sarasota, false, false); cntMarker += Sarasota.length; map.addOverlays(Venice); centerByArray(Venice, false, false); cntMarker += Venice.length; centerByArray(North_Port,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=1&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; }