function addMarkers() { mySelect = document.getElementById('selection'); Aberdeen = [];Acme = [];Adna = [];Almira = [];Anacortes = [];Arlington = [];Asotin = [];Auburn = [];Ashford = [];Amanda_Park = [];Addy = [];Airway_Heights = [];Ariel = [];mySelect.options[mySelect.options.length] = new Option("Aberdeen schools",'all=Aberdeen'); mySelect.options[mySelect.options.length] = new Option("Acme schools",'all=Acme'); mySelect.options[mySelect.options.length] = new Option("Addy schools",'all=Addy'); mySelect.options[mySelect.options.length] = new Option("Adna schools",'all=Adna'); mySelect.options[mySelect.options.length] = new Option("Airway Heights schools",'all=Airway_Heights'); mySelect.options[mySelect.options.length] = new Option("Almira schools",'all=Almira'); mySelect.options[mySelect.options.length] = new Option("Amanda Park schools",'all=Amanda_Park'); mySelect.options[mySelect.options.length] = new Option("Anacortes schools",'all=Anacortes'); mySelect.options[mySelect.options.length] = new Option("Ariel schools",'all=Ariel'); mySelect.options[mySelect.options.length] = new Option("Arlington schools",'all=Arlington'); mySelect.options[mySelect.options.length] = new Option("Ashford schools",'all=Ashford'); mySelect.options[mySelect.options.length] = new Option("Asotin schools",'all=Asotin'); mySelect.options[mySelect.options.length] = new Option("Auburn schools",'all=Auburn'); Aberdeen[Aberdeen.length] = createMarker(new GPoint(-123.83791351,46.97226334),"
A J West Elementary School
1801 Bay Ave.
Aberdeen, WA 98520

[ View School Profile ]
",iconRd); Acme[Acme.length] = createMarker(new GPoint(-122.20867157,48.71847534),"
Acme Elementary School
5200 Turkington Rd
Acme, WA 98220

[ View School Profile ]
",iconRd); Adna[Adna.length] = createMarker(new GPoint(-123.06015015,46.63745880),"
Adna Elementary School
P.o. Box 28
Adna, WA 98522

[ View School Profile ]
",iconRd); Adna[Adna.length] = createMarker(new GPoint(-123.05069733,46.62859344),"
Adna Middle/high School
P.o. Box 148
Adna, WA 98522

[ View School Profile ]
",iconGr); Aberdeen[Aberdeen.length] = createMarker(new GPoint(-123.83650208,46.97703552),"
Alexander Young Elementary School
1700 Cherry St
Aberdeen, WA 98520

[ View School Profile ]
",iconRd); Almira[Almira.length] = createMarker(new GPoint(-118.94090271,47.70750046),"
Almira Elementary School
Po Box 217
Almira, WA 99103

[ View School Profile ]
",iconRd); Anacortes[Anacortes.length] = createMarker(new GPoint(-122.62220764,48.50818634),"
Anacortes High School
1600 20th Street
Anacortes, WA 98221

[ View School Profile ]
",iconGr); Anacortes[Anacortes.length] = createMarker(new GPoint(-122.61770630,48.50433731),"
Anacortes Middle School
2202 M Avenue
Anacortes, WA 98221

[ View School Profile ]
",iconBl); Arlington[Arlington.length] = createMarker(new GPoint(-122.12119293,48.19226456),"
Arlington High School
18821 Crown Ridge Blvd
Arlington, WA 98223

[ View School Profile ]
",iconGr); Asotin[Asotin.length] = createMarker(new GPoint(-117.04896100,46.33825000),"
Asotin Elementary School
Po Box 489
Asotin, WA 99402

[ View School Profile ]
",iconRd); Asotin[Asotin.length] = createMarker(new GPoint(-117.04875183,46.33956909),"
Asotin Junior Senior High School
Po Box 489
Asotin, WA 99402

[ View School Profile ]
",iconGr); Auburn[Auburn.length] = createMarker(new GPoint(-122.17620300,47.34221600),"
Auburn Mountainview High School
28900 124th Ave Se
Auburn, WA 98092

[ View School Profile ]
",iconGr); Auburn[Auburn.length] = createMarker(new GPoint(-122.22452545,47.26491928),"
Auburn Riverside High School
501 Oravetz Rd Se
Auburn, WA 98092

[ View School Profile ]
",iconGr); Auburn[Auburn.length] = createMarker(new GPoint(-122.21928406,47.31087494),"
Auburn Senior High School
800 4th St Ne
Auburn, WA 98002

[ View School Profile ]
",iconGr); Auburn[Auburn.length] = createMarker(new GPoint(-122.28432465,47.33476257),"
Camelot Elementary School
4041 S 298th
Auburn, WA 98001

[ View School Profile ]
",iconRd); Auburn[Auburn.length] = createMarker(new GPoint(-122.21558380,47.32853699),"
Cascade Middle School
1015 24th St Ne
Auburn, WA 98002

[ View School Profile ]
",iconBl); Aberdeen[Aberdeen.length] = createMarker(new GPoint(-123.69719696,46.96626282),"
Central Park Elementary School
601 School Road
Aberdeen, WA 98520

[ View School Profile ]
",iconRd); Ashford[Ashford.length] = createMarker(new GPoint(-122.10990906,46.75363922),"
Columbia Crest Elementary School
24503 State Route 706 E
Ashford, WA 98304

[ View School Profile ]
",iconRd); Anacortes[Anacortes.length] = createMarker(new GPoint(-122.61770630,48.50436401),"
Cooperatives
2200 M Avenue
Anacortes, WA 98221

[ View School Profile ]
",iconGr); Anacortes[Anacortes.length] = createMarker(new GPoint(-122.63349915,48.49499893),"
Decatur Elementary School
Decatur Island
Anacortes, WA 98221

[ View School Profile ]
",iconRd); Auburn[Auburn.length] = createMarker(new GPoint(-122.21701813,47.32043839),"
Dick Scobee Elementary School
1031 14th St Ne
Auburn, WA 98002

[ View School Profile ]
",iconRd); Arlington[Arlington.length] = createMarker(new GPoint(-122.11440277,48.19717789),"
Eagle Creek Elementary School
1216 E 5th
Arlington, WA 98223

[ View School Profile ]
",iconRd); Auburn[Auburn.length] = createMarker(new GPoint(-122.26530457,47.31883621),"
Evergreen Heights Elementary School
5602 S 316th St
Auburn, WA 98001

[ View School Profile ]
",iconRd); Anacortes[Anacortes.length] = createMarker(new GPoint(-122.58319855,48.43519974),"
Fidalgo Elementary School
13590 Gibralter Road
Anacortes, WA 98221

[ View School Profile ]
",iconRd); Arlington[Arlington.length] = createMarker(new GPoint(-122.15140533,48.16585541),"
Freshman Acadamy
18722 59th Ave Ne
Arlington, WA 98223

[ View School Profile ]
",iconGr); Auburn[Auburn.length] = createMarker(new GPoint(-122.21523285,47.27681351),"
Gildo Rey Elementary School
1005 37th St Se
Auburn, WA 98002

[ View School Profile ]
",iconRd); Aberdeen[Aberdeen.length] = createMarker(new GPoint(-123.81596400,46.97587500),"
Grays Harbor Juvenile Detention
Grays Harbor Juvenile Detentio
Aberdeen, WA 98520

[ View School Profile ]
",iconGr); Aberdeen[Aberdeen.length] = createMarker(new GPoint(-123.83129883,46.97203064),"
Harbor High School
300 N. Williams
Aberdeen, WA 98520

[ View School Profile ]
",iconGr); Auburn[Auburn.length] = createMarker(new GPoint(-122.18382263,47.32975388),"
Hazelwood Elementary School
11815 Se 304th St
Auburn, WA 98092

[ View School Profile ]
",iconRd); Aberdeen[Aberdeen.length] = createMarker(new GPoint(-123.81616974,46.97798920),"
Homelink
216 North G Street
Aberdeen, WA 98520

[ View School Profile ]
",iconGr); Aberdeen[Aberdeen.length] = createMarker(new GPoint(-123.83791351,46.97226334),"
Hopkins Elementary School
1313 Pacific
Aberdeen, WA 98520

[ View School Profile ]
",iconRd); Auburn[Auburn.length] = createMarker(new GPoint(-122.22836304,47.26469040),"
Ilalko Elementary School
301 Oravetz Pl Se
Auburn, WA 98092

[ View School Profile ]
",iconRd); Anacortes[Anacortes.length] = createMarker(new GPoint(-122.62189484,48.50206375),"
Island View Elementary School
2501 J Avenue
Anacortes, WA 98221

[ View School Profile ]
",iconRd); Aberdeen[Aberdeen.length] = createMarker(new GPoint(-123.82025146,46.97837830),"
J M Weatherwax High School
414 North I Street
Aberdeen, WA 98520

[ View School Profile ]
",iconGr); Arlington[Arlington.length] = createMarker(new GPoint(-122.12193298,48.18341827),"
Kent Prairie Elementary School
8110 207th St Ne
Arlington, WA 98223

[ View School Profile ]
",iconRd); Auburn[Auburn.length] = createMarker(new GPoint(-122.27870941,47.32594681),"
Kilo Middle School
4400 S 308th St
Auburn, WA 98001

[ View School Profile ]
",iconBl); Auburn[Auburn.length] = createMarker(new GPoint(-122.28129578,47.32593536),"
Lake Dolloff Elementary School
4200 S 308th St
Auburn, WA 98001

[ View School Profile ]
",iconRd); Amanda_Park[Amanda_Park.length] = createMarker(new GPoint(-123.88752747,47.46189880),"
Lake Quinault Elementary School
P O Box 38
Amanda Park, WA 98526

[ View School Profile ]
",iconRd); Amanda_Park[Amanda_Park.length] = createMarker(new GPoint(-124.06729889,47.45479965),"
Lake Quinault High School
P O Box 38
Amanda Park, WA 98526

[ View School Profile ]
",iconGr); Auburn[Auburn.length] = createMarker(new GPoint(-122.12415314,47.31686401),"
Lake View Elementary School
16401 Se 318th St
Auburn, WA 98092

[ View School Profile ]
",iconRd); Auburn[Auburn.length] = createMarker(new GPoint(-122.29249573,47.28059006),"
Lakeland Elementary School
35675 32nd Av S
Auburn, WA 98001

[ View School Profile ]
",iconRd); Auburn[Auburn.length] = createMarker(new GPoint(-122.17619324,47.32521439),"
Lea Hill Elementary School
30908 124th Ave Se
Auburn, WA 98092

[ View School Profile ]
",iconRd); Anacortes[Anacortes.length] = createMarker(new GPoint(-122.61259460,48.49945450),"
Learning Opportunity Center
2801 Commercial Avenue
Anacortes, WA 98221

[ View School Profile ]
",iconGr); Aberdeen[Aberdeen.length] = createMarker(new GPoint(-123.82302856,46.97689056),"
Mcdermoth Elementary School
601 North K St
Aberdeen, WA 98520

[ View School Profile ]
",iconRd); Auburn[Auburn.length] = createMarker(new GPoint(-122.26052094,47.33323669),"
Meredith Hill Elementary School
5830 S 300th St
Auburn, WA 98001

[ View School Profile ]
",iconRd); Aberdeen[Aberdeen.length] = createMarker(new GPoint(-123.79339600,46.96373749),"
Miller Junior High School
100 E Lindstrom
Aberdeen, WA 98520

[ View School Profile ]
",iconBl); Anacortes[Anacortes.length] = createMarker(new GPoint(-122.61932373,48.48786163),"
Mount Erie Elementary School
1313 41st Street
Anacortes, WA 98221

[ View School Profile ]
",iconRd); Auburn[Auburn.length] = createMarker(new GPoint(-122.21997833,47.27546310),"
Mt Baker Middle School
620 37th St Se
Auburn, WA 98002

[ View School Profile ]
",iconBl); Auburn[Auburn.length] = createMarker(new GPoint(-122.22736359,47.30701828),"
Muckleshoot Tribal School
39015-172nd Avenue Se
Auburn, WA 98002

[ View School Profile ]
",iconGr); Auburn[Auburn.length] = createMarker(new GPoint(-122.21620178,47.29250336),"
Olympic Middle School
1825 K St Se
Auburn, WA 98002

[ View School Profile ]
",iconBl); Anacortes[Anacortes.length] = createMarker(new GPoint(-122.61770630,48.50436401),"
Parent Partner Program
2200 M Avenue
Anacortes, WA 98221

[ View School Profile ]
",iconGr); Arlington[Arlington.length] = createMarker(new GPoint(-122.12037659,48.16396332),"
Pioneer Elementary School
8213 Eaglefield Dr
Arlington, WA 98223

[ View School Profile ]
",iconRd); Auburn[Auburn.length] = createMarker(new GPoint(-122.21360016,47.28815460),"
Pioneer Elementary School
2301 M St Se
Auburn, WA 98002

[ View School Profile ]
",iconRd); Arlington[Arlington.length] = createMarker(new GPoint(-122.11437225,48.19718552),"
Post Middle School
1220 E. 5th St
Arlington, WA 98223

[ View School Profile ]
",iconBl); Arlington[Arlington.length] = createMarker(new GPoint(-122.12238312,48.19614029),"
Presidents Elementary School
505 East Third
Arlington, WA 98223

[ View School Profile ]
",iconRd); Auburn[Auburn.length] = createMarker(new GPoint(-122.18669891,47.32799530),"
Rainier Middle School
30620 116th Ave Se
Auburn, WA 98092

[ View School Profile ]
",iconBl); Aberdeen[Aberdeen.length] = createMarker(new GPoint(-123.81257629,46.98413086),"
Robert Gray Elementary School
1516 North B St
Aberdeen, WA 98520

[ View School Profile ]
",iconRd); Anacortes[Anacortes.length] = createMarker(new GPoint(-122.62220764,48.50818634),"
Running Start High School
1916 J Avenue
Anacortes, WA 98221

[ View School Profile ]
",iconGr); Anacortes[Anacortes.length] = createMarker(new GPoint(-122.61249542,48.50751495),"
Secret Harbor High School
2200 M Avenue
Anacortes, WA 98221

[ View School Profile ]
",iconGr); Auburn[Auburn.length] = createMarker(new GPoint(-122.28751000,47.27893500),"
Sequoyah Middle School
3425 S 360th St
Auburn, WA 98001

[ View School Profile ]
",iconBl); Auburn[Auburn.length] = createMarker(new GPoint(-122.21759796,47.31110001),"
Special Ed School
502 4th St Ne
Auburn, WA 98002

[ View School Profile ]
",iconGr); Aberdeen[Aberdeen.length] = createMarker(new GPoint(-123.78919983,46.96720123),"
Stevens Elementary School
301 S. Farragut
Aberdeen, WA 98520

[ View School Profile ]
",iconRd); Arlington[Arlington.length] = createMarker(new GPoint(-122.12239075,48.19507599),"
Stillaguamish School
1215 E 5th
Arlington, WA 98223

[ View School Profile ]
",iconGr); Addy[Addy.length] = createMarker(new GPoint(-117.97523499,48.30633163),"
Summit Valley School
2360 Addy-gifford Road
Addy, WA 99101

[ View School Profile ]
",iconRd); Airway_Heights[Airway_Heights.length] = createMarker(new GPoint(-117.58704376,47.64483643),"
Sunset Elementary School
12824 W 12th St
Airway Heights, WA 99001

[ View School Profile ]
",iconRd); Auburn[Auburn.length] = createMarker(new GPoint(-122.22421265,47.29806519),"
Terminal Park Elementary School
1101 D St Se
Auburn, WA 98002

[ View School Profile ]
",iconRd); Auburn[Auburn.length] = createMarker(new GPoint(-122.28031921,47.34353638),"
Thomas Jefferson High School
4248 S 288th St
Auburn, WA 98001

[ View School Profile ]
",iconGr); Arlington[Arlington.length] = createMarker(new GPoint(-122.06017303,48.23667908),"
Trafton Elementary School
12616 Jim Creek Rd
Arlington, WA 98223

[ View School Profile ]
",iconRd); Auburn[Auburn.length] = createMarker(new GPoint(-122.28150177,47.35192490),"
Valhalla Elementary School
27847 42nd Av S
Auburn, WA 98001

[ View School Profile ]
",iconRd); Auburn[Auburn.length] = createMarker(new GPoint(-122.22736359,47.30701828),"
Washington Elementary School
20 E St Ne
Auburn, WA 98002

[ View School Profile ]
",iconRd); Auburn[Auburn.length] = createMarker(new GPoint(-122.23431396,47.30773544),"
West Auburn Senior High School
401 W Main St
Auburn, WA 98001

[ View School Profile ]
",iconGr); Arlington[Arlington.length] = createMarker(new GPoint(-122.15140533,48.16585541),"
Weston High School
18722 59th Ave Ne
Arlington, WA 98223

[ View School Profile ]
",iconGr); Anacortes[Anacortes.length] = createMarker(new GPoint(-122.61752319,48.51257324),"
Whitney Elementary School
1200 M Avenue
Anacortes, WA 98221

[ View School Profile ]
",iconRd); Aberdeen[Aberdeen.length] = createMarker(new GPoint(-123.77185822,47.11763763),"
Wishkah Valley Elementary/high School
4640 Wishkah Rd.
Aberdeen, WA 98520

[ View School Profile ]
",iconGr); Ariel[Ariel.length] = createMarker(new GPoint(-122.74166107,45.90615845),"
Yale Elementary School
11842 Lewis River Road
Ariel, WA 98603

[ View School Profile ]
",iconRd); } // 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(Aberdeen); map.removeOverlays(Acme); map.removeOverlays(Addy); map.removeOverlays(Adna); map.removeOverlays(Airway_Heights); map.removeOverlays(Almira); map.removeOverlays(Amanda_Park); map.removeOverlays(Anacortes); map.removeOverlays(Ariel); map.removeOverlays(Arlington); map.removeOverlays(Ashford); map.removeOverlays(Asotin); map.removeOverlays(Auburn); 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(Aberdeen);map.removeOverlays(Aberdeen); map.removeOverlays(Acme); map.removeOverlays(Addy); map.removeOverlays(Adna); map.removeOverlays(Airway_Heights); map.removeOverlays(Almira); map.removeOverlays(Amanda_Park); map.removeOverlays(Anacortes); map.removeOverlays(Ariel); map.removeOverlays(Arlington); map.removeOverlays(Ashford); map.removeOverlays(Asotin); map.removeOverlays(Auburn); map.addOverlays(Aberdeen); centerByArray(Aberdeen, false, false); cntMarker += Aberdeen.length; map.addOverlays(Acme); centerByArray(Acme, false, false); cntMarker += Acme.length; map.addOverlays(Addy); centerByArray(Addy, false, false); cntMarker += Addy.length; map.addOverlays(Adna); centerByArray(Adna, false, false); cntMarker += Adna.length; map.addOverlays(Airway_Heights); centerByArray(Airway_Heights, false, false); cntMarker += Airway_Heights.length; map.addOverlays(Almira); centerByArray(Almira, false, false); cntMarker += Almira.length; map.addOverlays(Amanda_Park); centerByArray(Amanda_Park, false, false); cntMarker += Amanda_Park.length; map.addOverlays(Anacortes); centerByArray(Anacortes, false, false); cntMarker += Anacortes.length; map.addOverlays(Ariel); centerByArray(Ariel, false, false); cntMarker += Ariel.length; map.addOverlays(Arlington); centerByArray(Arlington, false, false); cntMarker += Arlington.length; map.addOverlays(Ashford); centerByArray(Ashford, false, false); cntMarker += Ashford.length; map.addOverlays(Asotin); centerByArray(Asotin, false, false); cntMarker += Asotin.length; map.addOverlays(Auburn); centerByArray(Auburn, false, false); cntMarker += Auburn.length; centerByArray(Aberdeen,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'); } }