function addMarkers() { mySelect = document.getElementById('selection'); Ogden = [];West_Haven = [];Hooper = [];Plain_City = [];Roy = [];Harrisville = [];Eden = [];Huntsville = [];mySelect.options[mySelect.options.length] = new Option("Eden schools",'all=Eden'); mySelect.options[mySelect.options.length] = new Option("Harrisville schools",'all=Harrisville'); mySelect.options[mySelect.options.length] = new Option("Hooper schools",'all=Hooper'); mySelect.options[mySelect.options.length] = new Option("Huntsville schools",'all=Huntsville'); mySelect.options[mySelect.options.length] = new Option("Ogden schools",'all=Ogden'); mySelect.options[mySelect.options.length] = new Option("Plain City schools",'all=Plain_City'); mySelect.options[mySelect.options.length] = new Option("Roy schools",'all=Roy'); mySelect.options[mySelect.options.length] = new Option("West Haven schools",'all=West_Haven'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Ogden[Ogden.length] = createMarker(new GPoint(-111.95372772,41.31748962),"
Bates Elementary School
850 E 3100 N
Ogden, UT 84414

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Bates Elementary School",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.95221710,41.24993515),"
Ben Lomond High School
800 Jackson Ave
Ogden, UT 84404

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ben Lomond High School",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.97045400,41.22171000),"
Bennett Home Program
1950 Monroe Blvd
Ogden, UT 84401

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Bennett Home Program",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.95730591,41.25468063),"
Bonneville Elementary School
490 Gramercy Ave
Ogden, UT 84404

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Bonneville Elementary School",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.97475433,41.17596436),"
Bonneville High School
251 E Laker Way 4800 S
Ogden, UT 84405

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bonneville High School",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.96234894,41.24559784),"
Canyon View High School
1100 Orchard Ave
Ogden, UT 84404

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Canyon View High School",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.96258700,41.24475700),"
Canyon View School
1100 Orchard Ave
Ogden, UT 84404

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Canyon View School",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-112.02776400,41.29618500),"
Canyon View School
1100 Orchard Ave
Ogden, UT 84404

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Canyon View School",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.93957520,41.22800827),"
Carl H Taylor Elementary School
2130 Taylor Ave
Ogden, UT 84401

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Carl H Taylor Elementary School",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.95948029,41.21920395),"
Central Middle School
2563 Monroe Blvd
Ogden, UT 84401

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Central Middle School",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.97785187,41.18753815),"
Club Heights Elementary School
4150 S 100 E
Ogden, UT 84405

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Club Heights Elementary School",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.99810028,41.21720123),"
Contracted Spec Ed Elementary School
1950 Monroe Blvd
Ogden, UT 84401

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Contracted Spec Ed Elementary School",'Ogden=' + Ogden.length); West_Haven[West_Haven.length] = createMarker(new GPoint(-111.57499695,39.37329865),"
Country View Elementary School
4650 W 4800 S
West Haven, UT 84401

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Country View Elementary School",'West_Haven=' + West_Haven.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.97308300,41.23047000),"
Da Vinci Academy
2033 Grant Ave
Ogden, UT 84401

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Da Vinci Academy",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.96258700,41.24475700),"
Day Treatment
1100 Orchard Ave
Ogden, UT 84404

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Day Treatment",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.96608734,41.22703552),"
Dee Elementary School
550 - 22nd St
Ogden, UT 84401

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Dee Elementary School",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.95891571,41.23177338),"
Early Childhood Elementary School
1950 Monroe Blvd
Ogden, UT 84401

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Early Childhood Elementary School",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.95464325,41.27616119),"
Edison Elementary School
935 E 1050 N
Ogden, UT 84404

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Edison Elementary School",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-112.02776400,41.29618500),"
Farr West Elementary School
2190 W 2700 N
Ogden, UT 84404

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Farr West Elementary School",'Ogden=' + Ogden.length); Hooper[Hooper.length] = createMarker(new GPoint(-112.09069061,41.16393661),"
Freedom Elementary School
4555 W 5500 S
Hooper, UT 84315

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Freedom Elementary School",'Hooper=' + Hooper.length); Plain_City[Plain_City.length] = createMarker(new GPoint(-112.09293365,41.29213333),"
Fremont High School
1900 N 4700 W
Plain City, UT 84404

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Fremont High School",'Plain_City=' + Plain_City.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.95748138,41.24405289),"
Gramercy Elementary School
1270 Gramercy Ave
Ogden, UT 84404

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Gramercy Elementary School",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.95545959,41.19163513),"
Grandview Elementary School
960 39th Street
Ogden, UT 84403

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Grandview Elementary School",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.96167755,41.29322815),"
Green Acres Elementary School
640 E 1900 N
Ogden, UT 84414

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Green Acres Elementary School",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.96348572,41.16296387),"
H Guy Child Elementary School
655 E 5500 S
Ogden, UT 84405

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("H Guy Child Elementary School",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.95759583,41.25735855),"
Highland Middle School
325 Gramercy Ave
Ogden, UT 84404

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Highland Middle School",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.95071411,41.26126480),"
Hillcrest Elementary School
130 N Eccles Ave
Ogden, UT 84404

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Hillcrest Elementary School",'Ogden=' + Ogden.length); Hooper[Hooper.length] = createMarker(new GPoint(-112.12261963,41.16376114),"
Hooper Elementary School
5500 S 5900 W
Hooper, UT 84315

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Hooper Elementary School",'Hooper=' + Hooper.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.94480896,41.24853134),"
Horace Mann Elementary School
1300 - 9th St
Ogden, UT 84404

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Horace Mann Elementary School",'Ogden=' + Ogden.length); West_Haven[West_Haven.length] = createMarker(new GPoint(-112.06401825,41.20808029),"
Kanesville Elementary School
3112 S 3500 W
West Haven, UT 84401

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Kanesville Elementary School",'West_Haven=' + West_Haven.length); Roy[Roy.length] = createMarker(new GPoint(-112.02600400,41.17214000),"
Lakeview Elementary School
2025 W 5000 S
Roy, UT 84067

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lakeview Elementary School",'Roy=' + Roy.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.96907043,41.21421051),"
Lewis Elementary School
455 - 28th Street
Ogden, UT 84401

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lewis Elementary School",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.95934296,41.28279877),"
Lincoln Elementary School
1235 N Canfield
Ogden, UT 84404

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lincoln Elementary School",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.99800873,41.32440948),"
Lomond View Elementary School
3644 N 900 W
Ogden, UT 84414

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lomond View Elementary School",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.97277832,41.25323486),"
Lynn Elementary School
605 Grant Ave
Ogden, UT 84404

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lynn Elementary School",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.98631287,41.30396271),"
Majestic Elementary School
425 W 2550 N
Ogden, UT 84414

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Majestic Elementary School",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.96291351,41.18360138),"
Marlon Hills Elementary School
4400 Madison Ave
Ogden, UT 84403

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Marlon Hills Elementary School",'Ogden=' + Ogden.length); Roy[Roy.length] = createMarker(new GPoint(-112.05498505,41.17623520),"
Midland Elementary School
3100 W 4800 S
Roy, UT 84067

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Midland Elementary School",'Roy=' + Roy.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.99736786,41.24465179),"
Mill Creek Youth Center
790 W 12th Street
Ogden, UT 84404

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mill Creek Youth Center",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.96051788,41.24146652),"
Mound Fort Middle School
1400 Mound Fort Dr
Ogden, UT 84404

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Mound Fort Middle School",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.94841766,41.20459747),"
Mount Ogden Middle School
3260 Harrison Blvd
Ogden, UT 84403

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Mount Ogden Middle School",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.97616577,41.24003983),"
Mountain View Elementary School
170 - 15th Street
Ogden, UT 84404

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Mountain View Elementary School",'Ogden=' + Ogden.length); Roy[Roy.length] = createMarker(new GPoint(-112.03367615,41.15832138),"
Municipal Elementary School
5775 S 2200 W
Roy, UT 84067

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Municipal Elementary School",'Roy=' + Roy.length); Roy[Roy.length] = createMarker(new GPoint(-112.04522200,41.16165700),"
No Utah Academy For Math Engin & Sci (nuames)
P.o. Box 248
Roy, UT 84067

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("No Utah Academy For Math Engin & Sci (nuames)",'Roy=' + Roy.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.96596527,41.30723572),"
North Ogden Elementary School
474 E 2650 N
Ogden, UT 84414

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("North Ogden Elementary School",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.96315002,41.31366348),"
North Ogden Junior High School
575 E 2900 N
Ogden, UT 84414

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("North Ogden Junior High School",'Ogden=' + Ogden.length); Roy[Roy.length] = createMarker(new GPoint(-112.03211975,41.18650055),"
North Park Elementary School
4230 S 2175 W
Roy, UT 84067

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("North Park Elementary School",'Roy=' + Roy.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.95769501,41.26169586),"
Observ & Assess (yic) High School
145 N Monroe Blvd
Ogden, UT 84404

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Observ & Assess (yic) High School",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.94821930,41.21344757),"
Ogden High School
2828 Harrison Blvd
Ogden, UT 84403

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ogden High School",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.99810028,41.21720123),"
Ogden Prep Academy
2221 Grant Ave
Ogden, UT 84401

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Ogden Prep Academy",'Ogden=' + Ogden.length); Harrisville[Harrisville.length] = createMarker(new GPoint(-111.96839905,41.31269836),"
Orion Junior High School
370 W 2000 N
Harrisville, UT 84414

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Orion Junior High School",'Harrisville=' + Harrisville.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.96471405,41.22009277),"
Paramount (yic)
2760 Adams Ave
Ogden, UT 84401

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Paramount (yic)",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-112.01859283,41.26451874),"
Pioneer Elementary School
250 N 1600 W
Ogden, UT 84404

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Pioneer Elementary School",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-112.08546448,41.30213547),"
Plain City Elementary School
4394 W 2425 N
Ogden, UT 84404

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Plain City Elementary School",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.94291687,41.21781921),"
Polk Elementary School
2615 Polk Ave
Ogden, UT 84401

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Polk Elementary School",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.97070312,41.16329956),"
Project Success
165 W 5100 S
Ogden, UT 84405

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Project Success",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-112.00330353,41.26979828),"
Project Surpass (ben Lomond) High School
800 Jackson Ave
Ogden, UT 84404

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Project Surpass (ben Lomond) High School",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.94450378,41.18190002),"
Project Surpass (ogden) High School
2828 Harrison Blvd
Ogden, UT 84403

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Project Surpass (ogden) High School",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.97617600,41.21751300),"
Project Surpass-archway
2660 Lincoln Ave
Ogden, UT 84401

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Project Surpass-archway",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.94793700,41.17174500),"
Project Surpass-b H I
5030 Harrison Blvd
Ogden, UT 84403

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Project Surpass-b H I",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.95936500,41.21917800),"
Project Surpass-central Middle School
2563 Monroe Blvd
Ogden, UT 84401

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Project Surpass-central Middle School",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.97490300,41.21652000),"
Project Surpass-day Treatment
238 - 27th St
Ogden, UT 84401

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Project Surpass-day Treatment",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-112.00708008,41.18276978),"
Riverdale Elementary School
1160 W 4400 S
Ogden, UT 84405

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Riverdale Elementary School",'Ogden=' + Ogden.length); West_Haven[West_Haven.length] = createMarker(new GPoint(-111.57499695,39.37329865),"
Rocky Mountain Junior High School
4350 W 4800 S
West Haven, UT 84401

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Rocky Mountain Junior High School",'West_Haven=' + West_Haven.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.98039246,41.17083740),"
Roosevelt Elementary School
190 W 5100 S
Ogden, UT 84405

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Roosevelt Elementary School",'Ogden=' + Ogden.length); Roy[Roy.length] = createMarker(new GPoint(-112.04953003,41.16183853),"
Roy Elementary School
2888 W 5600 S
Roy, UT 84067

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Roy Elementary School",'Roy=' + Roy.length); Roy[Roy.length] = createMarker(new GPoint(-112.03220367,41.17633820),"
Roy High School
2150 W 4800 S
Roy, UT 84067

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Roy High School",'Roy=' + Roy.length); Roy[Roy.length] = createMarker(new GPoint(-112.03061676,41.16466141),"
Roy Junior High School
5400 S 2100 W
Roy, UT 84067

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Roy Junior High School",'Roy=' + Roy.length); Roy[Roy.length] = createMarker(new GPoint(-112.02969360,41.17926788),"
Sand Ridge Junior High School
2075 W 4600 S
Roy, UT 84067

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Sand Ridge Junior High School",'Roy=' + Roy.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.94781494,41.25065994),"
School For Blind
742 Harrison Blvd
Ogden, UT 84404

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("School For Blind",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.94781494,41.25065994),"
School For Deaf
742 Harrison Blvd
Ogden, UT 84404

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("School For Deaf",'Ogden=' + Ogden.length); Eden[Eden.length] = createMarker(new GPoint(-111.84380341,41.32669830),"
Snowcrest Junior High School
2755 N Highway 162
Eden, UT 84310

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Snowcrest Junior High School",'Eden=' + Eden.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.96291351,41.18376160),"
South Ogden Junior High School
4300 Madison Ave
Ogden, UT 84403

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("South Ogden Junior High School",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.99810028,41.21720123),"
Sp Ed Atc (contracted) High School
1950 Monroe Blvd
Ogden, UT 84401

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sp Ed Atc (contracted) High School",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.96258700,41.24475700),"
Summit View
1100 Orchard Ave
Ogden, UT 84404

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Summit View",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.97972107,41.17056274),"
T H Bell Junior High School
165 W 5100 S
Ogden, UT 84405

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("T H Bell Junior High School",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.95858002,41.20401001),"
Thomas O Smith Elementary School
3295 Gramercy Ave
Ogden, UT 84403

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Thomas O Smith Elementary School",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-112.00271600,41.24454500),"
Two Rivers High School
955 W 12th St
Ogden, UT 84404

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Two Rivers High School",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.92340851,41.15305328),"
Uintah Elementary School
6115 S 2250 E
Ogden, UT 84403

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Uintah Elementary School",'Ogden=' + Ogden.length); Huntsville[Huntsville.length] = createMarker(new GPoint(-111.76925659,41.26077652),"
Valley Elementary School
7436 E 200 S
Huntsville, UT 84317

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Valley Elementary School",'Huntsville=' + Huntsville.length); Roy[Roy.length] = createMarker(new GPoint(-112.03913879,41.18140411),"
Valley View Elementary School
2465 W 4500 S
Roy, UT 84067

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Valley View Elementary School",'Roy=' + Roy.length); Ogden[Ogden.length] = createMarker(new GPoint(-112.00875854,41.27644348),"
Wahlquist Junior High School
1033 N 1200 W
Ogden, UT 84404

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Wahlquist Junior High School",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.94351959,41.20201111),"
Wasatch Elementary School
3370 Polk Ave
Ogden, UT 84403

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Wasatch Elementary School",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.99810028,41.21720123),"
Washington High (yic)
956 - 20th Street
Ogden, UT 84401

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Washington High (yic)",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.95474243,41.23103714),"
Washington High School
956 - 20th Street
Ogden, UT 84401

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Washington High School",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.97777557,41.17865753),"
Washington Terrace Elementary School
20 E 4600 S
Ogden, UT 84405

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Washington Terrace Elementary School",'Ogden=' + Ogden.length); Ogden[Ogden.length] = createMarker(new GPoint(-111.98791504,41.32383728),"
Weber High School
430 W Weber High Dr
Ogden, UT 84414

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Weber High School",'Ogden=' + Ogden.length); Roy[Roy.length] = createMarker(new GPoint(-112.04501343,41.16450119),"
Weber Valley Detention Center
5470 S 2700 W
Roy, UT 84067

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Weber Valley Detention Center",'Roy=' + Roy.length); West_Haven[West_Haven.length] = createMarker(new GPoint(-112.07349300,41.17990500),"
West Haven School
4385 S 3900 W
West Haven, UT 84401

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("West Haven School",'West_Haven=' + West_Haven.length); Ogden[Ogden.length] = createMarker(new GPoint(-112.08011627,41.24980164),"
West Weber Elementary School
4178 W 900 S
Ogden, UT 84404

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("West Weber Elementary School",'Ogden=' + Ogden.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(Eden); map.removeOverlays(Harrisville); map.removeOverlays(Hooper); map.removeOverlays(Huntsville); map.removeOverlays(Ogden); map.removeOverlays(Plain_City); map.removeOverlays(Roy); map.removeOverlays(West_Haven); 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(Ogden);map.removeOverlays(Eden); map.removeOverlays(Harrisville); map.removeOverlays(Hooper); map.removeOverlays(Huntsville); map.removeOverlays(Ogden); map.removeOverlays(Plain_City); map.removeOverlays(Roy); map.removeOverlays(West_Haven); map.addOverlays(Eden); centerByArray(Eden, false, false); cntMarker += Eden.length; map.addOverlays(Harrisville); centerByArray(Harrisville, false, false); cntMarker += Harrisville.length; map.addOverlays(Hooper); centerByArray(Hooper, false, false); cntMarker += Hooper.length; map.addOverlays(Huntsville); centerByArray(Huntsville, false, false); cntMarker += Huntsville.length; map.addOverlays(Ogden); centerByArray(Ogden, false, false); cntMarker += Ogden.length; map.addOverlays(Plain_City); centerByArray(Plain_City, false, false); cntMarker += Plain_City.length; map.addOverlays(Roy); centerByArray(Roy, false, false); cntMarker += Roy.length; map.addOverlays(West_Haven); centerByArray(West_Haven, false, false); cntMarker += West_Haven.length; centerByArray(Ogden,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'); } }