function addMarkers() { mySelect = document.getElementById('selection'); Acme = [];Bellingham = [];Lummi_Island = [];Blaine = [];Ferndale = [];_Custer_School_Road = [];Deming = [];_Everson_Goshen_Rd = [];Lynden = [];Everson = [];Maple_Falls = [];_Deming_Rd = [];Sumas = [];mySelect.options[mySelect.options.length] = new Option("Acme schools",'all=Acme'); mySelect.options[mySelect.options.length] = new Option("Bellingham schools",'all=Bellingham'); mySelect.options[mySelect.options.length] = new Option("Blaine schools",'all=Blaine'); mySelect.options[mySelect.options.length] = new Option("Deming schools",'all=Deming'); mySelect.options[mySelect.options.length] = new Option("Everson schools",'all=Everson'); mySelect.options[mySelect.options.length] = new Option("Ferndale schools",'all=Ferndale'); mySelect.options[mySelect.options.length] = new Option("Lummi Island schools",'all=Lummi_Island'); mySelect.options[mySelect.options.length] = new Option("Lynden schools",'all=Lynden'); mySelect.options[mySelect.options.length] = new Option("Maple Falls schools",'all=Maple_Falls'); mySelect.options[mySelect.options.length] = new Option("Sumas schools",'all=Sumas'); mySelect.options[mySelect.options.length] = new Option(" Custer School Road schools",'all=_Custer_School_Road'); mySelect.options[mySelect.options.length] = new Option(" Deming Rd schools",'all=_Deming_Rd'); mySelect.options[mySelect.options.length] = new Option(" Everson Goshen Rd schools",'all=_Everson_Goshen_Rd'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Acme[Acme.length] = createMarker(new GPoint(-122.20867157,48.71847534),"
Acme Elementary School
5200 Turkington Rd
Acme, WA 98220

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Acme Elementary School",'Acme=' + Acme.length); Bellingham[Bellingham.length] = createMarker(new GPoint(-122.52549744,48.77763748),"
Alderwood Early Childhood Center
3408 Redwood Ave
Bellingham, WA 98225

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Alderwood Early Childhood Center",'Bellingham=' + Bellingham.length); Bellingham[Bellingham.length] = createMarker(new GPoint(-122.52739716,48.78054428),"
Alderwood Elementary School
3400 Hollywood Ave
Bellingham, WA 98225

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Alderwood Elementary School",'Bellingham=' + Bellingham.length); Lummi_Island[Lummi_Island.length] = createMarker(new GPoint(-122.58891296,48.84693146),"
Beach Elementary School
3786 Centerview Road
Lummi Island, WA 98262

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Beach Elementary School",'Lummi_Island=' + Lummi_Island.length); Bellingham[Bellingham.length] = createMarker(new GPoint(-122.47489166,48.75683212),"
Bellingham High School
2020 Cornwall Ave
Bellingham, WA 98225

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bellingham High School",'Bellingham=' + Bellingham.length); Blaine[Blaine.length] = createMarker(new GPoint(-122.74434000,48.99912100),"
Birch Bay Home Connections
580 C Street
Blaine, WA 98230

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Birch Bay Home Connections",'Blaine=' + Blaine.length); Bellingham[Bellingham.length] = createMarker(new GPoint(-122.50649261,48.77404022),"
Birchwood Elementary School
3200 Pinewood Ave
Bellingham, WA 98225

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Birchwood Elementary School",'Bellingham=' + Bellingham.length); Blaine[Blaine.length] = createMarker(new GPoint(-122.73100281,48.97430038),"
Blaine At Timber Ridge
770 Mitchell Ave
Blaine, WA 98230

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Blaine At Timber Ridge",'Blaine=' + Blaine.length); Blaine[Blaine.length] = createMarker(new GPoint(-122.74149323,48.99251556),"
Blaine Elementary School
836 Mitchell Ave
Blaine, WA 98230

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Blaine Elementary School",'Blaine=' + Blaine.length); Blaine[Blaine.length] = createMarker(new GPoint(-122.74149323,48.99341965),"
Blaine High School
1055 H Street
Blaine, WA 98230

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Blaine High School",'Blaine=' + Blaine.length); Blaine[Blaine.length] = createMarker(new GPoint(-122.73817444,48.99386215),"
Blaine Middle School
975 H Street
Blaine, WA 98230

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Blaine Middle School",'Blaine=' + Blaine.length); Blaine[Blaine.length] = createMarker(new GPoint(-122.74888400,48.99404500),"
Blaine Primary School
820 Boblett St
Blaine, WA 98230

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Blaine Primary School",'Blaine=' + Blaine.length); Bellingham[Bellingham.length] = createMarker(new GPoint(-122.46816254,48.73131943),"
Carl Cozier Elementary School
1330 Lincoln St
Bellingham, WA 98229

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Carl Cozier Elementary School",'Bellingham=' + Bellingham.length); Ferndale[Ferndale.length] = createMarker(new GPoint(-122.59230804,48.84513855),"
Central Elementary School
P.o. Box 187
Ferndale, WA 98248

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Central Elementary School",'Ferndale=' + Ferndale.length); Bellingham[Bellingham.length] = createMarker(new GPoint(-122.49279022,48.76341248),"
Columbia Elementary School
2508 Utter St
Bellingham, WA 98225

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Columbia Elementary School",'Bellingham=' + Bellingham.length); Bellingham[Bellingham.length] = createMarker(new GPoint(-122.47179413,48.75684738),"
Community Transitions 18-21 High School
2036 Ellis St
Bellingham, WA 98225

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Community Transitions 18-21 High School",'Bellingham=' + Bellingham.length); _Custer_School_Road[_Custer_School_Road.length] = createMarker(new GPoint(-122.63827515,48.91891098),"
Custer Elementary School
7660 Custer School Road
7660 Custer School Road, WA 98240

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Custer Elementary School",'_Custer_School_Road=' + _Custer_School_Road.length); Bellingham[Bellingham.length] = createMarker(new GPoint(-122.45634460,48.75193787),"
Discovery Center
1306 Dupont St
Bellingham, WA 98225

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Discovery Center",'Bellingham=' + Bellingham.length); Ferndale[Ferndale.length] = createMarker(new GPoint(-122.62520599,48.86256409),"
Eagleridge Elementary School
P.o. Box 1127
Ferndale, WA 98248

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Eagleridge Elementary School",'Ferndale=' + Ferndale.length); Deming[Deming.length] = createMarker(new GPoint(-122.22310100,48.82504500),"
Educational Resource Center
4888 Deming Rd
Deming, WA 98244

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Educational Resource Center",'Deming=' + Deming.length); _Everson_Goshen_Rd[_Everson_Goshen_Rd.length] = createMarker(new GPoint(-122.36029816,48.90900803),"
Everson Elementary School
216 Everson Goshen Rd.
216 Everson Goshen Rd., WA 98247

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Everson Elementary School",'_Everson_Goshen_Rd=' + _Everson_Goshen_Rd.length); Bellingham[Bellingham.length] = createMarker(new GPoint(-122.50240326,48.71533585),"
Fairhaven Middle School
110 Park Ridge Rd
Bellingham, WA 98225

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Fairhaven Middle School",'Bellingham=' + Bellingham.length); Ferndale[Ferndale.length] = createMarker(new GPoint(-122.59329224,48.85183716),"
Ferndale High School
P.o. Box 428
Ferndale, WA 98248

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ferndale High School",'Ferndale=' + Ferndale.length); Lynden[Lynden.length] = createMarker(new GPoint(-122.46557617,48.94430923),"
Fisher Elementary School
501 N 14th St
Lynden, WA 98264

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Fisher Elementary School",'Lynden=' + Lynden.length); Bellingham[Bellingham.length] = createMarker(new GPoint(-122.40190887,48.74814224),"
Geneva Elementary School
1401 Geneva St
Bellingham, WA 98229

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Geneva Elementary School",'Bellingham=' + Bellingham.length); Bellingham[Bellingham.length] = createMarker(new GPoint(-122.48599243,48.72311401),"
Happy Valley Elementary School
1041 24th St
Bellingham, WA 98225

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Happy Valley Elementary School",'Bellingham=' + Bellingham.length); Bellingham[Bellingham.length] = createMarker(new GPoint(-122.33238220,48.82495499),"
Harmony Elementary School
5060 Sand Road
Bellingham, WA 98226

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Harmony Elementary School",'Bellingham=' + Bellingham.length); Bellingham[Bellingham.length] = createMarker(new GPoint(-122.48491669,48.75430298),"
Home Port Learning Center
1306 Dupont St
Bellingham, WA 98225

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Home Port Learning Center",'Bellingham=' + Bellingham.length); Ferndale[Ferndale.length] = createMarker(new GPoint(-122.62624359,48.86256409),"
Horizon Middle School
P.o. Box 1769
Ferndale, WA 98248

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Horizon Middle School",'Ferndale=' + Ferndale.length); Everson[Everson.length] = createMarker(new GPoint(-122.43951416,48.86265182),"
Irene Reither Primary School
954 E. Hemmi Road
Everson, WA 98226

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Irene Reither Primary School",'Everson=' + Everson.length); Lynden[Lynden.length] = createMarker(new GPoint(-122.46353149,48.94913101),"
Isom Intermediate School
8461 Benson Rd
Lynden, WA 98264

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Isom Intermediate School",'Lynden=' + Lynden.length); Maple_Falls[Maple_Falls.length] = createMarker(new GPoint(-122.16307831,48.96744156),"
Kendall Elementary School
7547 Kendall Rd
Maple Falls, WA 98266

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Kendall Elementary School",'Maple_Falls=' + Maple_Falls.length); Bellingham[Bellingham.length] = createMarker(new GPoint(-122.43469238,48.74534988),"
Kulshan Middle School
1250 Kenoyer Dr
Bellingham, WA 98229

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Kulshan Middle School",'Bellingham=' + Bellingham.length); Bellingham[Bellingham.length] = createMarker(new GPoint(-122.49419403,48.71911240),"
Larrabee Elementary School
1409 18th St
Bellingham, WA 98225

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Larrabee Elementary School",'Bellingham=' + Bellingham.length); Bellingham[Bellingham.length] = createMarker(new GPoint(-122.49968719,48.72447586),"
Lowell Elementary School
935 14th St
Bellingham, WA 98225

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lowell Elementary School",'Bellingham=' + Bellingham.length); Bellingham[Bellingham.length] = createMarker(new GPoint(-122.61919403,48.79399490),"
Lummi High School
2334 Lummi View Drive
Bellingham, WA 98226

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lummi High School",'Bellingham=' + Bellingham.length); Bellingham[Bellingham.length] = createMarker(new GPoint(-122.61957550,48.79399490),"
Lummi Tribal School
2334 Lummi View Drive
Bellingham, WA 98226

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lummi Tribal School",'Bellingham=' + Bellingham.length); Bellingham[Bellingham.length] = createMarker(new GPoint(-122.49188232,48.76216125),"
Lynden At Timber Ridge High School
5604 Mission Rd
Bellingham, WA 98226

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lynden At Timber Ridge High School",'Bellingham=' + Bellingham.length); Lynden[Lynden.length] = createMarker(new GPoint(-122.42475128,48.95306396),"
Lynden High School
1201 Bradley Rd
Lynden, WA 98264

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lynden High School",'Lynden=' + Lynden.length); Lynden[Lynden.length] = createMarker(new GPoint(-122.46798400,48.94062900),"
Lynden Learning Lifestyle
1610 Grover St D-2
Lynden, WA 98264

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lynden Learning Lifestyle",'Lynden=' + Lynden.length); Lynden[Lynden.length] = createMarker(new GPoint(-122.45590973,48.94653702),"
Lynden Middle School
516 Main St
Lynden, WA 98264

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Lynden Middle School",'Lynden=' + Lynden.length); Lynden[Lynden.length] = createMarker(new GPoint(-122.45590973,48.94653702),"
Lynden Special Services
516 Main St
Lynden, WA 98264

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lynden Special Services",'Lynden=' + Lynden.length); Bellingham[Bellingham.length] = createMarker(new GPoint(-122.49188232,48.76216125),"
Meridian At Timber Ridge High School
194 W. Laurel Road
Bellingham, WA 98226

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Meridian At Timber Ridge High School",'Bellingham=' + Bellingham.length); Bellingham[Bellingham.length] = createMarker(new GPoint(-122.49119568,48.85528564),"
Meridian High School
194 W Laurel Road
Bellingham, WA 98226

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Meridian High School",'Bellingham=' + Bellingham.length); Lynden[Lynden.length] = createMarker(new GPoint(-122.44483185,48.87003708),"
Meridian Middle School
861 Ten Mile Road
Lynden, WA 98264

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Meridian Middle School",'Lynden=' + Lynden.length); Bellingham[Bellingham.length] = createMarker(new GPoint(-122.49227905,48.85529709),"
Meridian Special Programs Elementary School
214 W Laurel Road
Bellingham, WA 98226

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Meridian Special Programs Elementary School",'Bellingham=' + Bellingham.length); Bellingham[Bellingham.length] = createMarker(new GPoint(-122.35387421,48.84397125),"
Mount Baker At Timber Ridge High School
5604 Mission Rd
Bellingham, WA 98226

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mount Baker At Timber Ridge High School",'Bellingham=' + Bellingham.length); Deming[Deming.length] = createMarker(new GPoint(-122.22279358,48.82543945),"
Mount Baker Junior High School
5100 Mitchell Rd
Deming, WA 98244

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Mount Baker Junior High School",'Deming=' + Deming.length); _Deming_Rd[_Deming_Rd.length] = createMarker(new GPoint(-122.20964050,48.82109833),"
Mount Baker Senior High School
4936 Deming Rd
4936 Deming Rd, WA 98244

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mount Baker Senior High School",'_Deming_Rd=' + _Deming_Rd.length); Ferndale[Ferndale.length] = createMarker(new GPoint(-122.60659027,48.85003662),"
Mountain View Elementary School
P.o. Box 935
Ferndale, WA 98248

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Mountain View Elementary School",'Ferndale=' + Ferndale.length); Bellingham[Bellingham.length] = createMarker(new GPoint(-122.47949982,48.75429916),"
Nooksack At Timber Ridge High School
5604 Mission Rd
Bellingham, WA 98226

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Nooksack At Timber Ridge High School",'Bellingham=' + Bellingham.length); Everson[Everson.length] = createMarker(new GPoint(-122.30820465,48.92732620),"
Nooksack Elementary School
3333 Breckenridge Rd.
Everson, WA 98247

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Nooksack Elementary School",'Everson=' + Everson.length); Everson[Everson.length] = createMarker(new GPoint(-122.30782318,48.96403885),"
Nooksack Valley High School
3326 East Badger Road
Everson, WA 98247

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Nooksack Valley High School",'Everson=' + Everson.length); Everson[Everson.length] = createMarker(new GPoint(-122.33985901,48.92020035),"
Nooksack Valley Middle School
404 W. Columbia St.
Everson, WA 98247

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Nooksack Valley Middle School",'Everson=' + Everson.length); Everson[Everson.length] = createMarker(new GPoint(-122.32019806,48.92770004),"
Nooksack Valley Special Services Elementary School
3326 E. Badger Road
Everson, WA 98247

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Nooksack Valley Special Services Elementary School",'Everson=' + Everson.length); Ferndale[Ferndale.length] = createMarker(new GPoint(-122.54029083,48.83230972),"
North Bellingham Elementary School
5275 Northwest Road
Ferndale, WA 98226

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("North Bellingham Elementary School",'Ferndale=' + Ferndale.length); Bellingham[Bellingham.length] = createMarker(new GPoint(-122.42086029,48.78601456),"
Northern Heights Elementary School
4000 Magrath Rd
Bellingham, WA 98226

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Northern Heights Elementary School",'Bellingham=' + Bellingham.length); Bellingham[Bellingham.length] = createMarker(new GPoint(-122.47100830,48.75679398),"
Options High School
2015 Franklin St
Bellingham, WA 98225

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Options High School",'Bellingham=' + Bellingham.length); Bellingham[Bellingham.length] = createMarker(new GPoint(-122.47820282,48.77003479),"
Parkview Elementary School
3033 Coolidge Dr
Bellingham, WA 98225

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Parkview Elementary School",'Bellingham=' + Bellingham.length); Blaine[Blaine.length] = createMarker(new GPoint(-122.74149323,48.99341965),"
Point Roberts Primary
820 Boblett St
Blaine, WA 98230

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Point Roberts Primary",'Blaine=' + Blaine.length); Bellingham[Bellingham.length] = createMarker(new GPoint(-122.44239044,48.76718903),"
Roosevelt Elementary School
2900 Yew St
Bellingham, WA 98226

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Roosevelt Elementary School",'Bellingham=' + Bellingham.length); Bellingham[Bellingham.length] = createMarker(new GPoint(-122.48269653,48.72782135),"
Sehome High School
2700 Bill Mcdonald Pkwy
Bellingham, WA 98225

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sehome High School",'Bellingham=' + Bellingham.length); Bellingham[Bellingham.length] = createMarker(new GPoint(-122.50103760,48.77976227),"
Shuksan Middle School
2713 Alderwood Ave
Bellingham, WA 98225

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Shuksan Middle School",'Bellingham=' + Bellingham.length); Bellingham[Bellingham.length] = createMarker(new GPoint(-122.41587830,48.76793671),"
Silver Beach Elementary School
4101 Academy St
Bellingham, WA 98226

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Silver Beach Elementary School",'Bellingham=' + Bellingham.length); Ferndale[Ferndale.length] = createMarker(new GPoint(-122.60277557,48.86273193),"
Skyline Elementary School
P.o. Box 905
Ferndale, WA 98248

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Skyline Elementary School",'Ferndale=' + Ferndale.length); Bellingham[Bellingham.length] = createMarker(new GPoint(-122.48691559,48.75891876),"
Special Services
1306 Dupont St
Bellingham, WA 98225

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Special Services",'Bellingham=' + Bellingham.length); Bellingham[Bellingham.length] = createMarker(new GPoint(-122.42414856,48.78233719),"
Squalicum High School
3773 E Mcleod Rd
Bellingham, WA 98226

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Squalicum High School",'Bellingham=' + Bellingham.length); Sumas[Sumas.length] = createMarker(new GPoint(-122.25530243,48.98949814),"
Sumas Elementary School
Po Box 589
Sumas, WA 98295

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Sumas Elementary School",'Sumas=' + Sumas.length); Bellingham[Bellingham.length] = createMarker(new GPoint(-122.46479034,48.76693726),"
Sunnyland Elementary School
2800 James St
Bellingham, WA 98226

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Sunnyland Elementary School",'Bellingham=' + Bellingham.length); Everson[Everson.length] = createMarker(new GPoint(-122.43917847,48.86265182),"
Ten Mile Creek Elementary School
960 E. Hemmi Road
Everson, WA 98247

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Ten Mile Creek Elementary School",'Everson=' + Everson.length); Bellingham[Bellingham.length] = createMarker(new GPoint(-122.45304871,48.76823807),"
Visions (seamar Youth Center)
1306 Dupont St
Bellingham, WA 98225

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Visions (seamar Youth Center)",'Bellingham=' + Bellingham.length); Ferndale[Ferndale.length] = createMarker(new GPoint(-122.60146332,48.86121368),"
Vista Middle School
P.o. Box 1328
Ferndale, WA 98248

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Vista Middle School",'Ferndale=' + Ferndale.length); Lynden[Lynden.length] = createMarker(new GPoint(-122.42752075,48.95833588),"
Vossbeck Elementary School
1301 Bridgeview Dr
Lynden, WA 98264

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Vossbeck Elementary School",'Lynden=' + Lynden.length); Bellingham[Bellingham.length] = createMarker(new GPoint(-122.48690033,48.75968170),"
Whatcom Co Detention Center
311 Grand Ave 6th Fl
Bellingham, WA 98225

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Whatcom Co Detention Center",'Bellingham=' + Bellingham.length); Bellingham[Bellingham.length] = createMarker(new GPoint(-122.48005676,48.75852966),"
Whatcom Middle School
810 Halleck St
Bellingham, WA 98225

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Whatcom Middle School",'Bellingham=' + Bellingham.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(Acme); map.removeOverlays(Bellingham); map.removeOverlays(Blaine); map.removeOverlays(Deming); map.removeOverlays(Everson); map.removeOverlays(Ferndale); map.removeOverlays(Lummi_Island); map.removeOverlays(Lynden); map.removeOverlays(Maple_Falls); map.removeOverlays(Sumas); map.removeOverlays(_Custer_School_Road); map.removeOverlays(_Deming_Rd); map.removeOverlays(_Everson_Goshen_Rd); 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(Acme);map.removeOverlays(Acme); map.removeOverlays(Bellingham); map.removeOverlays(Blaine); map.removeOverlays(Deming); map.removeOverlays(Everson); map.removeOverlays(Ferndale); map.removeOverlays(Lummi_Island); map.removeOverlays(Lynden); map.removeOverlays(Maple_Falls); map.removeOverlays(Sumas); map.removeOverlays(_Custer_School_Road); map.removeOverlays(_Deming_Rd); map.removeOverlays(_Everson_Goshen_Rd); map.addOverlays(Acme); centerByArray(Acme, false, false); cntMarker += Acme.length; map.addOverlays(Bellingham); centerByArray(Bellingham, false, false); cntMarker += Bellingham.length; map.addOverlays(Blaine); centerByArray(Blaine, false, false); cntMarker += Blaine.length; map.addOverlays(Deming); centerByArray(Deming, false, false); cntMarker += Deming.length; map.addOverlays(Everson); centerByArray(Everson, false, false); cntMarker += Everson.length; map.addOverlays(Ferndale); centerByArray(Ferndale, false, false); cntMarker += Ferndale.length; map.addOverlays(Lummi_Island); centerByArray(Lummi_Island, false, false); cntMarker += Lummi_Island.length; map.addOverlays(Lynden); centerByArray(Lynden, false, false); cntMarker += Lynden.length; map.addOverlays(Maple_Falls); centerByArray(Maple_Falls, false, false); cntMarker += Maple_Falls.length; map.addOverlays(Sumas); centerByArray(Sumas, false, false); cntMarker += Sumas.length; map.addOverlays(_Custer_School_Road); centerByArray(_Custer_School_Road, false, false); cntMarker += _Custer_School_Road.length; map.addOverlays(_Deming_Rd); centerByArray(_Deming_Rd, false, false); cntMarker += _Deming_Rd.length; map.addOverlays(_Everson_Goshen_Rd); centerByArray(_Everson_Goshen_Rd, false, false); cntMarker += _Everson_Goshen_Rd.length; centerByArray(Acme,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'); } }