function addMarkers(){ mySelect = document.getElementById('selection'); Seattle = [];Bellevue = [];Bellingham = [];Moses_Lake = [];Centralia = [];Vancouver = [];Lakewood = [];Pasco = [];Lynnwood = [];Everett = [];Aberdeen = [];Auburn = [];Des_Moines = [];Spokane_Valley = [];Kirkland = [];Longview = [];Bremerton = [];Port_Angeles = [];Renton = [];Shoreline = [];Mount_Vernon = [];Olympia = [];Spokane = [];Tacoma = [];Walla_Walla = [];Wenatchee = [];Yakima = [];mySelect.options[mySelect.options.length] = new Option("Aberdeen Schools",'all=Aberdeen'); mySelect.options[mySelect.options.length] = new Option("Auburn Schools",'all=Auburn'); mySelect.options[mySelect.options.length] = new Option("Bellevue Schools",'all=Bellevue'); mySelect.options[mySelect.options.length] = new Option("Bellingham Schools",'all=Bellingham'); mySelect.options[mySelect.options.length] = new Option("Bremerton Schools",'all=Bremerton'); mySelect.options[mySelect.options.length] = new Option("Centralia Schools",'all=Centralia'); mySelect.options[mySelect.options.length] = new Option("Des Moines Schools",'all=Des_Moines'); mySelect.options[mySelect.options.length] = new Option("Everett Schools",'all=Everett'); mySelect.options[mySelect.options.length] = new Option("Kirkland Schools",'all=Kirkland'); mySelect.options[mySelect.options.length] = new Option("Lakewood Schools",'all=Lakewood'); mySelect.options[mySelect.options.length] = new Option("Longview Schools",'all=Longview'); mySelect.options[mySelect.options.length] = new Option("Lynnwood Schools",'all=Lynnwood'); mySelect.options[mySelect.options.length] = new Option("Moses Lake Schools",'all=Moses_Lake'); mySelect.options[mySelect.options.length] = new Option("Mount Vernon Schools",'all=Mount_Vernon'); mySelect.options[mySelect.options.length] = new Option("Olympia Schools",'all=Olympia'); mySelect.options[mySelect.options.length] = new Option("Pasco Schools",'all=Pasco'); mySelect.options[mySelect.options.length] = new Option("Port Angeles Schools",'all=Port_Angeles'); mySelect.options[mySelect.options.length] = new Option("Renton Schools",'all=Renton'); mySelect.options[mySelect.options.length] = new Option("Seattle Schools",'all=Seattle'); mySelect.options[mySelect.options.length] = new Option("Shoreline Schools",'all=Shoreline'); mySelect.options[mySelect.options.length] = new Option("Spokane Schools",'all=Spokane'); mySelect.options[mySelect.options.length] = new Option("Spokane Valley Schools",'all=Spokane_Valley'); mySelect.options[mySelect.options.length] = new Option("Tacoma Schools",'all=Tacoma'); mySelect.options[mySelect.options.length] = new Option("Vancouver Schools",'all=Vancouver'); mySelect.options[mySelect.options.length] = new Option("Walla Walla Schools",'all=Walla_Walla'); mySelect.options[mySelect.options.length] = new Option("Wenatchee Schools",'all=Wenatchee'); mySelect.options[mySelect.options.length] = new Option("Yakima Schools",'all=Yakima'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); var tmpLatLng=0; var tmpLen=0; tmpLatLng=new GLatLng(47.61245499999999708,-122.348252000000002); tmpLen=Seattle.length; Seattle[tmpLen] = createMarker(tmpLatLng,"
Art Institute Of Seattle
2323 Elliott Ave
Seattle, WA 98121

[ View School Profile ]
",iconRd); Seattle[tmpLen].point = tmpLatLng; mySelect.options[mySelect.options.length] = new Option("Art Institute Of Seattle",'Seattle=' + Seattle.length); tmpLatLng=new GLatLng(47.58402099999999990,-122.146005000000002); tmpLen=Bellevue.length; Bellevue[tmpLen] = createMarker(tmpLatLng,"
Bellevue Community College
3000 Landerholm Cir Se
Bellevue, WA 98007

[ View School Profile ]
",iconGr); Bellevue[tmpLen].point = tmpLatLng; mySelect.options[mySelect.options.length] = new Option("Bellevue Community College",'Bellevue=' + Bellevue.length); tmpLatLng=new GLatLng(48.76499599999999645,-122.511719999999996); tmpLen=Bellingham.length; Bellingham[tmpLen] = createMarker(tmpLatLng,"
Bellingham Technical College
3028 Lindbergh Ave
Bellingham, WA 98225

[ View School Profile ]
",iconGr); Bellingham[tmpLen].point = tmpLatLng; mySelect.options[mySelect.options.length] = new Option("Bellingham Technical College",'Bellingham=' + Bellingham.length); tmpLatLng=new GLatLng(47.18404400000000009,-119.325558000000000); tmpLen=Moses_Lake.length; Moses_Lake[tmpLen] = createMarker(tmpLatLng,"
Big Bend Community College
7662 Chanute St
Moses Lake, WA 98837

[ View School Profile ]
",iconGr); Moses_Lake[tmpLen].point = tmpLatLng; mySelect.options[mySelect.options.length] = new Option("Big Bend Community College",'Moses_Lake=' + Moses_Lake.length); tmpLatLng=new GLatLng(46.71641499999999780,-122.960475999999999); tmpLen=Centralia.length; Centralia[tmpLen] = createMarker(tmpLatLng,"
Centralia College
600 W Locust St
Centralia, WA 98531

[ View School Profile ]
",iconGr); Centralia[tmpLen].point = tmpLatLng; mySelect.options[mySelect.options.length] = new Option("Centralia College",'Centralia=' + Centralia.length); tmpLatLng=new GLatLng(45.63493900000000280,-122.664807999999993); tmpLen=Vancouver.length; Vancouver[tmpLen] = createMarker(tmpLatLng,"
Clark College
1800 E Mcloughlin Blvd
Vancouver, WA 98663

[ View School Profile ]
",iconGr); Vancouver[tmpLen].point = tmpLatLng; mySelect.options[mySelect.options.length] = new Option("Clark College",'Vancouver=' + Vancouver.length); tmpLatLng=new GLatLng(47.17651599999999945,-122.497119999999995); tmpLen=Lakewood.length; Lakewood[tmpLen] = createMarker(tmpLatLng,"
Clover Park Technical College
4500 Steilacoom Blvd Sw
Lakewood, WA 98499

[ View School Profile ]
",iconGr); Lakewood[tmpLen].point = tmpLatLng; mySelect.options[mySelect.options.length] = new Option("Clover Park Technical College",'Lakewood=' + Lakewood.length); tmpLatLng=new GLatLng(46.24990199999999873,-119.117125000000001); tmpLen=Pasco.length; Pasco[tmpLen] = createMarker(tmpLatLng,"
Columbia Basin College
2600 N 20th Ave
Pasco, WA 99301

[ View School Profile ]
",iconGr); Pasco[tmpLen].point = tmpLatLng; mySelect.options[mySelect.options.length] = new Option("Columbia Basin College",'Pasco=' + Pasco.length); tmpLatLng=new GLatLng(47.81309799999999654,-122.324809999999999); tmpLen=Lynnwood.length; Lynnwood[tmpLen] = createMarker(tmpLatLng,"
Edmonds Community College
20000 68th Ave W
Lynnwood, WA 98037

[ View School Profile ]
",iconGr); Lynnwood[tmpLen].point = tmpLatLng; mySelect.options[mySelect.options.length] = new Option("Edmonds Community College",'Lynnwood=' + Lynnwood.length); tmpLatLng=new GLatLng(48.00581700000000040,-122.200946999999999); tmpLen=Everett.length; Everett[tmpLen] = createMarker(tmpLatLng,"
Everett Community College
2000 Tower Street
Everett, WA 98201

[ View School Profile ]
",iconGr); Everett[tmpLen].point = tmpLatLng; mySelect.options[mySelect.options.length] = new Option("Everett Community College",'Everett=' + Everett.length); tmpLatLng=new GLatLng(46.95530300000000067,-123.804805000000001); tmpLen=Aberdeen.length; Aberdeen[tmpLen] = createMarker(tmpLatLng,"
Grays Harbor College
1620 Edward P Smith Dr
Aberdeen, WA 98520

[ View School Profile ]
",iconGr); Aberdeen[tmpLen].point = tmpLatLng; mySelect.options[mySelect.options.length] = new Option("Grays Harbor College",'Aberdeen=' + Aberdeen.length); tmpLatLng=new GLatLng(47.31532200000000187,-122.175629000000000); tmpLen=Auburn.length; Auburn[tmpLen] = createMarker(tmpLatLng,"
Green River Community College
12401 Se 320th St
Auburn, WA 98092

[ View School Profile ]
",iconGr); Auburn[tmpLen].point = tmpLatLng; mySelect.options[mySelect.options.length] = new Option("Green River Community College",'Auburn=' + Auburn.length); tmpLatLng=new GLatLng(47.38652799999999842,-122.302876999999995); tmpLen=Des_Moines.length; Des_Moines[tmpLen] = createMarker(tmpLatLng,"
Highline Community College
2400 S 240th St
Des Moines, WA 98198

[ View School Profile ]
",iconGr); Des_Moines[tmpLen].point = tmpLatLng; mySelect.options[mySelect.options.length] = new Option("Highline Community College",'Des_Moines=' + Des_Moines.length); tmpLatLng=new GLatLng(47.79613700000000164,-122.198832999999993); tmpLen=Everett.length; Everett[tmpLen] = createMarker(tmpLatLng,"
Itt Technical Institute-everett
1615 75th Street Sw, Suite 220
Everett, WA 98203

[ View School Profile ]
",iconRd); Everett[tmpLen].point = tmpLatLng; mySelect.options[mySelect.options.length] = new Option("Itt Technical Institute-everett",'Everett=' + Everett.length); tmpLatLng=new GLatLng(47.66652200000000050,-117.282695000000003); tmpLen=Spokane_Valley.length; Spokane_Valley[tmpLen] = createMarker(tmpLatLng,"
Itt Technical Institute-spokane Valley
13518 E Indiana Avenue
Spokane Valley, WA 99216

[ View School Profile ]
",iconRd); Spokane_Valley[tmpLen].point = tmpLatLng; mySelect.options[mySelect.options.length] = new Option("Itt Technical Institute-spokane Valley",'Spokane_Valley=' + Spokane_Valley.length); tmpLatLng=new GLatLng(47.70225700000000301,-122.164325000000005); tmpLen=Kirkland.length; Kirkland[tmpLen] = createMarker(tmpLatLng,"
Lake Washington Technical College
11605 132nd Ave Ne
Kirkland, WA 98034

[ View School Profile ]
",iconGr); Kirkland[tmpLen].point = tmpLatLng; mySelect.options[mySelect.options.length] = new Option("Lake Washington Technical College",'Kirkland=' + Kirkland.length); tmpLatLng=new GLatLng(46.14043300000000158,-122.936321000000006); tmpLen=Longview.length; Longview[tmpLen] = createMarker(tmpLatLng,"
Lower Columbia College
1600 Maple
Longview, WA 98632

[ View School Profile ]
",iconGr); Longview[tmpLen].point = tmpLatLng; mySelect.options[mySelect.options.length] = new Option("Lower Columbia College",'Longview=' + Longview.length); tmpLatLng=new GLatLng(47.57581700000000068,-122.635350000000002); tmpLen=Bremerton.length; Bremerton[tmpLen] = createMarker(tmpLatLng,"
Olympic College
1600 Chester Ave
Bremerton, WA 98337

[ View School Profile ]
",iconGr); Bremerton[tmpLen].point = tmpLatLng; mySelect.options[mySelect.options.length] = new Option("Olympic College",'Bremerton=' + Bremerton.length); tmpLatLng=new GLatLng(48.10242999999999824,-123.412715000000005); tmpLen=Port_Angeles.length; Port_Angeles[tmpLen] = createMarker(tmpLatLng,"
Peninsula College
1502 E Lauridsen Blvd
Port Angeles, WA 98362

[ View School Profile ]
",iconGr); Port_Angeles[tmpLen].point = tmpLatLng; mySelect.options[mySelect.options.length] = new Option("Peninsula College",'Port_Angeles=' + Port_Angeles.length); tmpLatLng=new GLatLng(47.17127500000000139,-122.574171000000006); tmpLen=Lakewood.length; Lakewood[tmpLen] = createMarker(tmpLatLng,"
Pierce College At Fort Steilacoom
9401 Farwest Dr Sw
Lakewood, WA 98498

[ View School Profile ]
",iconGr); Lakewood[tmpLen].point = tmpLatLng; mySelect.options[mySelect.options.length] = new Option("Pierce College At Fort Steilacoom",'Lakewood=' + Lakewood.length); tmpLatLng=new GLatLng(47.48842199999999991,-122.180632000000002); tmpLen=Renton.length; Renton[tmpLen] = createMarker(tmpLatLng,"
Renton Technical College
3000 Ne Fourth St
Renton, WA 98056

[ View School Profile ]
",iconGr); Renton[tmpLen].point = tmpLatLng; mySelect.options[mySelect.options.length] = new Option("Renton Technical College",'Renton=' + Renton.length); tmpLatLng=new GLatLng(47.61654300000000006,-122.320735999999996); tmpLen=Seattle.length; Seattle[tmpLen] = createMarker(tmpLatLng,"
Seattle Community College-central Campus
1701 Broadway Avenue
Seattle, WA 98122

[ View School Profile ]
",iconGr); Seattle[tmpLen].point = tmpLatLng; mySelect.options[mySelect.options.length] = new Option("Seattle Community College-central Campus",'Seattle=' + Seattle.length); tmpLatLng=new GLatLng(47.69877999999999929,-122.335037999999997); tmpLen=Seattle.length; Seattle[tmpLen] = createMarker(tmpLatLng,"
Seattle Community College-north Campus
9600 College Way North
Seattle, WA 98103

[ View School Profile ]
",iconGr); Seattle[tmpLen].point = tmpLatLng; mySelect.options[mySelect.options.length] = new Option("Seattle Community College-north Campus",'Seattle=' + Seattle.length); tmpLatLng=new GLatLng(47.54845900000000114,-122.354636999999996); tmpLen=Seattle.length; Seattle[tmpLen] = createMarker(tmpLatLng,"
Seattle Community College-south Campus
6000 16th Ave Sw
Seattle, WA 98106

[ View School Profile ]
",iconGr); Seattle[tmpLen].point = tmpLatLng; mySelect.options[mySelect.options.length] = new Option("Seattle Community College-south Campus",'Seattle=' + Seattle.length); tmpLatLng=new GLatLng(47.74616199999999821,-122.355840000000000); tmpLen=Shoreline.length; Shoreline[tmpLen] = createMarker(tmpLatLng,"
Shoreline Community College
16101 Greenwood Ave N
Shoreline, WA 98133

[ View School Profile ]
",iconGr); Shoreline[tmpLen].point = tmpLatLng; mySelect.options[mySelect.options.length] = new Option("Shoreline Community College",'Shoreline=' + Shoreline.length); tmpLatLng=new GLatLng(48.43555899999999780,-122.310913999999996); tmpLen=Mount_Vernon.length; Mount_Vernon[tmpLen] = createMarker(tmpLatLng,"
Skagit Valley College
2405 E. College Way
Mount Vernon, WA 98273

[ View School Profile ]
",iconGr); Mount_Vernon[tmpLen].point = tmpLatLng; mySelect.options[mySelect.options.length] = new Option("Skagit Valley College",'Mount_Vernon=' + Mount_Vernon.length); tmpLatLng=new GLatLng(47.02517999999999887,-122.925066999999998); tmpLen=Olympia.length; Olympia[tmpLen] = createMarker(tmpLatLng,"
South Puget Sound Community College
2011 Mottman Rd Sw
Olympia, WA 98512

[ View School Profile ]
",iconGr); Olympia[tmpLen].point = tmpLatLng; mySelect.options[mySelect.options.length] = new Option("South Puget Sound Community College",'Olympia=' + Olympia.length); tmpLatLng=new GLatLng(47.67448199999999758,-117.363861999999997); tmpLen=Spokane.length; Spokane[tmpLen] = createMarker(tmpLatLng,"
Spokane Community College
1810 North Greene Street
Spokane, WA 99217

[ View School Profile ]
",iconGr); Spokane[tmpLen].point = tmpLatLng; mySelect.options[mySelect.options.length] = new Option("Spokane Community College",'Spokane=' + Spokane.length); tmpLatLng=new GLatLng(47.67508800000000235,-117.463110999999997); tmpLen=Spokane.length; Spokane[tmpLen] = createMarker(tmpLatLng,"
Spokane Falls Community College
3410 W Fort Geo Wright Dr
Spokane, WA 99224

[ View School Profile ]
",iconGr); Spokane[tmpLen].point = tmpLatLng; mySelect.options[mySelect.options.length] = new Option("Spokane Falls Community College",'Spokane=' + Spokane.length); tmpLatLng=new GLatLng(47.24252800000000007,-122.526138000000003); tmpLen=Tacoma.length; Tacoma[tmpLen] = createMarker(tmpLatLng,"
Tacoma Community College
6501 S 19th St
Tacoma, WA 98466

[ View School Profile ]
",iconGr); Tacoma[tmpLen].point = tmpLatLng; mySelect.options[mySelect.options.length] = new Option("Tacoma Community College",'Tacoma=' + Tacoma.length); tmpLatLng=new GLatLng(46.07391599999999698,-118.285163999999994); tmpLen=Walla_Walla.length; Walla_Walla[tmpLen] = createMarker(tmpLatLng,"
Walla Walla Community College
500 Tausick Way
Walla Walla, WA 99362

[ View School Profile ]
",iconGr); Walla_Walla[tmpLen].point = tmpLatLng; mySelect.options[mySelect.options.length] = new Option("Walla Walla Community College",'Walla_Walla=' + Walla_Walla.length); tmpLatLng=new GLatLng(47.42968900000000331,-120.332367000000004); tmpLen=Wenatchee.length; Wenatchee[tmpLen] = createMarker(tmpLatLng,"
Wenatchee Valley College
1300 Fifth St
Wenatchee, WA 98801

[ View School Profile ]
",iconGr); Wenatchee[tmpLen].point = tmpLatLng; mySelect.options[mySelect.options.length] = new Option("Wenatchee Valley College",'Wenatchee=' + Wenatchee.length); tmpLatLng=new GLatLng(48.79475000000000051,-122.492830999999995); tmpLen=Bellingham.length; Bellingham[tmpLen] = createMarker(tmpLatLng,"
Whatcom Community College
237 West Kellogg Road
Bellingham, WA 98226

[ View School Profile ]
",iconGr); Bellingham[tmpLen].point = tmpLatLng; mySelect.options[mySelect.options.length] = new Option("Whatcom Community College",'Bellingham=' + Bellingham.length); tmpLatLng=new GLatLng(46.58534800000000331,-120.530376000000003); tmpLen=Yakima.length; Yakima[tmpLen] = createMarker(tmpLatLng,"
Yakima Valley Community College
Sixteenth And Nob Hill Boulevard
Yakima, WA 98907

[ View School Profile ]
",iconGr); Yakima[tmpLen].point = tmpLatLng; mySelect.options[mySelect.options.length] = new Option("Yakima Valley Community College",'Yakima=' + Yakima.length); map.removeOverlays(Aberdeen); map.removeOverlays(Auburn); map.removeOverlays(Bellevue); map.removeOverlays(Bellingham); map.removeOverlays(Bremerton); map.removeOverlays(Centralia); map.removeOverlays(Des_Moines); map.removeOverlays(Everett); map.removeOverlays(Kirkland); map.removeOverlays(Lakewood); map.removeOverlays(Longview); map.removeOverlays(Lynnwood); map.removeOverlays(Moses_Lake); map.removeOverlays(Mount_Vernon); map.removeOverlays(Olympia); map.removeOverlays(Pasco); map.removeOverlays(Port_Angeles); map.removeOverlays(Renton); map.removeOverlays(Seattle); map.removeOverlays(Shoreline); map.removeOverlays(Spokane); map.removeOverlays(Spokane_Valley); map.removeOverlays(Tacoma); map.removeOverlays(Vancouver); map.removeOverlays(Walla_Walla); map.removeOverlays(Wenatchee); map.removeOverlays(Yakima); setTimeout(function(){map.addOverlays(Aberdeen)},1000); setTimeout(function(){map.addOverlays(Auburn)},1000); setTimeout(function(){map.addOverlays(Bellevue)},1000); setTimeout(function(){map.addOverlays(Bellingham)},1000); setTimeout(function(){map.addOverlays(Bremerton)},1000); setTimeout(function(){map.addOverlays(Centralia)},1000); setTimeout(function(){map.addOverlays(Des_Moines)},1000); setTimeout(function(){map.addOverlays(Everett)},1000); setTimeout(function(){map.addOverlays(Kirkland)},1000); setTimeout(function(){map.addOverlays(Lakewood)},1000); setTimeout(function(){map.addOverlays(Longview)},1000); setTimeout(function(){map.addOverlays(Lynnwood)},1000); setTimeout(function(){map.addOverlays(Moses_Lake)},1000); setTimeout(function(){map.addOverlays(Mount_Vernon)},1000); setTimeout(function(){map.addOverlays(Olympia)},1000); setTimeout(function(){map.addOverlays(Pasco)},1000); setTimeout(function(){map.addOverlays(Port_Angeles)},1000); setTimeout(function(){map.addOverlays(Renton)},1000); setTimeout(function(){map.addOverlays(Seattle)},1000); setTimeout(function(){map.addOverlays(Shoreline)},1000); setTimeout(function(){map.addOverlays(Spokane)},1000); setTimeout(function(){map.addOverlays(Spokane_Valley)},1000); setTimeout(function(){map.addOverlays(Tacoma)},1000); setTimeout(function(){map.addOverlays(Vancouver)},1000); setTimeout(function(){map.addOverlays(Walla_Walla)},1000); setTimeout(function(){map.addOverlays(Wenatchee)},1000); setTimeout(function(){map.addOverlays(Yakima)},1000); getPoly("","state","","WA");} // End addStateMarkers JavaScript Function //open all when map is defined function openAll() { if (map) { selectChange("all"); } else { setTimeout("openAll()",200); } } // 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].point.x; var markLat = myArray[i].point.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].point.x; maxLat = myArray[0].point.y; minLng = myArray[0].point.x; minLat = myArray[0].point.y; } // Recenter map based on global max/mins function reCenterMap(){ //alert('#' + minLat + '#' + minLng + '#' + maxLat + '#' + maxLng); 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) { if (selection.options) { var _openNewWindow=true; var myVal = selection.options[selection.selectedIndex].value; } else { var _openNewWindow=false; var myVal=selection; } 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('schools-by-distance') == -1) window.open(location.href + '/map/all'); else window.open('/search////all'); map.removeOverlays(Aberdeen); map.removeOverlays(Auburn); map.removeOverlays(Bellevue); map.removeOverlays(Bellingham); map.removeOverlays(Bremerton); map.removeOverlays(Centralia); map.removeOverlays(Des_Moines); map.removeOverlays(Everett); map.removeOverlays(Kirkland); map.removeOverlays(Lakewood); map.removeOverlays(Longview); map.removeOverlays(Lynnwood); map.removeOverlays(Moses_Lake); map.removeOverlays(Mount_Vernon); map.removeOverlays(Olympia); map.removeOverlays(Pasco); map.removeOverlays(Port_Angeles); map.removeOverlays(Renton); map.removeOverlays(Seattle); map.removeOverlays(Shoreline); map.removeOverlays(Spokane); map.removeOverlays(Spokane_Valley); map.removeOverlays(Tacoma); map.removeOverlays(Vancouver); map.removeOverlays(Walla_Walla); map.removeOverlays(Wenatchee); map.removeOverlays(Yakima); 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(Seattle);map.removeOverlays(Aberdeen); map.removeOverlays(Auburn); map.removeOverlays(Bellevue); map.removeOverlays(Bellingham); map.removeOverlays(Bremerton); map.removeOverlays(Centralia); map.removeOverlays(Des_Moines); map.removeOverlays(Everett); map.removeOverlays(Kirkland); map.removeOverlays(Lakewood); map.removeOverlays(Longview); map.removeOverlays(Lynnwood); map.removeOverlays(Moses_Lake); map.removeOverlays(Mount_Vernon); map.removeOverlays(Olympia); map.removeOverlays(Pasco); map.removeOverlays(Port_Angeles); map.removeOverlays(Renton); map.removeOverlays(Seattle); map.removeOverlays(Shoreline); map.removeOverlays(Spokane); map.removeOverlays(Spokane_Valley); map.removeOverlays(Tacoma); map.removeOverlays(Vancouver); map.removeOverlays(Walla_Walla); map.removeOverlays(Wenatchee); map.removeOverlays(Yakima); map.addOverlays(Aberdeen); centerByArray(Aberdeen, false, false); cntMarker += Aberdeen.length; map.addOverlays(Auburn); centerByArray(Auburn, false, false); cntMarker += Auburn.length; map.addOverlays(Bellevue); centerByArray(Bellevue, false, false); cntMarker += Bellevue.length; map.addOverlays(Bellingham); centerByArray(Bellingham, false, false); cntMarker += Bellingham.length; map.addOverlays(Bremerton); centerByArray(Bremerton, false, false); cntMarker += Bremerton.length; map.addOverlays(Centralia); centerByArray(Centralia, false, false); cntMarker += Centralia.length; map.addOverlays(Des_Moines); centerByArray(Des_Moines, false, false); cntMarker += Des_Moines.length; map.addOverlays(Everett); centerByArray(Everett, false, false); cntMarker += Everett.length; map.addOverlays(Kirkland); centerByArray(Kirkland, false, false); cntMarker += Kirkland.length; map.addOverlays(Lakewood); centerByArray(Lakewood, false, false); cntMarker += Lakewood.length; map.addOverlays(Longview); centerByArray(Longview, false, false); cntMarker += Longview.length; map.addOverlays(Lynnwood); centerByArray(Lynnwood, false, false); cntMarker += Lynnwood.length; map.addOverlays(Moses_Lake); centerByArray(Moses_Lake, false, false); cntMarker += Moses_Lake.length; map.addOverlays(Mount_Vernon); centerByArray(Mount_Vernon, false, false); cntMarker += Mount_Vernon.length; map.addOverlays(Olympia); centerByArray(Olympia, false, false); cntMarker += Olympia.length; map.addOverlays(Pasco); centerByArray(Pasco, false, false); cntMarker += Pasco.length; map.addOverlays(Port_Angeles); centerByArray(Port_Angeles, false, false); cntMarker += Port_Angeles.length; map.addOverlays(Renton); centerByArray(Renton, false, false); cntMarker += Renton.length; map.addOverlays(Seattle); centerByArray(Seattle, false, false); cntMarker += Seattle.length; map.addOverlays(Shoreline); centerByArray(Shoreline, false, false); cntMarker += Shoreline.length; map.addOverlays(Spokane); centerByArray(Spokane, false, false); cntMarker += Spokane.length; map.addOverlays(Spokane_Valley); centerByArray(Spokane_Valley, false, false); cntMarker += Spokane_Valley.length; map.addOverlays(Tacoma); centerByArray(Tacoma, false, false); cntMarker += Tacoma.length; map.addOverlays(Vancouver); centerByArray(Vancouver, false, false); cntMarker += Vancouver.length; map.addOverlays(Walla_Walla); centerByArray(Walla_Walla, false, false); cntMarker += Walla_Walla.length; map.addOverlays(Wenatchee); centerByArray(Wenatchee, false, false); cntMarker += Wenatchee.length; map.addOverlays(Yakima); centerByArray(Yakima, false, false); cntMarker += Yakima.length; reCenterMap(); //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'); } } function createMarker(point, label, icon){ var marker = new GMarker(point, icon); var html = label; GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml(html); }); return marker; }