function addMarkers(){ mySelect = document.getElementById('selection'); South_Pasadena = [];Los_Angeles = [];Cypress = [];Belmont = [];Seaside = [];La_Habra = [];Covina = [];San_Bernardino = [];Tustin = [];Compton = [];San_Diego = [];Pasadena = [];El_Dorado_Hills = [];San_Bruno = [];Altadena = [];Carmichael = [];Redwood_City = [];Calimesa = [];Santa_Rosa = [];Poway = [];Lodi = [];Murrieta = [];San_Clemente = [];Wilmington = [];West_Hills = [];Northridge = [];San_Anselmo = [];San_Gabriel = [];Benicia = [];Stockton = [];Lynwood = [];Orange = [];Buena_Park = [];Gardena = [];Richmond = [];mySelect.options[mySelect.options.length] = new Option("Altadena schools",'all=Altadena'); mySelect.options[mySelect.options.length] = new Option("Belmont schools",'all=Belmont'); mySelect.options[mySelect.options.length] = new Option("Benicia schools",'all=Benicia'); mySelect.options[mySelect.options.length] = new Option("Buena Park schools",'all=Buena_Park'); mySelect.options[mySelect.options.length] = new Option("Calimesa schools",'all=Calimesa'); mySelect.options[mySelect.options.length] = new Option("Carmichael schools",'all=Carmichael'); mySelect.options[mySelect.options.length] = new Option("Compton schools",'all=Compton'); mySelect.options[mySelect.options.length] = new Option("Covina schools",'all=Covina'); mySelect.options[mySelect.options.length] = new Option("Cypress schools",'all=Cypress'); mySelect.options[mySelect.options.length] = new Option("El Dorado Hills schools",'all=El_Dorado_Hills'); mySelect.options[mySelect.options.length] = new Option("Gardena schools",'all=Gardena'); mySelect.options[mySelect.options.length] = new Option("La Habra schools",'all=La_Habra'); mySelect.options[mySelect.options.length] = new Option("Lodi schools",'all=Lodi'); mySelect.options[mySelect.options.length] = new Option("Los Angeles schools",'all=Los_Angeles'); mySelect.options[mySelect.options.length] = new Option("Lynwood schools",'all=Lynwood'); mySelect.options[mySelect.options.length] = new Option("Murrieta schools",'all=Murrieta'); mySelect.options[mySelect.options.length] = new Option("Northridge schools",'all=Northridge'); mySelect.options[mySelect.options.length] = new Option("Orange schools",'all=Orange'); mySelect.options[mySelect.options.length] = new Option("Pasadena schools",'all=Pasadena'); mySelect.options[mySelect.options.length] = new Option("Poway schools",'all=Poway'); mySelect.options[mySelect.options.length] = new Option("Redwood City schools",'all=Redwood_City'); mySelect.options[mySelect.options.length] = new Option("Richmond schools",'all=Richmond'); mySelect.options[mySelect.options.length] = new Option("San Anselmo schools",'all=San_Anselmo'); mySelect.options[mySelect.options.length] = new Option("San Bernardino schools",'all=San_Bernardino'); mySelect.options[mySelect.options.length] = new Option("San Bruno schools",'all=San_Bruno'); mySelect.options[mySelect.options.length] = new Option("San Clemente schools",'all=San_Clemente'); mySelect.options[mySelect.options.length] = new Option("San Diego schools",'all=San_Diego'); mySelect.options[mySelect.options.length] = new Option("San Gabriel schools",'all=San_Gabriel'); mySelect.options[mySelect.options.length] = new Option("Santa Rosa schools",'all=Santa_Rosa'); mySelect.options[mySelect.options.length] = new Option("Seaside schools",'all=Seaside'); mySelect.options[mySelect.options.length] = new Option("South Pasadena schools",'all=South_Pasadena'); mySelect.options[mySelect.options.length] = new Option("Stockton schools",'all=Stockton'); mySelect.options[mySelect.options.length] = new Option("Tustin schools",'all=Tustin'); mySelect.options[mySelect.options.length] = new Option("West Hills schools",'all=West_Hills'); mySelect.options[mySelect.options.length] = new Option("Wilmington schools",'all=Wilmington'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); South_Pasadena[South_Pasadena.length] = createMarker(new GPoint(-118.15228100,34.10203600),"
Almansor Center
1955 Fremont Avenue
South Pasadena, CA 91030
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Almansor Center",'South_Pasadena=' + South_Pasadena.length); Los_Angeles[Los_Angeles.length] = createMarker(new GPoint(-118.30653300,34.07528600),"
Beverly Christian Academy
224 N Serrano Avenue
Los Angeles, CA 90004
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Beverly Christian Academy",'Los_Angeles=' + Los_Angeles.length); Cypress[Cypress.length] = createMarker(new GPoint(-118.04205800,33.83156300),"
Calvary Chapel Christian School Of Cypress
5202 Lincoln Avenue
Cypress, CA 90630
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Calvary Chapel Christian School Of Cypress",'Cypress=' + Cypress.length); Belmont[Belmont.length] = createMarker(new GPoint(-122.28434900,37.51129300),"
Charles Armstrong School
1405 Solana Drive
Belmont, CA 94002
Co-ed school, 1-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Charles Armstrong School",'Belmont=' + Belmont.length); Seaside[Seaside.length] = createMarker(new GPoint(-121.79991800,36.63598400),"
Chartwell School
2511 Numa Watson Road
Seaside, CA 93955
Co-ed school, 2-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Chartwell School",'Seaside=' + Seaside.length); La_Habra[La_Habra.length] = createMarker(new GPoint(-117.94636400,33.94105900),"
Cleta Harder Developmental
981 N Euclid St
La Habra, CA 90631
Co-ed school, NS-NS
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Cleta Harder Developmental",'La_Habra=' + La_Habra.length); Covina[Covina.length] = createMarker(new GPoint(-117.87213400,34.08400800),"
Covina Development Center
240 S Grand Avenue
Covina, CA 91724
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Covina Development Center",'Covina=' + Covina.length); San_Bernardino[San_Bernardino.length] = createMarker(new GPoint(-117.31678900,34.14445500),"
Eagle Valley School
2915 Little Mountain Drive
San Bernardino, CA 92405
Co-ed school, 5-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Eagle Valley School",'San_Bernardino=' + San_Bernardino.length); Tustin[Tustin.length] = createMarker(new GPoint(-117.81513000,33.74298600),"
Edgewood Preprimary Academy
1091 Bryan Avenue
Tustin, CA 92780
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Edgewood Preprimary Academy",'Tustin=' + Tustin.length); Compton[Compton.length] = createMarker(new GPoint(-118.21613400,33.89321600),"
Eko Multipurpose Center Inc
403 S Santa Fe Avenue
Compton, CA 90221
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Eko Multipurpose Center Inc",'Compton=' + Compton.length); San_Diego[San_Diego.length] = createMarker(new GPoint(-117.07833000,32.80179000),"
Excelsior Academy
7202 Princess View Dr
San Diego, CA 92120
Co-ed school, 3-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Excelsior Academy",'San_Diego=' + San_Diego.length); Pasadena[Pasadena.length] = createMarker(new GPoint(-118.09843100,34.16300200),"
Frostig School
971 N Altadena Dr
Pasadena, CA 91107
Co-ed school, 1-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Frostig School",'Pasadena=' + Pasadena.length); El_Dorado_Hills[El_Dorado_Hills.length] = createMarker(new GPoint(-121.07096600,38.63709900),"
Guiding Hands School
4900 Windplay Drive
El Dorado Hills, CA 95762
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Guiding Hands School",'El_Dorado_Hills=' + El_Dorado_Hills.length); San_Bruno[San_Bruno.length] = createMarker(new GPoint(-122.44784300,37.62199200),"
Highlands Christian Schools
1900 Monterey Dr
San Bruno, CA 94066
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Highlands Christian Schools",'San_Bruno=' + San_Bruno.length); Altadena[Altadena.length] = createMarker(new GPoint(-118.14889100,34.19100900),"
James H Hawkins Educational Programs
2662 Fair Oaks Avenue
Altadena, CA 91001
Co-ed school, 5-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("James H Hawkins Educational Programs",'Altadena=' + Altadena.length); Carmichael[Carmichael.length] = createMarker(new GPoint(-121.34041900,38.63193700),"
Jane Lathrop School
5325 Engle Rd
Carmichael, CA 95608
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Jane Lathrop School",'Carmichael=' + Carmichael.length); Redwood_City[Redwood_City.length] = createMarker(new GPoint(-122.24914300,37.46682700),"
Jean Weingarten Peninsula Oral Schl For The Deaf
3518 Jefferson Avenue
Redwood City, CA 94062
Co-ed school, NS-1
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Jean Weingarten Peninsula Oral Schl For The Deaf",'Redwood_City=' + Redwood_City.length); Calimesa[Calimesa.length] = createMarker(new GPoint(-117.04320000,33.98580000),"
Live Oak School
Po Box 704
Calimesa, CA 92320
Co-ed school, 6-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Live Oak School",'Calimesa=' + Calimesa.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); Poway[Poway.length] = createMarker(new GPoint(-117.06783700,32.95094800),"
Newbridge School
12285 Oak Knoll Rd
Poway, CA 92064
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Newbridge School",'Poway=' + Poway.length); Lodi[Lodi.length] = createMarker(new GPoint(-121.18108100,38.09319600),"
North Valley School
12755 N Hwy 88
Lodi, CA 95240
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("North Valley School",'Lodi=' + Lodi.length); Murrieta[Murrieta.length] = createMarker(new GPoint(-117.21803900,33.56791700),"
Oak Grove Institute
24275 Jefferson Avenue
Murrieta, CA 92562
Co-ed school, 2-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Oak Grove Institute",'Murrieta=' + Murrieta.length); San_Clemente[San_Clemente.length] = createMarker(new GPoint(-117.59858500,33.41568100),"
Our Saviors Lutheran School
200 Avenida San Pablo
San Clemente, CA 92672
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Our Saviors Lutheran School",'San_Clemente=' + San_Clemente.length); Wilmington[Wilmington.length] = createMarker(new GPoint(-118.27497400,33.79369700),"
Pacific Harbor Christian School
1530 N Wilmington Blvd
Wilmington, CA 90744
Co-ed school, NS-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Pacific Harbor Christian School",'Wilmington=' + Wilmington.length); West_Hills[West_Hills.length] = createMarker(new GPoint(-118.61486500,34.20475400),"
Parkhill School
7401 Shoup Ave
West Hills, CA 91307
Co-ed school, 3-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Parkhill School",'West_Hills=' + West_Hills.length); Northridge[Northridge.length] = createMarker(new GPoint(-118.50476500,34.25763700),"
Pinecrest School Northridge
17081 Devonshire Street
Northridge, CA 91325
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Pinecrest School Northridge",'Northridge=' + Northridge.length); San_Anselmo[San_Anselmo.length] = createMarker(new GPoint(-122.56232500,37.98273800),"
Red Hill Academy
300 Sunny Hills Dr
San Anselmo, CA 94960
Co-ed school, 8-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Red Hill Academy",'San_Anselmo=' + San_Anselmo.length); San_Gabriel[San_Gabriel.length] = createMarker(new GPoint(-118.10821500,34.09722000),"
San Gabriel Mission Elementary School
416 S Mission Drive
San Gabriel, CA 91776
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("San Gabriel Mission Elementary School",'San_Gabriel=' + San_Gabriel.length); Benicia[Benicia.length] = createMarker(new GPoint(-122.14911100,38.04798700),"
St Dominic Elementary School
935 East 5th Street
Benicia, CA 94510
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Dominic Elementary School",'Benicia=' + Benicia.length); Stockton[Stockton.length] = createMarker(new GPoint(-121.26350000,37.96460000),"
Stockton Sda School
Po Box 5066
Stockton, CA 95205
Co-ed school, K-7
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Stockton Sda School",'Stockton=' + Stockton.length); Lynwood[Lynwood.length] = createMarker(new GPoint(-118.21754100,33.91791800),"
Sunshine Day Care Center
12070 Santa Fe Avenue
Lynwood, CA 90262
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sunshine Day Care Center",'Lynwood=' + Lynwood.length); Orange[Orange.length] = createMarker(new GPoint(-117.83952600,33.82359400),"
Tec-canal St Elementary School
2190 N Canal Street
Orange, CA 92865
Co-ed school, 1-7
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Tec-canal St Elementary School",'Orange=' + Orange.length); Buena_Park[Buena_Park.length] = createMarker(new GPoint(-118.00482100,33.83907600),"
Tiny Tot Christian School
7362 Crescent Avenue
Buena Park, CA 90620
Co-ed school, PK-2
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Tiny Tot Christian School",'Buena_Park=' + Buena_Park.length); Gardena[Gardena.length] = createMarker(new GPoint(-118.31773400,33.89080200),"
Van Ness Nursery School & Kindergarten
15408 Van Ness Avenue
Gardena, CA 90249
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Van Ness Nursery School & Kindergarten",'Gardena=' + Gardena.length); Los_Angeles[Los_Angeles.length] = createMarker(new GPoint(-118.41088300,34.03114800),"
Vista School
3200 Motor Avenue
Los Angeles, CA 90034
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Vista School",'Los_Angeles=' + Los_Angeles.length); Richmond[Richmond.length] = createMarker(new GPoint(-122.34823900,37.94470800),"
Williams & Brown Academy
2225 Gaynor Avenue
Richmond, CA 94801
Co-ed school, K-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Williams & Brown Academy",'Richmond=' + Richmond.length); map.removeOverlays(Altadena); map.removeOverlays(Belmont); map.removeOverlays(Benicia); map.removeOverlays(Buena_Park); map.removeOverlays(Calimesa); map.removeOverlays(Carmichael); map.removeOverlays(Compton); map.removeOverlays(Covina); map.removeOverlays(Cypress); map.removeOverlays(El_Dorado_Hills); map.removeOverlays(Gardena); map.removeOverlays(La_Habra); map.removeOverlays(Lodi); map.removeOverlays(Los_Angeles); map.removeOverlays(Lynwood); map.removeOverlays(Murrieta); map.removeOverlays(Northridge); map.removeOverlays(Orange); map.removeOverlays(Pasadena); map.removeOverlays(Poway); map.removeOverlays(Redwood_City); map.removeOverlays(Richmond); map.removeOverlays(San_Anselmo); map.removeOverlays(San_Bernardino); map.removeOverlays(San_Bruno); map.removeOverlays(San_Clemente); map.removeOverlays(San_Diego); map.removeOverlays(San_Gabriel); map.removeOverlays(Santa_Rosa); map.removeOverlays(Seaside); map.removeOverlays(South_Pasadena); map.removeOverlays(Stockton); map.removeOverlays(Tustin); map.removeOverlays(West_Hills); map.removeOverlays(Wilmington); setTimeout(function(){map.addOverlays(Altadena)},1000); setTimeout(function(){map.addOverlays(Belmont)},1000); setTimeout(function(){map.addOverlays(Benicia)},1000); setTimeout(function(){map.addOverlays(Buena_Park)},1000); setTimeout(function(){map.addOverlays(Calimesa)},1000); setTimeout(function(){map.addOverlays(Carmichael)},1000); setTimeout(function(){map.addOverlays(Compton)},1000); setTimeout(function(){map.addOverlays(Covina)},1000); setTimeout(function(){map.addOverlays(Cypress)},1000); setTimeout(function(){map.addOverlays(El_Dorado_Hills)},1000); setTimeout(function(){map.addOverlays(Gardena)},1000); setTimeout(function(){map.addOverlays(La_Habra)},1000); setTimeout(function(){map.addOverlays(Lodi)},1000); setTimeout(function(){map.addOverlays(Los_Angeles)},1000); setTimeout(function(){map.addOverlays(Lynwood)},1000); setTimeout(function(){map.addOverlays(Murrieta)},1000); setTimeout(function(){map.addOverlays(Northridge)},1000); setTimeout(function(){map.addOverlays(Orange)},1000); setTimeout(function(){map.addOverlays(Pasadena)},1000); setTimeout(function(){map.addOverlays(Poway)},1000); setTimeout(function(){map.addOverlays(Redwood_City)},1000); setTimeout(function(){map.addOverlays(Richmond)},1000); setTimeout(function(){map.addOverlays(San_Anselmo)},1000); setTimeout(function(){map.addOverlays(San_Bernardino)},1000); setTimeout(function(){map.addOverlays(San_Bruno)},1000); setTimeout(function(){map.addOverlays(San_Clemente)},1000); setTimeout(function(){map.addOverlays(San_Diego)},1000); setTimeout(function(){map.addOverlays(San_Gabriel)},1000); setTimeout(function(){map.addOverlays(Santa_Rosa)},1000); setTimeout(function(){map.addOverlays(Seaside)},1000); setTimeout(function(){map.addOverlays(South_Pasadena)},1000); setTimeout(function(){map.addOverlays(Stockton)},1000); setTimeout(function(){map.addOverlays(Tustin)},1000); setTimeout(function(){map.addOverlays(West_Hills)},1000); setTimeout(function(){map.addOverlays(Wilmington)},1000); maxLng = -117.04320000; maxLat = 38.63709900; minLng = -122.70963200; minLat = 32.80179000; reCenterMap(); } // 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(Altadena); map.removeOverlays(Belmont); map.removeOverlays(Benicia); map.removeOverlays(Buena_Park); map.removeOverlays(Calimesa); map.removeOverlays(Carmichael); map.removeOverlays(Compton); map.removeOverlays(Covina); map.removeOverlays(Cypress); map.removeOverlays(El_Dorado_Hills); map.removeOverlays(Gardena); map.removeOverlays(La_Habra); map.removeOverlays(Lodi); map.removeOverlays(Los_Angeles); map.removeOverlays(Lynwood); map.removeOverlays(Murrieta); map.removeOverlays(Northridge); map.removeOverlays(Orange); map.removeOverlays(Pasadena); map.removeOverlays(Poway); map.removeOverlays(Redwood_City); map.removeOverlays(Richmond); map.removeOverlays(San_Anselmo); map.removeOverlays(San_Bernardino); map.removeOverlays(San_Bruno); map.removeOverlays(San_Clemente); map.removeOverlays(San_Diego); map.removeOverlays(San_Gabriel); map.removeOverlays(Santa_Rosa); map.removeOverlays(Seaside); map.removeOverlays(South_Pasadena); map.removeOverlays(Stockton); map.removeOverlays(Tustin); map.removeOverlays(West_Hills); map.removeOverlays(Wilmington); 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(South_Pasadena);map.removeOverlays(Altadena); map.removeOverlays(Belmont); map.removeOverlays(Benicia); map.removeOverlays(Buena_Park); map.removeOverlays(Calimesa); map.removeOverlays(Carmichael); map.removeOverlays(Compton); map.removeOverlays(Covina); map.removeOverlays(Cypress); map.removeOverlays(El_Dorado_Hills); map.removeOverlays(Gardena); map.removeOverlays(La_Habra); map.removeOverlays(Lodi); map.removeOverlays(Los_Angeles); map.removeOverlays(Lynwood); map.removeOverlays(Murrieta); map.removeOverlays(Northridge); map.removeOverlays(Orange); map.removeOverlays(Pasadena); map.removeOverlays(Poway); map.removeOverlays(Redwood_City); map.removeOverlays(Richmond); map.removeOverlays(San_Anselmo); map.removeOverlays(San_Bernardino); map.removeOverlays(San_Bruno); map.removeOverlays(San_Clemente); map.removeOverlays(San_Diego); map.removeOverlays(San_Gabriel); map.removeOverlays(Santa_Rosa); map.removeOverlays(Seaside); map.removeOverlays(South_Pasadena); map.removeOverlays(Stockton); map.removeOverlays(Tustin); map.removeOverlays(West_Hills); map.removeOverlays(Wilmington); map.addOverlays(Altadena); centerByArray(Altadena, false, false); cntMarker += Altadena.length; map.addOverlays(Belmont); centerByArray(Belmont, false, false); cntMarker += Belmont.length; map.addOverlays(Benicia); centerByArray(Benicia, false, false); cntMarker += Benicia.length; map.addOverlays(Buena_Park); centerByArray(Buena_Park, false, false); cntMarker += Buena_Park.length; map.addOverlays(Calimesa); centerByArray(Calimesa, false, false); cntMarker += Calimesa.length; map.addOverlays(Carmichael); centerByArray(Carmichael, false, false); cntMarker += Carmichael.length; map.addOverlays(Compton); centerByArray(Compton, false, false); cntMarker += Compton.length; map.addOverlays(Covina); centerByArray(Covina, false, false); cntMarker += Covina.length; map.addOverlays(Cypress); centerByArray(Cypress, false, false); cntMarker += Cypress.length; map.addOverlays(El_Dorado_Hills); centerByArray(El_Dorado_Hills, false, false); cntMarker += El_Dorado_Hills.length; map.addOverlays(Gardena); centerByArray(Gardena, false, false); cntMarker += Gardena.length; map.addOverlays(La_Habra); centerByArray(La_Habra, false, false); cntMarker += La_Habra.length; map.addOverlays(Lodi); centerByArray(Lodi, false, false); cntMarker += Lodi.length; map.addOverlays(Los_Angeles); centerByArray(Los_Angeles, false, false); cntMarker += Los_Angeles.length; map.addOverlays(Lynwood); centerByArray(Lynwood, false, false); cntMarker += Lynwood.length; map.addOverlays(Murrieta); centerByArray(Murrieta, false, false); cntMarker += Murrieta.length; map.addOverlays(Northridge); centerByArray(Northridge, false, false); cntMarker += Northridge.length; map.addOverlays(Orange); centerByArray(Orange, false, false); cntMarker += Orange.length; map.addOverlays(Pasadena); centerByArray(Pasadena, false, false); cntMarker += Pasadena.length; map.addOverlays(Poway); centerByArray(Poway, false, false); cntMarker += Poway.length; map.addOverlays(Redwood_City); centerByArray(Redwood_City, false, false); cntMarker += Redwood_City.length; map.addOverlays(Richmond); centerByArray(Richmond, false, false); cntMarker += Richmond.length; map.addOverlays(San_Anselmo); centerByArray(San_Anselmo, false, false); cntMarker += San_Anselmo.length; map.addOverlays(San_Bernardino); centerByArray(San_Bernardino, false, false); cntMarker += San_Bernardino.length; map.addOverlays(San_Bruno); centerByArray(San_Bruno, false, false); cntMarker += San_Bruno.length; map.addOverlays(San_Clemente); centerByArray(San_Clemente, false, false); cntMarker += San_Clemente.length; map.addOverlays(San_Diego); centerByArray(San_Diego, false, false); cntMarker += San_Diego.length; map.addOverlays(San_Gabriel); centerByArray(San_Gabriel, false, false); cntMarker += San_Gabriel.length; map.addOverlays(Santa_Rosa); centerByArray(Santa_Rosa, false, false); cntMarker += Santa_Rosa.length; map.addOverlays(Seaside); centerByArray(Seaside, false, false); cntMarker += Seaside.length; map.addOverlays(South_Pasadena); centerByArray(South_Pasadena, false, false); cntMarker += South_Pasadena.length; map.addOverlays(Stockton); centerByArray(Stockton, false, false); cntMarker += Stockton.length; map.addOverlays(Tustin); centerByArray(Tustin, false, false); cntMarker += Tustin.length; map.addOverlays(West_Hills); centerByArray(West_Hills, false, false); cntMarker += West_Hills.length; map.addOverlays(Wilmington); centerByArray(Wilmington, false, false); cntMarker += Wilmington.length; centerByArray(South_Pasadena,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///2501,2741,2504,2021,3181,35323,3207,2191,1113,2502,3180,2060,3120,35301,3385,2327,2501,4377,3954,35850,2741,2021,1881,1533,2315,4554,1795,3181,1436,35323,34876,3207,3439,34899,2191,1113,2499,4673,3180,2385,3335,2060,3698,1663,35301,4308,34941,3385,2327,/all'); //window.open('/map.php?type=2&schools=2501,2741,2504,2021,3181,35323,3207,2191,1113,2502,3180,2060,3120,35301,3385,2327,2501,4377,3954,35850,2741,2021,1881,1533,2315,4554,1795,3181,1436,35323,34876,3207,3439,34899,2191,1113,2499,4673,3180,2385,3335,2060,3698,1663,35301,4308,34941,3385,2327,&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; }