function addMarkers(){ mySelect = document.getElementById('selection'); Hialeah = [];Tampa = [];Winter_Haven = [];Fort_Myers = [];Fort_Lauderdale = [];Neptune_Beach = [];Orlando = [];Miami = [];Bartow = [];Brandon = [];Homestead = [];Lake_Wales = [];Kissimmee = [];North_Miami_Beach = [];Coral_Gables = [];Lake_Placid = [];Boca_Raton = [];Brooksville = [];Winter_Park = [];Wesley_Chapel = [];Saint_Petersburg = [];Plantation = [];Ocala = [];Longwood = [];Melbourne = [];Palm_Beach_Gardens = [];Naples = [];Palm_Harbor = [];Orange_Park = [];mySelect.options[mySelect.options.length] = new Option("Bartow schools",'all=Bartow'); mySelect.options[mySelect.options.length] = new Option("Boca Raton schools",'all=Boca_Raton'); mySelect.options[mySelect.options.length] = new Option("Brandon schools",'all=Brandon'); mySelect.options[mySelect.options.length] = new Option("Brooksville schools",'all=Brooksville'); mySelect.options[mySelect.options.length] = new Option("Coral Gables schools",'all=Coral_Gables'); mySelect.options[mySelect.options.length] = new Option("Fort Lauderdale schools",'all=Fort_Lauderdale'); mySelect.options[mySelect.options.length] = new Option("Fort Myers schools",'all=Fort_Myers'); mySelect.options[mySelect.options.length] = new Option("Hialeah schools",'all=Hialeah'); mySelect.options[mySelect.options.length] = new Option("Homestead schools",'all=Homestead'); mySelect.options[mySelect.options.length] = new Option("Kissimmee schools",'all=Kissimmee'); mySelect.options[mySelect.options.length] = new Option("Lake Placid schools",'all=Lake_Placid'); mySelect.options[mySelect.options.length] = new Option("Lake Wales schools",'all=Lake_Wales'); mySelect.options[mySelect.options.length] = new Option("Longwood schools",'all=Longwood'); mySelect.options[mySelect.options.length] = new Option("Melbourne schools",'all=Melbourne'); mySelect.options[mySelect.options.length] = new Option("Miami schools",'all=Miami'); mySelect.options[mySelect.options.length] = new Option("Naples schools",'all=Naples'); mySelect.options[mySelect.options.length] = new Option("Neptune Beach schools",'all=Neptune_Beach'); mySelect.options[mySelect.options.length] = new Option("North Miami Beach schools",'all=North_Miami_Beach'); mySelect.options[mySelect.options.length] = new Option("Ocala schools",'all=Ocala'); mySelect.options[mySelect.options.length] = new Option("Orange Park schools",'all=Orange_Park'); mySelect.options[mySelect.options.length] = new Option("Orlando schools",'all=Orlando'); mySelect.options[mySelect.options.length] = new Option("Palm Beach Gardens schools",'all=Palm_Beach_Gardens'); mySelect.options[mySelect.options.length] = new Option("Palm Harbor schools",'all=Palm_Harbor'); mySelect.options[mySelect.options.length] = new Option("Plantation schools",'all=Plantation'); mySelect.options[mySelect.options.length] = new Option("Saint Petersburg schools",'all=Saint_Petersburg'); mySelect.options[mySelect.options.length] = new Option("Tampa schools",'all=Tampa'); mySelect.options[mySelect.options.length] = new Option("Wesley Chapel schools",'all=Wesley_Chapel'); mySelect.options[mySelect.options.length] = new Option("Winter Haven schools",'all=Winter_Haven'); mySelect.options[mySelect.options.length] = new Option("Winter Park schools",'all=Winter_Park'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Hialeah[Hialeah.length] = createMarker(new GPoint(-80.28314600,25.87299200),"
Asbury Christian School
5559 Palm Avenue
Hialeah, FL 33012
Co-ed school, PK-4
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Asbury Christian School",'Hialeah=' + Hialeah.length); Tampa[Tampa.length] = createMarker(new GPoint(-82.49385400,27.90698500),"
Bayshore Christian School
3909 S Macdill Avenue
Tampa, FL 33611
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bayshore Christian School",'Tampa=' + Tampa.length); Winter_Haven[Winter_Haven.length] = createMarker(new GPoint(-81.73502500,28.02778300),"
Beymer Umc Preschool & Kindergarten
700 N Lake Howard Drive
Winter Haven, FL 33881
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Beymer Umc Preschool & Kindergarten",'Winter_Haven=' + Winter_Haven.length); Fort_Myers[Fort_Myers.length] = createMarker(new GPoint(-81.89709500,26.54610900),"
Bright Beginnings Early School
8570 Cypress Lake Drive
Fort Myers, FL 33919
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bright Beginnings Early School",'Fort_Myers=' + Fort_Myers.length); Fort_Lauderdale[Fort_Lauderdale.length] = createMarker(new GPoint(-80.11166200,26.18786100),"
Christ Church School
4845 NE 25th Avenue
Fort Lauderdale, FL 33308
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Christ Church School",'Fort_Lauderdale=' + Fort_Lauderdale.length); Neptune_Beach[Neptune_Beach.length] = createMarker(new GPoint(-81.40873000,30.32085600),"
Christ(united) Methodist Kindergarten
400 Penman Rd.
Neptune Beach, FL 32266
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Christ(united) Methodist Kindergarten",'Neptune_Beach=' + Neptune_Beach.length); Orlando[Orlando.length] = createMarker(new GPoint(-81.38820300,28.57100700),"
College Park UMC Primary School
644 W. Princeton St.
Orlando, FL 32804
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("College Park UMC Primary School",'Orlando=' + Orlando.length); Miami[Miami.length] = createMarker(new GPoint(-80.34276300,25.57466600),"
Cutler Ridge United Methodist Kindergarten
20740 Old Cutler Road
Miami, FL 33189
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Cutler Ridge United Methodist Kindergarten",'Miami=' + Miami.length); Bartow[Bartow.length] = createMarker(new GPoint(-81.84332800,27.89324400),"
First Methodist School
455 S Broadway Avenue
Bartow, FL 33830
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("First Methodist School",'Bartow=' + Bartow.length); Brandon[Brandon.length] = createMarker(new GPoint(-82.28997300,27.93844200),"
First Umc Preschool And Kindergarten
120 N Knights Avenue
Brandon, FL 33510
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("First Umc Preschool And Kindergarten",'Brandon=' + Brandon.length); Homestead[Homestead.length] = createMarker(new GPoint(-80.47756400,25.47556100),"
First United Methodist Christian School
622 North Krome Avenue
Homestead, FL 33030
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("First United Methodist Christian School",'Homestead=' + Homestead.length); Lake_Wales[Lake_Wales.length] = createMarker(new GPoint(-81.58164400,27.90453100),"
First United Methodist Preschool
230 N Fifth Street
Lake Wales, FL 33853
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("First United Methodist Preschool",'Lake_Wales=' + Lake_Wales.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); North_Miami_Beach[North_Miami_Beach.length] = createMarker(new GPoint(-80.16184600,25.92696300),"
Fulford Christian Day Care
1900 Ne 164th Street
North Miami Beach, FL 33162
Co-ed school, PK-1
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Fulford Christian Day Care",'North_Miami_Beach=' + North_Miami_Beach.length); Coral_Gables[Coral_Gables.length] = createMarker(new GPoint(-80.26555100,25.74918700),"
The Growing Place
536 Coral Way
Coral Gables, FL 33134
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Growing Place",'Coral_Gables=' + Coral_Gables.length); Tampa[Tampa.length] = createMarker(new GPoint(-82.49130800,28.06568500),"
Lake Magdalene UMC Early Childhood Center
2902 W Fletcher Avenue
Tampa, FL 33618
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lake Magdalene UMC Early Childhood Center",'Tampa=' + Tampa.length); Lake_Placid[Lake_Placid.length] = createMarker(new GPoint(-81.35525300,27.30134300),"
Lakeview Christian School
503 Kent Avenue
Lake Placid, FL 33852
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lakeview Christian School",'Lake_Placid=' + Lake_Placid.length); Boca_Raton[Boca_Raton.length] = createMarker(new GPoint(-80.08440300,26.35676500),"
Mece Inc
625 Ne Mizner Blvd
Boca Raton, FL 33432
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mece Inc",'Boca_Raton=' + Boca_Raton.length); Brooksville[Brooksville.length] = createMarker(new GPoint(-82.38890000,28.55476300),"
Methodist School Center
109 S Broad Street
Brooksville, FL 34601
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Methodist School Center",'Brooksville=' + Brooksville.length); Winter_Park[Winter_Park.length] = createMarker(new GPoint(-81.34885500,28.59814200),"
Methodist School For Early Education
125 N Interlachen Avenue
Winter Park, FL 32789
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Methodist School For Early Education",'Winter_Park=' + Winter_Park.length); Wesley_Chapel[Wesley_Chapel.length] = createMarker(new GPoint(-82.26175800,28.21808100),"
New River Academy
4210 Ernest Drive
Wesley Chapel, FL 33543
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("New River Academy",'Wesley_Chapel=' + Wesley_Chapel.length); Tampa[Tampa.length] = createMarker(new GPoint(-82.48733500,28.02543700),"
Oak Grove United Methodist School
2707 W Waters Avenue
Tampa, FL 33614
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Oak Grove United Methodist School",'Tampa=' + Tampa.length); Miami[Miami.length] = createMarker(new GPoint(-80.35154700,25.73435600),"
Olympia Height U. Meth. Kind &
3801 Sw 97 Ave
Miami, FL 33165
Co-ed school, PK-KG
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Olympia Height U. Meth. Kind &",'Miami=' + Miami.length); Saint_Petersburg[Saint_Petersburg.length] = createMarker(new GPoint(-82.73512100,27.76970100),"
Pasadena Community Church School
112 70th St South
Saint Petersburg, FL 33707
Co-ed school, PK-4
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Pasadena Community Church School",'Saint_Petersburg=' + Saint_Petersburg.length); Plantation[Plantation.length] = createMarker(new GPoint(-80.24150000,26.13580600),"
Plantation Methodist Preschool
1001 Nw 70th Avenue
Plantation, FL 33313
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Plantation Methodist Preschool",'Plantation=' + Plantation.length); Hialeah[Hialeah.length] = createMarker(new GPoint(-80.26416200,25.86567200),"
Rising Son Academy
921 E 47th Street
Hialeah, FL 33013
Co-ed school, 5-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Rising Son Academy",'Hialeah=' + Hialeah.length); Saint_Petersburg[Saint_Petersburg.length] = createMarker(new GPoint(-82.63550400,27.82863700),"
Riviera Day School
175 62nd Avenue N
Saint Petersburg, FL 33702
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Riviera Day School",'Saint_Petersburg=' + Saint_Petersburg.length); Ocala[Ocala.length] = createMarker(new GPoint(-82.07865600,29.17876300),"
St. Pauls Christian School
800 Se 41st Ave
Ocala, FL 34471
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Pauls Christian School",'Ocala=' + Ocala.length); Longwood[Longwood.length] = createMarker(new GPoint(-81.38609000,28.69201300),"
Sanlando Christian School
1890 W State Road 434
Longwood, FL 32750
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sanlando Christian School",'Longwood=' + Longwood.length); Tampa[Tampa.length] = createMarker(new GPoint(-82.38907700,28.10753500),"
St James Um Preschool & Kindergarten
16202 Bruce B Downs Blvd
Tampa, FL 33647
Co-ed school, PK-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St James Um Preschool & Kindergarten",'Tampa=' + Tampa.length); Winter_Haven[Winter_Haven.length] = createMarker(new GPoint(-81.70347300,28.00443900),"
St John's Christian School
1800 Cypress Gardens Blvd SE
Winter Haven, FL 33884
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St John's Christian School",'Winter_Haven=' + Winter_Haven.length); Melbourne[Melbourne.length] = createMarker(new GPoint(-80.68375500,28.23024100),"
Suntree United Methodist School
7400 N Wickham Road
Melbourne, FL 32940
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Suntree United Methodist School",'Melbourne=' + Melbourne.length); Miami[Miami.length] = createMarker(new GPoint(-80.23530000,25.76660000),"
Tamiami United Methodist Day Care & Elementary School
726 Sw 14th Avenue R
Miami, FL 33135
Co-ed school, PK-2
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Tamiami United Methodist Day Care & Elementary School",'Miami=' + Miami.length); Palm_Beach_Gardens[Palm_Beach_Gardens.length] = createMarker(new GPoint(-80.10627100,26.81803700),"
Trinity Christian School Of P B Gardens
9625 N Military Trail
Palm Beach Gardens, FL 33410
Co-ed school, PK-1
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Trinity Christian School Of P B Gardens",'Palm_Beach_Gardens=' + Palm_Beach_Gardens.length); Naples[Naples.length] = createMarker(new GPoint(-81.79113800,26.21817200),"
The Village School
6000 Goodlette Road N
Naples, FL 34109
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Village School",'Naples=' + Naples.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); Orange_Park[Orange_Park.length] = createMarker(new GPoint(-81.69833600,30.16426300),"
Wonderworks
152 Stowe Avenue
Orange Park, FL 32073
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Wonderworks",'Orange_Park=' + Orange_Park.length); map.removeOverlays(Bartow); map.removeOverlays(Boca_Raton); map.removeOverlays(Brandon); map.removeOverlays(Brooksville); map.removeOverlays(Coral_Gables); map.removeOverlays(Fort_Lauderdale); map.removeOverlays(Fort_Myers); map.removeOverlays(Hialeah); map.removeOverlays(Homestead); map.removeOverlays(Kissimmee); map.removeOverlays(Lake_Placid); map.removeOverlays(Lake_Wales); map.removeOverlays(Longwood); map.removeOverlays(Melbourne); map.removeOverlays(Miami); map.removeOverlays(Naples); map.removeOverlays(Neptune_Beach); map.removeOverlays(North_Miami_Beach); map.removeOverlays(Ocala); map.removeOverlays(Orange_Park); map.removeOverlays(Orlando); map.removeOverlays(Palm_Beach_Gardens); map.removeOverlays(Palm_Harbor); map.removeOverlays(Plantation); map.removeOverlays(Saint_Petersburg); map.removeOverlays(Tampa); map.removeOverlays(Wesley_Chapel); map.removeOverlays(Winter_Haven); map.removeOverlays(Winter_Park); setTimeout(function(){map.addOverlays(Bartow)},1000); setTimeout(function(){map.addOverlays(Boca_Raton)},1000); setTimeout(function(){map.addOverlays(Brandon)},1000); setTimeout(function(){map.addOverlays(Brooksville)},1000); setTimeout(function(){map.addOverlays(Coral_Gables)},1000); setTimeout(function(){map.addOverlays(Fort_Lauderdale)},1000); setTimeout(function(){map.addOverlays(Fort_Myers)},1000); setTimeout(function(){map.addOverlays(Hialeah)},1000); setTimeout(function(){map.addOverlays(Homestead)},1000); setTimeout(function(){map.addOverlays(Kissimmee)},1000); setTimeout(function(){map.addOverlays(Lake_Placid)},1000); setTimeout(function(){map.addOverlays(Lake_Wales)},1000); setTimeout(function(){map.addOverlays(Longwood)},1000); setTimeout(function(){map.addOverlays(Melbourne)},1000); setTimeout(function(){map.addOverlays(Miami)},1000); setTimeout(function(){map.addOverlays(Naples)},1000); setTimeout(function(){map.addOverlays(Neptune_Beach)},1000); setTimeout(function(){map.addOverlays(North_Miami_Beach)},1000); setTimeout(function(){map.addOverlays(Ocala)},1000); setTimeout(function(){map.addOverlays(Orange_Park)},1000); setTimeout(function(){map.addOverlays(Orlando)},1000); setTimeout(function(){map.addOverlays(Palm_Beach_Gardens)},1000); setTimeout(function(){map.addOverlays(Palm_Harbor)},1000); setTimeout(function(){map.addOverlays(Plantation)},1000); setTimeout(function(){map.addOverlays(Saint_Petersburg)},1000); setTimeout(function(){map.addOverlays(Tampa)},1000); setTimeout(function(){map.addOverlays(Wesley_Chapel)},1000); setTimeout(function(){map.addOverlays(Winter_Haven)},1000); setTimeout(function(){map.addOverlays(Winter_Park)},1000); maxLng = -80.08440300; maxLat = 30.32085600; minLng = -82.74774600; minLat = 25.47556100; reCenterMap(); } // 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(Bartow); map.removeOverlays(Boca_Raton); map.removeOverlays(Brandon); map.removeOverlays(Brooksville); map.removeOverlays(Coral_Gables); map.removeOverlays(Fort_Lauderdale); map.removeOverlays(Fort_Myers); map.removeOverlays(Hialeah); map.removeOverlays(Homestead); map.removeOverlays(Kissimmee); map.removeOverlays(Lake_Placid); map.removeOverlays(Lake_Wales); map.removeOverlays(Longwood); map.removeOverlays(Melbourne); map.removeOverlays(Miami); map.removeOverlays(Naples); map.removeOverlays(Neptune_Beach); map.removeOverlays(North_Miami_Beach); map.removeOverlays(Ocala); map.removeOverlays(Orange_Park); map.removeOverlays(Orlando); map.removeOverlays(Palm_Beach_Gardens); map.removeOverlays(Palm_Harbor); map.removeOverlays(Plantation); map.removeOverlays(Saint_Petersburg); map.removeOverlays(Tampa); map.removeOverlays(Wesley_Chapel); map.removeOverlays(Winter_Haven); map.removeOverlays(Winter_Park); 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(Hialeah);map.removeOverlays(Bartow); map.removeOverlays(Boca_Raton); map.removeOverlays(Brandon); map.removeOverlays(Brooksville); map.removeOverlays(Coral_Gables); map.removeOverlays(Fort_Lauderdale); map.removeOverlays(Fort_Myers); map.removeOverlays(Hialeah); map.removeOverlays(Homestead); map.removeOverlays(Kissimmee); map.removeOverlays(Lake_Placid); map.removeOverlays(Lake_Wales); map.removeOverlays(Longwood); map.removeOverlays(Melbourne); map.removeOverlays(Miami); map.removeOverlays(Naples); map.removeOverlays(Neptune_Beach); map.removeOverlays(North_Miami_Beach); map.removeOverlays(Ocala); map.removeOverlays(Orange_Park); map.removeOverlays(Orlando); map.removeOverlays(Palm_Beach_Gardens); map.removeOverlays(Palm_Harbor); map.removeOverlays(Plantation); map.removeOverlays(Saint_Petersburg); map.removeOverlays(Tampa); map.removeOverlays(Wesley_Chapel); map.removeOverlays(Winter_Haven); map.removeOverlays(Winter_Park); map.addOverlays(Bartow); centerByArray(Bartow, false, false); cntMarker += Bartow.length; map.addOverlays(Boca_Raton); centerByArray(Boca_Raton, false, false); cntMarker += Boca_Raton.length; map.addOverlays(Brandon); centerByArray(Brandon, false, false); cntMarker += Brandon.length; map.addOverlays(Brooksville); centerByArray(Brooksville, false, false); cntMarker += Brooksville.length; map.addOverlays(Coral_Gables); centerByArray(Coral_Gables, false, false); cntMarker += Coral_Gables.length; map.addOverlays(Fort_Lauderdale); centerByArray(Fort_Lauderdale, false, false); cntMarker += Fort_Lauderdale.length; map.addOverlays(Fort_Myers); centerByArray(Fort_Myers, false, false); cntMarker += Fort_Myers.length; map.addOverlays(Hialeah); centerByArray(Hialeah, false, false); cntMarker += Hialeah.length; map.addOverlays(Homestead); centerByArray(Homestead, false, false); cntMarker += Homestead.length; map.addOverlays(Kissimmee); centerByArray(Kissimmee, false, false); cntMarker += Kissimmee.length; map.addOverlays(Lake_Placid); centerByArray(Lake_Placid, false, false); cntMarker += Lake_Placid.length; map.addOverlays(Lake_Wales); centerByArray(Lake_Wales, false, false); cntMarker += Lake_Wales.length; map.addOverlays(Longwood); centerByArray(Longwood, false, false); cntMarker += Longwood.length; map.addOverlays(Melbourne); centerByArray(Melbourne, false, false); cntMarker += Melbourne.length; map.addOverlays(Miami); centerByArray(Miami, false, false); cntMarker += Miami.length; map.addOverlays(Naples); centerByArray(Naples, false, false); cntMarker += Naples.length; map.addOverlays(Neptune_Beach); centerByArray(Neptune_Beach, false, false); cntMarker += Neptune_Beach.length; map.addOverlays(North_Miami_Beach); centerByArray(North_Miami_Beach, false, false); cntMarker += North_Miami_Beach.length; map.addOverlays(Ocala); centerByArray(Ocala, false, false); cntMarker += Ocala.length; map.addOverlays(Orange_Park); centerByArray(Orange_Park, false, false); cntMarker += Orange_Park.length; map.addOverlays(Orlando); centerByArray(Orlando, false, false); cntMarker += Orlando.length; map.addOverlays(Palm_Beach_Gardens); centerByArray(Palm_Beach_Gardens, false, false); cntMarker += Palm_Beach_Gardens.length; map.addOverlays(Palm_Harbor); centerByArray(Palm_Harbor, false, false); cntMarker += Palm_Harbor.length; map.addOverlays(Plantation); centerByArray(Plantation, false, false); cntMarker += Plantation.length; map.addOverlays(Saint_Petersburg); centerByArray(Saint_Petersburg, false, false); cntMarker += Saint_Petersburg.length; map.addOverlays(Tampa); centerByArray(Tampa, false, false); cntMarker += Tampa.length; map.addOverlays(Wesley_Chapel); centerByArray(Wesley_Chapel, false, false); cntMarker += Wesley_Chapel.length; map.addOverlays(Winter_Haven); centerByArray(Winter_Haven, false, false); cntMarker += Winter_Haven.length; map.addOverlays(Winter_Park); centerByArray(Winter_Park, false, false); cntMarker += Winter_Park.length; centerByArray(Hialeah,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///7308,5977,32267,6628,7393,6634,6398,6103,35013,5956,31119,6317,6318,6564,7394,6922,7133,6194,6742,7141,32308,7366,6344,7497,7523,6135,7244,7308,6835,6810,6884,5977,6552,7459,7494,33484,7355,7495,7446,/all'); //window.open('/map.php?type=2&schools=7308,5977,32267,6628,7393,6634,6398,6103,35013,5956,31119,6317,6318,6564,7394,6922,7133,6194,6742,7141,32308,7366,6344,7497,7523,6135,7244,7308,6835,6810,6884,5977,6552,7459,7494,33484,7355,7495,7446,&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; }