function addMarkers() { mySelect = document.getElementById('selection'); Olympia = [];Lacey = [];Yelm = [];Tumwater = [];Rochester = [];Littlerock = [];Centralia = [];Tenino = [];Rainier = [];_Yelm_Hwy_Se = [];_Yelm_Ave_W = [];mySelect.options[mySelect.options.length] = new Option("Centralia schools",'all=Centralia'); mySelect.options[mySelect.options.length] = new Option("Lacey schools",'all=Lacey'); mySelect.options[mySelect.options.length] = new Option("Littlerock schools",'all=Littlerock'); mySelect.options[mySelect.options.length] = new Option("Olympia schools",'all=Olympia'); mySelect.options[mySelect.options.length] = new Option("Rainier schools",'all=Rainier'); mySelect.options[mySelect.options.length] = new Option("Rochester schools",'all=Rochester'); mySelect.options[mySelect.options.length] = new Option("Tenino schools",'all=Tenino'); mySelect.options[mySelect.options.length] = new Option("Tumwater schools",'all=Tumwater'); mySelect.options[mySelect.options.length] = new Option("Yelm schools",'all=Yelm'); mySelect.options[mySelect.options.length] = new Option(" Yelm Ave W schools",'all=_Yelm_Ave_W'); mySelect.options[mySelect.options.length] = new Option(" Yelm Hwy Se schools",'all=_Yelm_Hwy_Se'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Olympia[Olympia.length] = createMarker(new GPoint(-122.94502258,46.97578812),"
A G West Black Hills High School
7741 Littlerock Road Sw
Olympia, WA 98512

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("A G West Black Hills High School",'Olympia=' + Olympia.length); Olympia[Olympia.length] = createMarker(new GPoint(-122.88790131,47.04398346),"
Avanti High School
1113 Legion Way Se
Olympia, WA 98501

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Avanti High School",'Olympia=' + Olympia.length); Olympia[Olympia.length] = createMarker(new GPoint(-122.96239200,46.98227300),"
Black Lake Elementary School
6345 Belmore-black Lake Road
Olympia, WA 98512

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Black Lake Elementary School",'Olympia=' + Olympia.length); Olympia[Olympia.length] = createMarker(new GPoint(-122.88599396,47.13623810),"
Boston Harbor Elementary School
7300 Zangle Rd Ne
Olympia, WA 98506

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Boston Harbor Elementary School",'Olympia=' + Olympia.length); Olympia[Olympia.length] = createMarker(new GPoint(-122.93456268,47.05146408),"
Capital High School
2707 Conger Ave Nw
Olympia, WA 98502

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Capital High School",'Olympia=' + Olympia.length); Olympia[Olympia.length] = createMarker(new GPoint(-122.86470032,47.00566483),"
Centennial Elementary School
2637 45th Ave Se
Olympia, WA 98501

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Centennial Elementary School",'Olympia=' + Olympia.length); Lacey[Lacey.length] = createMarker(new GPoint(-122.82798004,47.05396271),"
Chinook Middle School
4301 6th Ave Ne
Lacey, WA 98516

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Chinook Middle School",'Lacey=' + Lacey.length); Olympia[Olympia.length] = createMarker(new GPoint(-122.83359528,46.96146393),"
East Olympia Elementary School
8700 Rich Road
Olympia, WA 98501

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("East Olympia Elementary School",'Olympia=' + Olympia.length); Lacey[Lacey.length] = createMarker(new GPoint(-122.75883484,47.02019119),"
Evergreen Forest Elementary School
3025 Marvin Rd Se
Lacey, WA 98503

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Evergreen Forest Elementary School",'Lacey=' + Lacey.length); Yelm[Yelm.length] = createMarker(new GPoint(-122.58947754,46.94188690),"
Fort Stevens Elementary School
Po Box 476
Yelm, WA 98597

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Fort Stevens Elementary School",'Yelm=' + Yelm.length); Olympia[Olympia.length] = createMarker(new GPoint(-122.91916656,47.04758072),"
Garfield Elementary School
325 Plymouth St Nw
Olympia, WA 98502

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Garfield Elementary School",'Olympia=' + Olympia.length); Tumwater[Tumwater.length] = createMarker(new GPoint(-122.92819977,46.96743774),"
George Washington Bush Middle School
2120 83rd Avenue Sw
Tumwater, WA 98512

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("George Washington Bush Middle School",'Tumwater=' + Tumwater.length); Rochester[Rochester.length] = createMarker(new GPoint(-123.04594421,46.79443359),"
Grand Mound Elementary School
7710 James Rd Sw
Rochester, WA 98579

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Grand Mound Elementary School",'Rochester=' + Rochester.length); Olympia[Olympia.length] = createMarker(new GPoint(-123.01918793,47.07971573),"
Griffin Elementary School
6530 33rd Ave Nw
Olympia, WA 98502

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Griffin Elementary School",'Olympia=' + Olympia.length); Rochester[Rochester.length] = createMarker(new GPoint(-123.09097290,46.82166290),"
H.e.a.r.t. High School
10140 Highway 12 Sw
Rochester, WA 98579

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("H.e.a.r.t. High School",'Rochester=' + Rochester.length); Lacey[Lacey.length] = createMarker(new GPoint(-122.82240295,46.98686218),"
Horizons Elementary School
4601 67th Ave Se
Lacey, WA 98513

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Horizons Elementary School",'Lacey=' + Lacey.length); Olympia[Olympia.length] = createMarker(new GPoint(-122.92780304,47.05173874),"
Jefferson Middle School
2200 Conger Ave Nw
Olympia, WA 98502

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Jefferson Middle School",'Olympia=' + Olympia.length); Olympia[Olympia.length] = createMarker(new GPoint(-122.89923096,47.03796005),"
Julia Butler Hansen Elementary School
1919 Road Sixty Five Nw
Olympia, WA 98502

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Julia Butler Hansen Elementary School",'Olympia=' + Olympia.length); Lacey[Lacey.length] = createMarker(new GPoint(-122.82296753,47.01341248),"
Komachin Middle School
3650 College St Se
Lacey, WA 98503

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Komachin Middle School",'Lacey=' + Lacey.length); Lacey[Lacey.length] = createMarker(new GPoint(-122.80366516,47.03038788),"
Lacey Elementary School
1800 Homann Dr Se
Lacey, WA 98503

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lacey Elementary School",'Lacey=' + Lacey.length); Yelm[Yelm.length] = createMarker(new GPoint(-122.48721900,46.85119500),"
Lackamas Elementary School
16240 Bald Hill Rd
Yelm, WA 98597

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lackamas Elementary School",'Yelm=' + Yelm.length); Lacey[Lacey.length] = createMarker(new GPoint(-122.80139160,47.00654221),"
Lakes Elementary School
6211 Mullen Rd Se
Lacey, WA 98503

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lakes Elementary School",'Lacey=' + Lacey.length); Olympia[Olympia.length] = createMarker(new GPoint(-122.92656708,47.07076645),"
Leland P Brown Elementary School
2000 26th Ave Nw
Olympia, WA 98502

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Leland P Brown Elementary School",'Olympia=' + Olympia.length); Olympia[Olympia.length] = createMarker(new GPoint(-122.89919281,47.03006363),"
Lincoln Elementary School
213 21st Ave Se
Olympia, WA 98501

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lincoln Elementary School",'Olympia=' + Olympia.length); Littlerock[Littlerock.length] = createMarker(new GPoint(-123.01678467,46.90246964),"
Littlerock Elementary School
Box C
Littlerock, WA 98556

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Littlerock Elementary School",'Littlerock=' + Littlerock.length); Lacey[Lacey.length] = createMarker(new GPoint(-122.77870178,47.04693604),"
Lydia Hawk Elementary School
7600 5th Ave Se
Lacey, WA 98503

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lydia Hawk Elementary School",'Lacey=' + Lacey.length); Olympia[Olympia.length] = createMarker(new GPoint(-122.88595581,47.04409409),"
Madison Elementary School
1225 Legion Way Se
Olympia, WA 98501

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Madison Elementary School",'Olympia=' + Olympia.length); Centralia[Centralia.length] = createMarker(new GPoint(-123.02696991,46.79352188),"
Maple Lane School
20311 Old Hwy 9 Sw
Centralia, WA 98531

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Maple Lane School",'Centralia=' + Centralia.length); Olympia[Olympia.length] = createMarker(new GPoint(-122.85621643,47.01823807),"
Mckenny Elementary School
3250 Morse Merryman Rd Se
Olympia, WA 98501

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Mckenny Elementary School",'Olympia=' + Olympia.length); Olympia[Olympia.length] = createMarker(new GPoint(-122.97745300,47.13350300),"
Mclane Elementary School
200 Delphi Rd Sw
Olympia, WA 98502

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Mclane Elementary School",'Olympia=' + Olympia.length); Lacey[Lacey.length] = createMarker(new GPoint(-122.74153137,47.04746246),"
Meadows Elementary School
836 Deerbrush Dr Se
Lacey, WA 98513

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Meadows Elementary School",'Lacey=' + Lacey.length); Tumwater[Tumwater.length] = createMarker(new GPoint(-122.91062164,47.00511551),"
Michael T Simmons Elementary School
1205 S 2nd Avenue
Tumwater, WA 98512

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Michael T Simmons Elementary School",'Tumwater=' + Tumwater.length); Yelm[Yelm.length] = createMarker(new GPoint(-122.56269836,46.89960098),"
Mill Pond Intermediate School
Po Box 476
Yelm, WA 98597

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Mill Pond Intermediate School",'Yelm=' + Yelm.length); Lacey[Lacey.length] = createMarker(new GPoint(-122.82309723,47.02956390),"
Mountain View Elementary School
1900 College St Se
Lacey, WA 98503

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Mountain View Elementary School",'Lacey=' + Lacey.length); Tumwater[Tumwater.length] = createMarker(new GPoint(-122.91319300,46.98200700),"
New Market High School
7299 New Market Street
Tumwater, WA 98501

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("New Market High School",'Tumwater=' + Tumwater.length); Lacey[Lacey.length] = createMarker(new GPoint(-122.76844025,47.04603577),"
Nisqually Middle School
8100 Steilacoom Rd Se
Lacey, WA 98503

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Nisqually Middle School",'Lacey=' + Lacey.length); Lacey[Lacey.length] = createMarker(new GPoint(-122.83340454,47.05154037),"
North Thurston High School
600 Sleater Kinney Rd Ne
Lacey, WA 98506

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("North Thurston High School",'Lacey=' + Lacey.length); Olympia[Olympia.length] = createMarker(new GPoint(-122.88498688,47.01673889),"
Olympia High School
1302 North St Se
Olympia, WA 98501

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Olympia High School",'Olympia=' + Olympia.length); Lacey[Lacey.length] = createMarker(new GPoint(-122.78049469,47.05857086),"
Olympic View Elementary School
1330 Horne Ave Ne
Lacey, WA 98516

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Olympic View Elementary School",'Lacey=' + Lacey.length); Tenino[Tenino.length] = createMarker(new GPoint(-122.84851837,46.85744476),"
Parkside Elementary School
Po Box 4024
Tenino, WA 98589

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Parkside Elementary School",'Tenino=' + Tenino.length); Tumwater[Tumwater.length] = createMarker(new GPoint(-122.90947723,47.00355911),"
Peter G Schmidt Elementary School
6600 Capitol Blvd
Tumwater, WA 98501

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Peter G Schmidt Elementary School",'Tumwater=' + Tumwater.length); Olympia[Olympia.length] = createMarker(new GPoint(-122.87943268,47.01976395),"
Pioneer Elementary School
1655 Carlyon Ave Se
Olympia, WA 98501

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Pioneer Elementary School",'Olympia=' + Olympia.length); Lacey[Lacey.length] = createMarker(new GPoint(-122.82730103,47.06195831),"
Pleasant Glade Elementary School
1920 Abernethy Rd Ne
Lacey, WA 98516

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Pleasant Glade Elementary School",'Lacey=' + Lacey.length); Rainier[Rainier.length] = createMarker(new GPoint(-122.68713379,46.88808060),"
Rainier Middle School
Po Box 98
Rainier, WA 98576

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Rainier Middle School",'Rainier=' + Rainier.length); Rainier[Rainier.length] = createMarker(new GPoint(-122.69148254,46.88253021),"
Rainier Primary School
Po Box 98
Rainier, WA 98576

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Rainier Primary School",'Rainier=' + Rainier.length); Rainier[Rainier.length] = createMarker(new GPoint(-122.69014740,46.88620377),"
Rainier Senior High School
Po Box 98
Rainier, WA 98576

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Rainier Senior High School",'Rainier=' + Rainier.length); Olympia[Olympia.length] = createMarker(new GPoint(-122.88966370,47.06291962),"
Reeves Middle School
2200 Quince St Ne
Olympia, WA 98506

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Reeves Middle School",'Olympia=' + Olympia.length); Lacey[Lacey.length] = createMarker(new GPoint(-122.74993134,47.05952835),"
River Ridge High School
8929 Martin Way E
Lacey, WA 98516

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("River Ridge High School",'Lacey=' + Lacey.length); Rochester[Rochester.length] = createMarker(new GPoint(-123.04820251,46.80096054),"
Rochester High School
19800 Carper Rd Sw
Rochester, WA 98579

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Rochester High School",'Rochester=' + Rochester.length); Rochester[Rochester.length] = createMarker(new GPoint(-123.09069824,46.82193756),"
Rochester Middle School
P.o. Box 398
Rochester, WA 98579

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Rochester Middle School",'Rochester=' + Rochester.length); Rochester[Rochester.length] = createMarker(new GPoint(-123.09604645,46.82193756),"
Rochester Primary School
7440 James Rd
Rochester, WA 98579

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Rochester Primary School",'Rochester=' + Rochester.length); Olympia[Olympia.length] = createMarker(new GPoint(-122.88455963,47.05706406),"
Roosevelt Elementary School
1417 San Francisco Ave Ne
Olympia, WA 98506

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Roosevelt Elementary School",'Olympia=' + Olympia.length); Olympia[Olympia.length] = createMarker(new GPoint(-122.94502258,46.97578812),"
Secondary Options
7741 Littlerock Road Sw
Olympia, WA 98512

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Secondary Options",'Olympia=' + Olympia.length); Lacey[Lacey.length] = createMarker(new GPoint(-122.77249908,47.02976227),"
Seven Oaks Elementary School
1800 Seven Oaks Dr Se
Lacey, WA 98503

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Seven Oaks Elementary School",'Lacey=' + Lacey.length); Lacey[Lacey.length] = createMarker(new GPoint(-122.83390045,47.08640671),"
South Bay Elementary School
3845 Sleater Kinney Rd Ne
Lacey, WA 98506

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("South Bay Elementary School",'Lacey=' + Lacey.length); Lacey[Lacey.length] = createMarker(new GPoint(-122.80429840,46.99993515),"
South Sound High School
5400 54th Ave Se
Lacey, WA 98513

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("South Sound High School",'Lacey=' + Lacey.length); _Yelm_Hwy_Se[_Yelm_Hwy_Se.length] = createMarker(new GPoint(-122.56269836,46.89960098),"
Southworth Elementary School
Po Box 476
13849 Yelm Hwy Se, WA 98597

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Southworth Elementary School",'_Yelm_Hwy_Se=' + _Yelm_Hwy_Se.length); Tenino[Tenino.length] = createMarker(new GPoint(-122.84660339,46.86220169),"
Tenino Elementary School
Po Box 4024
Tenino, WA 98589

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Tenino Elementary School",'Tenino=' + Tenino.length); Tenino[Tenino.length] = createMarker(new GPoint(-122.85624695,46.85813141),"
Tenino High School
Po Box 4024
Tenino, WA 98589

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Tenino High School",'Tenino=' + Tenino.length); Tenino[Tenino.length] = createMarker(new GPoint(-122.84660339,46.86220169),"
Tenino Middle School
Po Box 4024
Tenino, WA 98589

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Tenino Middle School",'Tenino=' + Tenino.length); Olympia[Olympia.length] = createMarker(new GPoint(-122.95332336,47.06325150),"
Thurgood Marshall Middle School
3939 20th Ave Nw
Olympia, WA 98502

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Thurgood Marshall Middle School",'Olympia=' + Olympia.length); Tumwater[Tumwater.length] = createMarker(new GPoint(-122.91008759,47.03135681),"
Thurs Co Juv Dept/tumwater West E
2801 32nd Avenue Sw
Tumwater, WA 98512

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Thurs Co Juv Dept/tumwater West E",'Tumwater=' + Tumwater.length); Lacey[Lacey.length] = createMarker(new GPoint(-122.80220032,47.00743484),"
Timberline High School
6120 Mullen Rd Se
Lacey, WA 98503

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Timberline High School",'Lacey=' + Lacey.length); Tumwater[Tumwater.length] = createMarker(new GPoint(-122.91492462,46.98553848),"
Tumwater High School
700 Israel Road
Tumwater, WA 98501

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Tumwater High School",'Tumwater=' + Tumwater.length); Tumwater[Tumwater.length] = createMarker(new GPoint(-122.92199707,47.01818848),"
Tumwater Hill Elementary School
3120 Ridgeview St Sw
Tumwater, WA 98512

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Tumwater Hill Elementary School",'Tumwater=' + Tumwater.length); Tumwater[Tumwater.length] = createMarker(new GPoint(-122.92420197,46.99165726),"
Tumwater Middle School
6335 Littlerock Road Sw
Tumwater, WA 98512

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Tumwater Middle School",'Tumwater=' + Tumwater.length); Tumwater[Tumwater.length] = createMarker(new GPoint(-122.91320038,46.96707916),"
Vocational Skills Center New Market
7299 New Market Street
Tumwater, WA 98501

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Vocational Skills Center New Market",'Tumwater=' + Tumwater.length); Olympia[Olympia.length] = createMarker(new GPoint(-122.70430756,47.06691360),"
Wa He Lut Indian School
11110 Connie Avenue Southeast
Olympia, WA 98513

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Wa He Lut Indian School",'Olympia=' + Olympia.length); Olympia[Olympia.length] = createMarker(new GPoint(-122.87300110,47.02006149),"
Washington Middle School
3100 Cain Rd Se
Olympia, WA 98501

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Washington Middle School",'Olympia=' + Olympia.length); Lacey[Lacey.length] = createMarker(new GPoint(-122.78013611,47.00534439),"
Woodland Elementary School
4630 Carpenter Rd Se
Lacey, WA 98503

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Woodland Elementary School",'Lacey=' + Lacey.length); Yelm[Yelm.length] = createMarker(new GPoint(-122.56269836,46.89960098),"
Yelm Extension School
Po Box 476
Yelm, WA 98597

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Yelm Extension School",'Yelm=' + Yelm.length); _Yelm_Ave_W[_Yelm_Ave_W.length] = createMarker(new GPoint(-122.62261963,46.95046234),"
Yelm High School 12
Po Box 476
1315 Yelm Ave. W, WA 98597

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Yelm High School 12",'_Yelm_Ave_W=' + _Yelm_Ave_W.length); _Yelm_Ave_W[_Yelm_Ave_W.length] = createMarker(new GPoint(-122.61026764,46.94422150),"
Yelm Middle School
Po Box 476
402 Yelm Ave. W, WA 98597

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Yelm Middle School",'_Yelm_Ave_W=' + _Yelm_Ave_W.length); Yelm[Yelm.length] = createMarker(new GPoint(-122.58963776,46.92706299),"
Yelm Prairie Elementary School
16535 110th Ave. Se
Yelm, WA 98597

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Yelm Prairie Elementary School",'Yelm=' + Yelm.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(Centralia); map.removeOverlays(Lacey); map.removeOverlays(Littlerock); map.removeOverlays(Olympia); map.removeOverlays(Rainier); map.removeOverlays(Rochester); map.removeOverlays(Tenino); map.removeOverlays(Tumwater); map.removeOverlays(Yelm); map.removeOverlays(_Yelm_Ave_W); map.removeOverlays(_Yelm_Hwy_Se); 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(Olympia);map.removeOverlays(Centralia); map.removeOverlays(Lacey); map.removeOverlays(Littlerock); map.removeOverlays(Olympia); map.removeOverlays(Rainier); map.removeOverlays(Rochester); map.removeOverlays(Tenino); map.removeOverlays(Tumwater); map.removeOverlays(Yelm); map.removeOverlays(_Yelm_Ave_W); map.removeOverlays(_Yelm_Hwy_Se); map.addOverlays(Centralia); centerByArray(Centralia, false, false); cntMarker += Centralia.length; map.addOverlays(Lacey); centerByArray(Lacey, false, false); cntMarker += Lacey.length; map.addOverlays(Littlerock); centerByArray(Littlerock, false, false); cntMarker += Littlerock.length; map.addOverlays(Olympia); centerByArray(Olympia, false, false); cntMarker += Olympia.length; map.addOverlays(Rainier); centerByArray(Rainier, false, false); cntMarker += Rainier.length; map.addOverlays(Rochester); centerByArray(Rochester, false, false); cntMarker += Rochester.length; map.addOverlays(Tenino); centerByArray(Tenino, false, false); cntMarker += Tenino.length; map.addOverlays(Tumwater); centerByArray(Tumwater, false, false); cntMarker += Tumwater.length; map.addOverlays(Yelm); centerByArray(Yelm, false, false); cntMarker += Yelm.length; map.addOverlays(_Yelm_Ave_W); centerByArray(_Yelm_Ave_W, false, false); cntMarker += _Yelm_Ave_W.length; map.addOverlays(_Yelm_Hwy_Se); centerByArray(_Yelm_Hwy_Se, false, false); cntMarker += _Yelm_Hwy_Se.length; centerByArray(Olympia,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'); } }