function addMarkers() { mySelect = document.getElementById('selection'); Kettleman_City = [];Nas_Lemoore = [];Armona = [];Avenal = [];Corcoran = [];Lemoore = [];Hanford = [];Stratford = [];Five_Points = [];mySelect.options[mySelect.options.length] = new Option("Armona schools",'all=Armona'); mySelect.options[mySelect.options.length] = new Option("Avenal schools",'all=Avenal'); mySelect.options[mySelect.options.length] = new Option("Corcoran schools",'all=Corcoran'); mySelect.options[mySelect.options.length] = new Option("Five Points schools",'all=Five_Points'); mySelect.options[mySelect.options.length] = new Option("Hanford schools",'all=Hanford'); mySelect.options[mySelect.options.length] = new Option("Kettleman City schools",'all=Kettleman_City'); mySelect.options[mySelect.options.length] = new Option("Lemoore schools",'all=Lemoore'); mySelect.options[mySelect.options.length] = new Option("Nas Lemoore schools",'all=Nas_Lemoore'); mySelect.options[mySelect.options.length] = new Option("Stratford schools",'all=Stratford'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Kettleman_City[Kettleman_City.length] = createMarker(new GPoint(-119.91600037,36.02090073),"
Adelante High Continuation School
Po Box 149
Kettleman City, CA 93239

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Adelante High Continuation School",'Kettleman_City=' + Kettleman_City.length); Nas_Lemoore[Nas_Lemoore.length] = createMarker(new GPoint(-119.82710266,36.29090118),"
Akers Elementary School
Po Box 1339
N.a.s. Lemoore, CA 93245

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Akers Elementary School",'Nas_Lemoore=' + Nas_Lemoore.length); Armona[Armona.length] = createMarker(new GPoint(-119.70700073,36.31029892),"
Armona Elementary School
Po Box 368
Armona, CA 93202

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Armona Elementary School",'Armona=' + Armona.length); Avenal[Avenal.length] = createMarker(new GPoint(-120.13796997,36.00336456),"
Avenal Elementary School
500 South First Ave.
Avenal, CA 93204

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Avenal Elementary School",'Avenal=' + Avenal.length); Avenal[Avenal.length] = createMarker(new GPoint(-120.12952423,36.00903702),"
Avenal High School
601 Mariposa St.
Avenal, CA 93204

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Avenal High School",'Avenal=' + Avenal.length); Corcoran[Corcoran.length] = createMarker(new GPoint(-119.56651306,36.10183716),"
Bret Harte Elementary School
1300 Letts Ave.
Corcoran, CA 93212

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Bret Harte Elementary School",'Corcoran=' + Corcoran.length); Lemoore[Lemoore.length] = createMarker(new GPoint(-119.78063202,36.24331284),"
Central Elementary School
15783 18th Ave.
Lemoore, CA 93245

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Central Elementary School",'Lemoore=' + Lemoore.length); Lemoore[Lemoore.length] = createMarker(new GPoint(-119.78962708,36.29706192),"
Cinnamon Elementary School
500 East Cinnamon Dr.
Lemoore, CA 93245

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Cinnamon Elementary School",'Lemoore=' + Lemoore.length); Corcoran[Corcoran.length] = createMarker(new GPoint(-119.56651306,36.10183716),"
Corcoran High School
1100 Letts Ave.
Corcoran, CA 93212

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Corcoran High School",'Corcoran=' + Corcoran.length); Corcoran[Corcoran.length] = createMarker(new GPoint(-119.56651306,36.10183716),"
Corcoran Unified Community High School
1128 South Dairy Ave.
Corcoran, CA 93212

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Corcoran Unified Community High School",'Corcoran=' + Corcoran.length); Armona[Armona.length] = createMarker(new GPoint(-119.71401978,36.30830002),"
Crossroads Charter School
Po Box 368
Armona, CA 93202

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Crossroads Charter School",'Armona=' + Armona.length); Hanford[Hanford.length] = createMarker(new GPoint(-119.47763824,36.32756424),"
Delta View Elementary School
1201 Lacey Blvd.
Hanford, CA 93230

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Delta View Elementary School",'Hanford=' + Hanford.length); Lemoore[Lemoore.length] = createMarker(new GPoint(-119.78962708,36.29706192),"
Engvall (p.w.) Elementary School
19th And Cedar
Lemoore, CA 93245

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Engvall (p.w.) Elementary School",'Lemoore=' + Lemoore.length); Corcoran[Corcoran.length] = createMarker(new GPoint(-119.56651306,36.10183716),"
Fremont (john C.) Elementary School
1900 Bell Ave.
Corcoran, CA 93212

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Fremont (john C.) Elementary School",'Corcoran=' + Corcoran.length); Hanford[Hanford.length] = createMarker(new GPoint(-119.62083435,36.24053574),"
Gardenside Elementary School
9615 Temple Dr.
Hanford, CA 93230

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Gardenside Elementary School",'Hanford=' + Hanford.length); Nas_Lemoore[Nas_Lemoore.length] = createMarker(new GPoint(-10.00000000,10.00000000),"
Gundacker Community Day
730 Enterprise Ave., Rm. 100 L
Nas Lemoore, CA 93246

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Gundacker Community Day",'Nas_Lemoore=' + Nas_Lemoore.length); Hanford[Hanford.length] = createMarker(new GPoint(-119.62049866,36.29359818),"
Hamilton Elementary School
P.o. Box 1067
Hanford, CA 93232

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Hamilton Elementary School",'Hanford=' + Hanford.length); Hanford[Hanford.length] = createMarker(new GPoint(-119.64542700,36.32555400),"
Hanford Elementary Community Day
Po Box 1067
Hanford, CA 93232

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Hanford Elementary Community Day",'Hanford=' + Hanford.length); Hanford[Hanford.length] = createMarker(new GPoint(-119.64557648,36.34283829),"
Hanford High Night Continuation School
1201 North Douty
Hanford, CA 93230

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Hanford High Night Continuation School",'Hanford=' + Hanford.length); Hanford[Hanford.length] = createMarker(new GPoint(-119.64557648,36.34283829),"
Hanford High School
120 East Grangeville Blvd.
Hanford, CA 93230

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Hanford High School",'Hanford=' + Hanford.length); Hanford[Hanford.length] = createMarker(new GPoint(-119.64557648,36.34283829),"
Hanford Jt. Union High Community Day
120 East Grangeville Blvd.
Hanford, CA 93230

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Hanford Jt. Union High Community Day",'Hanford=' + Hanford.length); Hanford[Hanford.length] = createMarker(new GPoint(-119.66236115,36.32823563),"
Hanford West High School
1150 West Lacey Blvd.
Hanford, CA 93230

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Hanford West High School",'Hanford=' + Hanford.length); Lemoore[Lemoore.length] = createMarker(new GPoint(-119.83383179,36.36151123),"
Island Elementary School
7799 21st Ave.
Lemoore, CA 93245

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Island Elementary School",'Lemoore=' + Lemoore.length); Hanford[Hanford.length] = createMarker(new GPoint(-119.66230011,36.32823563),"
J. C. Montgomery School
1450 Forum Dr.
Hanford, CA 93230

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("J. C. Montgomery School",'Hanford=' + Hanford.length); Lemoore[Lemoore.length] = createMarker(new GPoint(-119.77664185,36.29816437),"
Jamison (donald C.) High Continuation School
351 East Bush St.
Lemoore, CA 93245

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Jamison (donald C.) High Continuation School",'Lemoore=' + Lemoore.length); Hanford[Hanford.length] = createMarker(new GPoint(-119.62049866,36.29359818),"
Jefferson Elementary School
Po Box 1067
Hanford, CA 93232

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Jefferson Elementary School",'Hanford=' + Hanford.length); Corcoran[Corcoran.length] = createMarker(new GPoint(-119.56651306,36.10183716),"
John Muir Middle School
707 Letts St.
Corcoran, CA 93212

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("John Muir Middle School",'Corcoran=' + Corcoran.length); Hanford[Hanford.length] = createMarker(new GPoint(-119.64557648,36.34283829),"
Johnson (earl F.) High Continuation School
1201 North Douty
Hanford, CA 93230

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Johnson (earl F.) High Continuation School",'Hanford=' + Hanford.length); Hanford[Hanford.length] = createMarker(new GPoint(-119.62049866,36.29359818),"
Joseph M. Simas Elementary School
Po Box 1067
Hanford, CA 93232

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Joseph M. Simas Elementary School",'Hanford=' + Hanford.length); Hanford[Hanford.length] = createMarker(new GPoint(-119.64418793,36.32683945),"
Kennedy (john F.) Junior High School
Po Box 1067
Hanford, CA 93232

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Kennedy (john F.) Junior High School",'Hanford=' + Hanford.length); Kettleman_City[Kettleman_City.length] = createMarker(new GPoint(-119.91600037,36.02090073),"
Kettleman City Elementary School
Box 599
Kettleman City, CA 93239

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Kettleman City Elementary School",'Kettleman_City=' + Kettleman_City.length); Hanford[Hanford.length] = createMarker(new GPoint(-119.64418793,36.32683945),"
King (martin Luther Jr) Elementary School
Po Box 1067
Hanford, CA 93232

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("King (martin Luther Jr) Elementary School",'Hanford=' + Hanford.length); Hanford[Hanford.length] = createMarker(new GPoint(-119.65468597,36.30083466),"
Kings County Community High School
11835 South 11th Ave.
Hanford, CA 93230

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Kings County Community High School",'Hanford=' + Hanford.length); Hanford[Hanford.length] = createMarker(new GPoint(-119.66096900,36.32814200),"
Kings County Rop
1144 West Lacey Blvd.
Hanford, CA 93230

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Kings County Rop",'Hanford=' + Hanford.length); Hanford[Hanford.length] = createMarker(new GPoint(-119.64240265,36.40133667),"
Kings River-hardwick Elementary School
10300 Excelsior Ave.
Hanford, CA 93230

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Kings River-hardwick Elementary School",'Hanford=' + Hanford.length); Hanford[Hanford.length] = createMarker(new GPoint(-119.58293152,36.33043671),"
Kit Carson Elementary School
9895 Seventh Ave.
Hanford, CA 93230

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Kit Carson Elementary School",'Hanford=' + Hanford.length); Hanford[Hanford.length] = createMarker(new GPoint(-119.62083435,36.24053574),"
Lakeside Elementary School
9100 Jersey Ave.
Hanford, CA 93230

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Lakeside Elementary School",'Hanford=' + Hanford.length); Lemoore[Lemoore.length] = createMarker(new GPoint(-119.78962708,36.29706192),"
Lemoore Elementary School
573 Bush St.
Lemoore, CA 93245

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lemoore Elementary School",'Lemoore=' + Lemoore.length); Lemoore[Lemoore.length] = createMarker(new GPoint(-119.77952576,36.29816437),"
Lemoore High School
101 East Bush St.
Lemoore, CA 93245

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lemoore High School",'Lemoore=' + Lemoore.length); Lemoore[Lemoore.length] = createMarker(new GPoint(-10.00000000,10.00000000),"
Lemoore Middle College High School
555 College Ave.
Lemoore, CA 93245

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lemoore Middle College High School",'Lemoore=' + Lemoore.length); Lemoore[Lemoore.length] = createMarker(new GPoint(-119.88591766,36.26663971),"
Lemoore University Elementary Charter School
West Hills College-lemoore
Lemoore, CA 93245

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Lemoore University Elementary Charter School",'Lemoore=' + Lemoore.length); Lemoore[Lemoore.length] = createMarker(new GPoint(-119.78962708,36.29706192),"
Liberty Middle School
1000 Liberty Dr.
Lemoore, CA 93245

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Liberty Middle School",'Lemoore=' + Lemoore.length); Hanford[Hanford.length] = createMarker(new GPoint(-119.62049866,36.29359818),"
Lincoln Elementary School
Po Box 1067
Hanford, CA 93232

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lincoln Elementary School",'Hanford=' + Hanford.length); Corcoran[Corcoran.length] = createMarker(new GPoint(-119.56651306,36.10183716),"
Mark Twain Elementary School
1500 Oregon Ave.
Corcoran, CA 93212

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Mark Twain Elementary School",'Corcoran=' + Corcoran.length); Lemoore[Lemoore.length] = createMarker(new GPoint(-119.78962708,36.29706192),"
Meadow Lane Elementary School
Meadow Ln. And Quandt
Lemoore, CA 93245

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Meadow Lane Elementary School",'Lemoore=' + Lemoore.length); Hanford[Hanford.length] = createMarker(new GPoint(-119.58293152,36.33043671),"
Mid Valley Altern. Charter
9895 Seventh Ave.
Hanford, CA 93230

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Mid Valley Altern. Charter",'Hanford=' + Hanford.length); Hanford[Hanford.length] = createMarker(new GPoint(-119.62049866,36.29359818),"
Monroe Elementary School
Po Box 1067
Hanford, CA 93232

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Monroe Elementary School",'Hanford=' + Hanford.length); Nas_Lemoore[Nas_Lemoore.length] = createMarker(new GPoint(-119.82710266,36.29090118),"
Neutra Elementary School
Po Box 1339
N.a.s. Lemoore, CA 93245

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Neutra Elementary School",'Nas_Lemoore=' + Nas_Lemoore.length); Armona[Armona.length] = createMarker(new GPoint(-119.70700073,36.31029892),"
Parkview Middle School
Po Box 368
Armona, CA 93202

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Parkview Middle School",'Armona=' + Armona.length); Hanford[Hanford.length] = createMarker(new GPoint(-119.70916748,36.34459305),"
Pioneer Elementary School
8810 14th Ave.
Hanford, CA 93230

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Pioneer Elementary School",'Hanford=' + Hanford.length); Hanford[Hanford.length] = createMarker(new GPoint(-119.71350098,36.34529877),"
Pioneer Middle School
8810 14th Ave.
Hanford, CA 93230

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Pioneer Middle School",'Hanford=' + Hanford.length); Avenal[Avenal.length] = createMarker(new GPoint(-120.12542725,36.00817871),"
Reef Sunset Middle School
608 North First Ave.
Avenal, CA 93204

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Reef Sunset Middle School",'Avenal=' + Avenal.length); Avenal[Avenal.length] = createMarker(new GPoint(-120.13796997,36.00336456),"
Reef-sunset Elementary Community Day
500 S. First Ave.
Avenal, CA 93204

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Reef-sunset Elementary Community Day",'Avenal=' + Avenal.length); Avenal[Avenal.length] = createMarker(new GPoint(-120.12542725,36.00817871),"
Reef-sunset Secondary Community Day
861 Monterey St.
Avenal, CA 93204

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Reef-sunset Secondary Community Day",'Avenal=' + Avenal.length); Hanford[Hanford.length] = createMarker(new GPoint(-119.62049866,36.29359818),"
Richmond (lee) Elementary School
Po Box 1067
Hanford, CA 93232

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Richmond (lee) Elementary School",'Hanford=' + Hanford.length); Hanford[Hanford.length] = createMarker(new GPoint(-119.62049866,36.29359818),"
Roosevelt Elementary School
Po Box 1067
Hanford, CA 93232

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Roosevelt Elementary School",'Hanford=' + Hanford.length); Hanford[Hanford.length] = createMarker(new GPoint(-119.66230011,36.32823563),"
Special Education
1144 West Lacey Blvd.
Hanford, CA 93230

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Special Education",'Hanford=' + Hanford.length); Stratford[Stratford.length] = createMarker(new GPoint(-119.82479858,36.16979980),"
Stratford Elementary School
19348 Empire Ave.
Stratford, CA 93266

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Stratford Elementary School",'Stratford=' + Stratford.length); Avenal[Avenal.length] = createMarker(new GPoint(-120.12542725,36.00817871),"
Sunrise High Continuation School
209 North Park Ave.
Avenal, CA 93204

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sunrise High Continuation School",'Avenal=' + Avenal.length); Avenal[Avenal.length] = createMarker(new GPoint(-120.12542725,36.00817871),"
Tamarack Elementary School
1000 Union Ave.
Avenal, CA 93204

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Tamarack Elementary School",'Avenal=' + Avenal.length); Hanford[Hanford.length] = createMarker(new GPoint(-119.64418793,36.32683945),"
Washington (george) Elementary School
Po Box 1067
Hanford, CA 93232

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Washington (george) Elementary School",'Hanford=' + Hanford.length); Five_Points[Five_Points.length] = createMarker(new GPoint(-120.12899780,36.47719955),"
Westside Elementary School
Box 398
Five Points, CA 93624

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Westside Elementary School",'Five_Points=' + Five_Points.length); Hanford[Hanford.length] = createMarker(new GPoint(-119.62049866,36.29359818),"
Wilson (woodrow) Junior High School
Po Box 1067
Hanford, CA 93232

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Wilson (woodrow) Junior High School",'Hanford=' + Hanford.length); Lemoore[Lemoore.length] = createMarker(new GPoint(-119.77952576,36.29816437),"
Yokuts High Continuation School
101 E. Bush St.
Lemoore, CA 93245

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Yokuts High Continuation School",'Lemoore=' + Lemoore.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(Armona); map.removeOverlays(Avenal); map.removeOverlays(Corcoran); map.removeOverlays(Five_Points); map.removeOverlays(Hanford); map.removeOverlays(Kettleman_City); map.removeOverlays(Lemoore); map.removeOverlays(Nas_Lemoore); map.removeOverlays(Stratford); 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(Kettleman_City);map.removeOverlays(Armona); map.removeOverlays(Avenal); map.removeOverlays(Corcoran); map.removeOverlays(Five_Points); map.removeOverlays(Hanford); map.removeOverlays(Kettleman_City); map.removeOverlays(Lemoore); map.removeOverlays(Nas_Lemoore); map.removeOverlays(Stratford); map.addOverlays(Armona); centerByArray(Armona, false, false); cntMarker += Armona.length; map.addOverlays(Avenal); centerByArray(Avenal, false, false); cntMarker += Avenal.length; map.addOverlays(Corcoran); centerByArray(Corcoran, false, false); cntMarker += Corcoran.length; map.addOverlays(Five_Points); centerByArray(Five_Points, false, false); cntMarker += Five_Points.length; map.addOverlays(Hanford); centerByArray(Hanford, false, false); cntMarker += Hanford.length; map.addOverlays(Kettleman_City); centerByArray(Kettleman_City, false, false); cntMarker += Kettleman_City.length; map.addOverlays(Lemoore); centerByArray(Lemoore, false, false); cntMarker += Lemoore.length; map.addOverlays(Nas_Lemoore); centerByArray(Nas_Lemoore, false, false); cntMarker += Nas_Lemoore.length; map.addOverlays(Stratford); centerByArray(Stratford, false, false); cntMarker += Stratford.length; centerByArray(Kettleman_City,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'); } }