function addMarkers(){ mySelect = document.getElementById('selection'); Danville = [];Lafayette = [];Walnut_Creek = [];El_Sobrante = [];Concord = [];Pittsburg = [];Richmond = [];Antioch = [];Brentwood = [];Orinda = [];Martinez = [];Moraga = [];Pleasant_Hill = [];San_Pablo = [];mySelect.options[mySelect.options.length] = new Option("Antioch schools",'all=Antioch'); mySelect.options[mySelect.options.length] = new Option("Brentwood schools",'all=Brentwood'); mySelect.options[mySelect.options.length] = new Option("Concord schools",'all=Concord'); mySelect.options[mySelect.options.length] = new Option("Danville schools",'all=Danville'); mySelect.options[mySelect.options.length] = new Option("El Sobrante schools",'all=El_Sobrante'); mySelect.options[mySelect.options.length] = new Option("Lafayette schools",'all=Lafayette'); mySelect.options[mySelect.options.length] = new Option("Martinez schools",'all=Martinez'); mySelect.options[mySelect.options.length] = new Option("Moraga schools",'all=Moraga'); mySelect.options[mySelect.options.length] = new Option("Orinda schools",'all=Orinda'); mySelect.options[mySelect.options.length] = new Option("Pittsburg schools",'all=Pittsburg'); mySelect.options[mySelect.options.length] = new Option("Pleasant Hill schools",'all=Pleasant_Hill'); mySelect.options[mySelect.options.length] = new Option("Richmond schools",'all=Richmond'); mySelect.options[mySelect.options.length] = new Option("San Pablo schools",'all=San_Pablo'); mySelect.options[mySelect.options.length] = new Option("Walnut Creek schools",'all=Walnut_Creek'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Danville[Danville.length] = createMarker(new GPoint(-121.95170500,37.83321900),"
The Athenian School
2100 Mt Diablo Scenic Blvd
Danville, CA 94506
Co-ed school, 6-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Athenian School",'Danville=' + Danville.length); Lafayette[Lafayette.length] = createMarker(new GPoint(-122.15142400,37.89280900),"
Bentley School
1000 Upper Happy Valley Rd.
Lafayette, CA 94549
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bentley School",'Lafayette=' + Lafayette.length); Walnut_Creek[Walnut_Creek.length] = createMarker(new GPoint(-122.03289100,37.91410400),"
Berean Christian High School
245 El Divisadero Avenue
Walnut Creek, CA 94598
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Berean Christian High School",'Walnut_Creek=' + Walnut_Creek.length); El_Sobrante[El_Sobrante.length] = createMarker(new GPoint(-122.29823100,37.97706700),"
Bethel Christian Academy
431 Rincon Road
El Sobrante, CA 94803
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bethel Christian Academy",'El_Sobrante=' + El_Sobrante.length); El_Sobrante[El_Sobrante.length] = createMarker(new GPoint(-122.29265900,37.96326700),"
Calvary Christian Academy
4892 San Pablo Dam Road
El Sobrante, CA 94803
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Calvary Christian Academy",'El_Sobrante=' + El_Sobrante.length); Concord[Concord.length] = createMarker(new GPoint(-122.03233600,37.93332300),"
Carondelet High School
1133 Winton Drive
Concord, CA 94518
All-girls school, 9-12
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Carondelet High School",'Concord=' + Concord.length); Pittsburg[Pittsburg.length] = createMarker(new GPoint(-121.87526800,38.00321000),"
Christian Center School
1210 Stoneman Ave
Pittsburg, CA 94565
Co-ed school, NS-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Christian Center School",'Pittsburg=' + Pittsburg.length); Richmond[Richmond.length] = createMarker(new GPoint(-122.34114500,37.97512900),"
Community Christian Academy
2375 Aberdeen Way
Richmond, CA 94806
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Community Christian Academy",'Richmond=' + Richmond.length); Concord[Concord.length] = createMarker(new GPoint(-122.04064500,37.99720600),"
Concord Christian School
2120 Olivera Court
Concord, CA 94520
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Concord Christian School",'Concord=' + Concord.length); Walnut_Creek[Walnut_Creek.length] = createMarker(new GPoint(-122.07827300,37.92205200),"
Contra Costa Christian School
2721 Larkey Lane
Walnut Creek, CA 94597
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Contra Costa Christian School",'Walnut_Creek=' + Walnut_Creek.length); Antioch[Antioch.length] = createMarker(new GPoint(-121.77922400,38.00503700),"
Cornerstone Christian School
1745 E 18th Street
Antioch, CA 94509
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Cornerstone Christian School",'Antioch=' + Antioch.length); Concord[Concord.length] = createMarker(new GPoint(-122.03200700,37.93342700),"
De La Salle High School
1130 Winton Drive
Concord, CA 94518
All-boys school, 9-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("De La Salle High School",'Concord=' + Concord.length); Antioch[Antioch.length] = createMarker(new GPoint(-121.83783500,38.00106100),"
Delta Christian Jr/sr High School
2974 Delta Fair Blvd
Antioch, CA 94509
Co-ed school, 7-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Delta Christian Jr/sr High School",'Antioch=' + Antioch.length); Concord[Concord.length] = createMarker(new GPoint(-122.01150000,37.98350000),"
Diablo Valley School
2924 Clayton Rd. No. B
Concord, CA 94519
Co-ed school, NS-NS
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Diablo Valley School",'Concord=' + Concord.length); Walnut_Creek[Walnut_Creek.length] = createMarker(new GPoint(-122.06656600,37.88903700),"
The Dorris-Eaton School
1847 Newell Avenue
Walnut Creek, CA 94595
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Dorris-Eaton School",'Walnut_Creek=' + Walnut_Creek.length); El_Sobrante[El_Sobrante.length] = createMarker(new GPoint(-122.29656200,37.98052200),"
El Sobrante Christian School -
5100 Argyle Rd
El Sobrante, CA 94803
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("El Sobrante Christian School -",'El_Sobrante=' + El_Sobrante.length); Richmond[Richmond.length] = createMarker(new GPoint(-122.34515300,37.93319500),"
Family Christian Academy
160 Broadway
Richmond, CA 94804
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Family Christian Academy",'Richmond=' + Richmond.length); Brentwood[Brentwood.length] = createMarker(new GPoint(-121.73716800,37.95968800),"
Gateway Christian
2401 Shady Willow Lane
Brentwood, CA 94513
Co-ed school, KG-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Gateway Christian",'Brentwood=' + Brentwood.length); Antioch[Antioch.length] = createMarker(new GPoint(-121.75398900,37.97526000),"
Gateway Christian School
Po Box 4194
Antioch, CA 94531
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Gateway Christian School",'Antioch=' + Antioch.length); Antioch[Antioch.length] = createMarker(new GPoint(-121.75096800,37.94876000),"
Heritage Baptist Academy
5200 Heidorn Ranch Road
Antioch, CA 94531
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Heritage Baptist Academy",'Antioch=' + Antioch.length); Antioch[Antioch.length] = createMarker(new GPoint(-121.78566800,37.96816700),"
Hilltop Christian School
2200 Country Hills Drive
Antioch, CA 94509
Co-ed school, K-10
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Hilltop Christian School",'Antioch=' + Antioch.length); Orinda[Orinda.length] = createMarker(new GPoint(-122.18893400,37.88486600),"
Holden High School
10 Irwin Way
Orinda, CA 94563
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Holden High School",'Orinda=' + Orinda.length); Antioch[Antioch.length] = createMarker(new GPoint(-122.07400000,37.95370000),"
La Cheim School
1500 D Street Portable 601
Antioch, CA 94509
Co-ed school, 4-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("La Cheim School",'Antioch=' + Antioch.length); Richmond[Richmond.length] = createMarker(new GPoint(-122.33391000,37.97543900),"
La Cheim School-richmond
2853 Groom Drive
Richmond, CA 94806
Co-ed school, 6-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("La Cheim School-richmond",'Richmond=' + Richmond.length); Richmond[Richmond.length] = createMarker(new GPoint(-122.36152800,37.93556300),"
New Faith Christian Academy
830 Macdonald Avenue
Richmond, CA 94801
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("New Faith Christian Academy",'Richmond=' + Richmond.length); Martinez[Martinez.length] = createMarker(new GPoint(-122.10162500,38.00817300),"
New Vistas Christian School
68 Morello Ave
Martinez, CA 94553
Co-ed school, 5-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("New Vistas Christian School",'Martinez=' + Martinez.length); Orinda[Orinda.length] = createMarker(new GPoint(-122.18460800,37.88261900),"
Orinda Academy
19 Altarinda Road
Orinda, CA 94563
Co-ed school, 8-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Orinda Academy",'Orinda=' + Orinda.length); Moraga[Moraga.length] = createMarker(new GPoint(-122.12818300,37.86117000),"
Orion Academy
350 Rheem Blvd
Moraga, CA 94556
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Orion Academy",'Moraga=' + Moraga.length); Pleasant_Hill[Pleasant_Hill.length] = createMarker(new GPoint(-122.08870800,37.94766300),"
Pleasant Hill Adventist Academy
796 Grayson Road
Pleasant Hill, CA 94523
Co-ed school, NS-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Pleasant Hill Adventist Academy",'Pleasant_Hill=' + Pleasant_Hill.length); Richmond[Richmond.length] = createMarker(new GPoint(-122.35593900,37.93157400),"
Richmond Educ Learning Center
4 Marina Way
Richmond, CA 94801
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Richmond Educ Learning Center",'Richmond=' + Richmond.length); Moraga[Moraga.length] = createMarker(new GPoint(-122.13248700,37.83335600),"
Saklan Valley School
1678 School Street
Moraga, CA 94556
Co-ed school, NS-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Saklan Valley School",'Moraga=' + Moraga.length); Richmond[Richmond.length] = createMarker(new GPoint(-122.33921100,37.95287200),"
Salesian High School
2851 Salesian Avenue
Richmond, CA 94804
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Salesian High School",'Richmond=' + Richmond.length); Concord[Concord.length] = createMarker(new GPoint(-121.96191000,37.53501800),"
Seneca Center
1034 Oak Grove Road
Concord, CA 94518
Co-ed school, 9-11
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Seneca Center",'Concord=' + Concord.length); Pittsburg[Pittsburg.length] = createMarker(new GPoint(-121.89044100,38.01218000),"
Spectrum Center
135 E. Leland Ave.
Pittsburg, CA 94565
Co-ed school, NS-NS
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Spectrum Center",'Pittsburg=' + Pittsburg.length); Concord[Concord.length] = createMarker(new GPoint(-122.03562300,37.95038500),"
Spectrum Center Valley School
1026 Oak Grove Road Suite 1
Concord, CA 94518
Co-ed school, 2-10
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Spectrum Center Valley School",'Concord=' + Concord.length); San_Pablo[San_Pablo.length] = createMarker(new GPoint(-122.32425300,37.99820500),"
Spectrum Center-tara Hills
16330 San Pablo Avenue
San Pablo, CA 94806
Co-ed school, 1-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Spectrum Center-tara Hills",'San_Pablo=' + San_Pablo.length); Lafayette[Lafayette.length] = createMarker(new GPoint(-122.10295100,37.89226800),"
Springstone, The
1035 Carol Lane
Lafayette, CA 94549
Co-ed school, 6-9
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Springstone, The",'Lafayette=' + Lafayette.length); San_Pablo[San_Pablo.length] = createMarker(new GPoint(-122.31649200,37.99689500),"
Tara Hills Christian Academy
2800 Tara Hills Drive
San Pablo, CA 94806
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Tara Hills Christian Academy",'San_Pablo=' + San_Pablo.length); Brentwood[Brentwood.length] = createMarker(new GPoint(-121.69852500,37.93538700),"
Tobinworld Ii
8256 Brentwood Blvd
Brentwood, CA 94513
Co-ed school, 1-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Tobinworld Ii",'Brentwood=' + Brentwood.length); Walnut_Creek[Walnut_Creek.length] = createMarker(new GPoint(-122.07031300,37.91053300),"
Walnut Creek Christian Academy
2336 Buena Vista Avenue
Walnut Creek, CA 94597
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Walnut Creek Christian Academy",'Walnut_Creek=' + Walnut_Creek.length); El_Sobrante[El_Sobrante.length] = createMarker(new GPoint(-122.31354200,37.96509200),"
West County Christian Academy
Po Box 21779
El Sobrante, CA 94820
Co-ed school, 2-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("West County Christian Academy",'El_Sobrante=' + El_Sobrante.length); Concord[Concord.length] = createMarker(new GPoint(-121.97534500,37.95749900),"
Wood Rose Preparatory
Po Box 21464 1092 Alberta Way
Concord, CA 94521
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Wood Rose Preparatory",'Concord=' + Concord.length); Antioch[Antioch.length] = createMarker(new GPoint(-121.82640300,38.00428600),"
Zion Christian Academy
2127 Dogwood Way
Antioch, CA 94509
Co-ed school, K-10
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Zion Christian Academy",'Antioch=' + Antioch.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/////2/' + showArray); map.removeOverlays(Antioch); map.removeOverlays(Brentwood); map.removeOverlays(Concord); map.removeOverlays(Danville); map.removeOverlays(El_Sobrante); map.removeOverlays(Lafayette); map.removeOverlays(Martinez); map.removeOverlays(Moraga); map.removeOverlays(Orinda); map.removeOverlays(Pittsburg); map.removeOverlays(Pleasant_Hill); map.removeOverlays(Richmond); map.removeOverlays(San_Pablo); map.removeOverlays(Walnut_Creek); 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(Danville);map.removeOverlays(Antioch); map.removeOverlays(Brentwood); map.removeOverlays(Concord); map.removeOverlays(Danville); map.removeOverlays(El_Sobrante); map.removeOverlays(Lafayette); map.removeOverlays(Martinez); map.removeOverlays(Moraga); map.removeOverlays(Orinda); map.removeOverlays(Pittsburg); map.removeOverlays(Pleasant_Hill); map.removeOverlays(Richmond); map.removeOverlays(San_Pablo); map.removeOverlays(Walnut_Creek); map.addOverlays(Antioch); centerByArray(Antioch, false, false); cntMarker += Antioch.length; map.addOverlays(Brentwood); centerByArray(Brentwood, false, false); cntMarker += Brentwood.length; map.addOverlays(Concord); centerByArray(Concord, false, false); cntMarker += Concord.length; map.addOverlays(Danville); centerByArray(Danville, false, false); cntMarker += Danville.length; map.addOverlays(El_Sobrante); centerByArray(El_Sobrante, false, false); cntMarker += El_Sobrante.length; map.addOverlays(Lafayette); centerByArray(Lafayette, false, false); cntMarker += Lafayette.length; map.addOverlays(Martinez); centerByArray(Martinez, false, false); cntMarker += Martinez.length; map.addOverlays(Moraga); centerByArray(Moraga, false, false); cntMarker += Moraga.length; map.addOverlays(Orinda); centerByArray(Orinda, false, false); cntMarker += Orinda.length; map.addOverlays(Pittsburg); centerByArray(Pittsburg, false, false); cntMarker += Pittsburg.length; map.addOverlays(Pleasant_Hill); centerByArray(Pleasant_Hill, false, false); cntMarker += Pleasant_Hill.length; map.addOverlays(Richmond); centerByArray(Richmond, false, false); cntMarker += Richmond.length; map.addOverlays(San_Pablo); centerByArray(San_Pablo, false, false); cntMarker += San_Pablo.length; map.addOverlays(Walnut_Creek); centerByArray(Walnut_Creek, false, false); cntMarker += Walnut_Creek.length; centerByArray(Danville,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=2&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; }