function addMarkers(){ mySelect = document.getElementById('selection'); Irvine = [];Irvine[Irvine.length] = createMarker(new GPoint(-117.80227100,33.68037900),"
The Children's Center Of St An
4400 Barranca Pkwy
Irvine, CA 92604
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Children's Center Of St An",'Irvine=' + Irvine.length); Irvine[Irvine.length] = createMarker(new GPoint(-117.72141800,33.68200700),"
Christian Montessori Academy
7000 Trabuco Rd, Bldg. No. 656
Irvine, CA 92618
Co-ed school, PK-1
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Christian Montessori Academy",'Irvine=' + Irvine.length); Irvine[Irvine.length] = createMarker(new GPoint(-117.79729000,33.67266200),"
Crean Lutheran South High School
4947 Alton Parkway
Irvine, CA 92604
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Crean Lutheran South High School",'Irvine=' + Irvine.length); Irvine[Irvine.length] = createMarker(new GPoint(-117.84773400,33.69819900),"
International Academy Of Irvine
17062 Gillette Avenue
Irvine, CA 92614
All-boys school, PK-9
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("International Academy Of Irvine",'Irvine=' + Irvine.length); Irvine[Irvine.length] = createMarker(new GPoint(-117.80584000,33.67700500),"
Jenny Hart Early Education Center
4445 Alton Parkway
Irvine, CA 92604
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Jenny Hart Early Education Center",'Irvine=' + Irvine.length); Irvine[Irvine.length] = createMarker(new GPoint(-117.79518400,33.69523100),"
Kindercare Learning Center Bear Paw
1 Bear Paw
Irvine, CA 92604
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Kindercare Learning Center Bear Paw",'Irvine=' + Irvine.length); Irvine[Irvine.length] = createMarker(new GPoint(-117.82710000,33.66110000),"
Kindercare Learning Centers
3661 Michelson Drive
Irvine, CA 92612
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Kindercare Learning Centers",'Irvine=' + Irvine.length); Irvine[Irvine.length] = createMarker(new GPoint(-117.80204500,33.67841900),"
Leport Schools Irvine (Lake)
26 Lake Road
Irvine, CA 92604
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Leport Schools Irvine (Lake)",'Irvine=' + Irvine.length); Irvine[Irvine.length] = createMarker(new GPoint(-117.81347900,33.68239600),"
LePort Schools Irvine (San Marino)
1055 San Marino
Irvine, CA 92614
Co-ed school, PK-3
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("LePort Schools Irvine (San Marino)",'Irvine=' + Irvine.length); Irvine[Irvine.length] = createMarker(new GPoint(-117.78885000,33.67423000),"
Mardan Center of Educational Therapy
1 Osborn
Irvine, CA 92604
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mardan Center of Educational Therapy",'Irvine=' + Irvine.length); Irvine[Irvine.length] = createMarker(new GPoint(-117.75312400,33.72567600),"
Montessori Schools Of Irvine-northwood Montessori
12100 Yale Court
Irvine, CA 92620
Co-ed school, K-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Montessori Schools Of Irvine-northwood Montessori",'Irvine=' + Irvine.length); Irvine[Irvine.length] = createMarker(new GPoint(-117.82039800,33.66166900),"
Montessori Schools Of Irvine-village Montessori
4552 Sandburg Way
Irvine, CA 92612
Co-ed school, PK-3
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Montessori Schools Of Irvine-village Montessori",'Irvine=' + Irvine.length); Irvine[Irvine.length] = createMarker(new GPoint(-117.76632600,33.69643700),"
New Horizon Elem., Irvine
1 Truman Street
Irvine, CA 92620
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("New Horizon Elem., Irvine",'Irvine=' + Irvine.length); Irvine[Irvine.length] = createMarker(new GPoint(-117.75312400,33.72567600),"
Northwood Montessori School Of Irvine
12100 Yale Court
Irvine, CA 92620
Co-ed school, PK-1
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Northwood Montessori School Of Irvine",'Irvine=' + Irvine.length); Irvine[Irvine.length] = createMarker(new GPoint(-117.82658000,33.63170400),"
Tarbut V'Torah Community Day
5 Federation Way
Irvine, CA 92603
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Tarbut V'Torah Community Day",'Irvine=' + Irvine.length); Irvine[Irvine.length] = createMarker(new GPoint(-117.81551600,33.64978200),"
Turtle Rock Private School and Kindergarten
1 Concordia West
Irvine, CA 92612
Co-ed school, NS-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Turtle Rock Private School and Kindergarten",'Irvine=' + Irvine.length); Irvine[Irvine.length] = createMarker(new GPoint(-117.77261600,33.72515900),"
Tutor Time
12860 Central Park Avenue
Irvine, CA 92602
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Tutor Time",'Irvine=' + Irvine.length); Irvine[Irvine.length] = createMarker(new GPoint(-117.84590000,33.65030000),"
Uc Irvine-early Childhood Educ
501 Adobe Cir Rd
Irvine, CA 92697
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Uc Irvine-early Childhood Educ",'Irvine=' + Irvine.length); Irvine[Irvine.length] = createMarker(new GPoint(-117.82544300,33.68677700),"
Uci Farm Elementary School
3151 Social Science Plaza
Irvine, CA 92697
Co-ed school, K-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Uci Farm Elementary School",'Irvine=' + Irvine.length); Irvine[Irvine.length] = createMarker(new GPoint(-117.83729800,33.64099000),"
University Montessori Of Irvin
101 Russell Pl
Irvine, CA 92612
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("University Montessori Of Irvin",'Irvine=' + Irvine.length); Irvine[Irvine.length] = createMarker(new GPoint(-117.75308500,33.72553000),"
University Montessori Of Irvine
101 Russell Place
Irvine, CA 92617
Co-ed school, PK-1
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("University Montessori Of Irvine",'Irvine=' + Irvine.length); Irvine[Irvine.length] = createMarker(new GPoint(-117.82020300,33.66223500),"
University Park Cdc
4572 Sandburg Way
Irvine, CA 92612
Co-ed school, K-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("University Park Cdc",'Irvine=' + Irvine.length); Irvine[Irvine.length] = createMarker(new GPoint(-117.82052900,33.67395600),"
Westpark Montessori School
11 San Leandro
Irvine, CA 92614
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Westpark Montessori School",'Irvine=' + Irvine.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(Irvine); 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(Irvine);map.removeOverlays(Irvine); map.addOverlays(Irvine); centerByArray(Irvine, false, false); cntMarker += Irvine.length; centerByArray(Irvine,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; }