function addMarkers(){ mySelect = document.getElementById('selection'); Auberry = [];Fresno = [];Caruthers = [];Sanger = [];Selma = [];Kerman = [];Clovis = [];Coalinga = [];Reedley = [];Riverdale = [];Firebaugh = [];Prather = [];mySelect.options[mySelect.options.length] = new Option("Auberry schools",'all=Auberry'); mySelect.options[mySelect.options.length] = new Option("Caruthers schools",'all=Caruthers'); mySelect.options[mySelect.options.length] = new Option("Clovis schools",'all=Clovis'); mySelect.options[mySelect.options.length] = new Option("Coalinga schools",'all=Coalinga'); mySelect.options[mySelect.options.length] = new Option("Firebaugh schools",'all=Firebaugh'); mySelect.options[mySelect.options.length] = new Option("Fresno schools",'all=Fresno'); mySelect.options[mySelect.options.length] = new Option("Kerman schools",'all=Kerman'); mySelect.options[mySelect.options.length] = new Option("Prather schools",'all=Prather'); mySelect.options[mySelect.options.length] = new Option("Reedley schools",'all=Reedley'); mySelect.options[mySelect.options.length] = new Option("Riverdale schools",'all=Riverdale'); mySelect.options[mySelect.options.length] = new Option("Sanger schools",'all=Sanger'); mySelect.options[mySelect.options.length] = new Option("Selma schools",'all=Selma'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Auberry[Auberry.length] = createMarker(new GPoint(-119.44839900,37.07687000),"
Ambassador Academy
Po Box 995
Auberry, CA 93602
Co-ed school, 1-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ambassador Academy",'Auberry=' + Auberry.length); Fresno[Fresno.length] = createMarker(new GPoint(-119.85212400,36.77201900),"
Ambassador Baptist Academy
3354 W Clinton Avenue
Fresno, CA 93722
Co-ed school, K-7
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ambassador Baptist Academy",'Fresno=' + Fresno.length); Fresno[Fresno.length] = createMarker(new GPoint(-119.81360000,36.75750000),"
Armenian Community School
1444 N Wishon Po Box 4756
Fresno, CA 93728
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Armenian Community School",'Fresno=' + Fresno.length); Caruthers[Caruthers.length] = createMarker(new GPoint(-119.85376900,36.53247800),"
Bethel Christian Academy
3465 W Kamm Avenue
Caruthers, CA 93609
Co-ed school, 2-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bethel Christian Academy",'Caruthers=' + Caruthers.length); Sanger[Sanger.length] = createMarker(new GPoint(-119.57413400,36.70170900),"
Bethel Christian School
946 Bethel Avenue
Sanger, CA 93657
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bethel Christian School",'Sanger=' + Sanger.length); Fresno[Fresno.length] = createMarker(new GPoint(-119.74537000,36.83636500),"
Carden School Of Fresno
6901 N Maple Avenue
Fresno, CA 93710
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Carden School Of Fresno",'Fresno=' + Fresno.length); Selma[Selma.length] = createMarker(new GPoint(-119.61052800,36.58183700),"
Cathedral Christian School
3200 Mccall Avenue
Selma, CA 93662
Co-ed school, K-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Cathedral Christian School",'Selma=' + Selma.length); Fresno[Fresno.length] = createMarker(new GPoint(-119.75559900,36.78703700),"
Central Valley Christian Academy
4147 E Dakota Avenue
Fresno, CA 93726
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Central Valley Christian Academy",'Fresno=' + Fresno.length); Kerman[Kerman.length] = createMarker(new GPoint(-120.12745000,36.76409700),"
Central Valley Christian Molokan School
18720 W Mckinley Avenue
Kerman, CA 93630
Co-ed school, K-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Central Valley Christian Molokan School",'Kerman=' + Kerman.length); Clovis[Clovis.length] = createMarker(new GPoint(-119.65492800,36.79183700),"
Clovis Christian School
3105 Locan Avenue
Clovis, CA 93619
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Clovis Christian School",'Clovis=' + Clovis.length); Fresno[Fresno.length] = createMarker(new GPoint(-119.80280200,36.72812300),"
Emmanuel Learning Center
920-930 Fresno Street
Fresno, CA 93706
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Emmanuel Learning Center",'Fresno=' + Fresno.length); Fresno[Fresno.length] = createMarker(new GPoint(-119.81665200,36.80649400),"
Fairmont Private School
435 W Fairmont Avenue
Fresno, CA 93705
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Fairmont Private School",'Fresno=' + Fresno.length); Fresno[Fresno.length] = createMarker(new GPoint(-119.81057900,36.77917200),"
Faith Baptist Academy
106 E Shields Avenue
Fresno, CA 93704
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Faith Baptist Academy",'Fresno=' + Fresno.length); Coalinga[Coalinga.length] = createMarker(new GPoint(-120.36429600,36.13574800),"
Faith Christian Academy
450 W Elm Ave
Coalinga, CA 93210
Co-ed school, NS-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Faith Christian Academy",'Coalinga=' + Coalinga.length); Fresno[Fresno.length] = createMarker(new GPoint(-119.77200300,36.78936700),"
First Church Christian Academy
3920 N 1st St
Fresno, CA 93726
Co-ed school, NS-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("First Church Christian Academy",'Fresno=' + Fresno.length); Fresno[Fresno.length] = createMarker(new GPoint(-119.70946900,36.75763700),"
Fresno Adventist Academy
5397 E Olive Avenue
Fresno, CA 93727
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Fresno Adventist Academy",'Fresno=' + Fresno.length); Fresno[Fresno.length] = createMarker(new GPoint(-119.75645700,36.84332500),"
Fresno Christian Schools
7280 N Cedar Avenue
Fresno, CA 93720
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Fresno Christian Schools",'Fresno=' + Fresno.length); Fresno[Fresno.length] = createMarker(new GPoint(-119.75942800,36.81613700),"
Fresno Montessori School
1572 E Barstow Avenue
Fresno, CA 93710
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Fresno Montessori School",'Fresno=' + Fresno.length); Fresno[Fresno.length] = createMarker(new GPoint(-119.83557000,36.79430800),"
Grace Christian School
4221 N Hughes Ave
Fresno, CA 93705
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Grace Christian School",'Fresno=' + Fresno.length); Fresno[Fresno.length] = createMarker(new GPoint(-119.76308100,36.84458300),"
Holy Family Children's Center
1135 E Alluvial Avenue
Fresno, CA 93720
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Holy Family Children's Center",'Fresno=' + Fresno.length); Reedley[Reedley.length] = createMarker(new GPoint(-119.45751600,36.58744700),"
Immanuel Schools
1128 S Reed Avenue
Reedley, CA 93654
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Immanuel Schools",'Reedley=' + Reedley.length); Kerman[Kerman.length] = createMarker(new GPoint(-120.09710000,36.71530000),"
Kerman Christian School
15495 W Whitesbridge Rd Po Box 522
Kerman, CA 93630
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Kerman Christian School",'Kerman=' + Kerman.length); Fresno[Fresno.length] = createMarker(new GPoint(-119.79888700,36.77053700),"
Kinder Academy
4545 N Palm Avenue
Fresno, CA 93704
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Kinder Academy",'Fresno=' + Fresno.length); Fresno[Fresno.length] = createMarker(new GPoint(-119.85138300,36.75386200),"
Koinonia Christian School
3330 W Dudley Avenue
Fresno, CA 93722
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Koinonia Christian School",'Fresno=' + Fresno.length); Fresno[Fresno.length] = createMarker(new GPoint(-119.76595200,36.85906400),"
La Petite Academy
999 E Teague Avenue
Fresno, CA 93720
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("La Petite Academy",'Fresno=' + Fresno.length); Fresno[Fresno.length] = createMarker(new GPoint(-119.75457000,36.78563500),"
Light Of The Valley Christian
3731 N. Cedar Ave.
Fresno, CA 93726
Co-ed school, 1-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Light Of The Valley Christian",'Fresno=' + Fresno.length); Fresno[Fresno.length] = createMarker(new GPoint(-119.77358900,36.87800100),"
Little Lakers
9835 N Lakeshore Dr
Fresno, CA 93730
school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Little Lakers",'Fresno=' + Fresno.length); Fresno[Fresno.length] = createMarker(new GPoint(-119.76608300,36.82323700),"
Mountain View Christian School
1284 E Bullard Avenue
Fresno, CA 93710
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mountain View Christian School",'Fresno=' + Fresno.length); Clovis[Clovis.length] = createMarker(new GPoint(-119.70457000,36.82029100),"
Our Lady Of Perpetual Help School
836 Dewitt Avenue
Clovis, CA 93612
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Our Lady Of Perpetual Help School",'Clovis=' + Clovis.length); Fresno[Fresno.length] = createMarker(new GPoint(-119.82993200,36.77574100),"
Our Lady Of Victory Elementary School
1626 W Princeton Avenue
Fresno, CA 93705
Co-ed school, 5-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Our Lady Of Victory Elementary School",'Fresno=' + Fresno.length); Fresno[Fresno.length] = createMarker(new GPoint(-119.76919800,36.80763700),"
Piaget Discovery School
3315 E Sierra Madre
Fresno, CA 93726
Co-ed school, PK-KG
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Piaget Discovery School",'Fresno=' + Fresno.length); Fresno[Fresno.length] = createMarker(new GPoint(-119.76340000,36.76850000),"
Pilgrim Way Christian Academy
Po Box 6131
Fresno, CA 93703
Co-ed school, 2-9
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Pilgrim Way Christian Academy",'Fresno=' + Fresno.length); Coalinga[Coalinga.length] = createMarker(new GPoint(-120.33840000,36.19730000),"
Pleasant Valley Day School
198 East Elm Po Box 421
Coalinga, CA 93210
Co-ed school, 5-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Pleasant Valley Day School",'Coalinga=' + Coalinga.length); Riverdale[Riverdale.length] = createMarker(new GPoint(-119.89160900,36.43081000),"
Riverdale Christian Academy
Po Box 547
Riverdale, CA 93656
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Riverdale Christian Academy",'Riverdale=' + Riverdale.length); Fresno[Fresno.length] = createMarker(new GPoint(-119.75075300,36.77036300),"
Sacred Heart Elementary School
4460 E Yale Avenue
Fresno, CA 93703
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sacred Heart Elementary School",'Fresno=' + Fresno.length); Reedley[Reedley.length] = createMarker(new GPoint(-119.44536200,36.60433700),"
St. La Salle Elementary School
404 E Manning Avenue
Reedley, CA 93654
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. La Salle Elementary School",'Reedley=' + Reedley.length); Selma[Selma.length] = createMarker(new GPoint(-119.61087000,36.59692300),"
Selma Christian Academy
9559 S Mccall Avenue
Selma, CA 93662
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Selma Christian Academy",'Selma=' + Selma.length); Fresno[Fresno.length] = createMarker(new GPoint(-119.79120500,36.85128300),"
Souls Harbor Christian Academy
7969 N Blackstone Avenue 224
Fresno, CA 93720
Co-ed school, 2-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Souls Harbor Christian Academy",'Fresno=' + Fresno.length); Fresno[Fresno.length] = createMarker(new GPoint(-119.79922800,36.82067000),"
St Anthony Elementary School
5680 N Maroa Avenue
Fresno, CA 93704
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Anthony Elementary School",'Fresno=' + Fresno.length); Fresno[Fresno.length] = createMarker(new GPoint(-119.73245800,36.75026300),"
St Helens School
4888 E Belmont Avenue
Fresno, CA 93727
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Helens School",'Fresno=' + Fresno.length); Firebaugh[Firebaugh.length] = createMarker(new GPoint(-120.44534100,36.85286300),"
St Joseph School
1900 Saipan Avenue
Firebaugh, CA 93622
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Joseph School",'Firebaugh=' + Firebaugh.length); Fresno[Fresno.length] = createMarker(new GPoint(-119.77267000,36.79795500),"
Truth Tabernacle Christian School
4411 N 1st Street
Fresno, CA 93726
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Truth Tabernacle Christian School",'Fresno=' + Fresno.length); Selma[Selma.length] = createMarker(new GPoint(-86.68780300,33.62185700),"
Valley Christian Academy
3200 Mccall Avenue
Selma, CA 93662
Co-ed school, K-4
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Valley Christian Academy",'Selma=' + Selma.length); Clovis[Clovis.length] = createMarker(new GPoint(-119.72484400,36.85230800),"
Valley Crescent School
547 W Nees Avenue
Clovis, CA 93611
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Valley Crescent School",'Clovis=' + Clovis.length); Fresno[Fresno.length] = createMarker(new GPoint(-119.72193600,36.71818000),"
West Fresno Christian Academy, Inc.
5123 E Pitt Avenue
Fresno, CA 93725
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("West Fresno Christian Academy, Inc.",'Fresno=' + Fresno.length); Prather[Prather.length] = createMarker(new GPoint(-119.51886100,36.99386000),"
Western Christian Academy
Po Box 306
Prather, CA 93651
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Western Christian Academy",'Prather=' + Prather.length); Fresno[Fresno.length] = createMarker(new GPoint(-119.92536800,36.81136500),"
World Harvest Christian Academy
5242 N Garfield Avenue
Fresno, CA 93723
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("World Harvest Christian Academy",'Fresno=' + Fresno.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(Auberry); map.removeOverlays(Caruthers); map.removeOverlays(Clovis); map.removeOverlays(Coalinga); map.removeOverlays(Firebaugh); map.removeOverlays(Fresno); map.removeOverlays(Kerman); map.removeOverlays(Prather); map.removeOverlays(Reedley); map.removeOverlays(Riverdale); map.removeOverlays(Sanger); map.removeOverlays(Selma); 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(Auberry);map.removeOverlays(Auberry); map.removeOverlays(Caruthers); map.removeOverlays(Clovis); map.removeOverlays(Coalinga); map.removeOverlays(Firebaugh); map.removeOverlays(Fresno); map.removeOverlays(Kerman); map.removeOverlays(Prather); map.removeOverlays(Reedley); map.removeOverlays(Riverdale); map.removeOverlays(Sanger); map.removeOverlays(Selma); map.addOverlays(Auberry); centerByArray(Auberry, false, false); cntMarker += Auberry.length; map.addOverlays(Caruthers); centerByArray(Caruthers, false, false); cntMarker += Caruthers.length; map.addOverlays(Clovis); centerByArray(Clovis, false, false); cntMarker += Clovis.length; map.addOverlays(Coalinga); centerByArray(Coalinga, false, false); cntMarker += Coalinga.length; map.addOverlays(Firebaugh); centerByArray(Firebaugh, false, false); cntMarker += Firebaugh.length; map.addOverlays(Fresno); centerByArray(Fresno, false, false); cntMarker += Fresno.length; map.addOverlays(Kerman); centerByArray(Kerman, false, false); cntMarker += Kerman.length; map.addOverlays(Prather); centerByArray(Prather, false, false); cntMarker += Prather.length; map.addOverlays(Reedley); centerByArray(Reedley, false, false); cntMarker += Reedley.length; map.addOverlays(Riverdale); centerByArray(Riverdale, false, false); cntMarker += Riverdale.length; map.addOverlays(Sanger); centerByArray(Sanger, false, false); cntMarker += Sanger.length; map.addOverlays(Selma); centerByArray(Selma, false, false); cntMarker += Selma.length; centerByArray(Auberry,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; }