function addMarkers(){ mySelect = document.getElementById('selection'); Forestville = [];Santa_Rosa = [];Rohnert_Park = [];Petaluma = [];Sonoma = [];Sebastopol = [];Novato = [];Graton = [];Cotati = [];Penngrove = [];Healdsburg = [];Occidental = [];mySelect.options[mySelect.options.length] = new Option("Cotati schools",'all=Cotati'); mySelect.options[mySelect.options.length] = new Option("Forestville schools",'all=Forestville'); mySelect.options[mySelect.options.length] = new Option("Graton schools",'all=Graton'); mySelect.options[mySelect.options.length] = new Option("Healdsburg schools",'all=Healdsburg'); mySelect.options[mySelect.options.length] = new Option("Novato schools",'all=Novato'); mySelect.options[mySelect.options.length] = new Option("Occidental schools",'all=Occidental'); mySelect.options[mySelect.options.length] = new Option("Penngrove schools",'all=Penngrove'); mySelect.options[mySelect.options.length] = new Option("Petaluma schools",'all=Petaluma'); mySelect.options[mySelect.options.length] = new Option("Rohnert Park schools",'all=Rohnert_Park'); mySelect.options[mySelect.options.length] = new Option("Santa Rosa schools",'all=Santa_Rosa'); mySelect.options[mySelect.options.length] = new Option("Sebastopol schools",'all=Sebastopol'); mySelect.options[mySelect.options.length] = new Option("Sonoma schools",'all=Sonoma'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Forestville[Forestville.length] = createMarker(new GPoint(-122.89168900,38.47528100),"
American Christian Academy Ext
6782 1st Street
Forestville, CA 95436
Co-ed school, 1-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("American Christian Academy Ext",'Forestville=' + Forestville.length); Santa_Rosa[Santa_Rosa.length] = createMarker(new GPoint(-122.72863300,38.46731100),"
Anova Center For Education
3033 Cleveland Avenue
Santa Rosa, CA 95403
Co-ed school, 1-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Anova Center For Education",'Santa_Rosa=' + Santa_Rosa.length); Rohnert_Park[Rohnert_Park.length] = createMarker(new GPoint(-122.69401600,38.34651700),"
Berean Baptist Christian Academy
6298 Country Club Drive
Rohnert Park, CA 94928
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Berean Baptist Christian Academy",'Rohnert_Park=' + Rohnert_Park.length); Santa_Rosa[Santa_Rosa.length] = createMarker(new GPoint(-122.57949900,38.43354600),"
Bridges Of Sonoma
183 Pythian Rd.
Santa Rosa, CA 95409
Co-ed school, 8-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bridges Of Sonoma",'Santa_Rosa=' + Santa_Rosa.length); Santa_Rosa[Santa_Rosa.length] = createMarker(new GPoint(-122.74182400,38.49335300),"
Cardinal Newman High School
50 Ursuline Road
Santa Rosa, CA 95403
All-boys school, 9-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Cardinal Newman High School",'Santa_Rosa=' + Santa_Rosa.length); Petaluma[Petaluma.length] = createMarker(new GPoint(-122.71262600,38.25761900),"
Family Life Center
365 Kuck Lane
Petaluma, CA 94952
Co-ed school, 8-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Family Life Center",'Petaluma=' + Petaluma.length); Sonoma[Sonoma.length] = createMarker(new GPoint(-122.47200000,38.28940000),"
Hanna Boys Center School
Po Box 100
Sonoma, CA 95476
All-boys school, 7-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Hanna Boys Center School",'Sonoma=' + Sonoma.length); Sebastopol[Sebastopol.length] = createMarker(new GPoint(-122.82270000,38.40220000),"
Journey High School
P.o. Box 2079
Sebastopol, CA 95473
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Journey High School",'Sebastopol=' + Sebastopol.length); Santa_Rosa[Santa_Rosa.length] = createMarker(new GPoint(-122.73827400,38.47341000),"
Lattice Educational Services
3273 Airway Dr, Suite A
Santa Rosa, CA 95403
Co-ed school, Ungraded
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lattice Educational Services",'Santa_Rosa=' + Santa_Rosa.length); Santa_Rosa[Santa_Rosa.length] = createMarker(new GPoint(-122.74169000,38.38829000),"
New Directions Adolescent Services
3641 Stony Point Road
Santa Rosa, CA 95407
Co-ed school, 7-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("New Directions Adolescent Services",'Santa_Rosa=' + Santa_Rosa.length); Santa_Rosa[Santa_Rosa.length] = createMarker(new GPoint(-122.72310200,38.39855200),"
New Hope Baptist Church
3200 Dutton Avenue 226
Santa Rosa, CA 95407
Co-ed school, 2-9
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("New Hope Baptist Church",'Santa_Rosa=' + Santa_Rosa.length); Santa_Rosa[Santa_Rosa.length] = createMarker(new GPoint(-122.70963200,38.44149600),"
New Horizon School & Learning Center
827 3rd Street
Santa Rosa, CA 95404
Co-ed school, 7-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("New Horizon School & Learning Center",'Santa_Rosa=' + Santa_Rosa.length); Sonoma[Sonoma.length] = createMarker(new GPoint(-122.48520200,38.31669300),"
New Song/Olive Tree School
121 Lichtenberg Ave.
Sonoma, CA 95476
Co-ed school, 1-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("New Song/Olive Tree School",'Sonoma=' + Sonoma.length); Sebastopol[Sebastopol.length] = createMarker(new GPoint(-122.90867400,38.44356500),"
Nonesuch School
4004 Bones Road
Sebastopol, CA 95472
Co-ed school, 6-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Nonesuch School",'Sebastopol=' + Sebastopol.length); Novato[Novato.length] = createMarker(new GPoint(-122.60489300,38.11016100),"
North Bay Academy of Communication and Design
Temp offices 789 Eucalyptus Ave.
Novato, CA 94947
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("North Bay Academy of Communication and Design",'Novato=' + Novato.length); Santa_Rosa[Santa_Rosa.length] = createMarker(new GPoint(-122.74232400,38.46800600),"
North Valley School
3164 Condo Court
Santa Rosa, CA 95403
Co-ed school, 3-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("North Valley School",'Santa_Rosa=' + Santa_Rosa.length); Graton[Graton.length] = createMarker(new GPoint(-122.84320000,38.39420000),"
Pacific Christian Academy
Po Box 369 8877 Donald Street
Graton, CA 95444
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Pacific Christian Academy",'Graton=' + Graton.length); Santa_Rosa[Santa_Rosa.length] = createMarker(new GPoint(-122.75878300,38.44263500),"
Paideia Educational Heritage
1012 Sonora Court
Santa Rosa, CA 95401
Co-ed school, PK-10
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Paideia Educational Heritage",'Santa_Rosa=' + Santa_Rosa.length); Sebastopol[Sebastopol.length] = createMarker(new GPoint(-122.86766200,38.42258500),"
Plumfield Academy
9360 Occidental Road
Sebastopol, CA 95472
All-boys school, 2-11
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Plumfield Academy",'Sebastopol=' + Sebastopol.length); Cotati[Cotati.length] = createMarker(new GPoint(-122.70457100,38.32428600),"
Rancho Bodega School
8297 Old Redwood Hwy.
Cotati, CA 94931
Co-ed school, 7-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Rancho Bodega School",'Cotati=' + Cotati.length); Santa_Rosa[Santa_Rosa.length] = createMarker(new GPoint(-122.73852700,38.50143500),"
Redwood Adventist Academy
385 Mark West Springs Rd
Santa Rosa, CA 95404
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Redwood Adventist Academy",'Santa_Rosa=' + Santa_Rosa.length); Santa_Rosa[Santa_Rosa.length] = createMarker(new GPoint(-122.70960000,38.43990000),"
Redwood Isititute For Designed
Po Box 12216
Santa Rosa, CA 95406
All-boys school, 7-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Redwood Isititute For Designed",'Santa_Rosa=' + Santa_Rosa.length); Penngrove[Penngrove.length] = createMarker(new GPoint(-122.65688800,38.31419500),"
Redwood Montessori School
11201 Main St. P.O. Box 159
Penngrove, CA 94951
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Redwood Montessori School",'Penngrove=' + Penngrove.length); Santa_Rosa[Santa_Rosa.length] = createMarker(new GPoint(-122.67426500,38.48229800),"
Rincon Valley Christian School
4585 Badger Rd
Santa Rosa, CA 95409
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Rincon Valley Christian School",'Santa_Rosa=' + Santa_Rosa.length); Healdsburg[Healdsburg.length] = createMarker(new GPoint(-122.83593200,38.62947200),"
Rio Lindo Adventist Academy
3200 Rio Lindo Avenue
Healdsburg, CA 95448
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Rio Lindo Adventist Academy",'Healdsburg=' + Healdsburg.length); Occidental[Occidental.length] = createMarker(new GPoint(-122.99310000,38.40890000),"
Russian River Christian Academy
P O Box 509
Occidental, CA 95465
Co-ed school, 1-11
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Russian River Christian Academy",'Occidental=' + Occidental.length); Petaluma[Petaluma.length] = createMarker(new GPoint(-122.64968300,38.24332100),"
St. Vincent De Paul High School
849 Keokuk Street
Petaluma, CA 94952
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Vincent De Paul High School",'Petaluma=' + Petaluma.length); Santa_Rosa[Santa_Rosa.length] = createMarker(new GPoint(-122.75120900,38.49623800),"
Santa Rosa Christian School
50 Mark West Springs Rd.
Santa Rosa, CA 95403
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Santa Rosa Christian School",'Santa_Rosa=' + Santa_Rosa.length); Rohnert_Park[Rohnert_Park.length] = createMarker(new GPoint(-122.70745500,38.33589800),"
Sierra School Of Sonoma County
205 Southwest Blvd
Rohnert Park, CA 94928
Co-ed school, 6-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sierra School Of Sonoma County",'Rohnert_Park=' + Rohnert_Park.length); Sonoma[Sonoma.length] = createMarker(new GPoint(-122.46622700,38.29288900),"
Solo Quest Learning Center
414 W Napa Street
Sonoma, CA 95476
Co-ed school, 8-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Solo Quest Learning Center",'Sonoma=' + Sonoma.length); Santa_Rosa[Santa_Rosa.length] = createMarker(new GPoint(-122.68957900,38.41811000),"
Sonoma Academy
2500 Farmers Lane
Santa Rosa, CA 95404
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sonoma Academy",'Santa_Rosa=' + Santa_Rosa.length); Sonoma[Sonoma.length] = createMarker(new GPoint(-122.45267300,38.29152000),"
Sonoma Valley Academy
276 E Napa Street
Sonoma, CA 95476
Co-ed school, 5-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sonoma Valley Academy",'Sonoma=' + Sonoma.length); Santa_Rosa[Santa_Rosa.length] = createMarker(new GPoint(-122.73655000,38.42627600),"
St Michael's Orthodox School
1545 Rose Avenue
Santa Rosa, CA 95407
Co-ed school, 6-9
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Michael's Orthodox School",'Santa_Rosa=' + Santa_Rosa.length); Santa_Rosa[Santa_Rosa.length] = createMarker(new GPoint(-122.71356200,38.44213300),"
Stuart Preparatory School
431 Humboldt St
Santa Rosa, CA 95404
Co-ed school, PK-9
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Stuart Preparatory School",'Santa_Rosa=' + Santa_Rosa.length); Santa_Rosa[Santa_Rosa.length] = createMarker(new GPoint(-122.80690800,38.44405900),"
Summerfield Waldorf School
655 Willowside Road
Santa Rosa, CA 95401
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Summerfield Waldorf School",'Santa_Rosa=' + Santa_Rosa.length); Santa_Rosa[Santa_Rosa.length] = createMarker(new GPoint(-122.74182400,38.49426400),"
Ursuline High School
90 Ursuline Road
Santa Rosa, CA 95403
All-girls school, 9-12
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Ursuline High School",'Santa_Rosa=' + Santa_Rosa.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(Cotati); map.removeOverlays(Forestville); map.removeOverlays(Graton); map.removeOverlays(Healdsburg); map.removeOverlays(Novato); map.removeOverlays(Occidental); map.removeOverlays(Penngrove); map.removeOverlays(Petaluma); map.removeOverlays(Rohnert_Park); map.removeOverlays(Santa_Rosa); map.removeOverlays(Sebastopol); map.removeOverlays(Sonoma); 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(Forestville);map.removeOverlays(Cotati); map.removeOverlays(Forestville); map.removeOverlays(Graton); map.removeOverlays(Healdsburg); map.removeOverlays(Novato); map.removeOverlays(Occidental); map.removeOverlays(Penngrove); map.removeOverlays(Petaluma); map.removeOverlays(Rohnert_Park); map.removeOverlays(Santa_Rosa); map.removeOverlays(Sebastopol); map.removeOverlays(Sonoma); map.addOverlays(Cotati); centerByArray(Cotati, false, false); cntMarker += Cotati.length; map.addOverlays(Forestville); centerByArray(Forestville, false, false); cntMarker += Forestville.length; map.addOverlays(Graton); centerByArray(Graton, false, false); cntMarker += Graton.length; map.addOverlays(Healdsburg); centerByArray(Healdsburg, false, false); cntMarker += Healdsburg.length; map.addOverlays(Novato); centerByArray(Novato, false, false); cntMarker += Novato.length; map.addOverlays(Occidental); centerByArray(Occidental, false, false); cntMarker += Occidental.length; map.addOverlays(Penngrove); centerByArray(Penngrove, false, false); cntMarker += Penngrove.length; map.addOverlays(Petaluma); centerByArray(Petaluma, false, false); cntMarker += Petaluma.length; map.addOverlays(Rohnert_Park); centerByArray(Rohnert_Park, false, false); cntMarker += Rohnert_Park.length; map.addOverlays(Santa_Rosa); centerByArray(Santa_Rosa, false, false); cntMarker += Santa_Rosa.length; map.addOverlays(Sebastopol); centerByArray(Sebastopol, false, false); cntMarker += Sebastopol.length; map.addOverlays(Sonoma); centerByArray(Sonoma, false, false); cntMarker += Sonoma.length; centerByArray(Forestville,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; }