function addMarkers(){ mySelect = document.getElementById('selection'); Northridge = [];Northridge[Northridge.length] = createMarker(new GPoint(-118.52007300,34.25776800),"
Abraham Joshua Heschel Day School
17701 Devonshire Street
Northridge, CA 91325
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Abraham Joshua Heschel Day School",'Northridge=' + Northridge.length); Northridge[Northridge.length] = createMarker(new GPoint(-118.53660200,34.24261000),"
The Appletree Education Center
18510 Plummer Street
Northridge, CA 91324
Co-ed school, K-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Appletree Education Center",'Northridge=' + Northridge.length); Northridge[Northridge.length] = createMarker(new GPoint(-118.50921500,34.24404800),"
Arts Of Learning Academy
9535 Aldea Avenue
Northridge, CA 91325
Co-ed school, 6-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Arts Of Learning Academy",'Northridge=' + Northridge.length); Northridge[Northridge.length] = createMarker(new GPoint(-118.51840200,34.25044100),"
Casa Montessori
17633 Lassen Street
Northridge, CA 91325
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Casa Montessori",'Northridge=' + Northridge.length); Northridge[Northridge.length] = createMarker(new GPoint(-118.53273400,34.24441700),"
Child & Family Studies Center
18330 Halsted St
Northridge, CA 91330
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Child & Family Studies Center",'Northridge=' + Northridge.length); Northridge[Northridge.length] = createMarker(new GPoint(-118.53298500,34.22093700),"
First Lutheran Elementary School
18355 Roscoe Blvd
Northridge, CA 91325
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("First Lutheran Elementary School",'Northridge=' + Northridge.length); Northridge[Northridge.length] = createMarker(new GPoint(-118.52313300,34.25923900),"
First Presbyterian Church Weekday School
10400 Zelzah Avenue
Northridge, CA 91326
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("First Presbyterian Church Weekday School",'Northridge=' + Northridge.length); Northridge[Northridge.length] = createMarker(new GPoint(-118.50567800,34.24651100),"
Highland Hall Waldorf School
17100 Superior Street
Northridge, CA 91325
Co-ed school, NS-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Highland Hall Waldorf School",'Northridge=' + Northridge.length); Northridge[Northridge.length] = createMarker(new GPoint(-118.56213300,34.22373100),"
Kidsville U.s.a.
8464 Corbin Avenue
Northridge, CA 91324
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Kidsville U.s.a.",'Northridge=' + Northridge.length); Northridge[Northridge.length] = createMarker(new GPoint(-118.50380100,34.22836300),"
Knollwood Preschool & Kindergarten
17034 Parthenia Street
Northridge, CA 91325
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Knollwood Preschool & Kindergarten",'Northridge=' + Northridge.length); Northridge[Northridge.length] = createMarker(new GPoint(-118.53464100,34.23004400),"
New Heights Preparatory School
8756 Canby Ave
Northridge, CA 91325
Co-ed school, 6-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("New Heights Preparatory School",'Northridge=' + Northridge.length); Northridge[Northridge.length] = createMarker(new GPoint(-118.53593300,34.26383700),"
New Life Preschool & Kindergarten
10650 Reseda Blvd
Northridge, CA 91326
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("New Life Preschool & Kindergarten",'Northridge=' + Northridge.length); Northridge[Northridge.length] = createMarker(new GPoint(-118.52313300,34.24590900),"
Northpoint School & Intensive Outpatient Program
9650 Zelzah Avenue
Northridge, CA 91325
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Northpoint School & Intensive Outpatient Program",'Northridge=' + Northridge.length); Northridge[Northridge.length] = createMarker(new GPoint(-118.51775400,34.20857300),"
Oak Meadow School
17645 Saticoy Street
Northridge, CA 91325
Co-ed school, 3-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Oak Meadow School",'Northridge=' + Northridge.length); Northridge[Northridge.length] = createMarker(new GPoint(-118.53494800,34.24653700),"
Our Lady Of Lourdes School
18437 Superior Street
Northridge, CA 91325
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Our Lady Of Lourdes School",'Northridge=' + Northridge.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); Northridge[Northridge.length] = createMarker(new GPoint(-118.51785300,34.22113700),"
Pinecrest School-whiteoak
17643 Roscoe Blvd
Northridge, CA 91325
Co-ed school, K-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Pinecrest School-whiteoak",'Northridge=' + Northridge.length); Northridge[Northridge.length] = createMarker(new GPoint(-118.50261700,34.24329400),"
St. Nicholas School
9501 Balboa Blvd
Northridge, CA 91325
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Nicholas School",'Northridge=' + Northridge.length); Northridge[Northridge.length] = createMarker(new GPoint(-118.51775100,34.25044100),"
San Fernando Valley Academy
17601 Lassen Street
Northridge, CA 91325
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("San Fernando Valley Academy",'Northridge=' + Northridge.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(Northridge); 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(Northridge);map.removeOverlays(Northridge); map.addOverlays(Northridge); centerByArray(Northridge, false, false); cntMarker += Northridge.length; centerByArray(Northridge,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; }