function addMarkers() { mySelect = document.getElementById('selection'); Eugene = [];Springfield = [];Cottage_Grove = [];Culp_Creek = [];Creswell = [];Dorena = [];Elmira = [];Jasper = [];Junction_City = [];Lorane = [];Lowell = [];Mapleton = [];Marcola = [];Finn_Rock = [];Noti = [];Oakridge = [];Florence = [];Pleasant_Hill = [];Dexter = [];Blachly = [];Veneta = [];Westfir = [];mySelect.options[mySelect.options.length] = new Option("Blachly schools",'all=Blachly'); mySelect.options[mySelect.options.length] = new Option("Cottage Grove schools",'all=Cottage_Grove'); mySelect.options[mySelect.options.length] = new Option("Creswell schools",'all=Creswell'); mySelect.options[mySelect.options.length] = new Option("Culp Creek schools",'all=Culp_Creek'); mySelect.options[mySelect.options.length] = new Option("Dexter schools",'all=Dexter'); mySelect.options[mySelect.options.length] = new Option("Dorena schools",'all=Dorena'); mySelect.options[mySelect.options.length] = new Option("Elmira schools",'all=Elmira'); mySelect.options[mySelect.options.length] = new Option("Eugene schools",'all=Eugene'); mySelect.options[mySelect.options.length] = new Option("Finn Rock schools",'all=Finn_Rock'); mySelect.options[mySelect.options.length] = new Option("Florence schools",'all=Florence'); mySelect.options[mySelect.options.length] = new Option("Jasper schools",'all=Jasper'); mySelect.options[mySelect.options.length] = new Option("Junction City schools",'all=Junction_City'); mySelect.options[mySelect.options.length] = new Option("Lorane schools",'all=Lorane'); mySelect.options[mySelect.options.length] = new Option("Lowell schools",'all=Lowell'); mySelect.options[mySelect.options.length] = new Option("Mapleton schools",'all=Mapleton'); mySelect.options[mySelect.options.length] = new Option("Marcola schools",'all=Marcola'); mySelect.options[mySelect.options.length] = new Option("Noti schools",'all=Noti'); mySelect.options[mySelect.options.length] = new Option("Oakridge schools",'all=Oakridge'); mySelect.options[mySelect.options.length] = new Option("Pleasant Hill schools",'all=Pleasant_Hill'); mySelect.options[mySelect.options.length] = new Option("Springfield schools",'all=Springfield'); mySelect.options[mySelect.options.length] = new Option("Veneta schools",'all=Veneta'); mySelect.options[mySelect.options.length] = new Option("Westfir schools",'all=Westfir'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Eugene[Eugene.length] = createMarker(new GPoint(-123.10760498,44.03536224),"
",iconRd); mySelect.options[mySelect.options.length] = new Option("Adams Elementary School",'Eugene=' + Eugene.length); Springfield[Springfield.length] = createMarker(new GPoint(-122.98098755,44.03896332),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Agnes Stewart Middle School",'Springfield=' + Springfield.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.33522034,43.99054337),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Applegate Elementary School",'Eugene=' + Eugene.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.13822174,44.12416458),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Awbrey Park Elementary School",'Eugene=' + Eugene.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.06400299,44.03953934),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Bertha Holt Elementary School",'Eugene=' + Eugene.length); Cottage_Grove[Cottage_Grove.length] = createMarker(new GPoint(-122.98132200,43.72935300),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Blue Mountain Charter School",'Cottage_Grove=' + Cottage_Grove.length); Cottage_Grove[Cottage_Grove.length] = createMarker(new GPoint(-123.07569122,43.79129410),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Bohemia Elementary School",'Cottage_Grove=' + Cottage_Grove.length); Springfield[Springfield.length] = createMarker(new GPoint(-123.01230621,44.04909515),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Brattain Elementary School",'Springfield=' + Springfield.length); Springfield[Springfield.length] = createMarker(new GPoint(-122.99064636,44.07226181),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Briggs Middle School",'Springfield=' + Springfield.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.08891900,44.04991000),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Buena Vista Spanish Immersion School",'Eugene=' + Eugene.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.08110809,44.09058762),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Cal Young Middle School",'Eugene=' + Eugene.length); Springfield[Springfield.length] = createMarker(new GPoint(-122.87109375,44.08153915),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Camp Creek Elementary School",'Springfield=' + Springfield.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.16783905,44.07860565),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Cascade Middle School",'Eugene=' + Eugene.length); Springfield[Springfield.length] = createMarker(new GPoint(-123.04230499,44.05757141),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Centennial Elementary School",'Springfield=' + Springfield.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.30324554,44.02575684),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Central Elementary School",'Eugene=' + Eugene.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.06400299,44.03953934),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Cesar E Chavez Elementary School",'Eugene=' + Eugene.length); Springfield[Springfield.length] = createMarker(new GPoint(-122.96237946,44.07219696),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Child Center",'Springfield=' + Springfield.length); Culp_Creek[Culp_Creek.length] = createMarker(new GPoint(-122.84427400,43.69821000),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Child's Way Charter School",'Culp_Creek=' + Culp_Creek.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.10836300,44.01016000),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Churchill Alternative High School",'Eugene=' + Eugene.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.17424011,44.08446121),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Clear Lake Elementary School",'Eugene=' + Eugene.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.07218933,44.14471817),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Coburg Elementary School",'Eugene=' + Eugene.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.14274597,44.08786392),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Colin Kelly Middle School",'Eugene=' + Eugene.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.13529205,44.09546280),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Corridor Alternative Elementary School",'Eugene=' + Eugene.length); Cottage_Grove[Cottage_Grove.length] = createMarker(new GPoint(-123.05781555,43.78694153),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Cottage Grove High School",'Cottage_Grove=' + Cottage_Grove.length); Creswell[Creswell.length] = createMarker(new GPoint(-123.02974701,43.91973877),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Creslane Elementary School",'Creswell=' + Creswell.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.11005402,44.01570892),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Crest Drive Elementary School",'Eugene=' + Eugene.length); Creswell[Creswell.length] = createMarker(new GPoint(-123.02793884,43.92626190),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Creswell High School",'Creswell=' + Creswell.length); Creswell[Creswell.length] = createMarker(new GPoint(-123.02611542,43.91776276),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Creswell Middle School",'Creswell=' + Creswell.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.31812286,43.98654175),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Crow Middle/high School",'Eugene=' + Eugene.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.18058014,44.07551575),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Danebo Elementary School",'Eugene=' + Eugene.length); Cottage_Grove[Cottage_Grove.length] = createMarker(new GPoint(-123.03379059,43.83603668),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Delight Valley Elementary School",'Cottage_Grove=' + Cottage_Grove.length); Dorena[Dorena.length] = createMarker(new GPoint(-122.87995911,43.73787308),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Dorena School",'Dorena=' + Dorena.length); Springfield[Springfield.length] = createMarker(new GPoint(-122.97460937,44.03553772),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Douglas Gardens Elementary School",'Springfield=' + Springfield.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.07543945,44.01342392),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Eastside Alternative Elementary School",'Eugene=' + Eugene.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.08515167,44.00470734),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Edgewood Elementary School",'Eugene=' + Eugene.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.07259369,44.03546143),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Edison Elementary School",'Eugene=' + Eugene.length); Springfield[Springfield.length] = createMarker(new GPoint(-123.00650787,44.06993866),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Elizabeth Page Elementary School",'Springfield=' + Springfield.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.07543945,44.01342392),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Ellis Parker Elementary School",'Eugene=' + Eugene.length); Elmira[Elmira.length] = createMarker(new GPoint(-123.35368347,44.07238388),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Elmira Elementary School",'Elmira=' + Elmira.length); Elmira[Elmira.length] = createMarker(new GPoint(-123.35918427,44.07426453),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Elmira High School",'Elmira=' + Elmira.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.08515167,44.00470734),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Evergreen Alternative Elementary School",'Eugene=' + Eugene.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.15073395,44.07023621),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Fairfield Elementary School",'Eugene=' + Eugene.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.11553400,44.04444400),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Family School",'Eugene=' + Eugene.length); Elmira[Elmira.length] = createMarker(new GPoint(-123.35440063,44.06879044),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Fern Ridge Middle School",'Elmira=' + Elmira.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.08168030,43.99940491),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Fox Hollow French Immersion School",'Eugene=' + Eugene.length); Springfield[Springfield.length] = createMarker(new GPoint(-123.01744080,44.04606247),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Gateways Learning Center",'Springfield=' + Springfield.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.07774353,44.10026169),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Gilham Elementary School",'Eugene=' + Eugene.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.00991058,43.99469757),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Goshen Elementary School",'Eugene=' + Eugene.length); Springfield[Springfield.length] = createMarker(new GPoint(-123.03890991,44.07076263),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Guy Lee Elementary School",'Springfield=' + Springfield.length); Springfield[Springfield.length] = createMarker(new GPoint(-123.02241516,44.05640411),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Hamlin Middle School",'Springfield=' + Springfield.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.07574463,44.02546310),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Harris Elementary School",'Eugene=' + Eugene.length); Cottage_Grove[Cottage_Grove.length] = createMarker(new GPoint(-123.05818939,43.78965759),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Harrison Elementary School",'Cottage_Grove=' + Cottage_Grove.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.07364655,44.08019638),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Henry D Sheldon High School",'Eugene=' + Eugene.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.10760498,44.03536224),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Hillside Alternative Elementary School",'Eugene=' + Eugene.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.13938904,44.08786392),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Howard Elementary School",'Eugene=' + Eugene.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.11438751,44.04316711),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Ida Patterson Elementary School",'Eugene=' + Eugene.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.15158844,44.11173630),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Irving Elementary School",'Eugene=' + Eugene.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.12205505,44.11553574),"",iconBl); mySelect.options[mySelect.options.length] = new Option("James Madison Middle School",'Eugene=' + Eugene.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.06658936,44.07596207),"",iconBl); mySelect.options[mySelect.options.length] = new Option("James Monroe Middle School",'Eugene=' + Eugene.length); Jasper[Jasper.length] = createMarker(new GPoint(-122.86248016,43.97287750),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Jasper Mountain Elementary School",'Jasper=' + Jasper.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.15594482,44.03457260),"",iconBl); mySelect.options[mySelect.options.length] = new Option("John F Kennedy Middle School",'Eugene=' + Eugene.length); Junction_City[Junction_City.length] = createMarker(new GPoint(-123.21215820,44.21879578),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Junction City High School",'Junction_City=' + Junction_City.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.06400299,44.03953934),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Kalapuya High School",'Eugene=' + Eugene.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.12791400,44.04139100),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Lane School",'Eugene=' + Eugene.length); Cottage_Grove[Cottage_Grove.length] = createMarker(new GPoint(-123.07284546,43.76524734),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Latham Elementary School",'Cottage_Grove=' + Cottage_Grove.length); Junction_City[Junction_City.length] = createMarker(new GPoint(-123.20841217,44.22602463),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Laurel Elementary School",'Junction_City=' + Junction_City.length); Cottage_Grove[Cottage_Grove.length] = createMarker(new GPoint(-123.06459045,43.78426743),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Lincoln Middle School",'Cottage_Grove=' + Cottage_Grove.length); Cottage_Grove[Cottage_Grove.length] = createMarker(new GPoint(-123.08248138,43.65046310),"",iconRd); mySelect.options[mySelect.options.length] = new Option("London School",'Cottage_Grove=' + Cottage_Grove.length); Lorane[Lorane.length] = createMarker(new GPoint(-123.24027252,43.83822250),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Lorane Elementary School",'Lorane=' + Lorane.length); Lowell[Lowell.length] = createMarker(new GPoint(-122.78050232,43.91740036),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Lowell Junior/senior High School",'Lowell=' + Lowell.length); Lowell[Lowell.length] = createMarker(new GPoint(-122.78050232,43.91740036),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Lundy Elementary School",'Lowell=' + Lowell.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.11720276,44.03546143),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Magnet Arts Alternative Elementary School",'Eugene=' + Eugene.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.16075897,44.07646179),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Malabon Elementary School",'Eugene=' + Eugene.length); Springfield[Springfield.length] = createMarker(new GPoint(-122.99403381,44.05496216),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Maple Elementary School",'Springfield=' + Springfield.length); Mapleton[Mapleton.length] = createMarker(new GPoint(-123.89060211,44.01129913),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Mapleton Elementary School",'Mapleton=' + Mapleton.length); Mapleton[Mapleton.length] = createMarker(new GPoint(-123.89060211,44.01129913),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Mapleton Senior High School",'Mapleton=' + Mapleton.length); Marcola[Marcola.length] = createMarker(new GPoint(-122.79519653,44.21099854),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Marcola Elementary School",'Marcola=' + Marcola.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.14359283,44.03847122),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Mccornack Elementary School",'Eugene=' + Eugene.length); Finn_Rock[Finn_Rock.length] = createMarker(new GPoint(-122.34490967,44.15626526),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Mckenzie High School",'Finn_Rock=' + Finn_Rock.length); Finn_Rock[Finn_Rock.length] = createMarker(new GPoint(-122.38147700,44.12793500),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Mckenzie Middle School",'Finn_Rock=' + Finn_Rock.length); Finn_Rock[Finn_Rock.length] = createMarker(new GPoint(-122.34490967,44.15626526),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Mckenzie River Elementary School",'Finn_Rock=' + Finn_Rock.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.20320892,44.08274078),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Meadow View School",'Eugene=' + Eugene.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.07639313,44.07849121),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Meadowlark Elementary School",'Eugene=' + Eugene.length); Springfield[Springfield.length] = createMarker(new GPoint(-123.01959229,44.05887604),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Moffitt Elementary School",'Springfield=' + Springfield.length); Springfield[Springfield.length] = createMarker(new GPoint(-122.91196442,44.14183807),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Mohawk Elementary School",'Springfield=' + Springfield.length); Marcola[Marcola.length] = createMarker(new GPoint(-122.85360718,44.17136383),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Mohawk Jr/sr High School",'Marcola=' + Marcola.length); Springfield[Springfield.length] = createMarker(new GPoint(-122.96601105,44.03596497),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Mt Vernon Elementary School",'Springfield=' + Springfield.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.06400299,44.03953934),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Network Charter School",'Eugene=' + Eugene.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.13198853,44.09546280),"",iconGr); mySelect.options[mySelect.options.length] = new Option("North Eugene Alternative School",'Eugene=' + Eugene.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.13198853,44.09546280),"",iconGr); mySelect.options[mySelect.options.length] = new Option("North Eugene High School",'Eugene=' + Eugene.length); Noti[Noti.length] = createMarker(new GPoint(-123.44750977,44.06032181),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Noti Elementary School",'Noti=' + Noti.length); Junction_City[Junction_City.length] = createMarker(new GPoint(-123.21408844,44.22664642),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Oaklea Middle School",'Junction_City=' + Junction_City.length); Oakridge[Oakridge.length] = createMarker(new GPoint(-122.46380615,43.74813843),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Oakridge Elementary School",'Oakridge=' + Oakridge.length); Oakridge[Oakridge.length] = createMarker(new GPoint(-122.46896362,43.74829102),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Oakridge High School",'Oakridge=' + Oakridge.length); Florence[Florence.length] = createMarker(new GPoint(-124.11133575,43.95513535),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Ocean Dunes High School",'Florence=' + Florence.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.09204865,44.01916885),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Opportunity Center",'Eugene=' + Eugene.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.11749268,44.04646301),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Pioneer Youth Corps Academy",'Eugene=' + Eugene.length); Pleasant_Hill[Pleasant_Hill.length] = createMarker(new GPoint(-122.91874695,43.96152115),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Pleasant Hill Elementary School",'Pleasant_Hill=' + Pleasant_Hill.length); Pleasant_Hill[Pleasant_Hill.length] = createMarker(new GPoint(-122.91874695,43.96152115),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Pleasant Hill High School",'Pleasant_Hill=' + Pleasant_Hill.length); Pleasant_Hill[Pleasant_Hill.length] = createMarker(new GPoint(-122.91874695,43.96152115),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Pleasant Hill Junior High School",'Pleasant_Hill=' + Pleasant_Hill.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.19098663,44.07024384),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Prairie Mountain School",'Eugene=' + Eugene.length); Florence[Florence.length] = createMarker(new GPoint(-124.10403442,43.98545074),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Rhododendron Elementary School",'Florence=' + Florence.length); Florence[Florence.length] = createMarker(new GPoint(-124.10408783,43.98611069),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Rhododendron Primary School",'Florence=' + Florence.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.09680939,44.02661514),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Ridgeline Montessori",'Eugene=' + Eugene.length); Springfield[Springfield.length] = createMarker(new GPoint(-122.91088867,44.05003738),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Ridgeview Elementary School",'Springfield=' + Springfield.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.12297058,44.07882309),"",iconRd); mySelect.options[mySelect.options.length] = new Option("River Road Elementary School",'Eugene=' + Eugene.length); Springfield[Springfield.length] = createMarker(new GPoint(-122.94278717,44.04798508),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Riverbend Elementary School",'Springfield=' + Springfield.length); Springfield[Springfield.length] = createMarker(new GPoint(-123.02547455,44.05001831),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Safe Center",'Springfield=' + Springfield.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.13097382,44.10312271),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Santa Clara Elementary School",'Eugene=' + Eugene.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.17444611,44.08446121),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Shasta Middle School",'Eugene=' + Eugene.length); Florence[Florence.length] = createMarker(new GPoint(-124.10408783,43.99239731),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Siuslaw High School",'Florence=' + Florence.length); Florence[Florence.length] = createMarker(new GPoint(-124.10100555,43.97300720),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Siuslaw Middle School",'Florence=' + Florence.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.08650970,44.03876114),"",iconGr); mySelect.options[mySelect.options.length] = new Option("South Eugene High School",'Eugene=' + Eugene.length); Cottage_Grove[Cottage_Grove.length] = createMarker(new GPoint(-123.04290009,43.75889969),"",iconGr); mySelect.options[mySelect.options.length] = new Option("South Lane Academy",'Cottage_Grove=' + Cottage_Grove.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.08600616,44.00816345),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Spencer Butte Middle School",'Eugene=' + Eugene.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.14463043,44.11556244),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Spring Creek Elementary School",'Eugene=' + Eugene.length); Springfield[Springfield.length] = createMarker(new GPoint(-123.01660919,44.05302048),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Springfield High School",'Springfield=' + Springfield.length); Springfield[Springfield.length] = createMarker(new GPoint(-123.01094818,44.05243683),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Springfield Middle School",'Springfield=' + Springfield.length); Junction_City[Junction_City.length] = createMarker(new GPoint(-123.31420898,44.17234039),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Territorial Elementary School",'Junction_City=' + Junction_City.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.08245087,44.03336334),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Theodore Roosevelt Middle School",'Eugene=' + Eugene.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.11720276,44.03546143),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Thomas Jefferson Middle School",'Eugene=' + Eugene.length); Springfield[Springfield.length] = createMarker(new GPoint(-122.89601135,44.05175400),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Thurston Elementary School",'Springfield=' + Springfield.length); Springfield[Springfield.length] = createMarker(new GPoint(-122.92610931,44.04803085),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Thurston High School",'Springfield=' + Springfield.length); Springfield[Springfield.length] = createMarker(new GPoint(-122.91728973,44.05322266),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Thurston Middle School",'Springfield=' + Springfield.length); Dexter[Dexter.length] = createMarker(new GPoint(-122.85639954,43.94126892),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Trent Primary School",'Dexter=' + Dexter.length); Blachly[Blachly.length] = createMarker(new GPoint(-123.54592133,44.19589233),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Triangle Lake School",'Blachly=' + Blachly.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.17465210,43.99315262),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Twin Oaks Elementary School",'Eugene=' + Eugene.length); Veneta[Veneta.length] = createMarker(new GPoint(-123.35137939,44.04993439),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Veneta Elementary School",'Veneta=' + Veneta.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.08831787,44.01707840),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Village School",'Eugene=' + Eugene.length); Springfield[Springfield.length] = createMarker(new GPoint(-122.76484680,44.07719803),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Walterville Elementary School",'Springfield=' + Springfield.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.05579376,44.06986237),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Washington Elementary School",'Eugene=' + Eugene.length); Elmira[Elmira.length] = createMarker(new GPoint(-123.37550354,44.09130096),"",iconGr); mySelect.options[mySelect.options.length] = new Option("West Lane Technology Learning Center",'Elmira=' + Elmira.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.12770844,44.04144669),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Westmoreland Elementary School",'Eugene=' + Eugene.length); Westfir[Westfir.length] = createMarker(new GPoint(-122.53000641,43.75722504),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Westridge Middle School",'Westfir=' + Westfir.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.10018158,44.07191849),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Willagillespie Elementary School",'Eugene=' + Eugene.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.06217957,44.08183670),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Willakenzie Elementary School",'Eugene=' + Eugene.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.16790771,44.08184433),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Willamette High School",'Eugene=' + Eugene.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.06400299,44.03953934),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Willamette Leadership Academy",'Eugene=' + Eugene.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.14868164,44.03993988),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Winston Churchill High School",'Eugene=' + Eugene.length); Springfield[Springfield.length] = createMarker(new GPoint(-122.99066925,44.07253647),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Yolanda Elementary School",'Springfield=' + Springfield.length); Eugene[Eugene.length] = createMarker(new GPoint(-123.13529205,44.09546280),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Yujin Gakuen (japanese) School",'Eugene=' + Eugene.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(Blachly); map.removeOverlays(Cottage_Grove); map.removeOverlays(Creswell); map.removeOverlays(Culp_Creek); map.removeOverlays(Dexter); map.removeOverlays(Dorena); map.removeOverlays(Elmira); map.removeOverlays(Eugene); map.removeOverlays(Finn_Rock); map.removeOverlays(Florence); map.removeOverlays(Jasper); map.removeOverlays(Junction_City); map.removeOverlays(Lorane); map.removeOverlays(Lowell); map.removeOverlays(Mapleton); map.removeOverlays(Marcola); map.removeOverlays(Noti); map.removeOverlays(Oakridge); map.removeOverlays(Pleasant_Hill); map.removeOverlays(Springfield); map.removeOverlays(Veneta); map.removeOverlays(Westfir); 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(Eugene);map.removeOverlays(Blachly); map.removeOverlays(Cottage_Grove); map.removeOverlays(Creswell); map.removeOverlays(Culp_Creek); map.removeOverlays(Dexter); map.removeOverlays(Dorena); map.removeOverlays(Elmira); map.removeOverlays(Eugene); map.removeOverlays(Finn_Rock); map.removeOverlays(Florence); map.removeOverlays(Jasper); map.removeOverlays(Junction_City); map.removeOverlays(Lorane); map.removeOverlays(Lowell); map.removeOverlays(Mapleton); map.removeOverlays(Marcola); map.removeOverlays(Noti); map.removeOverlays(Oakridge); map.removeOverlays(Pleasant_Hill); map.removeOverlays(Springfield); map.removeOverlays(Veneta); map.removeOverlays(Westfir); map.addOverlays(Blachly); centerByArray(Blachly, false, false); cntMarker += Blachly.length; map.addOverlays(Cottage_Grove); centerByArray(Cottage_Grove, false, false); cntMarker += Cottage_Grove.length; map.addOverlays(Creswell); centerByArray(Creswell, false, false); cntMarker += Creswell.length; map.addOverlays(Culp_Creek); centerByArray(Culp_Creek, false, false); cntMarker += Culp_Creek.length; map.addOverlays(Dexter); centerByArray(Dexter, false, false); cntMarker += Dexter.length; map.addOverlays(Dorena); centerByArray(Dorena, false, false); cntMarker += Dorena.length; map.addOverlays(Elmira); centerByArray(Elmira, false, false); cntMarker += Elmira.length; map.addOverlays(Eugene); centerByArray(Eugene, false, false); cntMarker += Eugene.length; map.addOverlays(Finn_Rock); centerByArray(Finn_Rock, false, false); cntMarker += Finn_Rock.length; map.addOverlays(Florence); centerByArray(Florence, false, false); cntMarker += Florence.length; map.addOverlays(Jasper); centerByArray(Jasper, false, false); cntMarker += Jasper.length; map.addOverlays(Junction_City); centerByArray(Junction_City, false, false); cntMarker += Junction_City.length; map.addOverlays(Lorane); centerByArray(Lorane, false, false); cntMarker += Lorane.length; map.addOverlays(Lowell); centerByArray(Lowell, false, false); cntMarker += Lowell.length; map.addOverlays(Mapleton); centerByArray(Mapleton, false, false); cntMarker += Mapleton.length; map.addOverlays(Marcola); centerByArray(Marcola, false, false); cntMarker += Marcola.length; map.addOverlays(Noti); centerByArray(Noti, false, false); cntMarker += Noti.length; map.addOverlays(Oakridge); centerByArray(Oakridge, false, false); cntMarker += Oakridge.length; map.addOverlays(Pleasant_Hill); centerByArray(Pleasant_Hill, false, false); cntMarker += Pleasant_Hill.length; map.addOverlays(Springfield); centerByArray(Springfield, false, false); cntMarker += Springfield.length; map.addOverlays(Veneta); centerByArray(Veneta, false, false); cntMarker += Veneta.length; map.addOverlays(Westfir); centerByArray(Westfir, false, false); cntMarker += Westfir.length; centerByArray(Eugene,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'); } }