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,"
",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,"",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,"",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,"",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,"",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,"",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,"",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,"",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,"",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,"",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,"",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,"",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,"",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,"",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,"",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,"",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,"",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,"",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,"",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,"",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,"",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,"",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,"",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,"",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,"",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,"",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,"",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,"",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,"",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,"",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,"",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,"",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,"",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,"",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;
}