function addMarkers() { mySelect = document.getElementById('selection'); Naples = [];Ochopee = [];Immokalee = [];Everglades_City = [];Marco_Island = [];mySelect.options[mySelect.options.length] = new Option("Everglades City schools",'all=Everglades_City'); mySelect.options[mySelect.options.length] = new Option("Immokalee schools",'all=Immokalee'); mySelect.options[mySelect.options.length] = new Option("Marco Island schools",'all=Marco_Island'); mySelect.options[mySelect.options.length] = new Option("Naples schools",'all=Naples'); mySelect.options[mySelect.options.length] = new Option("Ochopee schools",'all=Ochopee'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Naples[Naples.length] = createMarker(new GPoint(-81.75175476,26.10917091),"
Avalon Elementary School
3300 Thomasson Drive
Naples, FL 34112

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Avalon Elementary School",'Naples=' + Naples.length); Naples[Naples.length] = createMarker(new GPoint(-81.76824951,26.21473122),"
Barron Collier High School
5600 Cougar Drive
Naples, FL 34109

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Barron Collier High School",'Naples=' + Naples.length); Naples[Naples.length] = createMarker(new GPoint(-81.67150116,26.22891426),"
Big Cypress Elementary School
3250 Golden Gate Blvd
Naples, FL 34120

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Big Cypress Elementary School",'Naples=' + Naples.length); Ochopee[Ochopee.length] = createMarker(new GPoint(-81.27042000,25.94250100),"
Big Cypress Wilderness Institute
25959 Turner River Road
Ochopee, FL 34141

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Big Cypress Wilderness Institute",'Ochopee=' + Ochopee.length); Naples[Naples.length] = createMarker(new GPoint(-81.71834564,26.14896393),"
Calusa Park Elementary School
4600 Santa Barbara Boulev
Naples, FL 34104

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Calusa Park Elementary School",'Naples=' + Naples.length); Naples[Naples.length] = createMarker(new GPoint(-81.74353800,26.10987500),"
Collier County Drop-back-in-academy
5130 Rattlesnake Hammock
Naples, FL 34113

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Collier County Drop-back-in-academy",'Naples=' + Naples.length); Naples[Naples.length] = createMarker(new GPoint(-81.76782900,26.24048000),"
Collier County Superintendent's Office
25775 Osceola Trail
Naples, FL 34109

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Collier County Superintendent's Office",'Naples=' + Naples.length); Naples[Naples.length] = createMarker(new GPoint(-81.59422302,26.29235458),"
Corkscrew Elementary School
1065 County Road 858
Naples, FL 34120

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Corkscrew Elementary School",'Naples=' + Naples.length); Naples[Naples.length] = createMarker(new GPoint(-81.59428406,26.29235268),"
Corkscrew Middle School
1165 County Road 858
Naples, FL 34120

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Corkscrew Middle School",'Naples=' + Naples.length); Immokalee[Immokalee.length] = createMarker(new GPoint(-81.41449900,26.39684200),"
D.r.i.l.l. Academy
323 Stockade Road
Immokalee, FL 34142

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("D.r.i.l.l. Academy",'Immokalee=' + Immokalee.length); Naples[Naples.length] = createMarker(new GPoint(-81.76432800,26.21473122),"
Detention Center
3315 E. Tamiami Trail
Naples, FL 34112

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Detention Center",'Naples=' + Naples.length); Naples[Naples.length] = createMarker(new GPoint(-81.75856781,26.14206886),"
East Naples Middle School
4100 Estey Avenue
Naples, FL 34104

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("East Naples Middle School",'Naples=' + Naples.length); Naples[Naples.length] = createMarker(new GPoint(-81.54744100,26.34047800),"
Estates Elementary School
5945 Everglades Blvd N
Naples, FL 34120

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Estates Elementary School",'Naples=' + Naples.length); Everglades_City[Everglades_City.length] = createMarker(new GPoint(-81.38469696,25.85910034),"
Everglades City School
P O Box 170
Everglades City, FL 34139

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Everglades City School",'Everglades_City=' + Everglades_City.length); Naples[Naples.length] = createMarker(new GPoint(-81.76432800,26.21473122),"
Excel Program
5720 Cougar Lane
Naples, FL 34109

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Excel Program",'Naples=' + Naples.length); Naples[Naples.length] = createMarker(new GPoint(-81.74540400,26.17322800),"
First Collier County Charter School, Inc.
6800 Golden Gate Parkway
Naples, FL 34105

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("First Collier County Charter School, Inc.",'Naples=' + Naples.length); Naples[Naples.length] = createMarker(new GPoint(-81.70483398,26.19052696),"
Golden Gate Elementary School
4911 20th Pl Sw
Naples, FL 34116

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Golden Gate Elementary School",'Naples=' + Naples.length); Naples[Naples.length] = createMarker(new GPoint(-81.69994200,26.16606900),"
Golden Gate High School
2925 Titan Lane
Naples, FL 34116

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Golden Gate High School",'Naples=' + Naples.length); Naples[Naples.length] = createMarker(new GPoint(-81.70680237,26.18379974),"
Golden Gate Intermediate Center North
5055 20th Place, Sw
Naples, FL 34116

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Golden Gate Intermediate Center North",'Naples=' + Naples.length); Naples[Naples.length] = createMarker(new GPoint(-81.70680237,26.18379974),"
Golden Gate Intermediate Center South
2965 44th Terrace, Sw
Naples, FL 34116

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Golden Gate Intermediate Center South",'Naples=' + Naples.length); Naples[Naples.length] = createMarker(new GPoint(-81.70446014,26.17795372),"
Golden Gate Middle School
2701 48th Terrace Sw
Naples, FL 34116

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Golden Gate Middle School",'Naples=' + Naples.length); Naples[Naples.length] = createMarker(new GPoint(-81.69680023,26.17835808),"
Golden Terrace Elementary School
2711 44th Terrace Sw
Naples, FL 34116

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Golden Terrace Elementary School",'Naples=' + Naples.length); Naples[Naples.length] = createMarker(new GPoint(-81.71005249,26.27312851),"
Gulf Coast High School
7878 Shark Way
Naples, FL 34119

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Gulf Coast High School",'Naples=' + Naples.length); Naples[Naples.length] = createMarker(new GPoint(-81.79940033,26.14390755),"
Gulfview Middle School
255 6th Street S
Naples, FL 34102

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Gulfview Middle School",'Naples=' + Naples.length); Immokalee[Immokalee.length] = createMarker(new GPoint(-81.42774963,26.43284607),"
Highlands Elementary School
1101 Lake Trafford Road
Immokalee, FL 34142

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Highlands Elementary School",'Immokalee=' + Immokalee.length); Naples[Naples.length] = createMarker(new GPoint(-81.76730347,26.24309921),"
Hospital/homebound
5775 Osceola Trail
Naples, FL 34109

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Hospital/homebound",'Naples=' + Naples.length); Immokalee[Immokalee.length] = createMarker(new GPoint(-81.76432800,26.21473122),"
Immokalee Area Teenage Parenting Program
701 Immokalee Drive
Immokalee, FL 34142

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Immokalee Area Teenage Parenting Program",'Immokalee=' + Immokalee.length); Immokalee[Immokalee.length] = createMarker(new GPoint(-81.42584991,26.42223740),"
Immokalee Community School
123 N 4th Street
Immokalee, FL 34142

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Immokalee Community School",'Immokalee=' + Immokalee.length); Immokalee[Immokalee.length] = createMarker(new GPoint(-81.42305756,26.42546272),"
Immokalee High School
701 W Immokalee Drive
Immokalee, FL 34142

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Immokalee High School",'Immokalee=' + Immokalee.length); Immokalee[Immokalee.length] = createMarker(new GPoint(-81.42550659,26.42548561),"
Immokalee Middle School
401 N 9th Street
Immokalee, FL 34142

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Immokalee Middle School",'Immokalee=' + Immokalee.length); Naples[Naples.length] = createMarker(new GPoint(-81.76208600,26.14220800),"
Internet Based High School
3710 Estey Avenue
Naples, FL 34104

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Internet Based High School",'Naples=' + Naples.length); Naples[Naples.length] = createMarker(new GPoint(-81.58322144,26.25576019),"
Lake Park Elementary School
1295 14th Avenue N
Naples, FL 34102

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lake Park Elementary School",'Naples=' + Naples.length); Immokalee[Immokalee.length] = createMarker(new GPoint(-81.43106079,26.43280029),"
Lake Trafford Elementary School
3500 Lake Trafford Road
Immokalee, FL 34142

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lake Trafford Elementary School",'Immokalee=' + Immokalee.length); Naples[Naples.length] = createMarker(new GPoint(-81.71322632,26.27312851),"
Laurel Oak Elementary School
7800 Immokalee Road
Naples, FL 34119

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Laurel Oak Elementary School",'Naples=' + Naples.length); Immokalee[Immokalee.length] = createMarker(new GPoint(-81.42550659,26.42565727),"
Learning Center
508 N 9th Street
Immokalee, FL 34142

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Learning Center",'Immokalee=' + Immokalee.length); Naples[Naples.length] = createMarker(new GPoint(-81.69445038,26.10320091),"
Lely Elementary School
8125 Lely Cultural Parkwa
Naples, FL 34113

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lely Elementary School",'Naples=' + Naples.length); Naples[Naples.length] = createMarker(new GPoint(-81.71187592,26.09272957),"
Lely High School
1 Lely High School Blvd
Naples, FL 34113

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lely High School",'Naples=' + Naples.length); Naples[Naples.length] = createMarker(new GPoint(-81.68750000,26.04758453),"
Manatee Elementary School
1880 Manatee Road
Naples, FL 34114

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Manatee Elementary School",'Naples=' + Naples.length); Naples[Naples.length] = createMarker(new GPoint(-81.68746185,26.04758835),"
Manatee Middle School
1920 Manatee Road
Naples, FL 34114

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Manatee Middle School",'Naples=' + Naples.length); Marco_Island[Marco_Island.length] = createMarker(new GPoint(-81.71231079,25.94103622),"
Marco Island Charter Middle School
1401 Trinadad Avenue
Marco Island, FL 34145

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Marco Island Charter Middle School",'Marco_Island=' + Marco_Island.length); Naples[Naples.length] = createMarker(new GPoint(-81.76432800,26.21473122),"
Naples Area Teenage Parenting Program High School
2925 Titan Lane
Naples, FL 34116

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Naples Area Teenage Parenting Program High School",'Naples=' + Naples.length); Naples[Naples.length] = createMarker(new GPoint(-81.79714966,26.17098618),"
Naples High School
1100 Golden Eagle Circle
Naples, FL 34102

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Naples High School",'Naples=' + Naples.length); Naples[Naples.length] = createMarker(new GPoint(-81.81104279,26.27216339),"
Naples Park Elementary School
685 111th Avenue N
Naples, FL 34108

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Naples Park Elementary School",'Naples=' + Naples.length); Naples[Naples.length] = createMarker(new GPoint(-81.74109650,26.15159988),"
Naples Technology Academy
3702 Estey Avenue
Naples, FL 34104

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Naples Technology Academy",'Naples=' + Naples.length); Naples[Naples.length] = createMarker(new GPoint(-81.76432800,26.21473122),"
New Beginnings - Naples Middle School
3710 Estey Avenue
Naples, FL 34104

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("New Beginnings - Naples Middle School",'Naples=' + Naples.length); Immokalee[Immokalee.length] = createMarker(new GPoint(-81.76432800,26.21473122),"
New Beginnings Alternative
800 Immokalee Drive
Immokalee, FL 34142

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("New Beginnings Alternative",'Immokalee=' + Immokalee.length); Naples[Naples.length] = createMarker(new GPoint(-81.76246000,26.29994700),"
North Naples Middle School
16165 Livingston Road
Naples, FL 34110

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("North Naples Middle School",'Naples=' + Naples.length); Naples[Naples.length] = createMarker(new GPoint(-81.68915558,26.26424217),"
Oakridge Middle School
14975 Collier Boulevard
Naples, FL 34119

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Oakridge Middle School",'Naples=' + Naples.length); Naples[Naples.length] = createMarker(new GPoint(-81.75942230,26.21900558),"
Osceola Elementary School
5770 Osceola Trail
Naples, FL 34109

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Osceola Elementary School",'Naples=' + Naples.length); Immokalee[Immokalee.length] = createMarker(new GPoint(-81.76432800,26.21473122),"
Pace Program
201 N. First Street
Immokalee, FL 34143

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Pace Program",'Immokalee=' + Immokalee.length); Naples[Naples.length] = createMarker(new GPoint(-81.57666700,26.29388100),"
Palmetto Ridge High School
1655 Victory Lane
Naples, FL 34120

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Palmetto Ridge High School",'Naples=' + Naples.length); Naples[Naples.length] = createMarker(new GPoint(-81.76660919,26.13936806),"
Pelican Marsh Elementary School
9480 Airport Road N
Naples, FL 34109

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Pelican Marsh Elementary School",'Naples=' + Naples.length); Naples[Naples.length] = createMarker(new GPoint(-81.76432800,26.21473122),"
Phoenix Program
3706 Estey Avenue
Naples, FL 34104

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Phoenix Program",'Naples=' + Naples.length); Immokalee[Immokalee.length] = createMarker(new GPoint(-81.42042300,26.40782100),"
Phoenix Program-immokalee
614 S. 5th Street
Immokalee, FL 34142

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Phoenix Program-immokalee",'Immokalee=' + Immokalee.length); Naples[Naples.length] = createMarker(new GPoint(-81.78936005,26.21114731),"
Pine Ridge Middle School
1515 Pine Ridge Road
Naples, FL 34109

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Pine Ridge Middle School",'Naples=' + Naples.length); Immokalee[Immokalee.length] = createMarker(new GPoint(-81.42530060,26.41621017),"
Pinecrest Elementary School
313 S 9th Street
Immokalee, FL 34142

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Pinecrest Elementary School",'Immokalee=' + Immokalee.length); Naples[Naples.length] = createMarker(new GPoint(-81.76641083,26.12700081),"
Poinciana Elementary School
2825 Airport Road
Naples, FL 34105

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Poinciana Elementary School",'Naples=' + Naples.length); Immokalee[Immokalee.length] = createMarker(new GPoint(-81.42559814,26.42195129),"
Redlands Christian Migrant Association Charter School
908 Roberts Avenue
Immokalee, FL 34142

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Redlands Christian Migrant Association Charter School",'Immokalee=' + Immokalee.length); Naples[Naples.length] = createMarker(new GPoint(-81.59380341,26.29260063),"
Sabal Palm Elementary School
4095 18th Avenue Ne
Naples, FL 34120

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Sabal Palm Elementary School",'Naples=' + Naples.length); Naples[Naples.length] = createMarker(new GPoint(-81.80420685,26.21096611),"
Sea Gate Elementary School
650 Seagate Drive
Naples, FL 34103

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Sea Gate Elementary School",'Naples=' + Naples.length); Naples[Naples.length] = createMarker(new GPoint(-81.77050781,26.13301849),"
Shadowlawn Elementary School
2161 Shadowlawn Drive
Naples, FL 34112

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Shadowlawn Elementary School",'Naples=' + Naples.length); Naples[Naples.length] = createMarker(new GPoint(-81.76432800,26.21473122),"
Sunshine School
6075 Golden Gate Parkway
Naples, FL 34117

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sunshine School",'Naples=' + Naples.length); Marco_Island[Marco_Island.length] = createMarker(new GPoint(-81.71236420,25.93865204),"
Tommie Barfield Elementary School
101 Kirkwood Street
Marco Island, FL 34145

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Tommie Barfield Elementary School",'Marco_Island=' + Marco_Island.length); Immokalee[Immokalee.length] = createMarker(new GPoint(-81.39573669,26.40724373),"
Village Oaks Elementary School
1601 State Road 29
Immokalee, FL 34142

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Village Oaks Elementary School",'Immokalee=' + Immokalee.length); Naples[Naples.length] = createMarker(new GPoint(-81.72035217,26.22982788),"
Vineyards Elementary School
6225 Arbor Boulevard W
Naples, FL 34119

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Vineyards Elementary School",'Naples=' + Naples.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,10); /* 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(Everglades_City); map.removeOverlays(Immokalee); map.removeOverlays(Marco_Island); map.removeOverlays(Naples); map.removeOverlays(Ochopee); 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(Naples);map.removeOverlays(Everglades_City); map.removeOverlays(Immokalee); map.removeOverlays(Marco_Island); map.removeOverlays(Naples); map.removeOverlays(Ochopee); map.addOverlays(Everglades_City); centerByArray(Everglades_City, false, false); cntMarker += Everglades_City.length; map.addOverlays(Immokalee); centerByArray(Immokalee, false, false); cntMarker += Immokalee.length; map.addOverlays(Marco_Island); centerByArray(Marco_Island, false, false); cntMarker += Marco_Island.length; map.addOverlays(Naples); centerByArray(Naples, false, false); cntMarker += Naples.length; map.addOverlays(Ochopee); centerByArray(Ochopee, false, false); cntMarker += Ochopee.length; centerByArray(Naples,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'); } }