function addMarkers() { mySelect = document.getElementById('selection'); Oroville = [];Oroville[Oroville.length] = createMarker(new GPoint(-121.56084442,39.51104736),"
Bird Street Elementary School
1421 Bird St.
Oroville, CA 95965

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Bird Street Elementary School",'Oroville=' + Oroville.length); Oroville[Oroville.length] = createMarker(new GPoint(-121.54058838,39.50181961),"
Central Middle School
2565 Mesa Ave.
Oroville, CA 95966

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Central Middle School",'Oroville=' + Oroville.length); Oroville[Oroville.length] = createMarker(new GPoint(-121.46340179,39.49100113),"
Challenge Charter High School
2120-a Robinson St.
Oroville, CA 95966

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Challenge Charter High School",'Oroville=' + Oroville.length); Oroville[Oroville.length] = createMarker(new GPoint(-121.52801514,39.73048782),"
Concow Elementary School
11679 Nelson Bar Rd.
Oroville, CA 95965

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Concow Elementary School",'Oroville=' + Oroville.length); Oroville[Oroville.length] = createMarker(new GPoint(-121.54565430,39.51306152),"
Eastside Elementary School
2775 Yard St.
Oroville, CA 95966

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Eastside Elementary School",'Oroville=' + Oroville.length); Oroville[Oroville.length] = createMarker(new GPoint(-121.55516052,39.51334000),"
Feather Falls Elementary School
2651 Lumpkin Rd.
Oroville, CA 95966

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Feather Falls Elementary School",'Oroville=' + Oroville.length); Oroville[Oroville.length] = createMarker(new GPoint(-121.52801514,39.73048782),"
Golden Feather Community Day
11679 Nelson Bar Rd.
Oroville, CA 95965

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Golden Feather Community Day",'Oroville=' + Oroville.length); Oroville[Oroville.length] = createMarker(new GPoint(-121.53562164,39.47579575),"
Helen M. Wilcox Elementary School
5737 Autrey Ln.
Oroville, CA 95966

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Helen M. Wilcox Elementary School",'Oroville=' + Oroville.length); Oroville[Oroville.length] = createMarker(new GPoint(-121.57392883,39.51947021),"
Heritage Community Day School
400 Grand Avenue
Oroville, CA 95965

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Heritage Community Day School",'Oroville=' + Oroville.length); Oroville[Oroville.length] = createMarker(new GPoint(-121.54591600,39.51292200),"
Ishi Hills Middle School
2795 Yard St.
Oroville, CA 95966

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Ishi Hills Middle School",'Oroville=' + Oroville.length); Oroville[Oroville.length] = createMarker(new GPoint(-121.56999969,39.52902603),"
Juvenile Hall/community
41 County Center Dr.
Oroville, CA 95965

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Juvenile Hall/community",'Oroville=' + Oroville.length); Oroville[Oroville.length] = createMarker(new GPoint(-121.54122162,39.48053741),"
Las Plumas High School
2380 Las Plumas Ave.
Oroville, CA 95966

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Las Plumas High School",'Oroville=' + Oroville.length); Oroville[Oroville.length] = createMarker(new GPoint(-121.55654907,39.51250458),"
Learning Community Charter
1859 Bird St.
Oroville, CA 95965

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Learning Community Charter",'Oroville=' + Oroville.length); Oroville[Oroville.length] = createMarker(new GPoint(-121.57888031,39.52620316),"
Nelson Avenue Middle School
2255 Sixth St.
Oroville, CA 95965

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Nelson Avenue Middle School",'Oroville=' + Oroville.length); Oroville[Oroville.length] = createMarker(new GPoint(-10.00000000,10.00000000),"
North County Community
2491 Carmichael Drive, Suite 5
Oroville, CA 95965

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("North County Community",'Oroville=' + Oroville.length); Oroville[Oroville.length] = createMarker(new GPoint(-121.54415131,39.48026276),"
Oakdale Heights Elementary School
2255 Las Plumas Ave.
Oroville, CA 95966

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Oakdale Heights Elementary School",'Oroville=' + Oroville.length); Oroville[Oroville.length] = createMarker(new GPoint(-121.49435425,39.50129700),"
Ophir Elementary School
210 Oakvale Ave.
Oroville, CA 95966

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Ophir Elementary School",'Oroville=' + Oroville.length); Oroville[Oroville.length] = createMarker(new GPoint(-121.57479858,39.60549927),"
Oroville High Community Day
2060 Second St. c
Oroville, CA 95965

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Oroville High Community Day",'Oroville=' + Oroville.length); Oroville[Oroville.length] = createMarker(new GPoint(-121.54692078,39.51502228),"
Oroville High School
1535 Bridge St.
Oroville, CA 95966

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Oroville High School",'Oroville=' + Oroville.length); Oroville[Oroville.length] = createMarker(new GPoint(-121.55610400,39.51388000),"
Pioneer Community Day
2255 Sixth St.
Oroville, CA 95965

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Pioneer Community Day",'Oroville=' + Oroville.length); Oroville[Oroville.length] = createMarker(new GPoint(-121.57459400,39.51970400),"
Plumas Avenue Elementary School
440 Plumas Ave.
Oroville, CA 95965

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Plumas Avenue Elementary School",'Oroville=' + Oroville.length); Oroville[Oroville.length] = createMarker(new GPoint(-121.60929871,39.52297592),"
Poplar Avenue Elementary School
2075 Poplar Ave.
Oroville, CA 95965

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Poplar Avenue Elementary School",'Oroville=' + Oroville.length); Oroville[Oroville.length] = createMarker(new GPoint(-121.56941986,39.52118301),"
Prospect High Continuation School
2060 Second St.
Oroville, CA 95965

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Prospect High Continuation School",'Oroville=' + Oroville.length); Oroville[Oroville.length] = createMarker(new GPoint(-121.58831024,39.50903702),"
Sierra Avenue Elementary School
1050 Sierra Ave.
Oroville, CA 95965

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Sierra Avenue Elementary School",'Oroville=' + Oroville.length); Oroville[Oroville.length] = createMarker(new GPoint(-121.55323029,39.51293945),"
South County Community Day
205 Mira Loma Drive, Suite 20
Oroville, CA 95965

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("South County Community Day",'Oroville=' + Oroville.length); Oroville[Oroville.length] = createMarker(new GPoint(-121.55654907,39.51250458),"
Special Education
1859 Bird St.
Oroville, CA 95965

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Special Education",'Oroville=' + Oroville.length); Oroville[Oroville.length] = createMarker(new GPoint(-121.56208801,39.65206528),"
Spring Valley Elementary School
2771 Pentz Rd.
Oroville, CA 95965

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Spring Valley Elementary School",'Oroville=' + Oroville.length); Oroville[Oroville.length] = createMarker(new GPoint(-121.53591919,39.51329803),"
Stanford Avenue Elementary School
1801 Stanford Ave.
Oroville, CA 95966

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Stanford Avenue Elementary School",'Oroville=' + Oroville.length); Oroville[Oroville.length] = createMarker(new GPoint(-121.54141998,39.50063705),"
Wyandotte Avenue Elementary School
2800 Wyandotte Ave.
Oroville, CA 95966

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Wyandotte Avenue Elementary School",'Oroville=' + Oroville.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,10); /* 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(Oroville); 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(Oroville);map.removeOverlays(Oroville); map.addOverlays(Oroville); centerByArray(Oroville, false, false); cntMarker += Oroville.length; centerByArray(Oroville,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'); } }