function addMarkers()
{
mySelect = document.getElementById('selection');
Greenville = [];Newark = [];Wilmington = [];Middletown = [];Claymont = [];New_Castle = [];St_Georges = [];Hockessin = [];Bear = [];Townsend = [];mySelect.options[mySelect.options.length] = new Option("Bear schools",'all=Bear');
mySelect.options[mySelect.options.length] = new Option("Claymont schools",'all=Claymont');
mySelect.options[mySelect.options.length] = new Option("Greenville schools",'all=Greenville');
mySelect.options[mySelect.options.length] = new Option("Hockessin schools",'all=Hockessin');
mySelect.options[mySelect.options.length] = new Option("Middletown schools",'all=Middletown');
mySelect.options[mySelect.options.length] = new Option("New Castle schools",'all=New_Castle');
mySelect.options[mySelect.options.length] = new Option("Newark schools",'all=Newark');
mySelect.options[mySelect.options.length] = new Option("St Georges schools",'all=St_Georges');
mySelect.options[mySelect.options.length] = new Option("Townsend schools",'all=Townsend');
mySelect.options[mySelect.options.length] = new Option("Wilmington schools",'all=Wilmington');
mySelect.options[mySelect.options.length] = new Option("---------------------------",'');
Greenville[Greenville.length] = createMarker(new GPoint(-75.58334351,39.76595688),"
",iconBl);
mySelect.options[mySelect.options.length] = new Option("A. I. Dupont Middle School",'Greenville=' + Greenville.length);
Newark[Newark.length] = createMarker(new GPoint(-75.66344452,39.66671371),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Albert H. Jones Elementary School",'Newark=' + Newark.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.59970856,39.77877808),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Alexis I. Dupont High School",'Wilmington=' + Wilmington.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.54689789,39.74580002),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Alfred I. Dupont Hospital School",'Wilmington=' + Wilmington.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.58161163,39.74151230),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Alternative Programs",'Wilmington=' + Wilmington.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.63689423,39.73447037),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Anna P. Mote Elementary School",'Wilmington=' + Wilmington.length);
Middletown[Middletown.length] = createMarker(new GPoint(-75.71553802,39.44487762),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Appoquinimink Early Childhood Center",'Middletown=' + Middletown.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.59764099,39.74778748),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Austin D. Baltz Elementary School",'Wilmington=' + Wilmington.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.54660034,39.73772812),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Bancroft Intermediate School",'Wilmington=' + Wilmington.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.57166290,39.74449158),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Bayard Intermediate School",'Wilmington=' + Wilmington.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.52316284,39.79954910),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Brandywine High School",'Wilmington=' + Wilmington.length);
Claymont[Claymont.length] = createMarker(new GPoint(-75.47440338,39.80319595),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Brandywine Intensive Learning Center",'Claymont=' + Claymont.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.65311432,39.74665833),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Brandywine Springs Elementary School",'Wilmington=' + Wilmington.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.51869965,39.82456970),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Brandywood Elementary School",'Wilmington=' + Wilmington.length);
Middletown[Middletown.length] = createMarker(new GPoint(-75.57830048,39.52882004),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Brick Mill Elementary School",'Middletown=' + Middletown.length);
Newark[Newark.length] = createMarker(new GPoint(-75.72721863,39.66697311),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Brookside Elementary School",'Newark=' + Newark.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.58846283,39.75246048),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Cab Calloway School Of Arts",'Wilmington=' + Wilmington.length);
New_Castle[New_Castle.length] = createMarker(new GPoint(-75.55657959,39.69876099),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Calvin R. Mccullough Elementary School",'New_Castle=' + New_Castle.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.50321960,39.78757477),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Carrcroft Elementary School",'Wilmington=' + Wilmington.length);
New_Castle[New_Castle.length] = createMarker(new GPoint(-75.57637024,39.66405106),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Carrie Downie Elementary School",'New_Castle=' + New_Castle.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.56996918,39.73699188),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Casimir Pulaski Intermediate School",'Wilmington=' + Wilmington.length);
New_Castle[New_Castle.length] = createMarker(new GPoint(-75.56628418,39.68016815),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Castle Hills Elementary School",'New_Castle=' + New_Castle.length);
Middletown[Middletown.length] = createMarker(new GPoint(-75.68505400,39.50266400),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Cedar Lane Early Childhood Center",'Middletown=' + Middletown.length);
Middletown[Middletown.length] = createMarker(new GPoint(-75.68652344,39.49945450),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Cedar Lane Elementary School",'Middletown=' + Middletown.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.55037689,39.80252457),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Charles W. Bush School",'Wilmington=' + Wilmington.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.58846283,39.75246048),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Charter School Of Wilmington",'Wilmington=' + Wilmington.length);
Newark[Newark.length] = createMarker(new GPoint(-75.69637299,39.66382217),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Christiana High School",'Newark=' + Newark.length);
Claymont[Claymont.length] = createMarker(new GPoint(-75.46321106,39.80330658),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Claymont Elementary School",'Claymont=' + Claymont.length);
Claymont[Claymont.length] = createMarker(new GPoint(-75.46321106,39.80330658),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Claymont Gifted Program Middle School",'Claymont=' + Claymont.length);
New_Castle[New_Castle.length] = createMarker(new GPoint(-75.56690216,39.69353867),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Colwyck Elementary School",'New_Castle=' + New_Castle.length);
St_Georges[St_Georges.length] = createMarker(new GPoint(-75.61103058,39.66453171),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Commodore Macdonough",'St_Georges=' + St_Georges.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.65133667,39.71087265),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Community School (the)",'Wilmington=' + Wilmington.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.52425385,39.82847214),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Concord High School",'Wilmington=' + Wilmington.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.60038757,39.72307587),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Conrad Middle School",'Wilmington=' + Wilmington.length);
Claymont[Claymont.length] = createMarker(new GPoint(-75.45969391,39.81049347),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Darley Road Elementary School",'Claymont=' + Claymont.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.54625702,39.74608994),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("David W. Harlan Elementary School",'Wilmington=' + Wilmington.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.53884888,39.74863052),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Delaware Adolescent Program",'Wilmington=' + Wilmington.length);
Newark[Newark.length] = createMarker(new GPoint(-75.71134186,39.67164993),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Delaware Autism Program (dap)",'Newark=' + Newark.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.54139709,39.78760147),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Delaware Military Academy",'Wilmington=' + Wilmington.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.62869263,39.72446823),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Delcastle Technical High School",'Wilmington=' + Wilmington.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.54660034,39.73772812),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Drew-pyle Intermediate School",'Wilmington=' + Wilmington.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.53036499,39.74902344),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("East Side Charter School",'Wilmington=' + Wilmington.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.54190826,39.73107910),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Elbert-palmer Intermediate School",'Wilmington=' + Wilmington.length);
Newark[Newark.length] = createMarker(new GPoint(-75.70898437,39.71487427),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Etta J. Wilson Elementary School",'Newark=' + Newark.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.54422760,39.75196075),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Evan G. Shortlidge Academy",'Wilmington=' + Wilmington.length);
Middletown[Middletown.length] = createMarker(new GPoint(-75.71553040,39.44486237),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Everett Meredith Middle School",'Middletown=' + Middletown.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.54625702,39.74608994),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("First State School",'Wilmington=' + Wilmington.length);
Newark[Newark.length] = createMarker(new GPoint(-75.68320465,39.70619202),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Forest Oak Elementary School",'Newark=' + Newark.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.50478363,39.80698013),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Forwood Elementary School",'Wilmington=' + Wilmington.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.54096985,39.74394989),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Frederick Douglass Stubbs Intermediate School",'Wilmington=' + Wilmington.length);
Newark[Newark.length] = createMarker(new GPoint(-75.71878052,39.66391373),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Gauger-cobbs Middle School",'Newark=' + Newark.length);
New_Castle[New_Castle.length] = createMarker(new GPoint(-75.58815765,39.67730713),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("George Read Middle School",'New_Castle=' + New_Castle.length);
Newark[Newark.length] = createMarker(new GPoint(-75.71130371,39.67156982),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("George V. Kirk Middle School",'Newark=' + Newark.length);
Newark[Newark.length] = createMarker(new GPoint(-75.74430084,39.62376404),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Glasgow High School",'Newark=' + Newark.length);
New_Castle[New_Castle.length] = createMarker(new GPoint(-75.60308075,39.56606674),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Gunning Bedford Middle School",'New_Castle=' + New_Castle.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.52526855,39.81983566),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Hanby Middle School",'Wilmington=' + Wilmington.length);
New_Castle[New_Castle.length] = createMarker(new GPoint(-75.56690216,39.69353867),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Harry O. Eisenberg Elementary School",'New_Castle=' + New_Castle.length);
Hockessin[Hockessin.length] = createMarker(new GPoint(-75.69287109,39.79934311),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Hb Dupont Middle School",'Hockessin=' + Hockessin.length);
Newark[Newark.length] = createMarker(new GPoint(-75.75278473,39.62706757),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Henry M. Brader Elementary School",'Newark=' + Newark.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.68505859,39.72117615),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Heritage Elementary School",'Wilmington=' + Wilmington.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.56515503,39.76194382),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Highlands Elementary School",'Wilmington=' + Wilmington.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.54257202,39.74569702),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Howard High School Of Technology",'Wilmington=' + Wilmington.length);
Newark[Newark.length] = createMarker(new GPoint(-75.71131897,39.67161179),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Jennie E. Smith Elementary School",'Newark=' + Newark.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.66903687,39.72910690),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("John Dickinson High School",'Wilmington=' + Wilmington.length);
New_Castle[New_Castle.length] = createMarker(new GPoint(-75.56690216,39.69353867),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("John G. Leach School",'New_Castle=' + New_Castle.length);
Newark[Newark.length] = createMarker(new GPoint(-75.77630615,39.68788910),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("John R. Downes Elementary School",'Newark=' + Newark.length);
Newark[Newark.length] = createMarker(new GPoint(-75.74775696,39.65594864),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Joseph M. Mcvey Elementary School",'Newark=' + Newark.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.55061340,39.74126434),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Kuumba Academy Charter School",'Wilmington=' + Wilmington.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.49788666,39.82432938),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Lancashire Elementary School",'Wilmington=' + Wilmington.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.69478607,39.73366547),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Linden Hill Elementary School",'Wilmington=' + Wilmington.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.54085541,39.78118896),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Lombardy Elementary School",'Wilmington=' + Wilmington.length);
Claymont[Claymont.length] = createMarker(new GPoint(-75.47112274,39.79268265),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Maple Lane Elementary School",'Claymont=' + Claymont.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.62371063,39.74353027),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Marbrook Elementary School",'Wilmington=' + Wilmington.length);
Newark[Newark.length] = createMarker(new GPoint(-75.70701599,39.67300797),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Margaret S. Sterck School Delaware School For The",'Newark=' + Newark.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.53595734,39.74212646),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Marion T. Academy Charter School",'Wilmington=' + Wilmington.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.52439117,39.75162125),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Martin Luther King Elementary School",'Wilmington=' + Wilmington.length);
Newark[Newark.length] = createMarker(new GPoint(-75.68182373,39.62070084),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("May B. Leasure Elementary School",'Newark=' + Newark.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-81.25769000,29.46576500),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Mckean (thomas) High School",'Wilmington=' + Wilmington.length);
Newark[Newark.length] = createMarker(new GPoint(-75.68337250,39.70610046),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Meadowood Program",'Newark=' + Newark.length);
Middletown[Middletown.length] = createMarker(new GPoint(-75.69635010,39.44904327),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Middletown High School",'Middletown=' + Middletown.length);
Middletown[Middletown.length] = createMarker(new GPoint(-75.74215698,39.42041397),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Mot Charter School",'Middletown=' + Middletown.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.49745941,39.77204132),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Mount Pleasant Elementary School",'Wilmington=' + Wilmington.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.49745941,39.77204132),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Mount Pleasant Gifted Program Elementary School",'Wilmington=' + Wilmington.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.50852966,39.77376938),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Mount Pleasant High School",'Wilmington=' + Wilmington.length);
New_Castle[New_Castle.length] = createMarker(new GPoint(-75.56228700,39.66760200),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Multiple Alternative Program",'New_Castle=' + New_Castle.length);
New_Castle[New_Castle.length] = createMarker(new GPoint(-75.57048798,39.66358948),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("New Castle Middle School",'New_Castle=' + New_Castle.length);
Newark[Newark.length] = createMarker(new GPoint(-75.76814270,39.67904282),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Newark Charter School",'Newark=' + Newark.length);
Newark[Newark.length] = createMarker(new GPoint(-75.73692322,39.68141174),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Newark High School",'Newark=' + Newark.length);
Hockessin[Hockessin.length] = createMarker(new GPoint(-75.71455800,39.76751400),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("North Star Elementary School",'Hockessin=' + Hockessin.length);
New_Castle[New_Castle.length] = createMarker(new GPoint(-75.63857800,39.66287600),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Northeast Treatment Center",'New_Castle=' + New_Castle.length);
Bear[Bear.length] = createMarker(new GPoint(-75.74233246,39.55999374),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Olive B. Loss Elementary School",'Bear=' + Bear.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.65133667,39.71087265),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Pace/trlc",'Wilmington=' + Wilmington.length);
Newark[Newark.length] = createMarker(new GPoint(-75.69835663,39.62742996),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Paul M. Hodgson Vocational Technical High School",'Newark=' + Newark.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.53392792,39.76356888),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Pierre S. Dupont Elementary School",'Wilmington=' + Wilmington.length);
New_Castle[New_Castle.length] = createMarker(new GPoint(-75.62477112,39.66448975),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Pleasantville Elementary School",'New_Castle=' + New_Castle.length);
Newark[Newark.length] = createMarker(new GPoint(-75.73577118,39.70114517),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("R. Elisabeth Maclary Elementary School",'Newark=' + Newark.length);
Middletown[Middletown.length] = createMarker(new GPoint(-75.70851135,39.45514679),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Redding (louis L.) Middle School",'Middletown=' + Middletown.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.59141541,39.72329712),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Richardson Park Elementary School",'Wilmington=' + Wilmington.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.58806610,39.72230530),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Richardson Park Learning Center",'Wilmington=' + Wilmington.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.60877228,39.71675873),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Richey Elementary School",'Wilmington=' + Wilmington.length);
Newark[Newark.length] = createMarker(new GPoint(-75.67831421,39.68019867),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Robert S. Gallaher Elementary School",'Newark=' + Newark.length);
Newark[Newark.length] = createMarker(new GPoint(-75.70787811,39.69831085),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Shue-medill Middle School",'Newark=' + Newark.length);
Middletown[Middletown.length] = createMarker(new GPoint(-75.71234894,39.44788742),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Silver Lake Elementary School",'Middletown=' + Middletown.length);
Middletown[Middletown.length] = createMarker(new GPoint(-75.69687900,39.45073600),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Silver Lake Treatment Center",'Middletown=' + Middletown.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.68423462,39.72519684),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Skyline Middle School",'Wilmington=' + Wilmington.length);
New_Castle[New_Castle.length] = createMarker(new GPoint(-75.60308075,39.56606674),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Southern Elementary School",'New_Castle=' + New_Castle.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.53465271,39.80293274),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Springer Middle School",'Wilmington=' + Wilmington.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.64913940,39.71344376),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Stanton Middle School",'Wilmington=' + Wilmington.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.47466278,39.82652283),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Talley Middle School",'Wilmington=' + Wilmington.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.53309631,39.74837494),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Thomas A. Edison Charter School Of Wilmington",'Wilmington=' + Wilmington.length);
Newark[Newark.length] = createMarker(new GPoint(-75.68775940,39.64751434),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Thurgood Marshall Elementary School",'Newark=' + Newark.length);
Townsend[Townsend.length] = createMarker(new GPoint(-75.67199707,39.39110184),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Townsend Elementary School",'Townsend=' + Townsend.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.54904938,39.75832367),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Warner Elementary School",'Wilmington=' + Wilmington.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.54817200,39.75887680),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Warner Kindergarten Center",'Wilmington=' + Wilmington.length);
Newark[Newark.length] = createMarker(new GPoint(-75.76187897,39.67470169),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("West Park Place Elementary School",'Newark=' + Newark.length);
Newark[Newark.length] = createMarker(new GPoint(-75.72882080,39.60426331),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("William B. Keene Elementary School",'Newark=' + Newark.length);
Wilmington[Wilmington.length] = createMarker(new GPoint(-75.55886841,39.74914932),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("William C. Lewis Dual Language Magnet Elementary School",'Wilmington=' + Wilmington.length);
New_Castle[New_Castle.length] = createMarker(new GPoint(-75.58215332,39.66859436),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("William Penn High School",'New_Castle=' + New_Castle.length);
New_Castle[New_Castle.length] = createMarker(new GPoint(-75.58311462,39.68545151),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Wilmington Manor Elementary School",'New_Castle=' + New_Castle.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(Bear);
map.removeOverlays(Claymont);
map.removeOverlays(Greenville);
map.removeOverlays(Hockessin);
map.removeOverlays(Middletown);
map.removeOverlays(New_Castle);
map.removeOverlays(Newark);
map.removeOverlays(St_Georges);
map.removeOverlays(Townsend);
map.removeOverlays(Wilmington);
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(Greenville);map.removeOverlays(Bear);
map.removeOverlays(Claymont);
map.removeOverlays(Greenville);
map.removeOverlays(Hockessin);
map.removeOverlays(Middletown);
map.removeOverlays(New_Castle);
map.removeOverlays(Newark);
map.removeOverlays(St_Georges);
map.removeOverlays(Townsend);
map.removeOverlays(Wilmington);
map.addOverlays(Bear);
centerByArray(Bear, false, false);
cntMarker += Bear.length;
map.addOverlays(Claymont);
centerByArray(Claymont, false, false);
cntMarker += Claymont.length;
map.addOverlays(Greenville);
centerByArray(Greenville, false, false);
cntMarker += Greenville.length;
map.addOverlays(Hockessin);
centerByArray(Hockessin, false, false);
cntMarker += Hockessin.length;
map.addOverlays(Middletown);
centerByArray(Middletown, false, false);
cntMarker += Middletown.length;
map.addOverlays(New_Castle);
centerByArray(New_Castle, false, false);
cntMarker += New_Castle.length;
map.addOverlays(Newark);
centerByArray(Newark, false, false);
cntMarker += Newark.length;
map.addOverlays(St_Georges);
centerByArray(St_Georges, false, false);
cntMarker += St_Georges.length;
map.addOverlays(Townsend);
centerByArray(Townsend, false, false);
cntMarker += Townsend.length;
map.addOverlays(Wilmington);
centerByArray(Wilmington, false, false);
cntMarker += Wilmington.length;
centerByArray(Greenville,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');
}
}