function addMarkers() { mySelect = document.getElementById('selection'); Adamstown = [];Akron = [];Bainbridge = [];Christiana = [];Blue_Ball = [];Lancaster = [];Denver = [];Brownstown = [];Manheim = [];Narvon = [];Washington_Boro = [];Ephrata = [];Quarryville = [];Columbia = [];Conestoga = [];Marietta = [];Mount_Joy = [];Elizabethtown = [];East_Petersburg = [];Millersville = [];New_Holland = [];Lampeter = [];Landisville = [];Lititz = [];Willow_Street = [];Gordonville = [];Leola = [];Holtwood = [];Pequea = [];Maytown = [];Mountville = [];Paradise = [];Bird_In_Hand = [];Kinzers = [];New_Providence = [];Reamstown = [];Rheems = [];Gap = [];Stevens = [];Strasburg = [];mySelect.options[mySelect.options.length] = new Option("Adamstown schools",'all=Adamstown'); mySelect.options[mySelect.options.length] = new Option("Akron schools",'all=Akron'); mySelect.options[mySelect.options.length] = new Option("Bainbridge schools",'all=Bainbridge'); mySelect.options[mySelect.options.length] = new Option("Bird In Hand schools",'all=Bird_In_Hand'); mySelect.options[mySelect.options.length] = new Option("Blue Ball schools",'all=Blue_Ball'); mySelect.options[mySelect.options.length] = new Option("Brownstown schools",'all=Brownstown'); mySelect.options[mySelect.options.length] = new Option("Christiana schools",'all=Christiana'); mySelect.options[mySelect.options.length] = new Option("Columbia schools",'all=Columbia'); mySelect.options[mySelect.options.length] = new Option("Conestoga schools",'all=Conestoga'); mySelect.options[mySelect.options.length] = new Option("Denver schools",'all=Denver'); mySelect.options[mySelect.options.length] = new Option("East Petersburg schools",'all=East_Petersburg'); mySelect.options[mySelect.options.length] = new Option("Elizabethtown schools",'all=Elizabethtown'); mySelect.options[mySelect.options.length] = new Option("Ephrata schools",'all=Ephrata'); mySelect.options[mySelect.options.length] = new Option("Gap schools",'all=Gap'); mySelect.options[mySelect.options.length] = new Option("Gordonville schools",'all=Gordonville'); mySelect.options[mySelect.options.length] = new Option("Holtwood schools",'all=Holtwood'); mySelect.options[mySelect.options.length] = new Option("Kinzers schools",'all=Kinzers'); mySelect.options[mySelect.options.length] = new Option("Lampeter schools",'all=Lampeter'); mySelect.options[mySelect.options.length] = new Option("Lancaster schools",'all=Lancaster'); mySelect.options[mySelect.options.length] = new Option("Landisville schools",'all=Landisville'); mySelect.options[mySelect.options.length] = new Option("Leola schools",'all=Leola'); mySelect.options[mySelect.options.length] = new Option("Lititz schools",'all=Lititz'); mySelect.options[mySelect.options.length] = new Option("Manheim schools",'all=Manheim'); mySelect.options[mySelect.options.length] = new Option("Marietta schools",'all=Marietta'); mySelect.options[mySelect.options.length] = new Option("Maytown schools",'all=Maytown'); mySelect.options[mySelect.options.length] = new Option("Millersville schools",'all=Millersville'); mySelect.options[mySelect.options.length] = new Option("Mount Joy schools",'all=Mount_Joy'); mySelect.options[mySelect.options.length] = new Option("Mountville schools",'all=Mountville'); mySelect.options[mySelect.options.length] = new Option("Narvon schools",'all=Narvon'); mySelect.options[mySelect.options.length] = new Option("New Holland schools",'all=New_Holland'); mySelect.options[mySelect.options.length] = new Option("New Providence schools",'all=New_Providence'); mySelect.options[mySelect.options.length] = new Option("Paradise schools",'all=Paradise'); mySelect.options[mySelect.options.length] = new Option("Pequea schools",'all=Pequea'); mySelect.options[mySelect.options.length] = new Option("Quarryville schools",'all=Quarryville'); mySelect.options[mySelect.options.length] = new Option("Reamstown schools",'all=Reamstown'); mySelect.options[mySelect.options.length] = new Option("Rheems schools",'all=Rheems'); mySelect.options[mySelect.options.length] = new Option("Stevens schools",'all=Stevens'); mySelect.options[mySelect.options.length] = new Option("Strasburg schools",'all=Strasburg'); mySelect.options[mySelect.options.length] = new Option("Washington Boro schools",'all=Washington_Boro'); mySelect.options[mySelect.options.length] = new Option("Willow Street schools",'all=Willow_Street'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Adamstown[Adamstown.length] = createMarker(new GPoint(-76.06253052,40.24009323),"
",iconRd); mySelect.options[mySelect.options.length] = new Option("Adamstown Elementary School",'Adamstown=' + Adamstown.length); Akron[Akron.length] = createMarker(new GPoint(-76.19890594,40.15419388),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Akron Elementary School",'Akron=' + Akron.length); Bainbridge[Bainbridge.length] = createMarker(new GPoint(-76.66960144,40.09989929),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Bainbridge Elementary School",'Bainbridge=' + Bainbridge.length); Christiana[Christiana.length] = createMarker(new GPoint(-76.06781769,39.89144135),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Bart-colerain Elementary School",'Christiana=' + Christiana.length); Blue_Ball[Blue_Ball.length] = createMarker(new GPoint(-76.05280304,40.11690140),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Blue Ball Elementary School",'Blue_Ball=' + Blue_Ball.length); Lancaster[Lancaster.length] = createMarker(new GPoint(-76.30603027,40.05796432),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Brecht School",'Lancaster=' + Lancaster.length); Denver[Denver.length] = createMarker(new GPoint(-76.14545441,40.22828674),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Brecknock Elementary School",'Denver=' + Denver.length); Brownstown[Brownstown.length] = createMarker(new GPoint(-76.20675659,40.12469864),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Brownstown Elementary School",'Brownstown=' + Brownstown.length); Lancaster[Lancaster.length] = createMarker(new GPoint(-76.33247375,40.08423233),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Bucher School",'Lancaster=' + Lancaster.length); Lancaster[Lancaster.length] = createMarker(new GPoint(-76.29863739,40.05072403),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Buehrle Alternative Ed School",'Lancaster=' + Lancaster.length); Manheim[Manheim.length] = createMarker(new GPoint(-76.39715576,40.15825653),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Burgard Elementary School",'Manheim=' + Manheim.length); Lancaster[Lancaster.length] = createMarker(new GPoint(-76.28330231,40.04195786),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Burrowes School",'Lancaster=' + Lancaster.length); Narvon[Narvon.length] = createMarker(new GPoint(-75.95791626,40.13396454),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Caernarvon Elementary School",'Narvon=' + Narvon.length); Lancaster[Lancaster.length] = createMarker(new GPoint(-76.30681610,40.03380585),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Carter And Macrae Elementary School",'Lancaster=' + Lancaster.length); Lancaster[Lancaster.length] = createMarker(new GPoint(-76.39653778,40.06563568),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Centerville Elementary School",'Lancaster=' + Lancaster.length); Lancaster[Lancaster.length] = createMarker(new GPoint(-76.39652252,40.06455231),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Centerville Middle School",'Lancaster=' + Lancaster.length); Washington_Boro[Washington_Boro.length] = createMarker(new GPoint(-76.42337799,40.00093460),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Central Manor Elementary School",'Washington_Boro=' + Washington_Boro.length); Ephrata[Ephrata.length] = createMarker(new GPoint(-76.23737335,40.21992493),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Clay Elementary School",'Ephrata=' + Ephrata.length); Quarryville[Quarryville.length] = createMarker(new GPoint(-76.15789032,39.80780029),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Clermont Elementary School",'Quarryville=' + Quarryville.length); Denver[Denver.length] = createMarker(new GPoint(-76.14473724,40.23040009),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Cocalico Middle School",'Denver=' + Denver.length); Denver[Denver.length] = createMarker(new GPoint(-76.14163971,40.23015976),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Cocalico Senior High School",'Denver=' + Denver.length); Columbia[Columbia.length] = createMarker(new GPoint(-76.49716949,40.04102707),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Columbia Junior Senior High School",'Columbia=' + Columbia.length); Conestoga[Conestoga.length] = createMarker(new GPoint(-76.33611298,39.94767380),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Conestoga Elementary School",'Conestoga=' + Conestoga.length); Lancaster[Lancaster.length] = createMarker(new GPoint(-76.21362305,40.05279160),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Conestoga Valley Middle School",'Lancaster=' + Lancaster.length); Lancaster[Lancaster.length] = createMarker(new GPoint(-76.22315979,40.05125427),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Conestoga Valley Senior High School",'Lancaster=' + Lancaster.length); Denver[Denver.length] = createMarker(new GPoint(-76.10700226,40.22949982),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Denver Elementary School",'Denver=' + Denver.length); Manheim[Manheim.length] = createMarker(new GPoint(-76.37097931,40.17343521),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Doe Run Elementary School",'Manheim=' + Manheim.length); Marietta[Marietta.length] = createMarker(new GPoint(-76.54521942,40.06286240),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Donegal Middle School",'Marietta=' + Marietta.length); Mount_Joy[Mount_Joy.length] = createMarker(new GPoint(-76.51876068,40.09260178),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Donegal Senior High School",'Mount_Joy=' + Mount_Joy.length); Mount_Joy[Mount_Joy.length] = createMarker(new GPoint(-76.46208191,40.07073975),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Donegal Springs Elementary School",'Mount_Joy=' + Mount_Joy.length); Elizabethtown[Elizabethtown.length] = createMarker(new GPoint(-76.58683014,40.16001129),"",iconRd); mySelect.options[mySelect.options.length] = new Option("East High Street Elementary School",'Elizabethtown=' + Elizabethtown.length); East_Petersburg[East_Petersburg.length] = createMarker(new GPoint(-76.35588074,40.09394073),"",iconRd); mySelect.options[mySelect.options.length] = new Option("East Petersburg Elementary School",'East_Petersburg=' + East_Petersburg.length); Lancaster[Lancaster.length] = createMarker(new GPoint(-76.33928680,40.01031876),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Elizabeth R Martin Elementary School",'Lancaster=' + Lancaster.length); Elizabethtown[Elizabethtown.length] = createMarker(new GPoint(-76.59284973,40.15755844),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Elizabethtown Area Middle School",'Elizabethtown=' + Elizabethtown.length); Elizabethtown[Elizabethtown.length] = createMarker(new GPoint(-76.59284973,40.15755844),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Elizabethtown Area Senior High School",'Elizabethtown=' + Elizabethtown.length); Mount_Joy[Mount_Joy.length] = createMarker(new GPoint(-76.45418549,40.11347580),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Elm Tree Elementary School",'Mount_Joy=' + Mount_Joy.length); Ephrata[Ephrata.length] = createMarker(new GPoint(-76.19696045,40.18300629),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Ephrata Middle School",'Ephrata=' + Ephrata.length); Ephrata[Ephrata.length] = createMarker(new GPoint(-76.19145203,40.17949677),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Ephrata Senior High School",'Ephrata=' + Ephrata.length); Millersville[Millersville.length] = createMarker(new GPoint(-76.35446930,40.01287460),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Eshleman Elementary School",'Millersville=' + Millersville.length); Elizabethtown[Elizabethtown.length] = createMarker(new GPoint(-76.55956268,40.17312622),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Fairview Elementary School",'Elizabethtown=' + Elizabethtown.length); Mount_Joy[Mount_Joy.length] = createMarker(new GPoint(-76.45803833,40.06593704),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Farmdale Elementary School",'Mount_Joy=' + Mount_Joy.length); Lancaster[Lancaster.length] = createMarker(new GPoint(-76.24237823,40.07500076),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Fritz Elementary School",'Lancaster=' + Lancaster.length); Lancaster[Lancaster.length] = createMarker(new GPoint(-76.22132111,40.05435944),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Fulton Elementary School",'Lancaster=' + Lancaster.length); Ephrata[Ephrata.length] = createMarker(new GPoint(-76.17929840,40.17642212),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Fulton Elementary School",'Ephrata=' + Ephrata.length); New_Holland[New_Holland.length] = createMarker(new GPoint(-76.07820129,40.10070038),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Garden Spot Middle School",'New_Holland=' + New_Holland.length); New_Holland[New_Holland.length] = createMarker(new GPoint(-76.07749939,40.09999847),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Garden Spot Senior High School",'New_Holland=' + New_Holland.length); Lancaster[Lancaster.length] = createMarker(new GPoint(-76.29303741,40.03108597),"",iconRd); mySelect.options[mySelect.options.length] = new Option("George Washington Elementary School",'Lancaster=' + Lancaster.length); Mount_Joy[Mount_Joy.length] = createMarker(new GPoint(-76.51567841,40.11573792),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Grandview Elementary School",'Mount_Joy=' + Mount_Joy.length); Lancaster[Lancaster.length] = createMarker(new GPoint(-76.36196136,40.03771591),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Hambright Elementary School",'Lancaster=' + Lancaster.length); Lancaster[Lancaster.length] = createMarker(new GPoint(-76.31899261,40.02110672),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Hamilton Elementary School",'Lancaster=' + Lancaster.length); Lancaster[Lancaster.length] = createMarker(new GPoint(-76.29348755,40.03287506),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Hand Middle School",'Lancaster=' + Lancaster.length); Lampeter[Lampeter.length] = createMarker(new GPoint(-76.23999786,39.99000168),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Hans Herr Elementary School",'Lampeter=' + Lampeter.length); Landisville[Landisville.length] = createMarker(new GPoint(-76.41470337,40.09297943),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Hempfield Senior High School",'Landisville=' + Landisville.length); Ephrata[Ephrata.length] = createMarker(new GPoint(-76.17850494,40.18271637),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Highland Elementary School",'Ephrata=' + Ephrata.length); Lancaster[Lancaster.length] = createMarker(new GPoint(-76.32482910,40.03381729),"",iconRd); mySelect.options[mySelect.options.length] = new Option("James Buchanan Elementary School",'Lancaster=' + Lancaster.length); Lititz[Lititz.length] = createMarker(new GPoint(-76.28784180,40.18676376),"",iconRd); mySelect.options[mySelect.options.length] = new Option("John Beck Elementary School",'Lititz=' + Lititz.length); Lititz[Lititz.length] = createMarker(new GPoint(-76.29116058,40.15708542),"",iconRd); mySelect.options[mySelect.options.length] = new Option("John R Bonfield Elementary School",'Lititz=' + Lititz.length); Lancaster[Lancaster.length] = createMarker(new GPoint(-76.30082703,40.03371811),"",iconRd); mySelect.options[mySelect.options.length] = new Option("King Elementary School",'Lancaster=' + Lancaster.length); Lititz[Lititz.length] = createMarker(new GPoint(-76.29529572,40.13909912),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Kissel Hill Elementary School",'Lititz=' + Lititz.length); Lancaster[Lancaster.length] = createMarker(new GPoint(-76.29541779,40.04003525),"",iconGr); mySelect.options[mySelect.options.length] = new Option("La Academia Charter School",'Lancaster=' + Lancaster.length); Lancaster[Lancaster.length] = createMarker(new GPoint(-76.31876373,40.02770615),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Lafayette Elementary School",'Lancaster=' + Lancaster.length); Lampeter[Lampeter.length] = createMarker(new GPoint(-76.23999786,39.99000168),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Lampeter-strasburg Senior High School",'Lampeter=' + Lampeter.length); Lancaster[Lancaster.length] = createMarker(new GPoint(-76.33984375,40.06671143),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Lancaster County Academy",'Lancaster=' + Lancaster.length); Brownstown[Brownstown.length] = createMarker(new GPoint(-76.18653870,40.14014053),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Lancaster County Ctc-brownstow",'Brownstown=' + Brownstown.length); Mount_Joy[Mount_Joy.length] = createMarker(new GPoint(-76.50590515,40.11731720),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Lancaster County Ctc-mt Joy Ca",'Mount_Joy=' + Mount_Joy.length); Willow_Street[Willow_Street.length] = createMarker(new GPoint(-76.26502228,39.98892593),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Lancaster County Ctc-willow St",'Willow_Street=' + Willow_Street.length); Landisville[Landisville.length] = createMarker(new GPoint(-76.40978241,40.08881378),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Landisville Intrmd Center",'Landisville=' + Landisville.length); Landisville[Landisville.length] = createMarker(new GPoint(-76.41255188,40.08533859),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Landisville Middle School",'Landisville=' + Landisville.length); Landisville[Landisville.length] = createMarker(new GPoint(-76.41075134,40.08568192),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Landisville Pri Center",'Landisville=' + Landisville.length); Gordonville[Gordonville.length] = createMarker(new GPoint(-76.10337830,40.03860474),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Leacock Elementary School",'Gordonville=' + Gordonville.length); Leola[Leola.length] = createMarker(new GPoint(-76.19167328,40.08755112),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Leola Elementary School",'Leola=' + Leola.length); Washington_Boro[Washington_Boro.length] = createMarker(new GPoint(-76.40058136,39.98261642),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Letort Elementary School",'Washington_Boro=' + Washington_Boro.length); Ephrata[Ephrata.length] = createMarker(new GPoint(-76.19841766,40.19422150),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Lincoln Elementary School",'Ephrata=' + Ephrata.length); Lancaster[Lancaster.length] = createMarker(new GPoint(-76.28621674,40.04637909),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Lincoln Middle School",'Lancaster=' + Lancaster.length); Lititz[Lititz.length] = createMarker(new GPoint(-76.30470276,40.15595245),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Lititz Elementary School",'Lititz=' + Lititz.length); Manheim[Manheim.length] = createMarker(new GPoint(-76.39508057,40.16688156),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Manheim Central Middle School",'Manheim=' + Manheim.length); Manheim[Manheim.length] = createMarker(new GPoint(-76.39287567,40.17029190),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Manheim Central Senior High School",'Manheim=' + Manheim.length); Lancaster[Lancaster.length] = createMarker(new GPoint(-76.30359650,40.09320068),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Manheim Township High School",'Lancaster=' + Lancaster.length); Lancaster[Lancaster.length] = createMarker(new GPoint(-76.30359650,40.09320068),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Manheim Township Middle School",'Lancaster=' + Lancaster.length); Lancaster[Lancaster.length] = createMarker(new GPoint(-76.38653564,40.01976776),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Manor Middle School",'Lancaster=' + Lancaster.length); Holtwood[Holtwood.length] = createMarker(new GPoint(-76.29207611,39.88546371),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Martic Elementary School",'Holtwood=' + Holtwood.length); Pequea[Pequea.length] = createMarker(new GPoint(-76.31049347,39.92710495),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Marticville Middle School",'Pequea=' + Pequea.length); Lampeter[Lampeter.length] = createMarker(new GPoint(-76.23999786,39.99000168),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Martin Meylin Middle School",'Lampeter=' + Lampeter.length); Manheim[Manheim.length] = createMarker(new GPoint(-76.48451996,40.19644547),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Mastersonville Elementary School",'Manheim=' + Manheim.length); Maytown[Maytown.length] = createMarker(new GPoint(-76.58322144,40.07698059),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Maytown Elementary School",'Maytown=' + Maytown.length); Lancaster[Lancaster.length] = createMarker(new GPoint(-76.28617096,40.04638672),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Mccaskey East High School-lev I",'Lancaster=' + Lancaster.length); Lancaster[Lancaster.length] = createMarker(new GPoint(-76.29073334,40.04715729),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Mccaskey High School-lev Ii",'Lancaster=' + Lancaster.length); Elizabethtown[Elizabethtown.length] = createMarker(new GPoint(-76.61164093,40.15988541),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Mill Road Elementary School",'Elizabethtown=' + Elizabethtown.length); Mountville[Mountville.length] = createMarker(new GPoint(-76.42635345,40.04182053),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Mountville Elementary School",'Mountville=' + Mountville.length); Lancaster[Lancaster.length] = createMarker(new GPoint(-76.30359650,40.09320068),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Neff 6 Middle School",'Lancaster=' + Lancaster.length); Lancaster[Lancaster.length] = createMarker(new GPoint(-76.30359650,40.09320068),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Neff School",'Lancaster=' + Lancaster.length); New_Holland[New_Holland.length] = createMarker(new GPoint(-76.07209778,40.08428574),"",iconRd); mySelect.options[mySelect.options.length] = new Option("New Holland Elementary School",'New_Holland=' + New_Holland.length); Lancaster[Lancaster.length] = createMarker(new GPoint(-76.29047394,40.07993698),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Nitrauer School",'Lancaster=' + Lancaster.length); Paradise[Paradise.length] = createMarker(new GPoint(-76.10655975,40.00529099),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Paradise Elementary School",'Paradise=' + Paradise.length); Columbia[Columbia.length] = createMarker(new GPoint(-76.49733734,40.03426361),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Park Elementary School",'Columbia=' + Columbia.length); Bird_In_Hand[Bird_In_Hand.length] = createMarker(new GPoint(-76.21372223,40.09907532),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Penn Johns Elementary School",'Bird_In_Hand=' + Bird_In_Hand.length); Millersville[Millersville.length] = createMarker(new GPoint(-76.36270142,39.99530029),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Penn Manor High School",'Millersville=' + Millersville.length); Willow_Street[Willow_Street.length] = createMarker(new GPoint(-76.28707886,39.96948624),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Pequea Elementary School",'Willow_Street=' + Willow_Street.length); Kinzers[Kinzers.length] = createMarker(new GPoint(-76.06739044,40.02054214),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Pequea Valley High School",'Kinzers=' + Kinzers.length); Kinzers[Kinzers.length] = createMarker(new GPoint(-76.04290009,40.00989914),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Pequea Valley Intrmd School",'Kinzers=' + Kinzers.length); Lancaster[Lancaster.length] = createMarker(new GPoint(-76.31063080,40.02643585),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Price Elementary School",'Lancaster=' + Lancaster.length); New_Providence[New_Providence.length] = createMarker(new GPoint(-76.20758820,39.91642380),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Providence Elementary School",'New_Providence=' + New_Providence.length); Quarryville[Quarryville.length] = createMarker(new GPoint(-76.15979767,39.89472580),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Quarryville Elementary School",'Quarryville=' + Quarryville.length); Reamstown[Reamstown.length] = createMarker(new GPoint(-76.12641907,40.20855713),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Reamstown Elementary School",'Reamstown=' + Reamstown.length); Lititz[Lititz.length] = createMarker(new GPoint(-76.32453156,40.12274933),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Reidenbaugh Elementary School",'Lititz=' + Lititz.length); Lancaster[Lancaster.length] = createMarker(new GPoint(-76.31831360,40.04169846),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Reynolds Middle School",'Lancaster=' + Lancaster.length); Rheems[Rheems.length] = createMarker(new GPoint(-76.57080078,40.13000107),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Rheems Elementary School",'Rheems=' + Rheems.length); Marietta[Marietta.length] = createMarker(new GPoint(-76.54590607,40.06286240),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Riverview Elementary School",'Marietta=' + Marietta.length); Lancaster[Lancaster.length] = createMarker(new GPoint(-76.36338806,40.05120468),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Rohrerstown Elementary School",'Lancaster=' + Lancaster.length); Lancaster[Lancaster.length] = createMarker(new GPoint(-76.30830383,40.05112076),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Ross Elementary School",'Lancaster=' + Lancaster.length); Gap[Gap.length] = createMarker(new GPoint(-76.00321198,40.01812744),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Salisbury Elementary School",'Gap=' + Gap.length); Lancaster[Lancaster.length] = createMarker(new GPoint(-76.29072571,40.05912018),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Schaeffer School",'Lancaster=' + Lancaster.length); Stevens[Stevens.length] = createMarker(new GPoint(-76.17717743,40.24210739),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Schoeneck Elementary School",'Stevens=' + Stevens.length); Mount_Joy[Mount_Joy.length] = createMarker(new GPoint(-76.49900818,40.10565567),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Seiler Elementary School",'Mount_Joy=' + Mount_Joy.length); Quarryville[Quarryville.length] = createMarker(new GPoint(-76.14632416,39.89264297),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Smith Middle School",'Quarryville=' + Quarryville.length); Lancaster[Lancaster.length] = createMarker(new GPoint(-76.20790100,40.03936386),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Smoketown Elementary School",'Lancaster=' + Lancaster.length); Quarryville[Quarryville.length] = createMarker(new GPoint(-76.15405273,39.86805725),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Solanco High School",'Quarryville=' + Quarryville.length); Manheim[Manheim.length] = createMarker(new GPoint(-76.41876984,40.14261246),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Sporting Hill Elementary School",'Manheim=' + Manheim.length); Manheim[Manheim.length] = createMarker(new GPoint(-76.39321136,40.16474152),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Stiegel Elementary School",'Manheim=' + Manheim.length); Strasburg[Strasburg.length] = createMarker(new GPoint(-76.18238068,39.98598099),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Strasburg Elementary School",'Strasburg=' + Strasburg.length); Quarryville[Quarryville.length] = createMarker(new GPoint(-76.15781403,39.80793381),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Swift Middle School",'Quarryville=' + Quarryville.length); Columbia[Columbia.length] = createMarker(new GPoint(-76.49406433,40.03834915),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Taylor Elementary School",'Columbia=' + Columbia.length); Lancaster[Lancaster.length] = createMarker(new GPoint(-76.31623840,40.04820251),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Thomas Wharton Elementary School",'Lancaster=' + Lancaster.length); Lititz[Lititz.length] = createMarker(new GPoint(-76.31797791,40.15616226),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Warwick Middle School",'Lititz=' + Lititz.length); Lititz[Lititz.length] = createMarker(new GPoint(-76.31386566,40.15454102),"",iconGr); mySelect.options[mySelect.options.length] = new Option("Warwick Senior High School",'Lititz=' + Lititz.length); Lancaster[Lancaster.length] = createMarker(new GPoint(-76.32662964,40.03139114),"",iconBl); mySelect.options[mySelect.options.length] = new Option("Wheatland Middle School",'Lancaster=' + Lancaster.length); Lancaster[Lancaster.length] = createMarker(new GPoint(-76.29025269,40.04598236),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Wickersham Elementary School",'Lancaster=' + Lancaster.length); Willow_Street[Willow_Street.length] = createMarker(new GPoint(-76.27588654,39.97881317),"",iconRd); mySelect.options[mySelect.options.length] = new Option("Willow Street Elementary School",'Willow_Street=' + Willow_Street.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(Adamstown); map.removeOverlays(Akron); map.removeOverlays(Bainbridge); map.removeOverlays(Bird_In_Hand); map.removeOverlays(Blue_Ball); map.removeOverlays(Brownstown); map.removeOverlays(Christiana); map.removeOverlays(Columbia); map.removeOverlays(Conestoga); map.removeOverlays(Denver); map.removeOverlays(East_Petersburg); map.removeOverlays(Elizabethtown); map.removeOverlays(Ephrata); map.removeOverlays(Gap); map.removeOverlays(Gordonville); map.removeOverlays(Holtwood); map.removeOverlays(Kinzers); map.removeOverlays(Lampeter); map.removeOverlays(Lancaster); map.removeOverlays(Landisville); map.removeOverlays(Leola); map.removeOverlays(Lititz); map.removeOverlays(Manheim); map.removeOverlays(Marietta); map.removeOverlays(Maytown); map.removeOverlays(Millersville); map.removeOverlays(Mount_Joy); map.removeOverlays(Mountville); map.removeOverlays(Narvon); map.removeOverlays(New_Holland); map.removeOverlays(New_Providence); map.removeOverlays(Paradise); map.removeOverlays(Pequea); map.removeOverlays(Quarryville); map.removeOverlays(Reamstown); map.removeOverlays(Rheems); map.removeOverlays(Stevens); map.removeOverlays(Strasburg); map.removeOverlays(Washington_Boro); map.removeOverlays(Willow_Street); 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(Adamstown);map.removeOverlays(Adamstown); map.removeOverlays(Akron); map.removeOverlays(Bainbridge); map.removeOverlays(Bird_In_Hand); map.removeOverlays(Blue_Ball); map.removeOverlays(Brownstown); map.removeOverlays(Christiana); map.removeOverlays(Columbia); map.removeOverlays(Conestoga); map.removeOverlays(Denver); map.removeOverlays(East_Petersburg); map.removeOverlays(Elizabethtown); map.removeOverlays(Ephrata); map.removeOverlays(Gap); map.removeOverlays(Gordonville); map.removeOverlays(Holtwood); map.removeOverlays(Kinzers); map.removeOverlays(Lampeter); map.removeOverlays(Lancaster); map.removeOverlays(Landisville); map.removeOverlays(Leola); map.removeOverlays(Lititz); map.removeOverlays(Manheim); map.removeOverlays(Marietta); map.removeOverlays(Maytown); map.removeOverlays(Millersville); map.removeOverlays(Mount_Joy); map.removeOverlays(Mountville); map.removeOverlays(Narvon); map.removeOverlays(New_Holland); map.removeOverlays(New_Providence); map.removeOverlays(Paradise); map.removeOverlays(Pequea); map.removeOverlays(Quarryville); map.removeOverlays(Reamstown); map.removeOverlays(Rheems); map.removeOverlays(Stevens); map.removeOverlays(Strasburg); map.removeOverlays(Washington_Boro); map.removeOverlays(Willow_Street); map.addOverlays(Adamstown); centerByArray(Adamstown, false, false); cntMarker += Adamstown.length; map.addOverlays(Akron); centerByArray(Akron, false, false); cntMarker += Akron.length; map.addOverlays(Bainbridge); centerByArray(Bainbridge, false, false); cntMarker += Bainbridge.length; map.addOverlays(Bird_In_Hand); centerByArray(Bird_In_Hand, false, false); cntMarker += Bird_In_Hand.length; map.addOverlays(Blue_Ball); centerByArray(Blue_Ball, false, false); cntMarker += Blue_Ball.length; map.addOverlays(Brownstown); centerByArray(Brownstown, false, false); cntMarker += Brownstown.length; map.addOverlays(Christiana); centerByArray(Christiana, false, false); cntMarker += Christiana.length; map.addOverlays(Columbia); centerByArray(Columbia, false, false); cntMarker += Columbia.length; map.addOverlays(Conestoga); centerByArray(Conestoga, false, false); cntMarker += Conestoga.length; map.addOverlays(Denver); centerByArray(Denver, false, false); cntMarker += Denver.length; map.addOverlays(East_Petersburg); centerByArray(East_Petersburg, false, false); cntMarker += East_Petersburg.length; map.addOverlays(Elizabethtown); centerByArray(Elizabethtown, false, false); cntMarker += Elizabethtown.length; map.addOverlays(Ephrata); centerByArray(Ephrata, false, false); cntMarker += Ephrata.length; map.addOverlays(Gap); centerByArray(Gap, false, false); cntMarker += Gap.length; map.addOverlays(Gordonville); centerByArray(Gordonville, false, false); cntMarker += Gordonville.length; map.addOverlays(Holtwood); centerByArray(Holtwood, false, false); cntMarker += Holtwood.length; map.addOverlays(Kinzers); centerByArray(Kinzers, false, false); cntMarker += Kinzers.length; map.addOverlays(Lampeter); centerByArray(Lampeter, false, false); cntMarker += Lampeter.length; map.addOverlays(Lancaster); centerByArray(Lancaster, false, false); cntMarker += Lancaster.length; map.addOverlays(Landisville); centerByArray(Landisville, false, false); cntMarker += Landisville.length; map.addOverlays(Leola); centerByArray(Leola, false, false); cntMarker += Leola.length; map.addOverlays(Lititz); centerByArray(Lititz, false, false); cntMarker += Lititz.length; map.addOverlays(Manheim); centerByArray(Manheim, false, false); cntMarker += Manheim.length; map.addOverlays(Marietta); centerByArray(Marietta, false, false); cntMarker += Marietta.length; map.addOverlays(Maytown); centerByArray(Maytown, false, false); cntMarker += Maytown.length; map.addOverlays(Millersville); centerByArray(Millersville, false, false); cntMarker += Millersville.length; map.addOverlays(Mount_Joy); centerByArray(Mount_Joy, false, false); cntMarker += Mount_Joy.length; map.addOverlays(Mountville); centerByArray(Mountville, false, false); cntMarker += Mountville.length; map.addOverlays(Narvon); centerByArray(Narvon, false, false); cntMarker += Narvon.length; map.addOverlays(New_Holland); centerByArray(New_Holland, false, false); cntMarker += New_Holland.length; map.addOverlays(New_Providence); centerByArray(New_Providence, false, false); cntMarker += New_Providence.length; map.addOverlays(Paradise); centerByArray(Paradise, false, false); cntMarker += Paradise.length; map.addOverlays(Pequea); centerByArray(Pequea, false, false); cntMarker += Pequea.length; map.addOverlays(Quarryville); centerByArray(Quarryville, false, false); cntMarker += Quarryville.length; map.addOverlays(Reamstown); centerByArray(Reamstown, false, false); cntMarker += Reamstown.length; map.addOverlays(Rheems); centerByArray(Rheems, false, false); cntMarker += Rheems.length; map.addOverlays(Stevens); centerByArray(Stevens, false, false); cntMarker += Stevens.length; map.addOverlays(Strasburg); centerByArray(Strasburg, false, false); cntMarker += Strasburg.length; map.addOverlays(Washington_Boro); centerByArray(Washington_Boro, false, false); cntMarker += Washington_Boro.length; map.addOverlays(Willow_Street); centerByArray(Willow_Street, false, false); cntMarker += Willow_Street.length; centerByArray(Adamstown,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'); } }