function addMarkers() { mySelect = document.getElementById('selection'); Winston_Salem = [];Winston_salem = [];Kernersville = [];Clemmons = [];Lewisville = [];Walkertown = [];Tobaccoville = [];Pfafftown = [];Rural_Hall = [];mySelect.options[mySelect.options.length] = new Option("Clemmons schools",'all=Clemmons'); mySelect.options[mySelect.options.length] = new Option("Kernersville schools",'all=Kernersville'); mySelect.options[mySelect.options.length] = new Option("Lewisville schools",'all=Lewisville'); mySelect.options[mySelect.options.length] = new Option("Pfafftown schools",'all=Pfafftown'); mySelect.options[mySelect.options.length] = new Option("Rural Hall schools",'all=Rural_Hall'); mySelect.options[mySelect.options.length] = new Option("Tobaccoville schools",'all=Tobaccoville'); mySelect.options[mySelect.options.length] = new Option("Walkertown schools",'all=Walkertown'); mySelect.options[mySelect.options.length] = new Option("Winston Salem schools",'all=Winston_Salem'); mySelect.options[mySelect.options.length] = new Option("Winston salem schools",'all=Winston_salem'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Winston_Salem[Winston_Salem.length] = createMarker(new GPoint(-80.26432037,36.03951645),"
12th Street Academy
1401 W Clemmonsville Rd
Winston Salem, NC 27127

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("12th Street Academy",'Winston_Salem=' + Winston_Salem.length); Winston_salem[Winston_salem.length] = createMarker(new GPoint(-80.24420166,36.10419846),"
Arts Based Elementary School
1380 Martin Luther King Jr Dr
Winston-salem, NC 27101

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Arts Based Elementary School",'Winston_salem=' + Winston_salem.length); Winston_salem[Winston_salem.length] = createMarker(new GPoint(-80.22431183,36.11843872),"
Ashley Elementary School
1647 East 21st Street
Winston-salem, NC 27105

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Ashley Elementary School",'Winston_salem=' + Winston_salem.length); Winston_Salem[Winston_Salem.length] = createMarker(new GPoint(-80.29011536,36.07463455),"
Bolton Elementary School
1250 Bolton Street
Winston Salem, NC 27103

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Bolton Elementary School",'Winston_Salem=' + Winston_Salem.length); Winston_Salem[Winston_Salem.length] = createMarker(new GPoint(-80.26552582,36.09478760),"
Brunson Elementary School
155 N Hawthorne Road
Winston Salem, NC 27104

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Brunson Elementary School",'Winston_Salem=' + Winston_Salem.length); Winston_salem[Winston_salem.length] = createMarker(new GPoint(-80.23118591,36.06729126),"
C G Woodson Sch Of Challenge
437 Goldfloss Street
Winston-salem, NC 27127

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("C G Woodson Sch Of Challenge",'Winston_salem=' + Winston_salem.length); Winston_Salem[Winston_Salem.length] = createMarker(new GPoint(-80.30999756,36.06549835),"
Career Center
1615 Miller Street
Winston Salem, NC 27103

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Career Center",'Winston_Salem=' + Winston_Salem.length); Winston_Salem[Winston_Salem.length] = createMarker(new GPoint(-80.20881653,36.13463211),"
Carver High School
3545 Carver School Road
Winston Salem, NC 27105

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Carver High School",'Winston_Salem=' + Winston_Salem.length); Kernersville[Kernersville.length] = createMarker(new GPoint(-80.12179565,36.13777161),"
Cash Elementary School
4700 Old Hollow Road
Kernersville, NC 27284

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Cash Elementary School",'Kernersville=' + Kernersville.length); Winston_Salem[Winston_Salem.length] = createMarker(new GPoint(-80.27966309,36.11649323),"
Children's Center
02315 Coliseum Drive
Winston Salem, NC 27106

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Children's Center",'Winston_Salem=' + Winston_Salem.length); Clemmons[Clemmons.length] = createMarker(new GPoint(-80.37723541,36.02533340),"
Clemmons Elementary School
6200 Bingham Avenue
Clemmons, NC 27012

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Clemmons Elementary School",'Clemmons=' + Clemmons.length); Winston_salem[Winston_salem.length] = createMarker(new GPoint(-80.34293365,36.02695847),"
Clemmons Middle School
3785 Fraternity Church Road
Winston-salem, NC 27127

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Clemmons Middle School",'Winston_salem=' + Winston_salem.length); Winston_salem[Winston_salem.length] = createMarker(new GPoint(-80.25952148,36.10879898),"
Cook Elementary School
920 11th Street Nw
Winston-salem, NC 27195

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Cook Elementary School",'Winston_salem=' + Winston_salem.length); Winston_Salem[Winston_Salem.length] = createMarker(new GPoint(-80.23202515,36.07880783),"
Diggs Elementary School
950 Mock Street
Winston Salem, NC 27107

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Diggs Elementary School",'Winston_Salem=' + Winston_Salem.length); Winston_salem[Winston_salem.length] = createMarker(new GPoint(-80.24360657,36.09231567),"
Downtown Middle School
280 S Liberty Street
Winston-salem, NC 27101

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Downtown Middle School",'Winston_salem=' + Winston_salem.length); Winston_Salem[Winston_Salem.length] = createMarker(new GPoint(-80.24745941,36.10127258),"
Downtown School
601 N Cherry Street
Winston Salem, NC 27101

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Downtown School",'Winston_Salem=' + Winston_Salem.length); Kernersville[Kernersville.length] = createMarker(new GPoint(-80.15095520,36.12131119),"
East Forsyth High School
2500 W Mountain Street
Kernersville, NC 27284

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("East Forsyth High School",'Kernersville=' + Kernersville.length); Kernersville[Kernersville.length] = createMarker(new GPoint(-80.12124400,36.13745100),"
East Forsyth Middle School
4690 Old Hollow Road
Kernersville, NC 27284

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("East Forsyth Middle School",'Kernersville=' + Kernersville.length); Winston_salem[Winston_salem.length] = createMarker(new GPoint(-80.22543335,36.11285019),"
East Winston Primary
1612 E 14th Street
Winston-salem, NC 27105

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("East Winston Primary",'Winston_salem=' + Winston_salem.length); Winston_Salem[Winston_Salem.length] = createMarker(new GPoint(-80.22335052,36.05631638),"
Easton Elementary School
734 E Clemmonsville Road
Winston Salem, NC 27107

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Easton Elementary School",'Winston_Salem=' + Winston_Salem.length); Winston_Salem[Winston_Salem.length] = createMarker(new GPoint(-80.21717072,36.07296371),"
Forest Park Elementary School
1900 Milford Street
Winston Salem, NC 27107

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Forest Park Elementary School",'Winston_Salem=' + Winston_Salem.length); Winston_salem[Winston_salem.length] = createMarker(new GPoint(-80.30004120,36.17168808),"
Forsyth Academies Elementary School
5426 Shattalon Drive
Winston-salem, NC 27106

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Forsyth Academies Elementary School",'Winston_salem=' + Winston_salem.length); Winston_Salem[Winston_Salem.length] = createMarker(new GPoint(-80.23867035,36.06286240),"
Forsyth Vocational High School
2700 S Main Street
Winston Salem, NC 27127

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Forsyth Vocational High School",'Winston_Salem=' + Winston_Salem.length); Winston_salem[Winston_salem.length] = createMarker(new GPoint(-80.31000519,36.18894958),"
Gibson Elementary School
2020 Walker Road
Winston-salem, NC 27106

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Gibson Elementary School",'Winston_salem=' + Winston_salem.length); Winston_salem[Winston_salem.length] = createMarker(new GPoint(-80.24452200,36.04752500),"
Griffith Alternative School
401 W Clemmonsville Rd
Winston-salem, NC 27127

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Griffith Alternative School",'Winston_salem=' + Winston_salem.length); Winston_Salem[Winston_Salem.length] = createMarker(new GPoint(-80.26366425,36.03968811),"
Griffith Elementary School
1385 W Clemmonsville Road
Winston Salem, NC 27127

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Griffith Elementary School",'Winston_Salem=' + Winston_Salem.length); Winston_Salem[Winston_Salem.length] = createMarker(new GPoint(-80.17613220,36.07914352),"
Hall-woodward Elementary School
125 Nicholson Road
Winston Salem, NC 27107

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Hall-woodward Elementary School",'Winston_Salem=' + Winston_Salem.length); Winston_Salem[Winston_Salem.length] = createMarker(new GPoint(-80.23683167,36.12676239),"
Hanes Middle School
2900 Indiana Avenue
Winston Salem, NC 27105

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Hanes Middle School",'Winston_Salem=' + Winston_Salem.length); Winston_Salem[Winston_Salem.length] = createMarker(new GPoint(-80.20565796,36.06866074),"
Hill Middle School
2200 Tryon Street
Winston Salem, NC 27107

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Hill Middle School",'Winston_Salem=' + Winston_Salem.length); Winston_salem[Winston_salem.length] = createMarker(new GPoint(-80.22428131,36.11843872),"
Homebound/hospital Educ Center
1401 W Clemmonsville Road
Winston-salem, NC 27127

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Homebound/hospital Educ Center",'Winston_salem=' + Winston_salem.length); Winston_Salem[Winston_Salem.length] = createMarker(new GPoint(-80.20282745,36.15800095),"
Ibraham Elementary School
5036 Old Walkertown
Winston Salem, NC 27105

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Ibraham Elementary School",'Winston_Salem=' + Winston_Salem.length); Winston_salem[Winston_salem.length] = createMarker(new GPoint(-80.34925842,36.12614822),"
Jefferson Elementary School
2470 Hilltop Drive
Winston-salem, NC 27106

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Jefferson Elementary School",'Winston_salem=' + Winston_salem.length); Winston_salem[Winston_salem.length] = createMarker(new GPoint(-80.32167053,36.11603546),"
Jefferson Middle School
3500 Sally Kirk Road
Winston-salem, NC 27106

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Jefferson Middle School",'Winston_salem=' + Winston_salem.length); Kernersville[Kernersville.length] = createMarker(new GPoint(-80.07979584,36.12517929),"
Kernersville Elementary School
512 W Mountain Street
Kernersville, NC 27284

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Kernersville Elementary School",'Kernersville=' + Kernersville.length); Kernersville[Kernersville.length] = createMarker(new GPoint(-80.07186890,36.13483429),"
Kernersville Middle School
110 Brown Road
Kernersville, NC 27284

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Kernersville Middle School",'Kernersville=' + Kernersville.length); Winston_Salem[Winston_Salem.length] = createMarker(new GPoint(-80.24334717,36.09997940),"
Kimberley Park Elementary School
1700 Old Cherry Street
Winston Salem, NC 27105

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Kimberley Park Elementary School",'Winston_Salem=' + Winston_Salem.length); Winston_Salem[Winston_Salem.length] = createMarker(new GPoint(-80.24593353,36.05144882),"
Konnoak Elementary School
3200 Renon Road
Winston Salem, NC 27127

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Konnoak Elementary School",'Winston_Salem=' + Winston_Salem.length); Winston_Salem[Winston_Salem.length] = createMarker(new GPoint(-80.25534058,36.07809830),"
Latham Elementary School
986 Hutton Street
Winston Salem, NC 27101

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Latham Elementary School",'Winston_Salem=' + Winston_Salem.length); Winston_Salem[Winston_Salem.length] = createMarker(new GPoint(-80.23332214,36.10676193),"
Leap At Kennedy Middle School
1000 N Highland Avenue
Winston Salem, NC 27101

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Leap At Kennedy Middle School",'Winston_Salem=' + Winston_Salem.length); Lewisville[Lewisville.length] = createMarker(new GPoint(-80.41984558,36.09568787),"
Lewisville Elementary School
6500 Lucy Lane
Lewisville, NC 27023

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lewisville Elementary School",'Lewisville=' + Lewisville.length); Winston_Salem[Winston_Salem.length] = createMarker(new GPoint(-80.23683167,36.12676239),"
Lowrance Middle School
2900 Indiana Avenue
Winston Salem, NC 27105

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lowrance Middle School",'Winston_Salem=' + Winston_Salem.length); Winston_salem[Winston_salem.length] = createMarker(new GPoint(-80.36588800,36.10177300),"
Meadowlark Elementary School
401 Meadowlark Road
Winston-salem, NC 27106

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Meadowlark Elementary School",'Winston_salem=' + Winston_salem.length); Winston_salem[Winston_salem.length] = createMarker(new GPoint(-80.36591339,36.09899902),"
Meadowlark Middle School
301 Meadowlark Drive
Winston-salem, NC 27106

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Meadowlark Middle School",'Winston_salem=' + Winston_salem.length); Winston_salem[Winston_salem.length] = createMarker(new GPoint(-80.30999756,36.06549835),"
Middle College Of Forsyth Cnty
2100 Silas Creek Parkway
Winston-salem, NC 27103

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Middle College Of Forsyth Cnty",'Winston_salem=' + Winston_salem.length); Walkertown[Walkertown.length] = createMarker(new GPoint(-80.16973200,36.14040000),"
Middle Fork Elementary School
3125 Williston Road
Walkertown, NC 27051

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Middle Fork Elementary School",'Walkertown=' + Walkertown.length); Winston_Salem[Winston_Salem.length] = createMarker(new GPoint(-80.23612976,36.15644073),"
Mineral Springs Elementary School
4527 Ogburn Avenue
Winston Salem, NC 27105

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Mineral Springs Elementary School",'Winston_Salem=' + Winston_Salem.length); Winston_Salem[Winston_Salem.length] = createMarker(new GPoint(-80.23612976,36.15742493),"
Mineral Springs Middle School
4559 Ogburn Avenue
Winston Salem, NC 27105

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Mineral Springs Middle School",'Winston_Salem=' + Winston_Salem.length); Winston_Salem[Winston_Salem.length] = createMarker(new GPoint(-80.28607941,36.08742905),"
Moore Elementary School
451 Knollwood Street
Winston Salem, NC 27103

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Moore Elementary School",'Winston_Salem=' + Winston_Salem.length); Winston_Salem[Winston_Salem.length] = createMarker(new GPoint(-80.31346893,36.12781525),"
Mount Tabor High School
342 Petree Road
Winston Salem, NC 27106

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mount Tabor High School",'Winston_Salem=' + Winston_Salem.length); Winston_Salem[Winston_Salem.length] = createMarker(new GPoint(-80.28405762,36.16902924),"
North Forsyth High School
5705 Shattalon Drive
Winston Salem, NC 27105

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("North Forsyth High School",'Winston_Salem=' + Winston_Salem.length); Winston_salem[Winston_salem.length] = createMarker(new GPoint(-80.25193787,36.14893723),"
North Hills Elementary School
340 Alspaugh Drive
Winston-salem, NC 27105

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("North Hills Elementary School",'Winston_salem=' + Winston_salem.length); Winston_Salem[Winston_Salem.length] = createMarker(new GPoint(-80.30927277,36.19181824),"
Northwest Middle School
5501 Murray Road
Winston Salem, NC 27106

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Northwest Middle School",'Winston_Salem=' + Winston_Salem.length); Tobaccoville[Tobaccoville.length] = createMarker(new GPoint(-80.38865662,36.20704269),"
Old Richmond Elementary School
6315 Tobaccoville Road
Tobaccoville, NC 27050

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Old Richmond Elementary School",'Tobaccoville=' + Tobaccoville.length); Winston_Salem[Winston_Salem.length] = createMarker(new GPoint(-80.33181763,36.16542816),"
Old Town Elementary School
3930 Reynolda Road
Winston Salem, NC 27106

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Old Town Elementary School",'Winston_Salem=' + Winston_Salem.length); Winston_Salem[Winston_Salem.length] = createMarker(new GPoint(-80.25827026,36.11346436),"
Paisley Middle School
1400 Grant Avenue
Winston Salem, NC 27105

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Paisley Middle School",'Winston_Salem=' + Winston_Salem.length); Winston_Salem[Winston_Salem.length] = createMarker(new GPoint(-80.25767517,36.05537033),"
Parkland High School
1600 Brewer Road
Winston Salem, NC 27127

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Parkland High School",'Winston_Salem=' + Winston_Salem.length); Winston_salem[Winston_salem.length] = createMarker(new GPoint(-80.19184113,36.11160278),"
Petree Elementary School
3815 Old Greensboro Road
Winston-salem, NC 27101

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Petree Elementary School",'Winston_salem=' + Winston_salem.length); Winston_Salem[Winston_Salem.length] = createMarker(new GPoint(-80.24623871,36.05347443),"
Philo Middle School
410 Haverhill Street
Winston Salem, NC 27127

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Philo Middle School",'Winston_Salem=' + Winston_Salem.length); Kernersville[Kernersville.length] = createMarker(new GPoint(-80.05503082,36.16038895),"
Piney Grove Elementary School
1500 Piney Grove Road
Kernersville, NC 27284

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Piney Grove Elementary School",'Kernersville=' + Kernersville.length); Winston_salem[Winston_salem.length] = createMarker(new GPoint(-80.23780060,36.14770126),"
Quality Education Academy
5012-d Lansing Drive
Winston-salem, NC 27105

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Quality Education Academy",'Winston_salem=' + Winston_salem.length); Kernersville[Kernersville.length] = createMarker(new GPoint(-80.11167145,36.06916428),"
R B Glenn High School
1600 Union Cross Road
Kernersville, NC 27284

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("R B Glenn High School",'Kernersville=' + Kernersville.length); Pfafftown[Pfafftown.length] = createMarker(new GPoint(-80.36442400,36.16905300),"
Reagen High School
3750 Transou Road
Pfafftown, NC 27040

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Reagen High School",'Pfafftown=' + Pfafftown.length); Winston_Salem[Winston_Salem.length] = createMarker(new GPoint(-80.26654053,36.10085678),"
Reynolds High School
301 N Hawthorne Road
Winston Salem, NC 27104

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Reynolds High School",'Winston_Salem=' + Winston_Salem.length); Rural_Hall[Rural_Hall.length] = createMarker(new GPoint(-80.29095459,36.24092865),"
Rural Hall Elementary School
275 College Street
Rural Hall, NC 27045

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Rural Hall Elementary School",'Rural_Hall=' + Rural_Hall.length); Winston_salem[Winston_salem.length] = createMarker(new GPoint(-80.19592600,36.10797300),"
Sch Computer Technology Atkins
3605 Old Greensboro Rd
Winston-salem, NC 27101

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sch Computer Technology Atkins",'Winston_salem=' + Winston_salem.length); Winston_salem[Winston_salem.length] = createMarker(new GPoint(-80.19592600,36.10797300),"
Sch Of Biotechnology Atkins High School
3605 Old Greensboro Rd
Winston-salem, NC 27101

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sch Of Biotechnology Atkins High School",'Winston_salem=' + Winston_salem.length); Winston_salem[Winston_salem.length] = createMarker(new GPoint(-80.19592600,36.10797300),"
Sch Pre-engineering Atkins Hig
3605 Old Greensboro Rd
Winston-salem, NC 27101

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sch Pre-engineering Atkins Hig",'Winston_salem=' + Winston_salem.length); Kernersville[Kernersville.length] = createMarker(new GPoint(-80.13729095,36.09654617),"
Sedge Garden Elementary School
475 Sedge Garden Road
Kernersville, NC 27284

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Sedge Garden Elementary School",'Kernersville=' + Kernersville.length); Winston_Salem[Winston_Salem.length] = createMarker(new GPoint(-80.31029510,36.10551071),"
Sherwood Forest Elementary School
1055 Yorkshire Road
Winston Salem, NC 27106

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Sherwood Forest Elementary School",'Winston_Salem=' + Winston_Salem.length); Winston_Salem[Winston_Salem.length] = createMarker(new GPoint(-80.32467651,36.08504868),"
South Fork Elementary School
4332 Country Club Road
Winston Salem, NC 27104

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("South Fork Elementary School",'Winston_Salem=' + Winston_Salem.length); Kernersville[Kernersville.length] = createMarker(new GPoint(-80.09072876,36.08301544),"
Southeast Middle School
1200 Old Salem Road
Kernersville, NC 27284

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Southeast Middle School",'Kernersville=' + Kernersville.length); Clemmons[Clemmons.length] = createMarker(new GPoint(-80.38442993,36.06733704),"
Southwest Elementary School
1631 Southwest School Drive
Clemmons, NC 27012

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Southwest Elementary School",'Clemmons=' + Clemmons.length); Winston_Salem[Winston_Salem.length] = createMarker(new GPoint(-80.29653931,36.13100433),"
Speas Elementary School
2000 W Polo Road
Winston Salem, NC 27106

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Speas Elementary School",'Winston_Salem=' + Winston_Salem.length); Kernersville[Kernersville.length] = createMarker(new GPoint(-80.11895752,36.04844284),"
Union Cross Elementary School
4300 High Point Road
Kernersville, NC 27284

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Union Cross Elementary School",'Kernersville=' + Kernersville.length); Pfafftown[Pfafftown.length] = createMarker(new GPoint(-80.38948059,36.14147568),"
Vienna Elementary School
1975 Chickasha Road
Pfafftown, NC 27040

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Vienna Elementary School",'Pfafftown=' + Pfafftown.length); Walkertown[Walkertown.length] = createMarker(new GPoint(-80.15155029,36.17083740),"
Walkertown Elementary School
2971 Main Street
Walkertown, NC 27051

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Walkertown Elementary School",'Walkertown=' + Walkertown.length); Walkertown[Walkertown.length] = createMarker(new GPoint(-80.15830231,36.17969894),"
Walkertown Middle School
Po Box 1149
Walkertown, NC 27051

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Walkertown Middle School",'Walkertown=' + Walkertown.length); Winston_salem[Winston_salem.length] = createMarker(new GPoint(-80.34262848,36.02637863),"
Ward Elementary School
3775 Fraternity Church Road
Winston-salem, NC 27127

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Ward Elementary School",'Winston_salem=' + Winston_salem.length); Clemmons[Clemmons.length] = createMarker(new GPoint(-80.38912964,36.06293869),"
West Forsyth High School
1735 Lewisville-clemmons
Clemmons, NC 27012

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("West Forsyth High School",'Clemmons=' + Clemmons.length); Winston_Salem[Winston_Salem.length] = createMarker(new GPoint(-80.28433228,36.10675049),"
Whitaker Elementary School
2600 Buena Vista Road
Winston Salem, NC 27104

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Whitaker Elementary School",'Winston_Salem=' + Winston_Salem.length); Winston_Salem[Winston_Salem.length] = createMarker(new GPoint(-80.26243591,36.10200882),"
Wiley Middle School
1400 Northwest Boulevard
Winston Salem, NC 27104

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Wiley Middle School",'Winston_Salem=' + Winston_Salem.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(Clemmons); map.removeOverlays(Kernersville); map.removeOverlays(Lewisville); map.removeOverlays(Pfafftown); map.removeOverlays(Rural_Hall); map.removeOverlays(Tobaccoville); map.removeOverlays(Walkertown); map.removeOverlays(Winston_Salem); map.removeOverlays(Winston_salem); 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(Winston_Salem);map.removeOverlays(Clemmons); map.removeOverlays(Kernersville); map.removeOverlays(Lewisville); map.removeOverlays(Pfafftown); map.removeOverlays(Rural_Hall); map.removeOverlays(Tobaccoville); map.removeOverlays(Walkertown); map.removeOverlays(Winston_Salem); map.removeOverlays(Winston_salem); map.addOverlays(Clemmons); centerByArray(Clemmons, false, false); cntMarker += Clemmons.length; map.addOverlays(Kernersville); centerByArray(Kernersville, false, false); cntMarker += Kernersville.length; map.addOverlays(Lewisville); centerByArray(Lewisville, false, false); cntMarker += Lewisville.length; map.addOverlays(Pfafftown); centerByArray(Pfafftown, false, false); cntMarker += Pfafftown.length; map.addOverlays(Rural_Hall); centerByArray(Rural_Hall, false, false); cntMarker += Rural_Hall.length; map.addOverlays(Tobaccoville); centerByArray(Tobaccoville, false, false); cntMarker += Tobaccoville.length; map.addOverlays(Walkertown); centerByArray(Walkertown, false, false); cntMarker += Walkertown.length; map.addOverlays(Winston_Salem); centerByArray(Winston_Salem, false, false); cntMarker += Winston_Salem.length; map.addOverlays(Winston_salem); centerByArray(Winston_salem, false, false); cntMarker += Winston_salem.length; centerByArray(Winston_Salem,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'); } }