function addMarkers() { mySelect = document.getElementById('selection'); Alpine = [];Orem = [];Lindon = [];Provo = [];American_Fork = [];Spanish_Fork = [];Springville = [];Payson = [];Cedar_Hills = [];Cedar_Fort = [];Pleasant_Grove = [];Eagle_Mountain = [];Lehi = [];Highland = [];Goshen = [];Mapleton = [];Salem = [];Santaquin = [];Saratoga_Springs = [];Sundance = [];Vineyard = [];mySelect.options[mySelect.options.length] = new Option("Alpine schools",'all=Alpine'); mySelect.options[mySelect.options.length] = new Option("American Fork schools",'all=American_Fork'); mySelect.options[mySelect.options.length] = new Option("Cedar Fort schools",'all=Cedar_Fort'); mySelect.options[mySelect.options.length] = new Option("Cedar Hills schools",'all=Cedar_Hills'); mySelect.options[mySelect.options.length] = new Option("Eagle Mountain schools",'all=Eagle_Mountain'); mySelect.options[mySelect.options.length] = new Option("Goshen schools",'all=Goshen'); mySelect.options[mySelect.options.length] = new Option("Highland schools",'all=Highland'); mySelect.options[mySelect.options.length] = new Option("Lehi schools",'all=Lehi'); mySelect.options[mySelect.options.length] = new Option("Lindon schools",'all=Lindon'); mySelect.options[mySelect.options.length] = new Option("Mapleton schools",'all=Mapleton'); mySelect.options[mySelect.options.length] = new Option("Orem schools",'all=Orem'); mySelect.options[mySelect.options.length] = new Option("Payson schools",'all=Payson'); mySelect.options[mySelect.options.length] = new Option("Pleasant Grove schools",'all=Pleasant_Grove'); mySelect.options[mySelect.options.length] = new Option("Provo schools",'all=Provo'); mySelect.options[mySelect.options.length] = new Option("Salem schools",'all=Salem'); mySelect.options[mySelect.options.length] = new Option("Santaquin schools",'all=Santaquin'); mySelect.options[mySelect.options.length] = new Option("Saratoga Springs schools",'all=Saratoga_Springs'); mySelect.options[mySelect.options.length] = new Option("Spanish Fork schools",'all=Spanish_Fork'); mySelect.options[mySelect.options.length] = new Option("Springville schools",'all=Springville'); mySelect.options[mySelect.options.length] = new Option("Sundance schools",'all=Sundance'); mySelect.options[mySelect.options.length] = new Option("Vineyard schools",'all=Vineyard'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Alpine[Alpine.length] = createMarker(new GPoint(-111.77105713,40.45703888),"
",iconRd); mySelect.options[mySelect.options.length] = new Option("Alpine Elementary School",'Alpine=' + Alpine.length); Orem[Orem.length] = createMarker(new GPoint(-111.72296143,40.28237152),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Alpine Life & Learning Center",'Orem=' + Orem.length); Lindon[Lindon.length] = createMarker(new GPoint(-111.72203064,40.34395599),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Alpine Transition & Employ Center",'Lindon=' + Lindon.length); Provo[Provo.length] = createMarker(new GPoint(-111.70539856,40.23086166),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Amelia Earhart Elementary School",'Provo=' + Provo.length); American_Fork[American_Fork.length] = createMarker(new GPoint(-111.78223419,40.38703156),"",iconGr); mySelect.options[mySelect.options.length] = new Option("American Fork High School",'American_Fork=' + American_Fork.length); American_Fork[American_Fork.length] = createMarker(new GPoint(-111.79989624,40.39939880),"",iconBl); mySelect.options[mySelect.options.length] = new Option("American Fork Junior High School",'American_Fork=' + American_Fork.length); Spanish_Fork[Spanish_Fork.length] = createMarker(new GPoint(-111.63913100,40.09523000),"",iconGr); mySelect.options[mySelect.options.length] = new Option("American Leadership Academy",'Spanish_Fork=' + Spanish_Fork.length); Springville[Springville.length] = createMarker(new GPoint(-111.59397888,40.16843414),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Art City Elementary School",'Springville=' + Springville.length); Orem[Orem.length] = createMarker(new GPoint(-111.71890259,40.33356476),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Aspen Elementary School",'Orem=' + Orem.length); Orem[Orem.length] = createMarker(new GPoint(-111.73323000,40.27853300),"",iconGr); mySelect.options[mySelect.options.length] = new Option("At Risk-summit Jr High School",'Orem=' + Orem.length); Payson[Payson.length] = createMarker(new GPoint(-111.72807312,40.04873657),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Barnett Elementary School",'Payson=' + Payson.length); American_Fork[American_Fork.length] = createMarker(new GPoint(-111.77293396,40.38000488),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Barratt Elementary School",'American_Fork=' + American_Fork.length); Spanish_Fork[Spanish_Fork.length] = createMarker(new GPoint(-111.65983200,40.11116100),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Birdseye Group Home",'Spanish_Fork=' + Spanish_Fork.length); Orem[Orem.length] = createMarker(new GPoint(-111.69288635,40.29710007),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Bonneville Elementary School",'Orem=' + Orem.length); Spanish_Fork[Spanish_Fork.length] = createMarker(new GPoint(-111.66046143,40.11648178),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Brockbank Elementary School",'Spanish_Fork=' + Spanish_Fork.length); Springville[Springville.length] = createMarker(new GPoint(-111.59734344,40.16086197),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Brookside Elementary School",'Springville=' + Springville.length); Provo[Provo.length] = createMarker(new GPoint(-111.65323639,40.29552460),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Canyon Crest Elementary School",'Provo=' + Provo.length); Spanish_Fork[Spanish_Fork.length] = createMarker(new GPoint(-111.62948608,40.09310913),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Canyon Elementary School",'Spanish_Fork=' + Spanish_Fork.length); Orem[Orem.length] = createMarker(new GPoint(-111.68088400,40.31477600),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Canyon View Junior High School",'Orem=' + Orem.length); Orem[Orem.length] = createMarker(new GPoint(-111.67631531,40.30010223),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Cascade Elementary School",'Orem=' + Orem.length); Cedar_Hills[Cedar_Hills.length] = createMarker(new GPoint(-111.76644135,40.41529465),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Cedar Ridge Elementary School",'Cedar_Hills=' + Cedar_Hills.length); Cedar_Fort[Cedar_Fort.length] = createMarker(new GPoint(-112.10546875,40.32706451),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Cedar Valley Elementary School",'Cedar_Fort=' + Cedar_Fort.length); Provo[Provo.length] = createMarker(new GPoint(-111.65284729,40.26441574),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Centennial Middle School",'Provo=' + Provo.length); Provo[Provo.length] = createMarker(new GPoint(-111.65369415,40.26392365),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Center For High School Studies",'Provo=' + Provo.length); Pleasant_Grove[Pleasant_Grove.length] = createMarker(new GPoint(-111.73337555,40.36492920),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Central Elementary School",'Pleasant_Grove=' + Pleasant_Grove.length); Orem[Orem.length] = createMarker(new GPoint(-111.68860626,40.26706696),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Cherry Hill Elementary School",'Orem=' + Orem.length); American_Fork[American_Fork.length] = createMarker(new GPoint(-111.76927948,40.37995911),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Dan W Peterson School",'American_Fork=' + American_Fork.length); Cedar_Hills[Cedar_Hills.length] = createMarker(new GPoint(-111.76274872,40.40636444),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Deerfield Elementary School",'Cedar_Hills=' + Cedar_Hills.length); Provo[Provo.length] = createMarker(new GPoint(-111.67185211,40.23663712),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Dixon Middle School",'Provo=' + Provo.length); Eagle_Mountain[Eagle_Mountain.length] = createMarker(new GPoint(-112.01072800,40.31240100),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Eagle Valley School",'Eagle_Mountain=' + Eagle_Mountain.length); Lehi[Lehi.length] = createMarker(new GPoint(-111.85431671,40.42300034),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Eaglecrest Elementary School",'Lehi=' + Lehi.length); Provo[Provo.length] = createMarker(new GPoint(-111.65863037,40.23376083),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Edgemont Elementary School",'Provo=' + Provo.length); Provo[Provo.length] = createMarker(new GPoint(-111.64801788,40.23523712),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Farrer Middle School",'Provo=' + Provo.length); Provo[Provo.length] = createMarker(new GPoint(-111.64821100,40.23508000),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Farrer School",'Provo=' + Provo.length); Orem[Orem.length] = createMarker(new GPoint(-111.66648102,40.31343460),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Foothill Elementary School",'Orem=' + Orem.length); American_Fork[American_Fork.length] = createMarker(new GPoint(-111.79338074,40.38254929),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Forbes Elementary School",'American_Fork=' + American_Fork.length); Provo[Provo.length] = createMarker(new GPoint(-111.66947937,40.22904587),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Franklin Elementary School",'Provo=' + Provo.length); Provo[Provo.length] = createMarker(new GPoint(-111.63964081,40.22686005),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Freedom Academy",'Provo=' + Provo.length); Highland[Highland.length] = createMarker(new GPoint(-111.80120087,40.40079880),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Freedom Elementary School",'Highland=' + Highland.length); Orem[Orem.length] = createMarker(new GPoint(-111.70655060,40.30953598),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Geneva Elementary School",'Orem=' + Orem.length); Goshen[Goshen.length] = createMarker(new GPoint(-112.02850342,40.16070175),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Goshen Elementary School",'Goshen=' + Goshen.length); Goshen[Goshen.length] = createMarker(new GPoint(-111.89884400,39.95287600),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Goshen Middle School",'Goshen=' + Goshen.length); Provo[Provo.length] = createMarker(new GPoint(-111.67606354,40.25451660),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Grandview Elementary School",'Provo=' + Provo.length); Springville[Springville.length] = createMarker(new GPoint(-111.60313416,40.16473770),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Grant Elementary School",'Springville=' + Springville.length); American_Fork[American_Fork.length] = createMarker(new GPoint(-111.79694366,40.37256241),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Greenwood Elementary School",'American_Fork=' + American_Fork.length); Pleasant_Grove[Pleasant_Grove.length] = createMarker(new GPoint(-111.73773956,40.37536240),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Grovecrest Elementary School",'Pleasant_Grove=' + Pleasant_Grove.length); Provo[Provo.length] = createMarker(new GPoint(-111.65880585,40.30663300),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Heritage (yic)",'Provo=' + Provo.length); Highland[Highland.length] = createMarker(new GPoint(-111.80227661,40.42920685),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Highland Elementary School",'Highland=' + Highland.length); Orem[Orem.length] = createMarker(new GPoint(-111.67943573,40.27163696),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Hillcrest Elementary School",'Orem=' + Orem.length); Mapleton[Mapleton.length] = createMarker(new GPoint(-111.57959747,40.12559891),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Hobble Creek Elementary School",'Mapleton=' + Mapleton.length); Provo[Provo.length] = createMarker(new GPoint(-111.68820190,40.24261475),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Independence High School",'Provo=' + Provo.length); Provo[Provo.length] = createMarker(new GPoint(-111.64801788,40.24209595),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Joaquin Elementary School",'Provo=' + Provo.length); Pleasant_Grove[Pleasant_Grove.length] = createMarker(new GPoint(-111.73908234,40.36547470),"",iconRd); mySelect.options[mySelect.options.length] = new Option("John Hancock School",'Pleasant_Grove=' + Pleasant_Grove.length); Provo[Provo.length] = createMarker(new GPoint(-111.67581700,40.26005500),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Journey (yic)",'Provo=' + Provo.length); Orem[Orem.length] = createMarker(new GPoint(-111.70471954,40.28010941),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Lakeridge Junior High School",'Orem=' + Orem.length); Spanish_Fork[Spanish_Fork.length] = createMarker(new GPoint(-111.65497589,40.10557556),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Landmark High School",'Spanish_Fork=' + Spanish_Fork.length); Spanish_Fork[Spanish_Fork.length] = createMarker(new GPoint(-111.63469696,40.10593796),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Larsen Elementary School",'Spanish_Fork=' + Spanish_Fork.length); American_Fork[American_Fork.length] = createMarker(new GPoint(-111.79701996,40.40320969),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Legacy Elementary School",'American_Fork=' + American_Fork.length); Lehi[Lehi.length] = createMarker(new GPoint(-111.84964752,40.39660645),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Lehi Elementary School",'Lehi=' + Lehi.length); Lehi[Lehi.length] = createMarker(new GPoint(-111.84088898,40.39015579),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Lehi High School",'Lehi=' + Lehi.length); Lehi[Lehi.length] = createMarker(new GPoint(-111.83755493,40.40443039),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Lehi Junior High School",'Lehi=' + Lehi.length); Pleasant_Grove[Pleasant_Grove.length] = createMarker(new GPoint(-111.73936500,40.39770100),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Lincoln Academy",'Pleasant_Grove=' + Pleasant_Grove.length); Lindon[Lindon.length] = createMarker(new GPoint(-111.71938400,40.34087000),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Lindon Elementary School",'Lindon=' + Lindon.length); Highland[Highland.length] = createMarker(new GPoint(-111.77358246,40.41765213),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Lone Peak High School",'Highland=' + Highland.length); Provo[Provo.length] = createMarker(new GPoint(-111.65017700,40.23164368),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Maeser Elementary School",'Provo=' + Provo.length); Pleasant_Grove[Pleasant_Grove.length] = createMarker(new GPoint(-111.74932098,40.38212585),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Manila Elementary School",'Pleasant_Grove=' + Pleasant_Grove.length); Mapleton[Mapleton.length] = createMarker(new GPoint(-111.58023071,40.13053513),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Mapleton Elementary School",'Mapleton=' + Mapleton.length); Lehi[Lehi.length] = createMarker(new GPoint(-111.85697937,40.38573074),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Meadow Elementary School",'Lehi=' + Lehi.length); Pleasant_Grove[Pleasant_Grove.length] = createMarker(new GPoint(-111.75921631,40.37070084),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Mount Mahogany Elementary School",'Pleasant_Grove=' + Pleasant_Grove.length); Orem[Orem.length] = createMarker(new GPoint(-111.71144867,40.29705429),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Mountain View High School",'Orem=' + Orem.length); Salem[Salem.length] = createMarker(new GPoint(-111.67812347,40.03745270),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Mt Loafer Elementary School",'Salem=' + Salem.length); Highland[Highland.length] = createMarker(new GPoint(-111.79040527,40.42076111),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Mt Ridge Junior High School",'Highland=' + Highland.length); Orem[Orem.length] = createMarker(new GPoint(-111.69509888,40.32801819),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Northridge Elementary School",'Orem=' + Orem.length); Springville[Springville.length] = createMarker(new GPoint(-111.61434937,40.17933655),"",iconGr); mySelect.options[mySelect.options.length] = new Option("O&a Youth Corrections High School",'Springville=' + Springville.length); Lindon[Lindon.length] = createMarker(new GPoint(-111.69921875,40.33574677),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Oak Canyon Junior High School",'Lindon=' + Lindon.length); Provo[Provo.length] = createMarker(new GPoint(-111.63629150,40.23356628),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Oak Springs Sch (elem-sec)",'Provo=' + Provo.length); American_Fork[American_Fork.length] = createMarker(new GPoint(-111.77961700,40.36138000),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Odyssey Charter School",'American_Fork=' + American_Fork.length); Orem[Orem.length] = createMarker(new GPoint(-111.67687988,40.31629944),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Orchard Elementary School",'Orem=' + Orem.length); Orem[Orem.length] = createMarker(new GPoint(-111.70640564,40.29003525),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Orem Elementary School",'Orem=' + Orem.length); Orem[Orem.length] = createMarker(new GPoint(-111.68572235,40.29378128),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Orem High School",'Orem=' + Orem.length); Orem[Orem.length] = createMarker(new GPoint(-111.71047974,40.31138611),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Orem Junior High School",'Orem=' + Orem.length); Spanish_Fork[Spanish_Fork.length] = createMarker(new GPoint(-111.64402008,40.11095810),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Park Elementary School",'Spanish_Fork=' + Spanish_Fork.length); Payson[Payson.length] = createMarker(new GPoint(-111.73088074,40.03886032),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Parkview Elementary School",'Payson=' + Payson.length); Payson[Payson.length] = createMarker(new GPoint(-111.73257446,40.02673721),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Payson High School",'Payson=' + Payson.length); Payson[Payson.length] = createMarker(new GPoint(-111.73843384,40.02878571),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Payson Jr High School",'Payson=' + Payson.length); Payson[Payson.length] = createMarker(new GPoint(-111.74694061,40.03731537),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Payson Middle School",'Payson=' + Payson.length); Pleasant_Grove[Pleasant_Grove.length] = createMarker(new GPoint(-111.72521973,40.36106110),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Pleasant Grove High School",'Pleasant_Grove=' + Pleasant_Grove.length); Pleasant_Grove[Pleasant_Grove.length] = createMarker(new GPoint(-111.73961639,40.37243271),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Pleasant Grove Junior High School",'Pleasant_Grove=' + Pleasant_Grove.length); Eagle_Mountain[Eagle_Mountain.length] = createMarker(new GPoint(-111.96727753,40.35837936),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Pony Express Elementary School",'Eagle_Mountain=' + Eagle_Mountain.length); Provo[Provo.length] = createMarker(new GPoint(-111.65877533,40.24915314),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Provo High School",'Provo=' + Provo.length); Provo[Provo.length] = createMarker(new GPoint(-111.64017487,40.22502136),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Provost Elementary School",'Provo=' + Provo.length); Eagle_Mountain[Eagle_Mountain.length] = createMarker(new GPoint(-111.98435500,40.35876700),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Ranches Academy Inc",'Eagle_Mountain=' + Eagle_Mountain.length); Springville[Springville.length] = createMarker(new GPoint(-111.62784300,40.16679200),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Reagan Academy",'Springville=' + Springville.length); Spanish_Fork[Spanish_Fork.length] = createMarker(new GPoint(-111.65166473,40.11513519),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Rees Elementary School",'Spanish_Fork=' + Spanish_Fork.length); Provo[Provo.length] = createMarker(new GPoint(-111.64768219,40.26585770),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Rock Canyon Elementary School",'Provo=' + Provo.length); Lindon[Lindon.length] = createMarker(new GPoint(-111.70331573,40.33679581),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Rocky Mountain Elementary School",'Lindon=' + Lindon.length); Springville[Springville.length] = createMarker(new GPoint(-111.59838104,40.15146637),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Sage Creek Elementary School",'Springville=' + Springville.length); Salem[Salem.length] = createMarker(new GPoint(-111.67626190,40.05324173),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Salem Elementary School",'Salem=' + Salem.length); Santaquin[Santaquin.length] = createMarker(new GPoint(-111.79286194,39.97531128),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Santaquin Elementary School",'Santaquin=' + Santaquin.length); Saratoga_Springs[Saratoga_Springs.length] = createMarker(new GPoint(-111.92088600,40.33735200),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Saratoga Shores School",'Saratoga_Springs=' + Saratoga_Springs.length); Orem[Orem.length] = createMarker(new GPoint(-111.68592834,40.28878784),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Scera Park Elementary School",'Orem=' + Orem.length); Lehi[Lehi.length] = createMarker(new GPoint(-111.84082794,40.39876175),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Sego Lily Elementary School",'Lehi=' + Lehi.length); American_Fork[American_Fork.length] = createMarker(new GPoint(-111.80120087,40.40079880),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Served By Appt (sp Ed) Elementary School",'American_Fork=' + American_Fork.length); Orem[Orem.length] = createMarker(new GPoint(-111.68627930,40.30683136),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Sharon Elementary School",'Orem=' + Orem.length); American_Fork[American_Fork.length] = createMarker(new GPoint(-111.80352020,40.38878250),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Shelley Elementary School",'American_Fork=' + American_Fork.length); Provo[Provo.length] = createMarker(new GPoint(-111.62719727,40.20611954),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Slate Canyon Dtn Home",'Provo=' + Provo.length); Lehi[Lehi.length] = createMarker(new GPoint(-111.87680054,40.38177872),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Snow Springs Elementary School",'Lehi=' + Lehi.length); Spanish_Fork[Spanish_Fork.length] = createMarker(new GPoint(-111.66007996,40.11118698),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Spanish Fork High School",'Spanish_Fork=' + Spanish_Fork.length); Spanish_Fork[Spanish_Fork.length] = createMarker(new GPoint(-111.64067841,40.10168076),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Spanish Fork Jr High School",'Spanish_Fork=' + Spanish_Fork.length); Spanish_Fork[Spanish_Fork.length] = createMarker(new GPoint(-111.63881683,40.11045074),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Spanish Fork Middle School",'Spanish_Fork=' + Spanish_Fork.length); Spanish_Fork[Spanish_Fork.length] = createMarker(new GPoint(-111.60894012,40.08522797),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Spanish Oaks Elementary School",'Spanish_Fork=' + Spanish_Fork.length); Provo[Provo.length] = createMarker(new GPoint(-111.62623596,40.21048737),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Spring Creek Elementary School",'Provo=' + Provo.length); Payson[Payson.length] = createMarker(new GPoint(-111.73992157,40.01536560),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Spring Lake Elementary School",'Payson=' + Payson.length); Springville[Springville.length] = createMarker(new GPoint(-111.58840942,40.15442657),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Springville High School",'Springville=' + Springville.length); Springville[Springville.length] = createMarker(new GPoint(-111.59832001,40.16413116),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Springville Jr High School",'Springville=' + Springville.length); Springville[Springville.length] = createMarker(new GPoint(-111.60861969,40.15999985),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Springville Middle School",'Springville=' + Springville.length); Orem[Orem.length] = createMarker(new GPoint(-111.73323000,40.27853300),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Summit - American Fork",'Orem=' + Orem.length); Orem[Orem.length] = createMarker(new GPoint(-111.77629089,40.39444733),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Summit High (yic)",'Orem=' + Orem.length); Orem[Orem.length] = createMarker(new GPoint(-111.71205902,40.30013657),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Suncrest Elementary School",'Orem=' + Orem.length); Sundance[Sundance.length] = createMarker(new GPoint(-111.65609741,40.27059937),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Sundance Mountain School",'Sundance=' + Sundance.length); Provo[Provo.length] = createMarker(new GPoint(-111.68721771,40.22700500),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Sunset View Elementary School",'Provo=' + Provo.length); Payson[Payson.length] = createMarker(new GPoint(-111.73997498,40.04313660),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Taylor Elementary School",'Payson=' + Payson.length); Alpine[Alpine.length] = createMarker(new GPoint(-111.75859833,40.46360016),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Timberline Middle School",'Alpine=' + Alpine.length); Lindon[Lindon.length] = createMarker(new GPoint(-111.71286774,40.33763123),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Timpanogos Academy",'Lindon=' + Lindon.length); Provo[Provo.length] = createMarker(new GPoint(-111.66757965,40.23974609),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Timpanogos Elementary School",'Provo=' + Provo.length); Orem[Orem.length] = createMarker(new GPoint(-111.68941498,40.32380676),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Timpanogos High School",'Orem=' + Orem.length); Provo[Provo.length] = createMarker(new GPoint(-111.64752197,40.28093338),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Timpview High School",'Provo=' + Provo.length); Orem[Orem.length] = createMarker(new GPoint(-111.71787000,40.28263800),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Utah County Academy Of Science (ucas)",'Orem=' + Orem.length); Pleasant_Grove[Pleasant_Grove.length] = createMarker(new GPoint(-111.71959686,40.35770416),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Valley View Elementary School",'Pleasant_Grove=' + Pleasant_Grove.length); Provo[Provo.length] = createMarker(new GPoint(-111.63964081,40.22686005),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Vantage Point (yic)",'Provo=' + Provo.length); Vineyard[Vineyard.length] = createMarker(new GPoint(-111.71803284,40.28277969),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Vineyard Elementary School",'Vineyard=' + Vineyard.length); Provo[Provo.length] = createMarker(new GPoint(-111.66312100,40.24072300),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Walden School Of Liberal Arts",'Provo=' + Provo.length); Provo[Provo.length] = createMarker(new GPoint(-111.64292145,40.24810028),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Wasatch Elementary School",'Provo=' + Provo.length); Alpine[Alpine.length] = createMarker(new GPoint(-111.78997803,40.44698715),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Westfield Elementary School",'Alpine=' + Alpine.length); Orem[Orem.length] = createMarker(new GPoint(-111.69532776,40.27608871),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Westmore Elementary School",'Orem=' + Orem.length); Provo[Provo.length] = createMarker(new GPoint(-111.68831635,40.25353622),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Westridge Elementary School",'Provo=' + Provo.length); Springville[Springville.length] = createMarker(new GPoint(-111.62335968,40.16693878),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Westside Elementary School",'Springville=' + Springville.length); Lehi[Lehi.length] = createMarker(new GPoint(-111.88390800,40.39109700),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Willowcreek Middle School",'Lehi=' + Lehi.length); Payson[Payson.length] = createMarker(new GPoint(-111.74047089,40.03693771),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Wilson Elementary School",'Payson=' + Payson.length); Orem[Orem.length] = createMarker(new GPoint(-111.69618225,40.32160187),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Windsor Elementary School",'Orem=' + Orem.length); Spanish_Fork[Spanish_Fork.length] = createMarker(new GPoint(-111.64067841,40.10142899),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Young Parents High School",'Spanish_Fork=' + Spanish_Fork.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(Alpine); map.removeOverlays(American_Fork); map.removeOverlays(Cedar_Fort); map.removeOverlays(Cedar_Hills); map.removeOverlays(Eagle_Mountain); map.removeOverlays(Goshen); map.removeOverlays(Highland); map.removeOverlays(Lehi); map.removeOverlays(Lindon); map.removeOverlays(Mapleton); map.removeOverlays(Orem); map.removeOverlays(Payson); map.removeOverlays(Pleasant_Grove); map.removeOverlays(Provo); map.removeOverlays(Salem); map.removeOverlays(Santaquin); map.removeOverlays(Saratoga_Springs); map.removeOverlays(Spanish_Fork); map.removeOverlays(Springville); map.removeOverlays(Sundance); map.removeOverlays(Vineyard); 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(Alpine);map.removeOverlays(Alpine); map.removeOverlays(American_Fork); map.removeOverlays(Cedar_Fort); map.removeOverlays(Cedar_Hills); map.removeOverlays(Eagle_Mountain); map.removeOverlays(Goshen); map.removeOverlays(Highland); map.removeOverlays(Lehi); map.removeOverlays(Lindon); map.removeOverlays(Mapleton); map.removeOverlays(Orem); map.removeOverlays(Payson); map.removeOverlays(Pleasant_Grove); map.removeOverlays(Provo); map.removeOverlays(Salem); map.removeOverlays(Santaquin); map.removeOverlays(Saratoga_Springs); map.removeOverlays(Spanish_Fork); map.removeOverlays(Springville); map.removeOverlays(Sundance); map.removeOverlays(Vineyard); map.addOverlays(Alpine); centerByArray(Alpine, false, false); cntMarker += Alpine.length; map.addOverlays(American_Fork); centerByArray(American_Fork, false, false); cntMarker += American_Fork.length; map.addOverlays(Cedar_Fort); centerByArray(Cedar_Fort, false, false); cntMarker += Cedar_Fort.length; map.addOverlays(Cedar_Hills); centerByArray(Cedar_Hills, false, false); cntMarker += Cedar_Hills.length; map.addOverlays(Eagle_Mountain); centerByArray(Eagle_Mountain, false, false); cntMarker += Eagle_Mountain.length; map.addOverlays(Goshen); centerByArray(Goshen, false, false); cntMarker += Goshen.length; map.addOverlays(Highland); centerByArray(Highland, false, false); cntMarker += Highland.length; map.addOverlays(Lehi); centerByArray(Lehi, false, false); cntMarker += Lehi.length; map.addOverlays(Lindon); centerByArray(Lindon, false, false); cntMarker += Lindon.length; map.addOverlays(Mapleton); centerByArray(Mapleton, false, false); cntMarker += Mapleton.length; map.addOverlays(Orem); centerByArray(Orem, false, false); cntMarker += Orem.length; map.addOverlays(Payson); centerByArray(Payson, false, false); cntMarker += Payson.length; map.addOverlays(Pleasant_Grove); centerByArray(Pleasant_Grove, false, false); cntMarker += Pleasant_Grove.length; map.addOverlays(Provo); centerByArray(Provo, false, false); cntMarker += Provo.length; map.addOverlays(Salem); centerByArray(Salem, false, false); cntMarker += Salem.length; map.addOverlays(Santaquin); centerByArray(Santaquin, false, false); cntMarker += Santaquin.length; map.addOverlays(Saratoga_Springs); centerByArray(Saratoga_Springs, false, false); cntMarker += Saratoga_Springs.length; map.addOverlays(Spanish_Fork); centerByArray(Spanish_Fork, false, false); cntMarker += Spanish_Fork.length; map.addOverlays(Springville); centerByArray(Springville, false, false); cntMarker += Springville.length; map.addOverlays(Sundance); centerByArray(Sundance, false, false); cntMarker += Sundance.length; map.addOverlays(Vineyard); centerByArray(Vineyard, false, false); cntMarker += Vineyard.length; centerByArray(Alpine,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'); } }