function addMarkers(){ mySelect = document.getElementById('selection'); Kissimmee = [];Celebration = [];St_Cloud = [];Saint_Cloud = [];mySelect.options[mySelect.options.length] = new Option("Celebration schools",'all=Celebration'); mySelect.options[mySelect.options.length] = new Option("Kissimmee schools",'all=Kissimmee'); mySelect.options[mySelect.options.length] = new Option("Saint Cloud schools",'all=Saint_Cloud'); mySelect.options[mySelect.options.length] = new Option("St Cloud schools",'all=St_Cloud'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Kissimmee[Kissimmee.length] = createMarker(new GPoint(-81.43462400,28.27903700),"
Bailey Academy Institute Of Learning Inc.
3117 Pershing Street
Kissimmee, FL 34741
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bailey Academy Institute Of Learning Inc.",'Kissimmee=' + Kissimmee.length); Celebration[Celebration.length] = createMarker(new GPoint(-81.53813300,28.31949900),"
Celebration Academy
607 Celebration Avenue
Celebration, FL 34747
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Celebration Academy",'Celebration=' + Celebration.length); Kissimmee[Kissimmee.length] = createMarker(new GPoint(-81.38143900,28.31532900),"
Faith Harvest Christian Academy
1537 Mill Slough Road
Kissimmee, FL 34744
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Faith Harvest Christian Academy",'Kissimmee=' + Kissimmee.length); Kissimmee[Kissimmee.length] = createMarker(new GPoint(-81.40594700,28.29571400),"
First United Methodist School
122 W Sproule Avenue
Kissimmee, FL 34741
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("First United Methodist School",'Kissimmee=' + Kissimmee.length); Kissimmee[Kissimmee.length] = createMarker(new GPoint(-81.36410000,28.30520000),"
Heartland Christian Academy
2874 E Irlo Bronson Mem Highway
Kissimmee, FL 34744
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Heartland Christian Academy",'Kissimmee=' + Kissimmee.length); Kissimmee[Kissimmee.length] = createMarker(new GPoint(-81.38306100,28.30387300),"
Heritage Christian School
1500 E Vine Street
Kissimmee, FL 34744
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Heritage Christian School",'Kissimmee=' + Kissimmee.length); Kissimmee[Kissimmee.length] = createMarker(new GPoint(-81.42236800,28.30797800),"
Holy Redeemer Catholic School
1800 W Columbia Avenue
Kissimmee, FL 34741
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Holy Redeemer Catholic School",'Kissimmee=' + Kissimmee.length); Kissimmee[Kissimmee.length] = createMarker(new GPoint(-81.34404800,28.30415800),"
Hope Christian Academy
2440 Fortune Road
Kissimmee, FL 34744
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Hope Christian Academy",'Kissimmee=' + Kissimmee.length); Kissimmee[Kissimmee.length] = createMarker(new GPoint(-81.44176100,28.30469300),"
Kissimmee Christian Academy
3827 W. Vine St
Kissimmee, FL 34741
Co-ed school, 1-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Kissimmee Christian Academy",'Kissimmee=' + Kissimmee.length); Kissimmee[Kissimmee.length] = createMarker(new GPoint(-81.35317500,28.27882300),"
Life Academy
2269 Partin Settlement Road
Kissimmee, FL 34744
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Life Academy",'Kissimmee=' + Kissimmee.length); Kissimmee[Kissimmee.length] = createMarker(new GPoint(-81.55214800,28.31063400),"
Montessori School Of Celebrat
901 Begonia Road
Kissimmee, FL 34747
Co-ed school, PK-7
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Montessori School Of Celebrat",'Kissimmee=' + Kissimmee.length); Kissimmee[Kissimmee.length] = createMarker(new GPoint(-81.44726000,28.13916900),"
New Jerusalem Academy
4925 Old Pleasant Hill Road
Kissimmee, FL 34759
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("New Jerusalem Academy",'Kissimmee=' + Kissimmee.length); Kissimmee[Kissimmee.length] = createMarker(new GPoint(-81.40796500,28.31913700),"
North Kissimmee Christian School
425 W Donegan Avenue
Kissimmee, FL 34741
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("North Kissimmee Christian School",'Kissimmee=' + Kissimmee.length); Kissimmee[Kissimmee.length] = createMarker(new GPoint(-81.34255200,28.31507400),"
North Lake Academy
2500 Boggy Creek Road
Kissimmee, FL 34744
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("North Lake Academy",'Kissimmee=' + Kissimmee.length); Kissimmee[Kissimmee.length] = createMarker(new GPoint(-81.34858500,28.30443700),"
Osceola Adventist Christian School
2391 Fortune Road
Kissimmee, FL 34744
Co-ed school, 1-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Osceola Adventist Christian School",'Kissimmee=' + Kissimmee.length); Kissimmee[Kissimmee.length] = createMarker(new GPoint(-81.41346600,28.29456300),"
Osceola Montessori School
916 Sumner Street
Kissimmee, FL 34741
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Osceola Montessori School",'Kissimmee=' + Kissimmee.length); Kissimmee[Kissimmee.length] = createMarker(new GPoint(-81.42294100,28.31071400),"
Otis Memorial Academy
414 Sumner St 730 N Central Ave
Kissimmee, FL 34741
Co-ed school, 1-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Otis Memorial Academy",'Kissimmee=' + Kissimmee.length); Kissimmee[Kissimmee.length] = createMarker(new GPoint(-81.40674000,28.29443400),"
Pleasant Hill Academy
Po Box 453536
Kissimmee, FL 34745
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Pleasant Hill Academy",'Kissimmee=' + Kissimmee.length); St_Cloud[St_Cloud.length] = createMarker(new GPoint(-81.29684300,28.24866800),"
Rocking Horse Christian Preschool
1015 Tennessee Ave
St Cloud, FL 34769
Co-ed school, PK-2
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Rocking Horse Christian Preschool",'St_Cloud=' + St_Cloud.length); Saint_Cloud[Saint_Cloud.length] = createMarker(new GPoint(-81.30975500,28.25016400),"
St. Thomas Aquinas School
800 Brown Chapel Road
Saint Cloud, FL 34769
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Thomas Aquinas School",'Saint_Cloud=' + Saint_Cloud.length); Kissimmee[Kissimmee.length] = createMarker(new GPoint(-81.40356400,28.31384200),"
Shady Oaks Private School
2355 N Orange Blossom Trail
Kissimmee, FL 34744
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Shady Oaks Private School",'Kissimmee=' + Kissimmee.length); Saint_Cloud[Saint_Cloud.length] = createMarker(new GPoint(-81.34400200,28.30407800),"
Southland Christian School
2901 17th Street
Saint Cloud, FL 34769
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Southland Christian School",'Saint_Cloud=' + Saint_Cloud.length); Kissimmee[Kissimmee.length] = createMarker(new GPoint(-81.43378000,28.30428700),"
Trinity Lutheran School
3016 W Vine Street
Kissimmee, FL 34741
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Trinity Lutheran School",'Kissimmee=' + Kissimmee.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/////3/' + showArray); map.removeOverlays(Celebration); map.removeOverlays(Kissimmee); map.removeOverlays(Saint_Cloud); map.removeOverlays(St_Cloud); 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(Kissimmee);map.removeOverlays(Celebration); map.removeOverlays(Kissimmee); map.removeOverlays(Saint_Cloud); map.removeOverlays(St_Cloud); map.addOverlays(Celebration); centerByArray(Celebration, false, false); cntMarker += Celebration.length; map.addOverlays(Kissimmee); centerByArray(Kissimmee, false, false); cntMarker += Kissimmee.length; map.addOverlays(Saint_Cloud); centerByArray(Saint_Cloud, false, false); cntMarker += Saint_Cloud.length; map.addOverlays(St_Cloud); centerByArray(St_Cloud, false, false); cntMarker += St_Cloud.length; centerByArray(Kissimmee,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=3&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; }