function addMarkers()
{
mySelect = document.getElementById('selection');
Bakersfield = [];Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.06536865,35.34376907),"
",iconGr);
mySelect.options[mySelect.options.length] = new Option("Able Center (high)",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.06479645,35.33348465),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Actis (o.j.) Junior High School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.11910248,35.40693665),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Almondale Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.02256775,35.36905289),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Bakersfield High School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.04121399,35.40846252),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Beardsley Intermediate",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.04121399,35.40846252),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Beardsley Junior High School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.04521179,35.28880310),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Berkshire Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.12827301,35.29565811),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Buena Vista Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-118.99585724,35.33936310),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Casa Loma Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.06794739,35.32950592),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Castle (charles H.) Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.16027069,35.37169647),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Centennial Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.09735107,35.40010834),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Centennial High School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-118.88172913,35.39141846),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Chavez (cesar E.) Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-118.93852997,35.40012360),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Chipman Junior High School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-118.97173309,35.39488983),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("College Heights Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.10406494,35.36411285),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Columbia Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.01657104,35.37443542),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Community Learning Center (charter)",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-118.95394135,35.39026642),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Compton Junior High School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.01657104,35.37443542),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("County Community",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.04612732,35.34489441),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Curran Middle School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.16233063,35.34969711),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Del Rio Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.08582306,35.39933777),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Discovery Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.01543427,35.37748337),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Downtown Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-118.96719360,35.37989426),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("East Bakersfield High School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-118.89759827,35.36553574),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Edison Senior Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-118.93852997,35.40008926),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Eissler (henry) Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.01071167,35.36066437),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Emerson Middle School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.10585022,35.39103699),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Endeavour Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.03247070,35.34413528),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Evergreen Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-118.93216705,35.34146118),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Fairfax Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-118.99575806,35.30296326),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Fairview Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-118.91853333,35.36545181),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Foothill High School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.02803040,35.33314514),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Frank West Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.02946472,35.37353516),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Franklin Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.12931061,35.40501022),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Freedom Middle School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-118.99778748,35.35736465),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Fremont Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.10973358,35.37931442),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Fruitvale Junior High School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-118.95391083,35.37216187),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Garza (ramon) Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.01610565,35.22324371),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("General Shafter Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.11968231,35.39179993),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Golden Valley High School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.01493835,35.31026459),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Greenfield Middle School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-118.95396423,35.39025497),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Harding Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.04818726,35.36356735),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Harris (caroline) Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.10727692,35.33016205),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Hart (leo B.) Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.02084351,35.41745377),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Highland Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-118.93116760,35.40026093),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Highland High School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.01412964,35.39443970),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Hills (stella I.) Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-118.95829010,35.37593842),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Horace Mann Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-118.91847229,35.37834167),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Hort Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.13697052,35.38095856),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Independence Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-118.98729706,35.38700485),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Jefferson Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.01436615,35.36563873),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Johnson (rafer) Center",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-118.96029663,35.38729858),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Johnson (rafer) Community Day",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.01657104,35.37443542),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Juvenile Court",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.02663422,35.30690765),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Kendrick (w.a.) Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.06536865,35.34376907),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Kern Workforce 2000 Academy (charter)",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.11006927,35.22295380),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Lakeside Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.08836365,35.33068466),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Laurelglen Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.01162720,35.28839874),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Leon H. Ollivier Middle School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.12806702,35.36451340),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Liberty High School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-161.40890503,60.78549957),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Longfellow Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.04708099,35.30008316),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Loudon (roy W.) Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.09959412,35.33028030),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Mcauliffe (christa) Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.00547791,35.27396393),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Mckee Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.00552368,35.27396393),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Mckee Middle School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.00841522,35.36066437),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Mckinley Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-118.96862793,35.36481476),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Mt. Vernon Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.04463959,35.34846115),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Munsey Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-118.95560455,35.40266418),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Nichols (colonel Howard) Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-118.98320007,35.39916229),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Noble (myra A.) Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.10983276,35.42277527),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Norris Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.10983276,35.42277527),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Norris Middle School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.04312897,35.41493607),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("North Beardsley Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.02614594,35.42816925),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("North High School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.08895111,35.41443634),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Olive Drive Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-118.89759827,35.36553574),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Orangewood Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-118.99387360,35.36466217),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Owens (bessie E.) Primary Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-118.99250793,35.37208557),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Owens Middle School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.01116943,35.30323792),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Palla (raffaello) Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.05653381,35.26975632),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Panama Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.13662720,35.40040207),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Patriot Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.00531006,35.32476425),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Pauly (leo G.) Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-118.93525696,35.36893845),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Pioneer Drive Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.01296997,35.31936264),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Plantation Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.02910614,35.32503510),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Planz Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.08407593,35.35836411),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Quailwood Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.12183380,35.34642029),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Reagan (ronald) Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-118.96746800,35.35070600),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Regional Occupational Center",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.05686951,35.27894974),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Ridgeview High School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.25436401,35.42211914),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Rio Bravo Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.25207520,35.41920471),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Rio Bravo-greeley Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.02848816,35.35623550),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Roosevelt Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.14073181,35.38336182),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Rosedale Middle School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.12863922,35.39083862),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Rosedale-north Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.06213100,35.40725500),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("San Lauren Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.04899597,35.31973648),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Sandrini (louise) Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.03492737,35.32969666),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Seibert (amy B.) Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.01206970,35.34683609),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Sequoia Middle School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-118.92950400,35.34438900),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Shirley Lane Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-118.95143127,35.37216187),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Sierra Middle School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.10366821,35.31333160),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Sing Lum Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.01456451,35.32476425),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("South High School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.01873779,35.37168121),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Special Education",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-118.96730042,35.35058212),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Special Services/constellation High School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.02084351,35.41745377),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Standard Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.02085876,35.41759109),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Standard Middle School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-118.91403198,35.38058090),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Stiern (walter) Middle School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.05236816,35.33243561),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Stine Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.08963013,35.34996414),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Stockdale Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.12772369,35.32934952),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Stockdale High School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.08252716,35.30483627),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Suburu (donald E.) Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-118.91207123,35.22316360),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Sunset Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.09818268,35.31961441),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Tevis Junior High School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.04956055,35.32514572),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Thompson (fred L.) Junior High School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-118.91741180,35.40412521),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Thorner (dr. Juliet) Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.11968231,35.39179993),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Valle Verde Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.01896667,35.39139938),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Valley Oaks Charter",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.06458282,35.35746384),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Van Horn (wayne) Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-118.89603424,35.22506714),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Vineland Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-118.94728851,35.36131287),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Virginia Avenue Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.01173401,35.35803604),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Vista High Continuation School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.08108521,35.38316345),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("Vista West Continuation High School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-118.91851807,35.36876297),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Voorhies Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.11896515,35.31346130),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Warren (earl) Junior High School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-118.98171234,35.39926147),"",iconBl);
mySelect.options[mySelect.options.length] = new Option("Washington Middle School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.01295471,35.33963776),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Wayside Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.06082916,35.34406281),"",iconGr);
mySelect.options[mySelect.options.length] = new Option("West High School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.09842682,35.41024780),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("William B. Bimat Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.02767944,35.36566162),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("William Penn Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.06404877,35.30316162),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Williams (bill L.) Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-118.97728729,35.37769318),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Williams Elementary School",'Bakersfield=' + Bakersfield.length);
Bakersfield[Bakersfield.length] = createMarker(new GPoint(-119.02084351,35.41745377),"",iconRd);
mySelect.options[mySelect.options.length] = new Option("Wingland Elementary School",'Bakersfield=' + Bakersfield.length);
maxLng = -118.88172913;
maxLat = 60.78549957;
minLng = -161.40890503;
minLat = 35.22295380;
reCenterMap();
} // 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(Bakersfield);
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(Bakersfield);map.removeOverlays(Bakersfield);
map.addOverlays(Bakersfield);
centerByArray(Bakersfield, false, false);
cntMarker += Bakersfield.length;
centerByArray(Bakersfield,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');
}
}