function addMarkers()
{
mySelect = document.getElementById('selection');
Vancouver = [];Battle_Ground = [];Camas = [];Washougal = [];Woodland = [];Brush_Prairie = [];La_Center = [];Ridgefield = [];_Yacolt_Rd = [];mySelect.options[mySelect.options.length] = new Option("Battle Ground schools",'all=Battle_Ground');
mySelect.options[mySelect.options.length] = new Option("Brush Prairie schools",'all=Brush_Prairie');
mySelect.options[mySelect.options.length] = new Option("Camas schools",'all=Camas');
mySelect.options[mySelect.options.length] = new Option("La Center schools",'all=La_Center');
mySelect.options[mySelect.options.length] = new Option("Ridgefield schools",'all=Ridgefield');
mySelect.options[mySelect.options.length] = new Option("Vancouver schools",'all=Vancouver');
mySelect.options[mySelect.options.length] = new Option("Washougal schools",'all=Washougal');
mySelect.options[mySelect.options.length] = new Option("Woodland schools",'all=Woodland');
mySelect.options[mySelect.options.length] = new Option(" Yacolt Rd schools",'all=_Yacolt_Rd');
mySelect.options[mySelect.options.length] = new Option("---------------------------",'');
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.69298553,45.72369766),"
",iconBl);
mySelect.options[mySelect.options.length] = new Option("Alki Middle School",'Vancouver=' + Vancouver.length);
Battle_Ground[Battle_Ground.length] = createMarker(new GPoint(-122.44622040,45.91367722),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Amboy Middle School",'Battle_Ground=' + Battle_Ground.length);
Battle_Ground[Battle_Ground.length] = createMarker(new GPoint(-122.54079437,45.78093719),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Battle Ground High School",'Battle_Ground=' + Battle_Ground.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.67749786,45.66045761),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Benjamin Franklin Elementary School",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.52210236,45.65726471),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Burnt Bridge Creek Elementary School",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.52788544,45.64286423),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Burton Elementary School",'Vancouver=' + Vancouver.length);
Battle_Ground[Battle_Ground.length] = createMarker(new GPoint(-122.51898193,45.75328064),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Cam Jr Senior High School",'Battle_Ground=' + Battle_Ground.length);
Camas[Camas.length] = createMarker(new GPoint(-122.40310669,45.59125137),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Camas High School",'Camas=' + Camas.length);
Battle_Ground[Battle_Ground.length] = createMarker(new GPoint(-122.54399872,45.78854752),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Captain Strong Elementary School",'Battle_Ground=' + Battle_Ground.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.52960205,45.63583755),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Cascade Middle School",'Vancouver=' + Vancouver.length);
Battle_Ground[Battle_Ground.length] = createMarker(new GPoint(-122.54423523,45.78758240),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Chief Umtuch Primary",'Battle_Ground=' + Battle_Ground.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.69334412,45.72397614),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Chinook Elementary School",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.67619324,45.62973785),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Clark Co Detention Center",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.54777527,45.64303589),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Clark County Vocational Skills Center",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.67859650,45.69303513),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Columbia River High School",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-10.00000000,10.00000000),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Columbia Valley Elementary School",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.55800629,45.66743469),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Covington Middle School",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.53968048,45.61606216),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Crestline Elementary School",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.66400146,45.65123749),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Discovery Middle School",'Vancouver=' + Vancouver.length);
Camas[Camas.length] = createMarker(new GPoint(-122.42959595,45.59744644),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Dorothy Fox Elementary School",'Camas=' + Camas.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.67930603,45.68864059),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Dwight D Eisenhower Elementary School",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.52445221,45.64286423),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Early Childhood Center",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.67288208,45.62435913),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Early Childhood Education Center",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.56120300,45.61795044),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Ellsworth Elementary School",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.52573395,45.63583755),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Evergreen High School",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.52573395,45.63583755),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Evergreen Internet Academy",'Vancouver=' + Vancouver.length);
Washougal[Washougal.length] = createMarker(new GPoint(-122.32699585,45.58654404),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Excelsior High School",'Washougal=' + Washougal.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.69926453,45.70738602),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Felida Elementary School",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.62879944,45.64252090),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Fir Grove Childrens Center",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.54959106,45.62816238),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Fircrest Elementary School",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.48624420,45.59416962),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Fishers Landing Elementary School",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.61498260,45.63527679),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Fort Vancouver High School",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.50209808,45.67778397),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Frontier Middle School",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.69223785,45.64559555),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Fruit Valley Elementary School",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.63959503,45.69333649),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Gaiser Middle School",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.62652588,45.64237595),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Gate Work Study Program High School",'Vancouver=' + Vancouver.length);
Washougal[Washougal.length] = createMarker(new GPoint(-122.33200073,45.58464050),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Gause Elementary School",'Washougal=' + Washougal.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.62597400,45.64314600),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Ged/re-entry Program",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.60552216,45.62177277),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("George C Marshall Elementary School",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.57283020,45.71883011),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Glenwood Heights Prim Elementary School",'Vancouver=' + Vancouver.length);
Woodland[Woodland.length] = createMarker(new GPoint(-122.53950500,45.94846725),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Green Mountain School",'Woodland=' + Woodland.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.49370575,45.63589478),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Harmony Elementary School",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.63686371,45.62604904),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Harney Elementary School",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.62859344,45.65465546),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Harry S Truman Elementary School",'Vancouver=' + Vancouver.length);
Washougal[Washougal.length] = createMarker(new GPoint(-122.34640503,45.58159637),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Hathaway Elementary School",'Washougal=' + Washougal.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.66622925,45.67256165),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Hazel Dell Elementary School",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.52750397,45.62784576),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Hearthwood Elementary School",'Vancouver=' + Vancouver.length);
Camas[Camas.length] = createMarker(new GPoint(-122.40310669,45.59321976),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Helen Baller Elementary School",'Camas=' + Camas.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.53913879,45.67953873),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Heritage High School",'Vancouver=' + Vancouver.length);
Brush_Prairie[Brush_Prairie.length] = createMarker(new GPoint(-122.46850586,45.74114227),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Hockinson Heights Intermediate",'Brush_Prairie=' + Brush_Prairie.length);
Brush_Prairie[Brush_Prairie.length] = createMarker(new GPoint(-122.46779633,45.74114227),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Hockinson Heights Primary",'Brush_Prairie=' + Brush_Prairie.length);
Brush_Prairie[Brush_Prairie.length] = createMarker(new GPoint(-122.48660278,45.73527527),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Hockinson High School",'Brush_Prairie=' + Brush_Prairie.length);
Brush_Prairie[Brush_Prairie.length] = createMarker(new GPoint(-122.48690796,45.73784256),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Hockinson Middle School",'Brush_Prairie=' + Brush_Prairie.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.67288208,45.62435913),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Home Choice Academy",'Vancouver=' + Vancouver.length);
Battle_Ground[Battle_Ground.length] = createMarker(new GPoint(-122.40760040,45.59526062),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Homelink River",'Battle_Ground=' + Battle_Ground.length);
Battle_Ground[Battle_Ground.length] = createMarker(new GPoint(-122.54521179,45.79156113),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Homelink Schools Elementary School",'Battle_Ground=' + Battle_Ground.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.67499542,45.63573837),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Hough Elementary School",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.64768400,45.64152500),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Hudson's Bay High School",'Vancouver=' + Vancouver.length);
Camas[Camas.length] = createMarker(new GPoint(-122.47390747,45.62116241),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Illahee Elementary School",'Camas=' + Camas.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.54779816,45.65383911),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Image Elementary School",'Vancouver=' + Vancouver.length);
Camas[Camas.length] = createMarker(new GPoint(-122.40279388,45.59523773),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("James David Zellerbach Elementary School",'Camas=' + Camas.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.67979431,45.68383789),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Jason Lee Middle School",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.70252500,45.70722200),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Jefferson Middle School",'Vancouver=' + Vancouver.length);
Washougal[Washougal.length] = createMarker(new GPoint(-122.30908966,45.57386017),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Jemtegaard Middle School",'Washougal=' + Washougal.length);
La_Center[La_Center.length] = createMarker(new GPoint(-122.65936279,45.86469269),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("La Center High School",'La_Center=' + La_Center.length);
Camas[Camas.length] = createMarker(new GPoint(-122.40399933,45.61391068),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Lacamas Heights Elementary School",'Camas=' + Camas.length);
La_Center[La_Center.length] = createMarker(new GPoint(-122.66407776,45.86216354),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Lacenter Elementary School",'La_Center=' + La_Center.length);
La_Center[La_Center.length] = createMarker(new GPoint(-122.66407776,45.86216354),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Lacenter Middle School",'La_Center=' + La_Center.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.69290924,45.68879700),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Lake Shore Elementary School",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.57300568,45.71968079),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Laurin Middle School",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.53050232,45.63887024),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Legacy High School",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.53050232,45.63887024),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Legacy Home School",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.62176514,45.64268112),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Lewis And Clark High School",'Vancouver=' + Vancouver.length);
Battle_Ground[Battle_Ground.length] = createMarker(new GPoint(-122.54441071,45.78370285),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Lewisville Middle School",'Battle_Ground=' + Battle_Ground.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.67499542,45.65224838),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Lincoln Elementary School",'Vancouver=' + Vancouver.length);
Battle_Ground[Battle_Ground.length] = createMarker(new GPoint(-122.54417419,45.76643753),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Maple Grove Middle School",'Battle_Ground=' + Battle_Ground.length);
Battle_Ground[Battle_Ground.length] = createMarker(new GPoint(-122.54417419,45.76643753),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Maple Grove Primary",'Battle_Ground=' + Battle_Ground.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.56919861,45.63176346),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Marrion Elementary School",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.62054443,45.63076782),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Martin Luther King Elementary School",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.61122131,45.62345886),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Mcloughlin Middle School",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.50449371,45.61916351),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Mill Plain Elementary School",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.63769531,45.63599014),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Minnehaha Elementary School",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.51721954,45.61117554),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Mountain View High School",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.58425800,45.62044800),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Nierenberg Center",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.55279541,45.67346191),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Orchards Elementary School",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.49550629,45.63762665),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Pacific Middle School",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.59191132,45.64280701),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Peter S Ogden Elementary School",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.50209808,45.67509460),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Pioneer Elementary School",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.62069702,45.72595978),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Pleasant Valley Middle School",'Vancouver=' + Vancouver.length);
Battle_Ground[Battle_Ground.length] = createMarker(new GPoint(-122.62069702,45.72595978),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Pleasant Valley Primary",'Battle_Ground=' + Battle_Ground.length);
Battle_Ground[Battle_Ground.length] = createMarker(new GPoint(-122.55248260,45.72658157),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Prairie High School",'Battle_Ground=' + Battle_Ground.length);
Battle_Ground[Battle_Ground.length] = createMarker(new GPoint(-122.53951263,45.78097153),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Preschool Infant Other",'Battle_Ground=' + Battle_Ground.length);
Camas[Camas.length] = createMarker(new GPoint(-122.40310669,45.59125137),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Prune Hill Elementary School",'Camas=' + Camas.length);
Ridgefield[Ridgefield.length] = createMarker(new GPoint(-122.71762848,45.79719925),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Ridgefield High School",'Ridgefield=' + Ridgefield.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.54154968,45.60711670),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Riverview Elementary School",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.62844086,45.64263153),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Roosevelt Elementary School",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.66480255,45.70209885),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Sacajawea Elementary School",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.65559387,45.71446228),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Salmon Creek Elementary School",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.64865875,45.69656372),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Sarah J Anderson Elementary School",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.47578430,45.61797333),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Shahala Middle School",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.53140259,45.67585373),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Sifton Elementary School",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.56600189,45.68443680),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Silver Star Elementary School",'Vancouver=' + Vancouver.length);
Camas[Camas.length] = createMarker(new GPoint(-122.44729614,45.61810684),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Skyridge Middle School",'Camas=' + Camas.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.68465424,45.72183990),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Skyview High School",'Vancouver=' + Vancouver.length);
Ridgefield[Ridgefield.length] = createMarker(new GPoint(-122.67408752,45.76523590),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("South Ridge Elementary School",'Ridgefield=' + Ridgefield.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.52210236,45.65726471),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Special Services School",'Vancouver=' + Vancouver.length);
Battle_Ground[Battle_Ground.length] = createMarker(new GPoint(-122.47699738,45.73400116),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Summit View High School",'Battle_Ground=' + Battle_Ground.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.58097839,45.69022751),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Sunset Elementary School",'Vancouver=' + Vancouver.length);
Ridgefield[Ridgefield.length] = createMarker(new GPoint(-122.74131012,45.81538010),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Union Ridge Elementary School",'Ridgefield=' + Ridgefield.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.62586900,45.64240400),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Vancouver Home Connection",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.66934967,45.64398956),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Vancouver School Of Arts And Academics",'Vancouver=' + Vancouver.length);
Ridgefield[Ridgefield.length] = createMarker(new GPoint(-122.66606903,45.81243515),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("View Ridge Middle School",'Ridgefield=' + Ridgefield.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.59920502,45.66653442),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Walnut Grove Elementary School",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.64809418,45.63040924),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Wash State School For Blind",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.65179443,45.64227295),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Washington Elementary School",'Vancouver=' + Vancouver.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.64040375,45.62504959),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Washington State School For Deaf",'Vancouver=' + Vancouver.length);
Washougal[Washougal.length] = createMarker(new GPoint(-122.32709503,45.58489990),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Washougal High School",'Washougal=' + Washougal.length);
Washougal[Washougal.length] = createMarker(new GPoint(-122.34741211,45.57856750),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Washougal Special Services Elementary School",'Washougal=' + Washougal.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.53269196,45.61195755),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Wyeast Middle School",'Vancouver=' + Vancouver.length);
_Yacolt_Rd[_Yacolt_Rd.length] = createMarker(new GPoint(-122.41095734,45.86693573),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Yacolt Primary",'_Yacolt_Rd=' + _Yacolt_Rd.length);
Vancouver[Vancouver.length] = createMarker(new GPoint(-122.67288208,45.62435913),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("York Elementary School",'Vancouver=' + Vancouver.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(Battle_Ground);
map.removeOverlays(Brush_Prairie);
map.removeOverlays(Camas);
map.removeOverlays(La_Center);
map.removeOverlays(Ridgefield);
map.removeOverlays(Vancouver);
map.removeOverlays(Washougal);
map.removeOverlays(Woodland);
map.removeOverlays(_Yacolt_Rd);
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(Vancouver);map.removeOverlays(Battle_Ground);
map.removeOverlays(Brush_Prairie);
map.removeOverlays(Camas);
map.removeOverlays(La_Center);
map.removeOverlays(Ridgefield);
map.removeOverlays(Vancouver);
map.removeOverlays(Washougal);
map.removeOverlays(Woodland);
map.removeOverlays(_Yacolt_Rd);
map.addOverlays(Battle_Ground);
centerByArray(Battle_Ground, false, false);
cntMarker += Battle_Ground.length;
map.addOverlays(Brush_Prairie);
centerByArray(Brush_Prairie, false, false);
cntMarker += Brush_Prairie.length;
map.addOverlays(Camas);
centerByArray(Camas, false, false);
cntMarker += Camas.length;
map.addOverlays(La_Center);
centerByArray(La_Center, false, false);
cntMarker += La_Center.length;
map.addOverlays(Ridgefield);
centerByArray(Ridgefield, false, false);
cntMarker += Ridgefield.length;
map.addOverlays(Vancouver);
centerByArray(Vancouver, false, false);
cntMarker += Vancouver.length;
map.addOverlays(Washougal);
centerByArray(Washougal, false, false);
cntMarker += Washougal.length;
map.addOverlays(Woodland);
centerByArray(Woodland, false, false);
cntMarker += Woodland.length;
map.addOverlays(_Yacolt_Rd);
centerByArray(_Yacolt_Rd, false, false);
cntMarker += _Yacolt_Rd.length;
centerByArray(Vancouver,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');
}
}