function addMarkers()
{
mySelect = document.getElementById('selection');
Des_Moines = [];Altoona = [];Bondurant = [];Ankeny = [];Johnston = [];West_Des_Moines = [];Clive = [];Maxwell = [];Pleasant_Hill = [];Grimes = [];Island = [];Urbandale = [];Mitchellville = [];Alleman = [];Polk_City = [];Runnells = [];mySelect.options[mySelect.options.length] = new Option("Alleman schools",'all=Alleman');
mySelect.options[mySelect.options.length] = new Option("Altoona schools",'all=Altoona');
mySelect.options[mySelect.options.length] = new Option("Ankeny schools",'all=Ankeny');
mySelect.options[mySelect.options.length] = new Option("Bondurant schools",'all=Bondurant');
mySelect.options[mySelect.options.length] = new Option("Clive schools",'all=Clive');
mySelect.options[mySelect.options.length] = new Option("Des Moines schools",'all=Des_Moines');
mySelect.options[mySelect.options.length] = new Option("Grimes schools",'all=Grimes');
mySelect.options[mySelect.options.length] = new Option("Island schools",'all=Island');
mySelect.options[mySelect.options.length] = new Option("Johnston schools",'all=Johnston');
mySelect.options[mySelect.options.length] = new Option("Maxwell schools",'all=Maxwell');
mySelect.options[mySelect.options.length] = new Option("Mitchellville schools",'all=Mitchellville');
mySelect.options[mySelect.options.length] = new Option("Pleasant Hill schools",'all=Pleasant_Hill');
mySelect.options[mySelect.options.length] = new Option("Polk City schools",'all=Polk_City');
mySelect.options[mySelect.options.length] = new Option("Runnells schools",'all=Runnells');
mySelect.options[mySelect.options.length] = new Option("Urbandale schools",'all=Urbandale');
mySelect.options[mySelect.options.length] = new Option("West Des Moines schools",'all=West_Des_Moines');
mySelect.options[mySelect.options.length] = new Option("---------------------------",'');
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.56138611,41.62862396),"
",iconRd);
mySelect.options[mySelect.options.length] = new Option("Adams Elementary School",'Des_Moines=' + Des_Moines.length);
Altoona[Altoona.length] = createMarker(new GPoint(-93.46719360,41.64673615),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Altoona Elementary School",'Altoona=' + Altoona.length);
Bondurant[Bondurant.length] = createMarker(new GPoint(-93.46459961,41.69779968),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Anderson Elementary School",'Bondurant=' + Bondurant.length);
Ankeny[Ankeny.length] = createMarker(new GPoint(-93.60058594,41.74324036),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Ankeny High School",'Ankeny=' + Ankeny.length);
Johnston[Johnston.length] = createMarker(new GPoint(-93.72039795,41.68030167),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Beaver Creek Elementary School",'Johnston=' + Johnston.length);
Bondurant[Bondurant.length] = createMarker(new GPoint(-93.46478271,41.69856262),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Bondurant-farrar Junior Senior High School",'Bondurant=' + Bondurant.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.67539978,41.58729935),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Bridges",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.64178300,41.58380400),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Bridges High School",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.65134430,41.55553818),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Brody Middle School",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.55460358,41.61510086),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Brubaker Elementary School",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.65836334,41.59146118),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Callanan Middle School",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.59190900,41.59262900),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Capitol View Elementary School",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.60461426,41.62321091),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Cattell Elementary School",'Des_Moines=' + Des_Moines.length);
Altoona[Altoona.length] = createMarker(new GPoint(-93.45737457,41.64250565),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Centennial Elementary School",'Altoona=' + Altoona.length);
West_Des_Moines[West_Des_Moines.length] = createMarker(new GPoint(-93.71326447,41.58535385),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Clegg Park Elementary School",'West_Des_Moines=' + West_Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.72920227,41.63140106),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Clive Elementary School",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.61501312,41.66662979),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Cornell Elementary School",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.70437622,41.60768509),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Cowles Elementary School",'Des_Moines=' + Des_Moines.length);
Clive[Clive.length] = createMarker(new GPoint(-93.73350525,41.61133575),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Crestview Elementary School",'Clive=' + Clive.length);
Ankeny[Ankeny.length] = createMarker(new GPoint(-93.63231500,41.70109700),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Crocker Elementary School",'Ankeny=' + Ankeny.length);
West_Des_Moines[West_Des_Moines.length] = createMarker(new GPoint(-93.77134705,41.58714676),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Crossroads Park Grade School",'West_Des_Moines=' + West_Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.52211761,41.64011383),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Delaware Elementary School",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.54171753,41.62973785),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Douglas Elementary School",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.60897064,41.60034943),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Downtown School",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.59975000,41.57956600),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Dunlap Exemplary Preschool",'Des_Moines=' + Des_Moines.length);
Ankeny[Ankeny.length] = createMarker(new GPoint(-93.59036255,41.72983551),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("East Elementary School",'Ankeny=' + Ankeny.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.60172272,41.59638214),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("East High School",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.63909149,41.59363556),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Edmunds Fine Arts Academy",'Des_Moines=' + Des_Moines.length);
West_Des_Moines[West_Des_Moines.length] = createMarker(new GPoint(-93.73657227,41.58091736),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Fair Meadows Elementary School",'West_Des_Moines=' + West_Des_Moines.length);
Maxwell[Maxwell.length] = createMarker(new GPoint(-93.39830017,41.88790131),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Farrar Elementary School",'Maxwell=' + Maxwell.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.61658478,41.62243652),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Findley Elementary School",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.70647100,41.60807800),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Focus Elementary School",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.70647100,41.60807800),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Focus Middle School",'Des_Moines=' + Des_Moines.length);
Pleasant_Hill[Pleasant_Hill.length] = createMarker(new GPoint(-93.47237396,41.58002472),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Four Mile Elementary School",'Pleasant_Hill=' + Pleasant_Hill.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.57378387,41.62081146),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Garton Elementary School",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.56138611,41.62495422),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Goodrell Middle School",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.61717224,41.54643631),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Granger Elementary School",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.66782000,41.58239300),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Greenwood Elementary School",'Des_Moines=' + Des_Moines.length);
Grimes[Grimes.length] = createMarker(new GPoint(-93.78759766,41.68669891),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Grimes Elementary Building",'Grimes=' + Grimes.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.61979675,41.54759979),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Hanawalt Elementary At Mann",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.69351959,41.57995987),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Hanawalt Elementary School",'Des_Moines=' + Des_Moines.length);
Altoona[Altoona.length] = createMarker(new GPoint(-93.46441650,41.65867233),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Harbor-southeast Polk Alternative School",'Altoona=' + Altoona.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.61608887,41.62756348),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Harding Middle School",'Des_Moines=' + Des_Moines.length);
Johnston[Johnston.length] = createMarker(new GPoint(-93.72039795,41.68030167),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Henry A Wallace Elementary School",'Johnston=' + Johnston.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.59778595,41.60121155),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Hiatt Middle School",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.69413757,41.61602783),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Hillis Elementary School",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.68308258,41.63666153),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Hoover High School",'Des_Moines=' + Des_Moines.length);
Johnston[Johnston.length] = createMarker(new GPoint(-93.72039795,41.68030167),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Horizon Elementary School",'Johnston=' + Johnston.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.60448456,41.55940628),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Howe Elementary School",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.53221893,41.62049866),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Hoyt Middle School",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.67448425,41.59243774),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Hubbell Elementary School",'Des_Moines=' + Des_Moines.length);
Clive[Clive.length] = createMarker(new GPoint(-93.74762726,41.60227966),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Indian Hills Junior High School",'Clive=' + Clive.length);
Island[Island.length] = createMarker(new GPoint(-87.14595795,37.44232178),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Island Alternative Education Program",'Island=' + Island.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.59276581,41.54929352),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Jackson Elementary School",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.65030670,41.54833603),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Jefferson Elementary School",'Des_Moines=' + Des_Moines.length);
Urbandale[Urbandale.length] = createMarker(new GPoint(-93.70406342,41.63673782),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Jensen Elementary School",'Urbandale=' + Urbandale.length);
Johnston[Johnston.length] = createMarker(new GPoint(-93.72039795,41.68030167),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Johnston Middle School",'Johnston=' + Johnston.length);
Johnston[Johnston.length] = createMarker(new GPoint(-93.72039795,41.68030167),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Johnston Senior High School",'Johnston=' + Johnston.length);
West_Des_Moines[West_Des_Moines.length] = createMarker(new GPoint(-93.75631714,41.55943680),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Jordan Creek Elementary School",'West_Des_Moines=' + West_Des_Moines.length);
Urbandale[Urbandale.length] = createMarker(new GPoint(-93.72064972,41.62656021),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Karen Acres Elementary School",'Urbandale=' + Urbandale.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.64204407,41.60413742),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("King Elementary School",'Des_Moines=' + Des_Moines.length);
Johnston[Johnston.length] = createMarker(new GPoint(-93.72039795,41.68030167),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Lawson Elementary School",'Johnston=' + Johnston.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.62587738,41.56192398),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Lincoln High School",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.62551880,41.59756851),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Longfellow Elementary School",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.60270691,41.53526306),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Lovejoy Elementary School",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.60813141,41.63213730),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Madison Elementary School",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.61715700,41.51198000),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Mccombs Middle School",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.53941345,41.61348343),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Mckee Elementary School",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.60574400,41.57319800),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Mckinley Elementary School",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.68398285,41.63323593),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Meredith Middle School",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.68936157,41.58328629),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Merrill Middle School",'Des_Moines=' + Des_Moines.length);
Grimes[Grimes.length] = createMarker(new GPoint(-93.77675629,41.65836334),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Metro West Learning Academy",'Grimes=' + Grimes.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.61637878,41.53383636),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Mitchell Elementary School",'Des_Moines=' + Des_Moines.length);
Mitchellville[Mitchellville.length] = createMarker(new GPoint(-93.36288452,41.67000580),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Mitchellville Elementary School",'Mitchellville=' + Mitchellville.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.65858459,41.61448288),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Monroe Elementary School",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.68999481,41.62857437),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Moore Elementary School",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.62736511,41.53356171),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Morris Elementary School",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.62815400,41.60665300),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Moulton Elementary School",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.62352753,41.61674118),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("North High School",'Des_Moines=' + Des_Moines.length);
Alleman[Alleman.length] = createMarker(new GPoint(-93.60749817,41.81320190),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("North Polk Central Elementary School",'Alleman=' + Alleman.length);
Alleman[Alleman.length] = createMarker(new GPoint(-93.60749817,41.81320190),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("North Polk Junior-senior High School",'Alleman=' + Alleman.length);
Polk_City[Polk_City.length] = createMarker(new GPoint(-93.72732544,41.77891541),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("North Polk West Elementary School",'Polk_City=' + Polk_City.length);
Ankeny[Ankeny.length] = createMarker(new GPoint(-93.58995819,41.74590302),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Northeast Elementary School",'Ankeny=' + Ankeny.length);
Ankeny[Ankeny.length] = createMarker(new GPoint(-93.61385345,41.73764038),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Northview Middle School",'Ankeny=' + Ankeny.length);
Ankeny[Ankeny.length] = createMarker(new GPoint(-93.61468506,41.73203659),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Northwest Elementary School",'Ankeny=' + Ankeny.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.56109619,41.59986115),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Norwoodville Elementary School",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.55460358,41.61510086),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Oak Park At Douglas Elementary School",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.62488556,41.63187027),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Oak Park Elementary School",'Des_Moines=' + Des_Moines.length);
Urbandale[Urbandale.length] = createMarker(new GPoint(-93.71506500,41.63466263),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Olmsted Elementary School",'Urbandale=' + Urbandale.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.62089400,41.54679000),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Orchard Place Elementary School",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.62625122,41.53383636),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Orchard Place School",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.62805800,41.58825000),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Pace",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.62551880,41.55614853),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Park Ave Elementary School",'Des_Moines=' + Des_Moines.length);
Ankeny[Ankeny.length] = createMarker(new GPoint(-93.60441589,41.73199081),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Parkview Middle School",'Ankeny=' + Ankeny.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.67659760,41.60773849),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Perkins Elementary School",'Des_Moines=' + Des_Moines.length);
West_Des_Moines[West_Des_Moines.length] = createMarker(new GPoint(-93.71141815,41.57423782),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Phenix Elementary School",'West_Des_Moines=' + West_Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.55460358,41.61510086),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Phillips Elementary At Mckee",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.57221222,41.60881805),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Phillips Elementary School",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.51992035,41.58747864),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Pleasant Hill Elementary School",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.71448300,41.57395000),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Pomerantz Learning Center",'Des_Moines=' + Des_Moines.length);
West_Des_Moines[West_Des_Moines.length] = createMarker(new GPoint(-93.71302800,41.57938400),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Rex Mathes School",'West_Des_Moines=' + West_Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.57731628,41.55814362),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("River Woods Elementary School",'Des_Moines=' + Des_Moines.length);
Urbandale[Urbandale.length] = createMarker(new GPoint(-93.72938538,41.63286209),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Rolling Green Elementary School",'Urbandale=' + Urbandale.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.67802429,41.59183884),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Roosevelt High School",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.65466309,41.59018707),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Ruby Van Meter School",'Des_Moines=' + Des_Moines.length);
Runnells[Runnells.length] = createMarker(new GPoint(-93.35762787,41.51873016),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Runnells Elementary School",'Runnells=' + Runnells.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.60994720,41.65989304),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Saydel High School",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.64168549,41.58426285),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Scavo High School",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.65499115,41.59146118),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Smouse Opportunity School",'Des_Moines=' + Des_Moines.length);
Ankeny[Ankeny.length] = createMarker(new GPoint(-93.59061432,41.72043610),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Southeast Elementary School",'Ankeny=' + Ankeny.length);
Runnells[Runnells.length] = createMarker(new GPoint(-93.35768890,41.51113892),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Southeast Polk High School",'Runnells=' + Runnells.length);
Runnells[Runnells.length] = createMarker(new GPoint(-93.35768890,41.51113892),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Southeast Polk Junior High School",'Runnells=' + Runnells.length);
West_Des_Moines[West_Des_Moines.length] = createMarker(new GPoint(-93.72542300,41.57738000),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Stilwell Junior High School",'West_Des_Moines=' + West_Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.55141449,41.60531998),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Stowe Elementary School",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.61331600,41.51396300),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Studebaker Elementary School",'Des_Moines=' + Des_Moines.length);
Johnston[Johnston.length] = createMarker(new GPoint(-93.74932500,41.66800300),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Summit Middle School",'Johnston=' + Johnston.length);
Ankeny[Ankeny.length] = createMarker(new GPoint(-93.60356140,41.73372269),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Terrace Elementary School",'Ankeny=' + Ankeny.length);
Urbandale[Urbandale.length] = createMarker(new GPoint(-93.72920227,41.63140106),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Urbandale High School",'Urbandale=' + Urbandale.length);
Urbandale[Urbandale.length] = createMarker(new GPoint(-93.72439575,41.63673782),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Urbandale Middle School",'Urbandale=' + Urbandale.length);
Urbandale[Urbandale.length] = createMarker(new GPoint(-93.74427032,41.62471771),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Valerius Elementary School",'Urbandale=' + Urbandale.length);
West_Des_Moines[West_Des_Moines.length] = createMarker(new GPoint(-93.75208282,41.58802032),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Valley High School",'West_Des_Moines=' + West_Des_Moines.length);
West_Des_Moines[West_Des_Moines.length] = createMarker(new GPoint(-93.75244141,41.56221390),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Valley Southwoods",'West_Des_Moines=' + West_Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.60461426,41.60524750),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Wallace Elementary School",'Des_Moines=' + Des_Moines.length);
West_Des_Moines[West_Des_Moines.length] = createMarker(new GPoint(-93.71273804,41.58127594),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Walnut Creek Campus High School",'West_Des_Moines=' + West_Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.60152435,41.55526352),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Weeks Middle School",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.61979675,41.54759979),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Weeks Middle School At Kurtz",'Des_Moines=' + Des_Moines.length);
West_Des_Moines[West_Des_Moines.length] = createMarker(new GPoint(-93.75668335,41.57801819),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Western Hills Elementary School",'West_Des_Moines=' + West_Des_Moines.length);
West_Des_Moines[West_Des_Moines.length] = createMarker(new GPoint(-93.77860260,41.58079910),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Westridge Elementary School",'West_Des_Moines=' + West_Des_Moines.length);
Ankeny[Ankeny.length] = createMarker(new GPoint(-93.63857269,41.73763657),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Westwood Elementary School",'Ankeny=' + Ankeny.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.55913200,41.59051900),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Willard Elementary School",'Des_Moines=' + Des_Moines.length);
Altoona[Altoona.length] = createMarker(new GPoint(-93.48388672,41.64906311),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Willowbrook Elementary School",'Altoona=' + Altoona.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.69909668,41.60026169),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Windsor Elementary School",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.66462708,41.63329315),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Woodlawn Elementary School",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.61370087,41.64379883),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Woodside Middle School",'Des_Moines=' + Des_Moines.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.63525391,41.53913879),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Wright Elementary School",'Des_Moines=' + Des_Moines.length);
Johnston[Johnston.length] = createMarker(new GPoint(-93.69488525,41.69010925),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Youth Homes Of Mid America",'Johnston=' + Johnston.length);
Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.62935900,41.59781600),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Zach Hamlett Preschool",'Des_Moines=' + Des_Moines.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(Alleman);
map.removeOverlays(Altoona);
map.removeOverlays(Ankeny);
map.removeOverlays(Bondurant);
map.removeOverlays(Clive);
map.removeOverlays(Des_Moines);
map.removeOverlays(Grimes);
map.removeOverlays(Island);
map.removeOverlays(Johnston);
map.removeOverlays(Maxwell);
map.removeOverlays(Mitchellville);
map.removeOverlays(Pleasant_Hill);
map.removeOverlays(Polk_City);
map.removeOverlays(Runnells);
map.removeOverlays(Urbandale);
map.removeOverlays(West_Des_Moines);
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(Des_Moines);map.removeOverlays(Alleman);
map.removeOverlays(Altoona);
map.removeOverlays(Ankeny);
map.removeOverlays(Bondurant);
map.removeOverlays(Clive);
map.removeOverlays(Des_Moines);
map.removeOverlays(Grimes);
map.removeOverlays(Island);
map.removeOverlays(Johnston);
map.removeOverlays(Maxwell);
map.removeOverlays(Mitchellville);
map.removeOverlays(Pleasant_Hill);
map.removeOverlays(Polk_City);
map.removeOverlays(Runnells);
map.removeOverlays(Urbandale);
map.removeOverlays(West_Des_Moines);
map.addOverlays(Alleman);
centerByArray(Alleman, false, false);
cntMarker += Alleman.length;
map.addOverlays(Altoona);
centerByArray(Altoona, false, false);
cntMarker += Altoona.length;
map.addOverlays(Ankeny);
centerByArray(Ankeny, false, false);
cntMarker += Ankeny.length;
map.addOverlays(Bondurant);
centerByArray(Bondurant, false, false);
cntMarker += Bondurant.length;
map.addOverlays(Clive);
centerByArray(Clive, false, false);
cntMarker += Clive.length;
map.addOverlays(Des_Moines);
centerByArray(Des_Moines, false, false);
cntMarker += Des_Moines.length;
map.addOverlays(Grimes);
centerByArray(Grimes, false, false);
cntMarker += Grimes.length;
map.addOverlays(Island);
centerByArray(Island, false, false);
cntMarker += Island.length;
map.addOverlays(Johnston);
centerByArray(Johnston, false, false);
cntMarker += Johnston.length;
map.addOverlays(Maxwell);
centerByArray(Maxwell, false, false);
cntMarker += Maxwell.length;
map.addOverlays(Mitchellville);
centerByArray(Mitchellville, false, false);
cntMarker += Mitchellville.length;
map.addOverlays(Pleasant_Hill);
centerByArray(Pleasant_Hill, false, false);
cntMarker += Pleasant_Hill.length;
map.addOverlays(Polk_City);
centerByArray(Polk_City, false, false);
cntMarker += Polk_City.length;
map.addOverlays(Runnells);
centerByArray(Runnells, false, false);
cntMarker += Runnells.length;
map.addOverlays(Urbandale);
centerByArray(Urbandale, false, false);
cntMarker += Urbandale.length;
map.addOverlays(West_Des_Moines);
centerByArray(West_Des_Moines, false, false);
cntMarker += West_Des_Moines.length;
centerByArray(Des_Moines,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');
}
}