function addMarkers(){ mySelect = document.getElementById('selection'); Fresno = [];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); 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); 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); 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); 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); 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); 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); 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); Fresno[Fresno.length] = createMarker(new GPoint(-119.78138800,36.76211300),"
San Joaquin Memorial High School
1406 N Fresno Street
Fresno, CA 93703
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("San Joaquin Memorial High School",'Fresno=' + Fresno.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); 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); 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); 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//////' + showArray); map.removeOverlays(Fresno); 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(Fresno);map.removeOverlays(Fresno); map.addOverlays(Fresno); centerByArray(Fresno, false, false); cntMarker += Fresno.length; centerByArray(Fresno,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=&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; }