function addMarkers() { mySelect = document.getElementById('selection'); Fairview = [];Erie = [];Corry = [];North_East = [];Edinboro = [];Lake_City = [];Waterford = [];Girard = [];Harborcreek = [];Mc_Kean = [];Mill_Village = [];Albion = [];East_Springfield = [];Union_City = [];mySelect.options[mySelect.options.length] = new Option("Albion schools",'all=Albion'); mySelect.options[mySelect.options.length] = new Option("Corry schools",'all=Corry'); mySelect.options[mySelect.options.length] = new Option("East Springfield schools",'all=East_Springfield'); mySelect.options[mySelect.options.length] = new Option("Edinboro schools",'all=Edinboro'); mySelect.options[mySelect.options.length] = new Option("Erie schools",'all=Erie'); mySelect.options[mySelect.options.length] = new Option("Fairview schools",'all=Fairview'); mySelect.options[mySelect.options.length] = new Option("Girard schools",'all=Girard'); mySelect.options[mySelect.options.length] = new Option("Harborcreek schools",'all=Harborcreek'); mySelect.options[mySelect.options.length] = new Option("Lake City schools",'all=Lake_City'); mySelect.options[mySelect.options.length] = new Option("Mc Kean schools",'all=Mc_Kean'); mySelect.options[mySelect.options.length] = new Option("Mill Village schools",'all=Mill_Village'); mySelect.options[mySelect.options.length] = new Option("North East schools",'all=North_East'); mySelect.options[mySelect.options.length] = new Option("Union City schools",'all=Union_City'); mySelect.options[mySelect.options.length] = new Option("Waterford schools",'all=Waterford'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Fairview[Fairview.length] = createMarker(new GPoint(-80.17689514,42.06328583),"
Asbury Elementary School
5875 Sterrettania Rd
Fairview, PA 16415

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Asbury Elementary School",'Fairview=' + Fairview.length); Erie[Erie.length] = createMarker(new GPoint(-80.02508545,42.09951782),"
Belle Valley Elementary School
5300 Henderson Rd
Erie, PA 16509

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Belle Valley Elementary School",'Erie=' + Erie.length); Erie[Erie.length] = createMarker(new GPoint(-80.04011536,42.12989807),"
Burton Elementary School
1661 Buffalo Rd
Erie, PA 16510

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Burton Elementary School",'Erie=' + Erie.length); Erie[Erie.length] = createMarker(new GPoint(-80.08282471,42.10128784),"
Central High School
3325 Cherry St
Erie, PA 16508

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Central High School",'Erie=' + Erie.length); Erie[Erie.length] = createMarker(new GPoint(-80.07780457,42.08000946),"
Chestnut Hill Elementary School
1001 W 54th St
Erie, PA 16509

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Chestnut Hill Elementary School",'Erie=' + Erie.length); Erie[Erie.length] = createMarker(new GPoint(-79.93983459,42.14830780),"
Clark Elementary School
3650 Depot Rd
Erie, PA 16510

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Clark Elementary School",'Erie=' + Erie.length); Erie[Erie.length] = createMarker(new GPoint(-80.09960937,42.09014511),"
Cleveland Elementary School
1540 W 38th St
Erie, PA 16508

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Cleveland Elementary School",'Erie=' + Erie.length); Corry[Corry.length] = createMarker(new GPoint(-79.64239502,41.91981888),"
Columbus Elementary School
100 W Main St
Corry, PA 16407

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Columbus Elementary School",'Corry=' + Corry.length); Corry[Corry.length] = createMarker(new GPoint(-79.63636780,41.92029572),"
Concord Elementary School
230 E South St
Corry, PA 16407

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Concord Elementary School",'Corry=' + Corry.length); Corry[Corry.length] = createMarker(new GPoint(-79.68372345,41.93076324),"
Conelway Elementary School
18700 Conelway Rd
Corry, PA 16407

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Conelway Elementary School",'Corry=' + Corry.length); Erie[Erie.length] = createMarker(new GPoint(-80.02753448,42.11686707),"
Connell Elementary School
1820 E 38th St
Erie, PA 16510

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Connell Elementary School",'Erie=' + Erie.length); Corry[Corry.length] = createMarker(new GPoint(-79.62693787,41.91936111),"
Corry Area Middle School High School
534 E Pleasant St
Corry, PA 16407

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Corry Area Middle School High School",'Corry=' + Corry.length); Corry[Corry.length] = createMarker(new GPoint(-79.62622500,41.91943900),"
Corry Area MiddleSchool
534 E Pleasant Street
Corry, PA 16407

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Corry Area MiddleSchool",'Corry=' + Corry.length); Erie[Erie.length] = createMarker(new GPoint(-80.02428436,42.13358307),"
Diehl Elementary School
2327 Fairmount Pkwy
Erie, PA 16510

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Diehl Elementary School",'Erie=' + Erie.length); North_East[North_East.length] = createMarker(new GPoint(-79.82972717,42.21914673),"
Earle C Davis Primary
50 E Division St
North East, PA 16428

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Earle C Davis Primary",'North_East=' + North_East.length); Erie[Erie.length] = createMarker(new GPoint(-80.06253052,42.13724518),"
East Senior High School
1001 Atkins St
Erie, PA 16503

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("East Senior High School",'Erie=' + Erie.length); Edinboro[Edinboro.length] = createMarker(new GPoint(-80.14758301,41.88103867),"
Edinboro Elementary School
5390 Route 6n
Edinboro, PA 16412

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Edinboro Elementary School",'Edinboro=' + Edinboro.length); Erie[Erie.length] = createMarker(new GPoint(-80.04258728,42.14530563),"
Edison Elementary School
1921 E Lake Rd
Erie, PA 16511

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Edison Elementary School",'Erie=' + Erie.length); Lake_City[Lake_City.length] = createMarker(new GPoint(-80.34465790,42.01044846),"
Elk Valley Elementary School
2556 Maple Ave
Lake City, PA 16423

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Elk Valley Elementary School",'Lake_City=' + Lake_City.length); Erie[Erie.length] = createMarker(new GPoint(-80.10300446,42.12359619),"
Emerson-gridley Elementary School
816 Park Ave N
Erie, PA 16502

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Emerson-gridley Elementary School",'Erie=' + Erie.length); Erie[Erie.length] = createMarker(new GPoint(-80.09256744,42.02873993),"
Erie County Technical School
8500 Oliver Rd
Erie, PA 16509

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Erie County Technical School",'Erie=' + Erie.length); Fairview[Fairview.length] = createMarker(new GPoint(-80.25070190,42.02431107),"
Fairview Elementary School
5145 Avonia Rd
Fairview, PA 16415

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Fairview Elementary School",'Fairview=' + Fairview.length); Fairview[Fairview.length] = createMarker(new GPoint(-80.24540710,42.01989365),"
Fairview High School
7460 Mccray Rd
Fairview, PA 16415

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Fairview High School",'Fairview=' + Fairview.length); Waterford[Waterford.length] = createMarker(new GPoint(-79.98960114,41.94760132),"
Fort Leboeuf Middle School
Po Box 516
Waterford, PA 16441

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Fort Leboeuf Middle School",'Waterford=' + Waterford.length); Waterford[Waterford.length] = createMarker(new GPoint(-79.98963165,41.95109177),"
Fort Leboeuf Senior High School
931 N High St
Waterford, PA 16441

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Fort Leboeuf Senior High School",'Waterford=' + Waterford.length); Fairview[Fairview.length] = createMarker(new GPoint(-80.25132751,42.02526474),"
Garwood Middle School
4967 Avonia Rd
Fairview, PA 16415

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Garwood Middle School",'Fairview=' + Fairview.length); Erie[Erie.length] = createMarker(new GPoint(-80.05464935,42.14130020),"
Gecac Community Charter School
1446 East Lake Rd
Erie, PA 16507

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Gecac Community Charter School",'Erie=' + Erie.length); Girard[Girard.length] = createMarker(new GPoint(-80.33479309,42.00679398),"
Girard High School
1135 Lake St
Girard, PA 16417

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Girard High School",'Girard=' + Girard.length); Erie[Erie.length] = createMarker(new GPoint(-80.07961273,42.10058212),"
Glenwood Elementary School
3503 Peach St
Erie, PA 16508

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Glenwood Elementary School",'Erie=' + Erie.length); Erie[Erie.length] = createMarker(new GPoint(-80.13544464,42.07112885),"
Grandview Elementary School
4301 Lancaster Rd
Erie, PA 16506

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Grandview Elementary School",'Erie=' + Erie.length); Harborcreek[Harborcreek.length] = createMarker(new GPoint(-79.95587921,42.16556168),"
Harbor Creek Junior Senior High School
6375 Buffalo Rd
Harborcreek, PA 16421

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Harbor Creek Junior Senior High School",'Harborcreek=' + Harborcreek.length); Erie[Erie.length] = createMarker(new GPoint(-80.12191010,42.11322403),"
Harding Elementary School
820 Lincoln Ave
Erie, PA 16505

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Harding Elementary School",'Erie=' + Erie.length); Erie[Erie.length] = createMarker(new GPoint(-80.01229858,42.15131378),"
Iroquois Junior Senior High School
4301 Main St
Erie, PA 16511

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Iroquois Junior Senior High School",'Erie=' + Erie.length); Erie[Erie.length] = createMarker(new GPoint(-80.09365082,42.10746384),"
Irving Elementary School
2310 Plum St
Erie, PA 16502

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Irving Elementary School",'Erie=' + Erie.length); Erie[Erie.length] = createMarker(new GPoint(-80.07669067,42.08041382),"
James S Wilson Middle School
901 W 54th St
Erie, PA 16509

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("James S Wilson Middle School",'Erie=' + Erie.length); Erie[Erie.length] = createMarker(new GPoint(-80.06254578,42.10395813),"
Jefferson Elementary School
230 East 38th St
Erie, PA 16504

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Jefferson Elementary School",'Erie=' + Erie.length); Erie[Erie.length] = createMarker(new GPoint(-79.99617004,42.17110825),"
Klein Elementary School
5325 E Lake Rd
Erie, PA 16511

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Klein Elementary School",'Erie=' + Erie.length); Erie[Erie.length] = createMarker(new GPoint(-80.01361084,42.15348816),"
Lawrence Park Elementary School
4231 Morse St
Erie, PA 16511

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Lawrence Park Elementary School",'Erie=' + Erie.length); Erie[Erie.length] = createMarker(new GPoint(-80.05238342,42.11442184),"
Lincoln Elementary School
831 E 31st St
Erie, PA 16504

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lincoln Elementary School",'Erie=' + Erie.length); Erie[Erie.length] = createMarker(new GPoint(-80.15146637,42.07746506),"
Mcdowell Ihs
3320 Caughey Rd
Erie, PA 16506

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mcdowell Ihs",'Erie=' + Erie.length); Erie[Erie.length] = createMarker(new GPoint(-80.14733124,42.07258224),"
Mcdowell Senior High School
3580 W 38th St
Erie, PA 16506

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mcdowell Senior High School",'Erie=' + Erie.length); Mc_Kean[Mc_Kean.length] = createMarker(new GPoint(-80.14565277,41.99693680),"
Mckean Elementary School
5120 West Rd
Mc Kean, PA 16426

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Mckean Elementary School",'Mc_Kean=' + Mc_Kean.length); Erie[Erie.length] = createMarker(new GPoint(-80.05500031,42.12276077),"
Mckinley Elementary School
933 E 22nd St
Erie, PA 16503

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Mckinley Elementary School",'Erie=' + Erie.length); Mill_Village[Mill_Village.length] = createMarker(new GPoint(-79.96513367,41.87676239),"
Mill Village Elementary School
Po Box 56l
Mill Village, PA 16427

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Mill Village Elementary School",'Mill_Village=' + Mill_Village.length); Erie[Erie.length] = createMarker(new GPoint(-80.14006600,42.08464600),"
Montessori Regional Charter School
2910 Sterrettania Rd
Erie, PA 16506

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Montessori Regional Charter School",'Erie=' + Erie.length); Erie[Erie.length] = createMarker(new GPoint(-80.11006165,42.09534073),"
North Coast School
3814 Asbury Rd
Erie, PA 16506

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("North Coast School",'Erie=' + Erie.length); North_East[North_East.length] = createMarker(new GPoint(-79.83311462,42.22338104),"
North East High School
1901 Freeport Rd
North East, PA 16428

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("North East High School",'North_East=' + North_East.length); North_East[North_East.length] = createMarker(new GPoint(-79.82972717,42.21914673),"
North East Intrmd Elementary School
50 E Division Street
North East, PA 16428

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("North East Intrmd Elementary School",'North_East=' + North_East.length); North_East[North_East.length] = createMarker(new GPoint(-79.83311462,42.22337723),"
North East Middle School
1903 Freeport Rd
North East, PA 16428

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("North East Middle School",'North_East=' + North_East.length); Erie[Erie.length] = createMarker(new GPoint(-80.07223511,42.11028671),"
Northwest Pennsylvania Collegi High School
2825 State St
Erie, PA 16508

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Northwest Pennsylvania Collegi High School",'Erie=' + Erie.length); Albion[Albion.length] = createMarker(new GPoint(-80.35140228,41.89196014),"
Northwestern Elementary School
John Williams Avenue
Albion, PA 16401

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Northwestern Elementary School",'Albion=' + Albion.length); Albion[Albion.length] = createMarker(new GPoint(-80.35122681,41.88984680),"
Northwestern Middle School
150 Harthan Way
Albion, PA 16401

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Northwestern Middle School",'Albion=' + Albion.length); Albion[Albion.length] = createMarker(new GPoint(-80.35071564,41.88987350),"
Northwestern Senior High School
200 Harthan Way
Albion, PA 16401

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Northwestern Senior High School",'Albion=' + Albion.length); Erie[Erie.length] = createMarker(new GPoint(-80.11634064,42.07535934),"
Pennsylvania Global Academy Charter School
3740 W 26th Street
Erie, PA 16506

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Pennsylvania Global Academy Charter School",'Erie=' + Erie.length); Erie[Erie.length] = createMarker(new GPoint(-80.09152985,42.10208511),"
Perry Elementary School
955 W 29th St
Erie, PA 16508

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Perry Elementary School",'Erie=' + Erie.length); Erie[Erie.length] = createMarker(new GPoint(-80.11634064,42.07535934),"
Perseus House Charter School Of Excellence
2931 Harvard Rd
Erie, PA 16506

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Perseus House Charter School Of Excellence",'Erie=' + Erie.length); Erie[Erie.length] = createMarker(new GPoint(-80.07721710,42.12611389),"
Pfeiffer-burleigh Elementary School
235 E 11th St
Erie, PA 16503

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Pfeiffer-burleigh Elementary School",'Erie=' + Erie.length); Girard[Girard.length] = createMarker(new GPoint(-80.32975769,42.00916672),"
Rice Avenue Middle School
1100 Rice Ave
Girard, PA 16417

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Rice Avenue Middle School",'Girard=' + Girard.length); Erie[Erie.length] = createMarker(new GPoint(-80.12543488,42.08636856),"
Ridgefield Elementary School
3227 Highland Rd
Erie, PA 16506

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Ridgefield Elementary School",'Erie=' + Erie.length); Erie[Erie.length] = createMarker(new GPoint(-80.06748962,42.04696274),"
Robison Elementary School
1651 Robison Road West
Erie, PA 16509

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Robison Elementary School",'Erie=' + Erie.length); Erie[Erie.length] = createMarker(new GPoint(-79.99738312,42.13893127),"
Rolling Ridge Elementary School
3700 Ridge Pkwy
Erie, PA 16510

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Rolling Ridge Elementary School",'Erie=' + Erie.length); Erie[Erie.length] = createMarker(new GPoint(-80.10086823,42.10481262),"
Roosevelt Middle School
2300 Cranberry St
Erie, PA 16502

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Roosevelt Middle School",'Erie=' + Erie.length); Erie[Erie.length] = createMarker(new GPoint(-79.90447998,42.05667496),"
Seneca High School
10770 Wattsburg Rd
Erie, PA 16509

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Seneca High School",'Erie=' + Erie.length); East_Springfield[East_Springfield.length] = createMarker(new GPoint(-80.40513611,41.96435547),"
Springfield Elementary School
11911 Bond St Po Box 248
East Springfield, PA 16411

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Springfield Elementary School",'East_Springfield=' + East_Springfield.length); Erie[Erie.length] = createMarker(new GPoint(-80.11267090,42.11702728),"
Strong Vincent High School
1330 W 8th St
Erie, PA 16502

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Strong Vincent High School",'Erie=' + Erie.length); Erie[Erie.length] = createMarker(new GPoint(-80.14335632,42.10803223),"
Tracy Elementary School
2624 W 6th St
Erie, PA 16505

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Tracy Elementary School",'Erie=' + Erie.length); Erie[Erie.length] = createMarker(new GPoint(-80.08164500,42.10182600),"
Transition School
3325 Cherry Street
Erie, PA 16509

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Transition School",'Erie=' + Erie.length); Union_City[Union_City.length] = createMarker(new GPoint(-79.84583282,41.88980865),"
Union City Elementary School
91 Miles St
Union City, PA 16438

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Union City Elementary School",'Union_City=' + Union_City.length); Union_City[Union_City.length] = createMarker(new GPoint(-79.83813477,41.89181137),"
Union City High School
105 Concord St
Union City, PA 16438

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Union City High School",'Union_City=' + Union_City.length); Union_City[Union_City.length] = createMarker(new GPoint(-79.83813477,41.89181137),"
Union City Middle School
105 Concord St
Union City, PA 16438

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Union City Middle School",'Union_City=' + Union_City.length); Erie[Erie.length] = createMarker(new GPoint(-80.20185852,42.07866669),"
Vernondale Elementary School
1432 Wilkins Rd
Erie, PA 16505

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Vernondale Elementary School",'Erie=' + Erie.length); Fairview[Fairview.length] = createMarker(new GPoint(-80.17406464,42.04328918),"
Walnut Creek Middle School
5901 Sterrettania Rd
Fairview, PA 16415

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Walnut Creek Middle School",'Fairview=' + Fairview.length); Waterford[Waterford.length] = createMarker(new GPoint(-79.98960114,41.94760132),"
Waterford Elementary School
Po Box 811
Waterford, PA 16441

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Waterford Elementary School",'Waterford=' + Waterford.length); Erie[Erie.length] = createMarker(new GPoint(-79.90402222,42.05662918),"
Wattsburg Area El Center
10780 Wattsburg Rd
Erie, PA 16509

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Wattsburg Area El Center",'Erie=' + Erie.length); Erie[Erie.length] = createMarker(new GPoint(-79.90429687,42.05665588),"
Wattsburg Area Middle School
10774 Wattsburg Rd
Erie, PA 16509

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Wattsburg Area Middle School",'Erie=' + Erie.length); Erie[Erie.length] = createMarker(new GPoint(-80.06275177,42.13692474),"
Wayne Middle School
650 East Ave
Erie, PA 16503

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Wayne Middle School",'Erie=' + Erie.length); Erie[Erie.length] = createMarker(new GPoint(-80.01452637,42.13785172),"
Wesleyville Elementary School
2138 Willow St
Erie, PA 16510

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Wesleyville Elementary School",'Erie=' + Erie.length); Erie[Erie.length] = createMarker(new GPoint(-80.18361664,42.08838654),"
Westlake Middle School
4330 W Lake Rd
Erie, PA 16505

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Westlake Middle School",'Erie=' + Erie.length); Erie[Erie.length] = createMarker(new GPoint(-80.05638885,42.11630630),"
Wilson Middle School
718 E 28th St
Erie, PA 16504

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Wilson Middle School",'Erie=' + Erie.length); Corry[Corry.length] = createMarker(new GPoint(-79.63851166,41.92765427),"
Wright Elementary School
426 Wright St
Corry, PA 16407

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Wright Elementary School",'Corry=' + Corry.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(Albion); map.removeOverlays(Corry); map.removeOverlays(East_Springfield); map.removeOverlays(Edinboro); map.removeOverlays(Erie); map.removeOverlays(Fairview); map.removeOverlays(Girard); map.removeOverlays(Harborcreek); map.removeOverlays(Lake_City); map.removeOverlays(Mc_Kean); map.removeOverlays(Mill_Village); map.removeOverlays(North_East); map.removeOverlays(Union_City); map.removeOverlays(Waterford); 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(Fairview);map.removeOverlays(Albion); map.removeOverlays(Corry); map.removeOverlays(East_Springfield); map.removeOverlays(Edinboro); map.removeOverlays(Erie); map.removeOverlays(Fairview); map.removeOverlays(Girard); map.removeOverlays(Harborcreek); map.removeOverlays(Lake_City); map.removeOverlays(Mc_Kean); map.removeOverlays(Mill_Village); map.removeOverlays(North_East); map.removeOverlays(Union_City); map.removeOverlays(Waterford); map.addOverlays(Albion); centerByArray(Albion, false, false); cntMarker += Albion.length; map.addOverlays(Corry); centerByArray(Corry, false, false); cntMarker += Corry.length; map.addOverlays(East_Springfield); centerByArray(East_Springfield, false, false); cntMarker += East_Springfield.length; map.addOverlays(Edinboro); centerByArray(Edinboro, false, false); cntMarker += Edinboro.length; map.addOverlays(Erie); centerByArray(Erie, false, false); cntMarker += Erie.length; map.addOverlays(Fairview); centerByArray(Fairview, false, false); cntMarker += Fairview.length; map.addOverlays(Girard); centerByArray(Girard, false, false); cntMarker += Girard.length; map.addOverlays(Harborcreek); centerByArray(Harborcreek, false, false); cntMarker += Harborcreek.length; map.addOverlays(Lake_City); centerByArray(Lake_City, false, false); cntMarker += Lake_City.length; map.addOverlays(Mc_Kean); centerByArray(Mc_Kean, false, false); cntMarker += Mc_Kean.length; map.addOverlays(Mill_Village); centerByArray(Mill_Village, false, false); cntMarker += Mill_Village.length; map.addOverlays(North_East); centerByArray(North_East, false, false); cntMarker += North_East.length; map.addOverlays(Union_City); centerByArray(Union_City, false, false); cntMarker += Union_City.length; map.addOverlays(Waterford); centerByArray(Waterford, false, false); cntMarker += Waterford.length; centerByArray(Fairview,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'); } }