function addMarkers(){ mySelect = document.getElementById('selection'); Corte_Madera = [];San_Rafael = [];Fairfax = [];Sausalito = [];Bolinas = [];Novato = [];Mill_Valley = [];Larkspur = [];San_Anselmo = [];Tiburon = [];Marin_City = [];mySelect.options[mySelect.options.length] = new Option("Bolinas schools",'all=Bolinas'); mySelect.options[mySelect.options.length] = new Option("Corte Madera schools",'all=Corte_Madera'); mySelect.options[mySelect.options.length] = new Option("Fairfax schools",'all=Fairfax'); mySelect.options[mySelect.options.length] = new Option("Larkspur schools",'all=Larkspur'); mySelect.options[mySelect.options.length] = new Option("Marin City schools",'all=Marin_City'); mySelect.options[mySelect.options.length] = new Option("Mill Valley schools",'all=Mill_Valley'); mySelect.options[mySelect.options.length] = new Option("Novato schools",'all=Novato'); mySelect.options[mySelect.options.length] = new Option("San Anselmo schools",'all=San_Anselmo'); mySelect.options[mySelect.options.length] = new Option("San Rafael schools",'all=San_Rafael'); mySelect.options[mySelect.options.length] = new Option("Sausalito schools",'all=Sausalito'); mySelect.options[mySelect.options.length] = new Option("Tiburon schools",'all=Tiburon'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Corte_Madera[Corte_Madera.length] = createMarker(new GPoint(-122.50543800,37.91638600),"
The Allaire School
50 El Camino Drive
Corte Madera, CA 94925
Co-ed school, 4-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Allaire School",'Corte_Madera=' + Corte_Madera.length); San_Rafael[San_Rafael.length] = createMarker(new GPoint(-122.52393900,38.00009400),"
Brandeis Hillel Day School
180 N San Pedro Rd
San Rafael, CA 94903
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Brandeis Hillel Day School",'San_Rafael=' + San_Rafael.length); Fairfax[Fairfax.length] = createMarker(new GPoint(-122.59981100,37.99841700),"
Cascade Canyon School
2626 Sir Francis Drake Blvd
Fairfax, CA 94930
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Cascade Canyon School",'Fairfax=' + Fairfax.length); Sausalito[Sausalito.length] = createMarker(new GPoint(-122.51405700,37.87148100),"
Childrens Cultural Cntr-marin
620 Drake Avenue
Sausalito, CA 94965
Co-ed school, PK-KG
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Childrens Cultural Cntr-marin",'Sausalito=' + Sausalito.length); Corte_Madera[Corte_Madera.length] = createMarker(new GPoint(-122.50543800,37.91638600),"
Corte Madera Montessori
50 El Camino Drive
Corte Madera, CA 94925
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Corte Madera Montessori",'Corte_Madera=' + Corte_Madera.length); San_Rafael[San_Rafael.length] = createMarker(new GPoint(-122.52772500,37.99584400),"
Dunham Academy
1 Saint Vincents Drive
San Rafael, CA 94903
Co-ed school, 5-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Dunham Academy",'San_Rafael=' + San_Rafael.length); San_Rafael[San_Rafael.length] = createMarker(new GPoint(-122.54702900,38.01968600),"
Full Circle
70 Skyview Ter
San Rafael, CA 94903
All-boys school, 5-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Full Circle",'San_Rafael=' + San_Rafael.length); Bolinas[Bolinas.length] = createMarker(new GPoint(-122.70040000,37.90760000),"
Full Circle School Marin
5855 State Route One
Bolinas, CA 94924
All-boys school, 6-11
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Full Circle School Marin",'Bolinas=' + Bolinas.length); Novato[Novato.length] = createMarker(new GPoint(-122.55772100,38.08080600),"
Good Shepherd Lutheran School
1180 Lynwood Drive
Novato, CA 94947
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Good Shepherd Lutheran School",'Novato=' + Novato.length); Mill_Valley[Mill_Valley.length] = createMarker(new GPoint(-122.54565400,37.90707100),"
Greenwood School
17 Buena Vista Ave
Mill Valley, CA 94941
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Greenwood School",'Mill_Valley=' + Mill_Valley.length); Mill_Valley[Mill_Valley.length] = createMarker(new GPoint(-122.54395000,37.87988200),"
Kumara School
540 Marin Avenue
Mill Valley, CA 94941
Co-ed school, PK-1
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Kumara School",'Mill_Valley=' + Mill_Valley.length); Novato[Novato.length] = createMarker(new GPoint(-122.57080000,38.10090000),"
Living Epistle Christian
Po Box 1552
Novato, CA 94948
Co-ed school, 3-10
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Living Epistle Christian",'Novato=' + Novato.length); Corte_Madera[Corte_Madera.length] = createMarker(new GPoint(-122.49834500,37.92124200),"
Lycee Francais La Perouse
330 Golden Mind Passage
Corte Madera, CA 94925
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lycee Francais La Perouse",'Corte_Madera=' + Corte_Madera.length); Novato[Novato.length] = createMarker(new GPoint(-122.56411800,38.08718600),"
Marin Christian Academy
1370 S Novato Blvd
Novato, CA 94947
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Marin Christian Academy",'Novato=' + Novato.length); Corte_Madera[Corte_Madera.length] = createMarker(new GPoint(-122.49186100,37.91990800),"
Marin Country Day School
5221 Paradise Drive
Corte Madera, CA 94925
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Marin Country Day School",'Corte_Madera=' + Corte_Madera.length); Mill_Valley[Mill_Valley.length] = createMarker(new GPoint(-122.54362800,37.89686600),"
Marin Horizon School
305 Montford Ave
Mill Valley, CA 94941
Co-ed school, NS-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Marin Horizon School",'Mill_Valley=' + Mill_Valley.length); Corte_Madera[Corte_Madera.length] = createMarker(new GPoint(-122.49087200,37.92004000),"
Marin Montessori School
5200 Paradise Drive
Corte Madera, CA 94925
Co-ed school, PK-9
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Marin Montessori School",'Corte_Madera=' + Corte_Madera.length); Larkspur[Larkspur.length] = createMarker(new GPoint(-122.53236300,37.92847500),"
Marin Primary & Middle School
20 Magnolia Avenue
Larkspur, CA 94939
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Marin Primary & Middle School",'Larkspur=' + Larkspur.length); San_Rafael[San_Rafael.length] = createMarker(new GPoint(-122.55879500,38.02826900),"
Marin Waldorf School
755 Idylberry Road
San Rafael, CA 94903
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Marin Waldorf School",'San_Rafael=' + San_Rafael.length); San_Rafael[San_Rafael.length] = createMarker(new GPoint(-122.53521900,37.99554100),"
Merry Times Preschool Academy
159 Merrydale Road
San Rafael, CA 94903
Co-ed school, KG-KG
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Merry Times Preschool Academy",'San_Rafael=' + San_Rafael.length); San_Rafael[San_Rafael.length] = createMarker(new GPoint(-122.54627900,38.01295000),"
Montessori De Terra Linda
Po Box 6093
San Rafael, CA 94903
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Montessori De Terra Linda",'San_Rafael=' + San_Rafael.length); San_Rafael[San_Rafael.length] = createMarker(new GPoint(-122.55751100,38.00356300),"
Montessori In Motion
3 Wellbrock Hts
San Rafael, CA 94903
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Montessori In Motion",'San_Rafael=' + San_Rafael.length); San_Rafael[San_Rafael.length] = createMarker(new GPoint(-122.51099800,37.95704000),"
Montessori School Of Central Marin
317 Auburn Street
San Rafael, CA 94901
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Montessori School Of Central Marin",'San_Rafael=' + San_Rafael.length); Novato[Novato.length] = createMarker(new GPoint(-122.58420000,38.09730000),"
Montessori School Of Novato
1466 S Novato Blvd Po Box 1921
Novato, CA 94947
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Montessori School Of Novato",'Novato=' + Novato.length); Mill_Valley[Mill_Valley.length] = createMarker(new GPoint(-122.53275200,37.88874800),"
Mount Tamalpais School
100 Harvard Avenue
Mill Valley, CA 94941
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mount Tamalpais School",'Mill_Valley=' + Mill_Valley.length); Corte_Madera[Corte_Madera.length] = createMarker(new GPoint(-122.50538400,37.91640200),"
The Mountain School
50 El Camino Drive
Corte Madera, CA 94925
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Mountain School",'Corte_Madera=' + Corte_Madera.length); Novato[Novato.length] = createMarker(new GPoint(-122.56465600,38.09733600),"
North Bay Christian Academy
6965 Redwood Blvd
Novato, CA 94945
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("North Bay Christian Academy",'Novato=' + Novato.length); Novato[Novato.length] = createMarker(new GPoint(-122.58517700,38.12194400),"
Novato Christian School
495 San Marin Dr.
Novato, CA 94945
Co-ed school, 1-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Novato Christian School",'Novato=' + Novato.length); Novato[Novato.length] = createMarker(new GPoint(-122.58366100,38.10970800),"
Our Lady Of Loretto School
1811 Virginia Avenue
Novato, CA 94945
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Our Lady Of Loretto School",'Novato=' + Novato.length); Mill_Valley[Mill_Valley.length] = createMarker(new GPoint(-122.52238000,37.90743700),"
Ring Mountain Day School
70 Lomita Drive
Mill Valley, CA 94941
Co-ed school, NS-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ring Mountain Day School",'Mill_Valley=' + Mill_Valley.length); Mill_Valley[Mill_Valley.length] = createMarker(new GPoint(-122.51396900,37.90663500),"
Ross Academy Montessori School
7 Thomas Drive
Mill Valley, CA 94941
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ross Academy Montessori School",'Mill_Valley=' + Mill_Valley.length); San_Anselmo[San_Anselmo.length] = createMarker(new GPoint(-122.56227900,37.97029400),"
St. Anselm School
40 Belle Avenue
San Anselmo, CA 94960
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Anselm School",'San_Anselmo=' + San_Anselmo.length); Tiburon[Tiburon.length] = createMarker(new GPoint(-122.47482500,37.88800200),"
St. Hilary School
765 Hilary Drive
Tiburon, CA 94920
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Hilary School",'Tiburon=' + Tiburon.length); San_Rafael[San_Rafael.length] = createMarker(new GPoint(-122.54440000,38.01440000),"
St. Isabella School
Po Box 6188 1 Trinity Way
San Rafael, CA 94903
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Isabella School",'San_Rafael=' + San_Rafael.length); San_Rafael[San_Rafael.length] = createMarker(new GPoint(-122.55583700,38.00748800),"
Saint Mark's School
39 Trellis Drive
San Rafael, CA 94903
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Saint Mark's School",'San_Rafael=' + San_Rafael.length); Larkspur[Larkspur.length] = createMarker(new GPoint(-122.53652000,37.93445800),"
St. Patrick School
120 King Street
Larkspur, CA 94939
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Patrick School",'Larkspur=' + Larkspur.length); San_Rafael[San_Rafael.length] = createMarker(new GPoint(-122.52823300,37.97426500),"
St. Raphael School
1100 5th Avenue
San Rafael, CA 94901
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Raphael School",'San_Rafael=' + San_Rafael.length); Fairfax[Fairfax.length] = createMarker(new GPoint(-122.59110800,37.99068200),"
St. Rita Elementary School
102 Marinda Drive
Fairfax, CA 94930
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Rita Elementary School",'Fairfax=' + Fairfax.length); San_Anselmo[San_Anselmo.length] = createMarker(new GPoint(-122.56050000,37.97060000),"
San Anselmo Montessori School
Po Box 707
San Anselmo, CA 94979
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("San Anselmo Montessori School",'San_Anselmo=' + San_Anselmo.length); San_Anselmo[San_Anselmo.length] = createMarker(new GPoint(-122.58544900,38.01318200),"
San Domenico School
1500 Butterfield Road
San Anselmo, CA 94960
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("San Domenico School",'San_Anselmo=' + San_Anselmo.length); San_Anselmo[San_Anselmo.length] = createMarker(new GPoint(-122.56645600,37.98069400),"
Star Academy
921 Sir Francis Drake Blvd
San Anselmo, CA 94960
Co-ed school, 5-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Star Academy",'San_Anselmo=' + San_Anselmo.length); San_Rafael[San_Rafael.length] = createMarker(new GPoint(-122.52829400,38.03465900),"
Timothy Murphy School
1 Saint Vincents Drive
San Rafael, CA 94903
All-boys school, 3-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Timothy Murphy School",'San_Rafael=' + San_Rafael.length); San_Rafael[San_Rafael.length] = createMarker(new GPoint(-122.52763200,37.96628900),"
Trinity Preschool And Kindergarten
333 Woodland Avenue
San Rafael, CA 94901
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Trinity Preschool And Kindergarten",'San_Rafael=' + San_Rafael.length); Marin_City[Marin_City.length] = createMarker(new GPoint(-122.51010700,37.86765200),"
Women Helping All People Scholastic Academy
79 Cole Drive No Five
Marin City, CA 94965
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Women Helping All People Scholastic Academy",'Marin_City=' + Marin_City.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(Bolinas); map.removeOverlays(Corte_Madera); map.removeOverlays(Fairfax); map.removeOverlays(Larkspur); map.removeOverlays(Marin_City); map.removeOverlays(Mill_Valley); map.removeOverlays(Novato); map.removeOverlays(San_Anselmo); map.removeOverlays(San_Rafael); map.removeOverlays(Sausalito); map.removeOverlays(Tiburon); 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(Corte_Madera);map.removeOverlays(Bolinas); map.removeOverlays(Corte_Madera); map.removeOverlays(Fairfax); map.removeOverlays(Larkspur); map.removeOverlays(Marin_City); map.removeOverlays(Mill_Valley); map.removeOverlays(Novato); map.removeOverlays(San_Anselmo); map.removeOverlays(San_Rafael); map.removeOverlays(Sausalito); map.removeOverlays(Tiburon); map.addOverlays(Bolinas); centerByArray(Bolinas, false, false); cntMarker += Bolinas.length; map.addOverlays(Corte_Madera); centerByArray(Corte_Madera, false, false); cntMarker += Corte_Madera.length; map.addOverlays(Fairfax); centerByArray(Fairfax, false, false); cntMarker += Fairfax.length; map.addOverlays(Larkspur); centerByArray(Larkspur, false, false); cntMarker += Larkspur.length; map.addOverlays(Marin_City); centerByArray(Marin_City, false, false); cntMarker += Marin_City.length; map.addOverlays(Mill_Valley); centerByArray(Mill_Valley, false, false); cntMarker += Mill_Valley.length; map.addOverlays(Novato); centerByArray(Novato, false, false); cntMarker += Novato.length; map.addOverlays(San_Anselmo); centerByArray(San_Anselmo, false, false); cntMarker += San_Anselmo.length; map.addOverlays(San_Rafael); centerByArray(San_Rafael, false, false); cntMarker += San_Rafael.length; map.addOverlays(Sausalito); centerByArray(Sausalito, false, false); cntMarker += Sausalito.length; map.addOverlays(Tiburon); centerByArray(Tiburon, false, false); cntMarker += Tiburon.length; centerByArray(Corte_Madera,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; }