function addMarkers() { mySelect = document.getElementById('selection'); Canby = [];Milwaukie = [];West_Linn = [];Beavercreek = [];Wilsonville = [];Sandy = [];Tualatin = [];Lake_Oswego = [];Mt_Angel = [];Oregon_City = [];Marylhurst = [];Clackamas = [];Estacada = [];Mulino = [];Colton = [];Boring = [];Molalla = [];Eagle_Creek = [];Gladstone = [];Portland = [];Hubbard = [];mySelect.options[mySelect.options.length] = new Option("Beavercreek schools",'all=Beavercreek'); mySelect.options[mySelect.options.length] = new Option("Boring schools",'all=Boring'); mySelect.options[mySelect.options.length] = new Option("Canby schools",'all=Canby'); mySelect.options[mySelect.options.length] = new Option("Clackamas schools",'all=Clackamas'); mySelect.options[mySelect.options.length] = new Option("Colton schools",'all=Colton'); mySelect.options[mySelect.options.length] = new Option("Eagle Creek schools",'all=Eagle_Creek'); mySelect.options[mySelect.options.length] = new Option("Estacada schools",'all=Estacada'); mySelect.options[mySelect.options.length] = new Option("Gladstone schools",'all=Gladstone'); mySelect.options[mySelect.options.length] = new Option("Hubbard schools",'all=Hubbard'); mySelect.options[mySelect.options.length] = new Option("Lake Oswego schools",'all=Lake_Oswego'); mySelect.options[mySelect.options.length] = new Option("Marylhurst schools",'all=Marylhurst'); mySelect.options[mySelect.options.length] = new Option("Milwaukie schools",'all=Milwaukie'); mySelect.options[mySelect.options.length] = new Option("Molalla schools",'all=Molalla'); mySelect.options[mySelect.options.length] = new Option("Mt Angel schools",'all=Mt_Angel'); mySelect.options[mySelect.options.length] = new Option("Mulino schools",'all=Mulino'); mySelect.options[mySelect.options.length] = new Option("Oregon City schools",'all=Oregon_City'); mySelect.options[mySelect.options.length] = new Option("Portland schools",'all=Portland'); mySelect.options[mySelect.options.length] = new Option("Sandy schools",'all=Sandy'); mySelect.options[mySelect.options.length] = new Option("Tualatin schools",'all=Tualatin'); mySelect.options[mySelect.options.length] = new Option("West Linn schools",'all=West_Linn'); mySelect.options[mySelect.options.length] = new Option("Wilsonville schools",'all=Wilsonville'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Canby[Canby.length] = createMarker(new GPoint(-122.68291473,45.25223541),"
",iconBl); mySelect.options[mySelect.options.length] = new Option("Ackerman Middle School",'Canby=' + Canby.length); Milwaukie[Milwaukie.length] = createMarker(new GPoint(-122.59323883,45.42359543),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Alder Creek Middle School",'Milwaukie=' + Milwaukie.length); Milwaukie[Milwaukie.length] = createMarker(new GPoint(-122.62580109,45.45814896),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Ardenwald Elementary School",'Milwaukie=' + Milwaukie.length); West_Linn[West_Linn.length] = createMarker(new GPoint(-122.67984009,45.35317993),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Athey Creek Middle School",'West_Linn=' + West_Linn.length); Beavercreek[Beavercreek.length] = createMarker(new GPoint(-122.51740265,45.29033279),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Beavercreek Elementary School",'Beavercreek=' + Beavercreek.length); Milwaukie[Milwaukie.length] = createMarker(new GPoint(-122.58994293,45.41004562),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Bilquist Elementary School",'Milwaukie=' + Milwaukie.length); Wilsonville[Wilsonville.length] = createMarker(new GPoint(-122.76550293,45.30459976),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Boeckman Creek Primary School",'Wilsonville=' + Wilsonville.length); West_Linn[West_Linn.length] = createMarker(new GPoint(-122.61756134,45.36873627),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Bolton Primary School",'West_Linn=' + West_Linn.length); Wilsonville[Wilsonville.length] = createMarker(new GPoint(-122.79573059,45.29760742),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Boones Ferry Primary School",'Wilsonville=' + Wilsonville.length); Sandy[Sandy.length] = createMarker(new GPoint(-122.22139740,45.38840103),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Boring Middle School",'Sandy=' + Sandy.length); Tualatin[Tualatin.length] = createMarker(new GPoint(-122.73273468,45.37673569),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Bridgeport Elementary School",'Tualatin=' + Tualatin.length); Lake_Oswego[Lake_Oswego.length] = createMarker(new GPoint(-122.72592926,45.39686203),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Bryant Elementary School",'Lake_Oswego=' + Lake_Oswego.length); Sandy[Sandy.length] = createMarker(new GPoint(-122.22139740,45.38840103),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Bull Run Elementary School",'Sandy=' + Sandy.length); Mt_Angel[Mt_Angel.length] = createMarker(new GPoint(-122.69864655,45.06320572),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Butte Creek Elementary School",'Mt_Angel=' + Mt_Angel.length); Milwaukie[Milwaukie.length] = createMarker(new GPoint(-122.61470032,45.44063950),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Campbell Elementary School",'Milwaukie=' + Milwaukie.length); Canby[Canby.length] = createMarker(new GPoint(-122.69849396,45.25761414),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Canby High School",'Canby=' + Canby.length); Milwaukie[Milwaukie.length] = createMarker(new GPoint(-122.60324860,45.45209885),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Candy Lane Elementary School",'Milwaukie=' + Milwaukie.length); Oregon_City[Oregon_City.length] = createMarker(new GPoint(-122.57119751,45.27115631),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Carus School",'Oregon_City=' + Oregon_City.length); Canby[Canby.length] = createMarker(new GPoint(-122.67630768,45.25676346),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Cecile Trost Elementary School",'Canby=' + Canby.length); Sandy[Sandy.length] = createMarker(new GPoint(-122.22139740,45.38840103),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Cedar Ridge Middle School",'Sandy=' + Sandy.length); West_Linn[West_Linn.length] = createMarker(new GPoint(-122.63317108,45.38912201),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Cedaroak Park Primary School",'West_Linn=' + West_Linn.length); Marylhurst[Marylhurst.length] = createMarker(new GPoint(-122.64910126,45.39619827),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Christie",'Marylhurst=' + Marylhurst.length); Oregon_City[Oregon_City.length] = createMarker(new GPoint(-122.59923553,45.33446121),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Clackamas Adt High School",'Oregon_City=' + Oregon_City.length); Clackamas[Clackamas.length] = createMarker(new GPoint(-122.56929779,45.41197968),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Clackamas Elementary School",'Clackamas=' + Clackamas.length); Clackamas[Clackamas.length] = createMarker(new GPoint(-122.59323883,45.42359543),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Clackamas High School",'Clackamas=' + Clackamas.length); Oregon_City[Oregon_City.length] = createMarker(new GPoint(-118.06777700,45.32665100),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Clackamas Middle College",'Oregon_City=' + Oregon_City.length); Estacada[Estacada.length] = createMarker(new GPoint(-122.14610291,45.18700027),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Clackamas River Elementary School",'Estacada=' + Estacada.length); Mulino[Mulino.length] = createMarker(new GPoint(-122.47496033,45.21536255),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Clarkes Elementary School",'Mulino=' + Mulino.length); Colton[Colton.length] = createMarker(new GPoint(-122.41459656,45.16605759),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Colton Elementary School",'Colton=' + Colton.length); Colton[Colton.length] = createMarker(new GPoint(-122.43773651,45.16860199),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Colton High School",'Colton=' + Colton.length); Colton[Colton.length] = createMarker(new GPoint(-122.43773651,45.16860199),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Colton Middle School",'Colton=' + Colton.length); Milwaukie[Milwaukie.length] = createMarker(new GPoint(-122.62405396,45.40997314),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Concord Elementary School",'Milwaukie=' + Milwaukie.length); Sandy[Sandy.length] = createMarker(new GPoint(-122.22139740,45.38840103),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Cottrell Elementary School",'Sandy=' + Sandy.length); Boring[Boring.length] = createMarker(new GPoint(-122.41392517,45.42021561),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Damascus Middle School",'Boring=' + Boring.length); Boring[Boring.length] = createMarker(new GPoint(-122.42384338,45.41007996),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Deep Creek Elementary School",'Boring=' + Boring.length); Molalla[Molalla.length] = createMarker(new GPoint(-122.52204895,45.11955261),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Dickey Prairie Elementary School",'Molalla=' + Molalla.length); Eagle_Creek[Eagle_Creek.length] = createMarker(new GPoint(-122.14610291,45.18700027),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Eagle Creek Elementary School",'Eagle_Creek=' + Eagle_Creek.length); Milwaukie[Milwaukie.length] = createMarker(new GPoint(-122.61730194,45.44250107),"",iconRd); mySelect.options[mySelect.options.length] = new Option("El Puente Elementary School",'Milwaukie=' + Milwaukie.length); Estacada[Estacada.length] = createMarker(new GPoint(-122.14610291,45.18700027),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Estacada High School",'Estacada=' + Estacada.length); Estacada[Estacada.length] = createMarker(new GPoint(-122.14610291,45.18700027),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Estacada Junior High School",'Estacada=' + Estacada.length); Sandy[Sandy.length] = createMarker(new GPoint(-122.22139740,45.38840103),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Firwood Elementary School",'Sandy=' + Sandy.length); Lake_Oswego[Lake_Oswego.length] = createMarker(new GPoint(-122.67698669,45.42551041),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Forest Hills Elementary School",'Lake_Oswego=' + Lake_Oswego.length); Oregon_City[Oregon_City.length] = createMarker(new GPoint(-122.58914948,45.32532120),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Gaffney Lane Elementary School",'Oregon_City=' + Oregon_City.length); Oregon_City[Oregon_City.length] = createMarker(new GPoint(-122.60272980,45.34001541),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Gardiner Middle School",'Oregon_City=' + Oregon_City.length); Gladstone[Gladstone.length] = createMarker(new GPoint(-122.59902191,45.38721466),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Gladstone High School",'Gladstone=' + Gladstone.length); Lake_Oswego[Lake_Oswego.length] = createMarker(new GPoint(-122.66429138,45.40321350),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Hallinan Elementary School",'Lake_Oswego=' + Lake_Oswego.length); Portland[Portland.length] = createMarker(new GPoint(-122.52056122,45.44694138),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Happy Valley Elementary School",'Portland=' + Portland.length); Oregon_City[Oregon_City.length] = createMarker(new GPoint(-122.56645966,45.37276840),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Holcomb Elementary School",'Oregon_City=' + Oregon_City.length); Canby[Canby.length] = createMarker(new GPoint(-122.70096588,45.26402283),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Howard Eccles Elementary School",'Canby=' + Canby.length); Wilsonville[Wilsonville.length] = createMarker(new GPoint(-122.76550293,45.30459976),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Inza R Wood Middle School",'Wilsonville=' + Wilsonville.length); Milwaukie[Milwaukie.length] = createMarker(new GPoint(-122.61546326,45.38886642),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Jennings Lodge Elementary School",'Milwaukie=' + Milwaukie.length); Oregon_City[Oregon_City.length] = createMarker(new GPoint(-122.63026428,45.32815170),"",iconRd); mySelect.options[mySelect.options.length] = new Option("John Mcloughlin Elementary School",'Oregon_City=' + Oregon_City.length); Gladstone[Gladstone.length] = createMarker(new GPoint(-122.59262085,45.38187790),"",iconRd); mySelect.options[mySelect.options.length] = new Option("John Wetten Elementary School",'Gladstone=' + Gladstone.length); Sandy[Sandy.length] = createMarker(new GPoint(-122.22139740,45.38840103),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Kelso Elementary School",'Sandy=' + Sandy.length); Oregon_City[Oregon_City.length] = createMarker(new GPoint(-122.62270355,45.33892822),"",iconRd); mySelect.options[mySelect.options.length] = new Option("King Elementary School",'Oregon_City=' + Oregon_City.length); Lake_Oswego[Lake_Oswego.length] = createMarker(new GPoint(-122.71810913,45.41173553),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Lake Grove Elementary School",'Lake_Oswego=' + Lake_Oswego.length); Lake_Oswego[Lake_Oswego.length] = createMarker(new GPoint(-122.70214081,45.42480850),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Lake Oswego Junior High School",'Lake_Oswego=' + Lake_Oswego.length); Lake_Oswego[Lake_Oswego.length] = createMarker(new GPoint(-122.68260193,45.40919876),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Lake Oswego Senior High School",'Lake_Oswego=' + Lake_Oswego.length); Lake_Oswego[Lake_Oswego.length] = createMarker(new GPoint(-122.68260193,45.40919876),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Lakeridge High School",'Lake_Oswego=' + Lake_Oswego.length); Milwaukie[Milwaukie.length] = createMarker(new GPoint(-122.60787201,45.45057297),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Lewelling Elementary School",'Milwaukie=' + Milwaukie.length); Milwaukie[Milwaukie.length] = createMarker(new GPoint(-122.59949493,45.43682861),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Linwood Elementary School",'Milwaukie=' + Milwaukie.length); Molalla[Molalla.length] = createMarker(new GPoint(-122.52989960,45.03767776),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Maple Grove Elementary School",'Molalla=' + Molalla.length); Milwaukie[Milwaukie.length] = createMarker(new GPoint(-122.57981110,45.41838074),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Mc Loughlin Junior High School",'Milwaukie=' + Milwaukie.length); Milwaukie[Milwaukie.length] = createMarker(new GPoint(-122.63468933,45.44219589),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Milwaukie Elementary School",'Milwaukie=' + Milwaukie.length); Milwaukie[Milwaukie.length] = createMarker(new GPoint(-122.63818359,45.44240570),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Milwaukie High School",'Milwaukie=' + Milwaukie.length); Milwaukie[Milwaukie.length] = createMarker(new GPoint(-122.63935852,45.44615936),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Milwaukie Junior High School",'Milwaukie=' + Milwaukie.length); Molalla[Molalla.length] = createMarker(new GPoint(-122.51450348,45.07820129),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Molalla Elementary School",'Molalla=' + Molalla.length); Molalla[Molalla.length] = createMarker(new GPoint(-122.51450348,45.07820129),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Molalla High School",'Molalla=' + Molalla.length); Molalla[Molalla.length] = createMarker(new GPoint(-122.51450348,45.07820129),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Molalla River Middle School",'Molalla=' + Molalla.length); Portland[Portland.length] = createMarker(new GPoint(-122.56399536,45.44186401),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Mount Scott Elementary School",'Portland=' + Portland.length); Oregon_City[Oregon_City.length] = createMarker(new GPoint(-122.60519409,45.33843231),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Mt Pleasant Elementary School",'Oregon_City=' + Oregon_City.length); Mulino[Mulino.length] = createMarker(new GPoint(-122.54440308,45.20800018),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Mulino Elementary School",'Mulino=' + Mulino.length); Sandy[Sandy.length] = createMarker(new GPoint(-122.22139740,45.38840103),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Naas Elementary School",'Sandy=' + Sandy.length); Milwaukie[Milwaukie.length] = createMarker(new GPoint(-122.61209869,45.40790176),"",iconGr); mySelect.options[mySelect.options.length] = new Option("New Urban High School",'Milwaukie=' + Milwaukie.length); Hubbard[Hubbard.length] = createMarker(new GPoint(-122.74745941,45.17653656),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Ninety-one School",'Hubbard=' + Hubbard.length); Lake_Oswego[Lake_Oswego.length] = createMarker(new GPoint(-122.73056030,45.42720795),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Oak Creek Elementary School",'Lake_Oswego=' + Lake_Oswego.length); Milwaukie[Milwaukie.length] = createMarker(new GPoint(-122.64160156,45.42480850),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Oak Grove Elementary School",'Milwaukie=' + Milwaukie.length); Oregon_City[Oregon_City.length] = createMarker(new GPoint(-122.57691956,45.35553741),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Ogden Middle School",'Oregon_City=' + Oregon_City.length); Oregon_City[Oregon_City.length] = createMarker(new GPoint(-122.59538269,45.35669708),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Oregon City Senior High School",'Oregon_City=' + Oregon_City.length); Clackamas[Clackamas.length] = createMarker(new GPoint(-122.50729370,45.42213058),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Oregon Trail Elementary School",'Clackamas=' + Clackamas.length); Lake_Oswego[Lake_Oswego.length] = createMarker(new GPoint(-122.69129181,45.40266418),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Palisades Elementary School",'Lake_Oswego=' + Lake_Oswego.length); Oregon_City[Oregon_City.length] = createMarker(new GPoint(-122.57893372,45.37369156),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Park Place Elementary School",'Oregon_City=' + Oregon_City.length); Milwaukie[Milwaukie.length] = createMarker(new GPoint(-122.61172485,45.40219879),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Putnam High School",'Milwaukie=' + Milwaukie.length); Oregon_City[Oregon_City.length] = createMarker(new GPoint(-122.49276733,45.34368896),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Redland Elementary School",'Oregon_City=' + Oregon_City.length); Lake_Oswego[Lake_Oswego.length] = createMarker(new GPoint(-122.73723602,45.38966370),"",iconRd); mySelect.options[mySelect.options.length] = new Option("River Grove Elementary School",'Lake_Oswego=' + Lake_Oswego.length); Estacada[Estacada.length] = createMarker(new GPoint(-122.14610291,45.18700027),"",iconRd); mySelect.options[mySelect.options.length] = new Option("River Mill Elementary School",'Estacada=' + Estacada.length); Oregon_City[Oregon_City.length] = createMarker(new GPoint(-122.55651855,45.39651871),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Riverbend Youth Center",'Oregon_City=' + Oregon_City.length); Milwaukie[Milwaukie.length] = createMarker(new GPoint(-122.63919067,45.40479279),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Riverside Elementary School",'Milwaukie=' + Milwaukie.length); West_Linn[West_Linn.length] = createMarker(new GPoint(-122.64713287,45.36849594),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Rosemont Ridge Middle School",'West_Linn=' + West_Linn.length); Milwaukie[Milwaukie.length] = createMarker(new GPoint(-122.62620544,45.43470383),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Rowe Middle School",'Milwaukie=' + Milwaukie.length); Molalla[Molalla.length] = createMarker(new GPoint(-122.65052032,45.14905167),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Rural Dell Elementary School",'Molalla=' + Molalla.length); Sandy[Sandy.length] = createMarker(new GPoint(-122.22139740,45.38840103),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Sandy Grade School",'Sandy=' + Sandy.length); Sandy[Sandy.length] = createMarker(new GPoint(-122.22139740,45.38840103),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Sandy High School",'Sandy=' + Sandy.length); Milwaukie[Milwaukie.length] = createMarker(new GPoint(-122.64309692,45.41814041),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Sojourner School",'Milwaukie=' + Milwaukie.length); Portland[Portland.length] = createMarker(new GPoint(-122.53479767,45.43796539),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Spring Mountain Elementary School",'Portland=' + Portland.length); West_Linn[West_Linn.length] = createMarker(new GPoint(-122.69914246,45.37861252),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Stafford Primary School",'West_Linn=' + West_Linn.length); Clackamas[Clackamas.length] = createMarker(new GPoint(-122.52789307,45.42663193),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Sunnyside Elementary School",'Clackamas=' + Clackamas.length); Clackamas[Clackamas.length] = createMarker(new GPoint(-122.52799225,45.41814041),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Sunrise Middle School",'Clackamas=' + Clackamas.length); West_Linn[West_Linn.length] = createMarker(new GPoint(-122.62657166,45.36113739),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Sunset Primary School",'West_Linn=' + West_Linn.length); West_Linn[West_Linn.length] = createMarker(new GPoint(-122.63144684,45.35520935),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Three Rivers Charter School",'West_Linn=' + West_Linn.length); Lake_Oswego[Lake_Oswego.length] = createMarker(new GPoint(-122.70008087,45.42255402),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Uplands Elementary School",'Lake_Oswego=' + Lake_Oswego.length); Milwaukie[Milwaukie.length] = createMarker(new GPoint(-122.61390686,45.41833878),"",iconRd); mySelect.options[mySelect.options.length] = new Option("View Acres Elementary School",'Milwaukie=' + Milwaukie.length); Gladstone[Gladstone.length] = createMarker(new GPoint(-122.58428192,45.39381790),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Walter L Kraxberger Middle School",'Gladstone=' + Gladstone.length); Lake_Oswego[Lake_Oswego.length] = createMarker(new GPoint(-122.72534180,45.39686203),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Waluga Junior High School",'Lake_Oswego=' + Lake_Oswego.length); Sandy[Sandy.length] = createMarker(new GPoint(-122.22139740,45.38840103),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Welches Elementary School",'Sandy=' + Sandy.length); Sandy[Sandy.length] = createMarker(new GPoint(-122.22139740,45.38840103),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Welches Middle School",'Sandy=' + Sandy.length); West_Linn[West_Linn.length] = createMarker(new GPoint(-122.61470700,45.36339500),"",iconGr); mySelect.options[mySelect.options.length] = new Option("West Linn High School",'West_Linn=' + West_Linn.length); Lake_Oswego[Lake_Oswego.length] = createMarker(new GPoint(-122.71215057,45.39586258),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Westridge Elementary School",'Lake_Oswego=' + Lake_Oswego.length); Milwaukie[Milwaukie.length] = createMarker(new GPoint(-122.58778381,45.44326782),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Whitcomb Elementary School",'Milwaukie=' + Milwaukie.length); Milwaukie[Milwaukie.length] = createMarker(new GPoint(-122.60105133,45.44813538),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Wichita Elementary School",'Milwaukie=' + Milwaukie.length); West_Linn[West_Linn.length] = createMarker(new GPoint(-122.65312195,45.34320068),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Willamette Primary School",'West_Linn=' + West_Linn.length); Canby[Canby.length] = createMarker(new GPoint(-122.69776154,45.26517868),"",iconRd); mySelect.options[mySelect.options.length] = new Option("William Knight Elementary School",'Canby=' + Canby.length); Wilsonville[Wilsonville.length] = createMarker(new GPoint(-122.76550293,45.30459976),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Wilsonville High School",'Wilsonville=' + Wilsonville.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(Beavercreek); map.removeOverlays(Boring); map.removeOverlays(Canby); map.removeOverlays(Clackamas); map.removeOverlays(Colton); map.removeOverlays(Eagle_Creek); map.removeOverlays(Estacada); map.removeOverlays(Gladstone); map.removeOverlays(Hubbard); map.removeOverlays(Lake_Oswego); map.removeOverlays(Marylhurst); map.removeOverlays(Milwaukie); map.removeOverlays(Molalla); map.removeOverlays(Mt_Angel); map.removeOverlays(Mulino); map.removeOverlays(Oregon_City); map.removeOverlays(Portland); map.removeOverlays(Sandy); map.removeOverlays(Tualatin); map.removeOverlays(West_Linn); map.removeOverlays(Wilsonville); 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(Canby);map.removeOverlays(Beavercreek); map.removeOverlays(Boring); map.removeOverlays(Canby); map.removeOverlays(Clackamas); map.removeOverlays(Colton); map.removeOverlays(Eagle_Creek); map.removeOverlays(Estacada); map.removeOverlays(Gladstone); map.removeOverlays(Hubbard); map.removeOverlays(Lake_Oswego); map.removeOverlays(Marylhurst); map.removeOverlays(Milwaukie); map.removeOverlays(Molalla); map.removeOverlays(Mt_Angel); map.removeOverlays(Mulino); map.removeOverlays(Oregon_City); map.removeOverlays(Portland); map.removeOverlays(Sandy); map.removeOverlays(Tualatin); map.removeOverlays(West_Linn); map.removeOverlays(Wilsonville); map.addOverlays(Beavercreek); centerByArray(Beavercreek, false, false); cntMarker += Beavercreek.length; map.addOverlays(Boring); centerByArray(Boring, false, false); cntMarker += Boring.length; map.addOverlays(Canby); centerByArray(Canby, false, false); cntMarker += Canby.length; map.addOverlays(Clackamas); centerByArray(Clackamas, false, false); cntMarker += Clackamas.length; map.addOverlays(Colton); centerByArray(Colton, false, false); cntMarker += Colton.length; map.addOverlays(Eagle_Creek); centerByArray(Eagle_Creek, false, false); cntMarker += Eagle_Creek.length; map.addOverlays(Estacada); centerByArray(Estacada, false, false); cntMarker += Estacada.length; map.addOverlays(Gladstone); centerByArray(Gladstone, false, false); cntMarker += Gladstone.length; map.addOverlays(Hubbard); centerByArray(Hubbard, false, false); cntMarker += Hubbard.length; map.addOverlays(Lake_Oswego); centerByArray(Lake_Oswego, false, false); cntMarker += Lake_Oswego.length; map.addOverlays(Marylhurst); centerByArray(Marylhurst, false, false); cntMarker += Marylhurst.length; map.addOverlays(Milwaukie); centerByArray(Milwaukie, false, false); cntMarker += Milwaukie.length; map.addOverlays(Molalla); centerByArray(Molalla, false, false); cntMarker += Molalla.length; map.addOverlays(Mt_Angel); centerByArray(Mt_Angel, false, false); cntMarker += Mt_Angel.length; map.addOverlays(Mulino); centerByArray(Mulino, false, false); cntMarker += Mulino.length; map.addOverlays(Oregon_City); centerByArray(Oregon_City, false, false); cntMarker += Oregon_City.length; map.addOverlays(Portland); centerByArray(Portland, false, false); cntMarker += Portland.length; map.addOverlays(Sandy); centerByArray(Sandy, false, false); cntMarker += Sandy.length; map.addOverlays(Tualatin); centerByArray(Tualatin, false, false); cntMarker += Tualatin.length; map.addOverlays(West_Linn); centerByArray(West_Linn, false, false); cntMarker += West_Linn.length; map.addOverlays(Wilsonville); centerByArray(Wilsonville, false, false); cntMarker += Wilsonville.length; centerByArray(Canby,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'); } }