function addMarkers(){ mySelect = document.getElementById('selection'); Riverside = [];Riverside[Riverside.length] = createMarker(new GPoint(-117.47881500,33.91742700),"
Active Learning/lovett's Child
10744 Hole Avenue
Riverside, CA 92505
Co-ed school, PK-3
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Active Learning/lovett's Child",'Riverside=' + Riverside.length); Riverside[Riverside.length] = createMarker(new GPoint(-117.43540500,33.92643800),"
Advocate Schools
8880 Magnolia
Riverside, CA 92503
Co-ed school, Ungraded
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Advocate Schools",'Riverside=' + Riverside.length); Riverside[Riverside.length] = createMarker(new GPoint(-117.31629300,33.97556300),"
Apple Tree Learning Center
220 W Big Springs Road
Riverside, CA 92507
Co-ed school, K-1
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Apple Tree Learning Center",'Riverside=' + Riverside.length); Riverside[Riverside.length] = createMarker(new GPoint(-117.44402300,33.93109800),"
Arlington Christian School
9085 California Avenue
Riverside, CA 92503
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Arlington Christian School",'Riverside=' + Riverside.length); Riverside[Riverside.length] = createMarker(new GPoint(-117.42985000,33.90040300),"
Bethel Christian Schools
2425 Van Buren Blvd
Riverside, CA 92503
Co-ed school, K-11
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bethel Christian Schools",'Riverside=' + Riverside.length); Riverside[Riverside.length] = createMarker(new GPoint(-117.31285200,33.97548800),"
Big Springs School
190 E. Big Springs Road
Riverside, CA 92507
Co-ed school, NS-NS
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Big Springs School",'Riverside=' + Riverside.length); Riverside[Riverside.length] = createMarker(new GPoint(-117.48041400,34.01553700),"
Calvary Chapel Group Of Valley
9021 Hastings Blvd
Riverside, CA 92509
Co-ed school, K-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Calvary Chapel Group Of Valley",'Riverside=' + Riverside.length); Riverside[Riverside.length] = createMarker(new GPoint(-117.40228500,33.94429700),"
Carolyn E Wyle Center For Children
7177 Potomac Street
Riverside, CA 92504
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Carolyn E Wyle Center For Children",'Riverside=' + Riverside.length); Riverside[Riverside.length] = createMarker(new GPoint(-117.49135100,33.98626800),"
Cedar Life Academy
5528 Cedar Street
Riverside, CA 92509
Co-ed school, PK-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Cedar Life Academy",'Riverside=' + Riverside.length); Riverside[Riverside.length] = createMarker(new GPoint(-117.45348400,33.93711800),"
Childrens' Discovery Centers
9265 Audrey Street
Riverside, CA 92503
Co-ed school, PK-KG
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Childrens' Discovery Centers",'Riverside=' + Riverside.length); Riverside[Riverside.length] = createMarker(new GPoint(-117.47084100,33.91478000),"
Cottonwood Montessori
4302 Pedley Road
Riverside, CA 92509
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Cottonwood Montessori",'Riverside=' + Riverside.length); Riverside[Riverside.length] = createMarker(new GPoint(-117.36078000,33.96833700),"
Eastside Christian Academy
2355 Pennsylvania Ave.
Riverside, CA 92507
Co-ed school, KG-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Eastside Christian Academy",'Riverside=' + Riverside.length); Riverside[Riverside.length] = createMarker(new GPoint(-117.38815800,33.97411400),"
Eden Lutheran School
4725 Brockton Ave
Riverside, CA 92506
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Eden Lutheran School",'Riverside=' + Riverside.length); Riverside[Riverside.length] = createMarker(new GPoint(-117.39848700,33.96104100),"
The Growing Place
4259 Jurupa Avenue
Riverside, CA 92506
Co-ed school, PK-2
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Growing Place",'Riverside=' + Riverside.length); Riverside[Riverside.length] = createMarker(new GPoint(-117.43679000,33.94603700),"
Harvest Christian School
6115 Arlington Avenue
Riverside, CA 92504
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Harvest Christian School",'Riverside=' + Riverside.length); Riverside[Riverside.length] = createMarker(new GPoint(-117.34861200,33.92837800),"
Hawarden Hills Academy
6696 Via Vista Drive
Riverside, CA 92506
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Hawarden Hills Academy",'Riverside=' + Riverside.length); Riverside[Riverside.length] = createMarker(new GPoint(-117.32256500,34.01880100),"
Immanuel Baptist School
45 Michigan Avenue
Riverside, CA 92507
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Immanuel Baptist School",'Riverside=' + Riverside.length); Riverside[Riverside.length] = createMarker(new GPoint(-117.35980900,33.95213000),"
Immanuel Lutheran Schools
5545 Alessandro Blvd
Riverside, CA 92506
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Immanuel Lutheran Schools",'Riverside=' + Riverside.length); Riverside[Riverside.length] = createMarker(new GPoint(-117.33490000,33.97460000),"
Islamic Academy Of Riverside
1038 W Linden Street B
Riverside, CA 92507
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Islamic Academy Of Riverside",'Riverside=' + Riverside.length); Riverside[Riverside.length] = createMarker(new GPoint(-117.32820100,33.90829100),"
Kindercare Learning Center
7897 Mission Grove Parkway S
Riverside, CA 92508
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Kindercare Learning Center",'Riverside=' + Riverside.length); Riverside[Riverside.length] = createMarker(new GPoint(-117.46203400,33.97606600),"
La Petite Academy
6212 Clay Street
Riverside, CA 92509
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("La Petite Academy",'Riverside=' + Riverside.length); Riverside[Riverside.length] = createMarker(new GPoint(-117.49406900,33.91682200),"
La Sierra Academy
4900 Golden Avenue
Riverside, CA 92505
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("La Sierra Academy",'Riverside=' + Riverside.length); Riverside[Riverside.length] = createMarker(new GPoint(-117.48312600,33.91160600),"
Lapetite Academy
11100 Collett Ave
Riverside, CA 92505
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lapetite Academy",'Riverside=' + Riverside.length); Riverside[Riverside.length] = createMarker(new GPoint(-117.47299400,33.92933100),"
Learning Bee
10235 Wells Avenue
Riverside, CA 92503
Co-ed school, PK-1
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Learning Bee",'Riverside=' + Riverside.length); Riverside[Riverside.length] = createMarker(new GPoint(-117.38276800,33.95656800),"
Montessori Academy
6200 Pachappa Drive
Riverside, CA 92506
school, PK-2
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Montessori Academy",'Riverside=' + Riverside.length); Riverside[Riverside.length] = createMarker(new GPoint(-117.46522700,33.91002100),"
Montessori Childrens House
10493 Magnolia Avenue
Riverside, CA 92505
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Montessori Childrens House",'Riverside=' + Riverside.length); Riverside[Riverside.length] = createMarker(new GPoint(-117.46386900,33.91625500),"
Mulberry Childcare & Preschool
10250 Kidd Street
Riverside, CA 92503
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mulberry Childcare & Preschool",'Riverside=' + Riverside.length); Riverside[Riverside.length] = createMarker(new GPoint(-117.39585700,33.94444700),"
Notre Dame High School
7085 Brockton Avenue
Riverside, CA 92506
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Notre Dame High School",'Riverside=' + Riverside.length); Riverside[Riverside.length] = createMarker(new GPoint(-117.40670000,33.92120000),"
Our Lady Of Perpetual Help School
6686 Streeter Avenue
Riverside, CA 92504
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Our Lady Of Perpetual Help School",'Riverside=' + Riverside.length); Riverside[Riverside.length] = createMarker(new GPoint(-117.47774500,33.92555900),"
Queen Of Angels Elementary School
4824 Jones Avenue
Riverside, CA 92505
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Queen Of Angels Elementary School",'Riverside=' + Riverside.length); Riverside[Riverside.length] = createMarker(new GPoint(-117.39310500,33.94616300),"
Riverside Christian Day School
3612 Arlington Avenue
Riverside, CA 92506
Co-ed school, K-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Riverside Christian Day School",'Riverside=' + Riverside.length); Riverside[Riverside.length] = createMarker(new GPoint(-117.42874500,33.92482300),"
Riverside Christian School
3532 Monroe Street
Riverside, CA 92504
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Riverside Christian School",'Riverside=' + Riverside.length); Riverside[Riverside.length] = createMarker(new GPoint(-117.33504700,33.97943700),"
Riverside Garden School
1085 W Linden St
Riverside, CA 92507
Co-ed school, NS-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Riverside Garden School",'Riverside=' + Riverside.length); Riverside[Riverside.length] = createMarker(new GPoint(-117.39785500,33.93901100),"
Riverside Montessori Academy
7141 Indiana Avenue
Riverside, CA 92504
Co-ed school, PK-1
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Riverside Montessori Academy",'Riverside=' + Riverside.length); Riverside[Riverside.length] = createMarker(new GPoint(-117.39667600,33.94553300),"
St. Catherine Of Alexandria School
7025 Brockton Avenue
Riverside, CA 92506
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Catherine Of Alexandria School",'Riverside=' + Riverside.length); Riverside[Riverside.length] = createMarker(new GPoint(-117.37274500,33.97579900),"
St. Francis De Sales School
4205 Mulberry Street
Riverside, CA 92501
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Francis De Sales School",'Riverside=' + Riverside.length); Riverside[Riverside.length] = createMarker(new GPoint(-117.36291200,33.88219000),"
Somerset Educational Service
17241 Van Buren Blvd.
Riverside, CA 92504
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Somerset Educational Service",'Riverside=' + Riverside.length); Riverside[Riverside.length] = createMarker(new GPoint(-117.39165000,33.96132100),"
St Paul Lutheran
5939 Magnolia Avenue
Riverside, CA 92506
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Paul Lutheran",'Riverside=' + Riverside.length); Riverside[Riverside.length] = createMarker(new GPoint(-117.43969900,33.92402600),"
St Thomas The Apostle Elementary School
9136 Magnolia Avenue
Riverside, CA 92503
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Thomas The Apostle Elementary School",'Riverside=' + Riverside.length); Riverside[Riverside.length] = createMarker(new GPoint(-117.36963200,33.95393700),"
Temple Beth El Child Development Center
2675 Central Avenue
Riverside, CA 92506
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Temple Beth El Child Development Center",'Riverside=' + Riverside.length); Riverside[Riverside.length] = createMarker(new GPoint(-117.34180700,33.88697000),"
Woodcrest Christian School
18401 Van Buren Blvd
Riverside, CA 92508
Co-ed school, 7-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Woodcrest Christian School",'Riverside=' + Riverside.length); Riverside[Riverside.length] = createMarker(new GPoint(-117.36630700,33.88405400),"
Woodcrest Montessori Ed. Center
16191 Washington St
Riverside, CA 92504
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Woodcrest Montessori Ed. Center",'Riverside=' + Riverside.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(Riverside); 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(Riverside);map.removeOverlays(Riverside); map.addOverlays(Riverside); centerByArray(Riverside, false, false); cntMarker += Riverside.length; centerByArray(Riverside,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; }