function addMarkers(){ mySelect = document.getElementById('selection'); Stockton = [];Aurora = [];Ballwin = [];Kansas_City = [];Marshall = [];Nevada = [];Camdenton = [];Jefferson_City = [];Springfield = [];Spokane = [];Greenfield = [];OFallon = [];Foristell = [];New_Franklin = [];Belton = [];Pleasant_Hill = [];St_Robert = [];Sullivan = [];Falcon = [];Salem = [];Marble_Hill = [];Holt = [];Blue_Springs = [];Forsyth = [];Miller = [];Grandview = [];Saint_Louis = [];Independence = [];Festus = [];Piedmont = [];Poplar_Bluff = [];Saint_Peters = [];mySelect.options[mySelect.options.length] = new Option("Aurora schools",'all=Aurora'); mySelect.options[mySelect.options.length] = new Option("Ballwin schools",'all=Ballwin'); mySelect.options[mySelect.options.length] = new Option("Belton schools",'all=Belton'); mySelect.options[mySelect.options.length] = new Option("Blue Springs schools",'all=Blue_Springs'); mySelect.options[mySelect.options.length] = new Option("Camdenton schools",'all=Camdenton'); mySelect.options[mySelect.options.length] = new Option("Falcon schools",'all=Falcon'); mySelect.options[mySelect.options.length] = new Option("Festus schools",'all=Festus'); mySelect.options[mySelect.options.length] = new Option("Foristell schools",'all=Foristell'); mySelect.options[mySelect.options.length] = new Option("Forsyth schools",'all=Forsyth'); mySelect.options[mySelect.options.length] = new Option("Grandview schools",'all=Grandview'); mySelect.options[mySelect.options.length] = new Option("Greenfield schools",'all=Greenfield'); mySelect.options[mySelect.options.length] = new Option("Holt schools",'all=Holt'); mySelect.options[mySelect.options.length] = new Option("Independence schools",'all=Independence'); mySelect.options[mySelect.options.length] = new Option("Jefferson City schools",'all=Jefferson_City'); mySelect.options[mySelect.options.length] = new Option("Kansas City schools",'all=Kansas_City'); mySelect.options[mySelect.options.length] = new Option("Marble Hill schools",'all=Marble_Hill'); mySelect.options[mySelect.options.length] = new Option("Marshall schools",'all=Marshall'); mySelect.options[mySelect.options.length] = new Option("Miller schools",'all=Miller'); mySelect.options[mySelect.options.length] = new Option("Nevada schools",'all=Nevada'); mySelect.options[mySelect.options.length] = new Option("New Franklin schools",'all=New_Franklin'); mySelect.options[mySelect.options.length] = new Option("OFallon schools",'all=OFallon'); mySelect.options[mySelect.options.length] = new Option("Piedmont schools",'all=Piedmont'); mySelect.options[mySelect.options.length] = new Option("Pleasant Hill schools",'all=Pleasant_Hill'); mySelect.options[mySelect.options.length] = new Option("Poplar Bluff schools",'all=Poplar_Bluff'); mySelect.options[mySelect.options.length] = new Option("Saint Louis schools",'all=Saint_Louis'); mySelect.options[mySelect.options.length] = new Option("Saint Peters schools",'all=Saint_Peters'); mySelect.options[mySelect.options.length] = new Option("Salem schools",'all=Salem'); mySelect.options[mySelect.options.length] = new Option("Spokane schools",'all=Spokane'); mySelect.options[mySelect.options.length] = new Option("Springfield schools",'all=Springfield'); mySelect.options[mySelect.options.length] = new Option("St Robert schools",'all=St_Robert'); mySelect.options[mySelect.options.length] = new Option("Stockton schools",'all=Stockton'); mySelect.options[mySelect.options.length] = new Option("Sullivan schools",'all=Sullivan'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Stockton[Stockton.length] = createMarker(new GPoint(-93.83749000,37.69506700),"
Agape Boarding School
12998 E. 1400 Rd
Stockton, MO 65785
All-boys school, 1-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Agape Boarding School",'Stockton=' + Stockton.length); Aurora[Aurora.length] = createMarker(new GPoint(-93.73905100,36.98426400),"
Aurora Christian Academy K-12
17818 Lawrence 2200
Aurora, MO 65605
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Aurora Christian Academy K-12",'Aurora=' + Aurora.length); Ballwin[Ballwin.length] = createMarker(new GPoint(-90.55017700,38.59302100),"
Ballwin Christian Academy
15101 Manchester Road
Ballwin, MO 63011
Co-ed school, K-4
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ballwin Christian Academy",'Ballwin=' + Ballwin.length); Kansas_City[Kansas_City.length] = createMarker(new GPoint(-94.50214800,38.95201600),"
Bannister Christian Academy
7503 E Bannister Road
Kansas City, MO 64134
Co-ed school, K-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bannister Christian Academy",'Kansas_City=' + Kansas_City.length); Marshall[Marshall.length] = createMarker(new GPoint(-93.20897600,39.10214500),"
Calvary Baptist School
1823 South Miami
Marshall, MO 65340
Co-ed school, PK-10
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Calvary Baptist School",'Marshall=' + Marshall.length); Nevada[Nevada.length] = createMarker(new GPoint(-94.35701000,37.83596300),"
Calvary Christian School
113 W Arch Street
Nevada, MO 64772
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Calvary Christian School",'Nevada=' + Nevada.length); Camdenton[Camdenton.length] = createMarker(new GPoint(-92.76890000,38.02180000),"
Camden Christian School
Po Box 20
Camdenton, MO 65020
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Camden Christian School",'Camdenton=' + Camdenton.length); Jefferson_City[Jefferson_City.length] = createMarker(new GPoint(-92.14401500,38.56165700),"
Central Baptist Christian Academy
1812 E Mccarty Street
Jefferson City, MO 65101
Co-ed school, 1-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Central Baptist Christian Academy",'Jefferson_City=' + Jefferson_City.length); Springfield[Springfield.length] = createMarker(new GPoint(-93.29793500,37.24453700),"
Christian Schools Of Springfield
739 W Talmage Street
Springfield, MO 65803
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Christian Schools Of Springfield",'Springfield=' + Springfield.length); Kansas_City[Kansas_City.length] = createMarker(new GPoint(-94.56705300,39.18005900),"
Covenant Memorial Baptist Day School
1115 Ne 47th Street
Kansas City, MO 64116
Co-ed school, K-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Covenant Memorial Baptist Day School",'Kansas_City=' + Kansas_City.length); Kansas_City[Kansas_City.length] = createMarker(new GPoint(-94.52127600,39.19573400),"
Eagle Heights Christian School
5600 N Brighton Avenue
Kansas City, MO 64119
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Eagle Heights Christian School",'Kansas_City=' + Kansas_City.length); Spokane[Spokane.length] = createMarker(new GPoint(-93.29620000,36.84840000),"
Faith Christian School
Po Box 304
Spokane, MO 65754
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Faith Christian School",'Spokane=' + Spokane.length); Greenfield[Greenfield.length] = createMarker(new GPoint(-91.28160000,33.35120000),"
Faith Fellowship Christian Academy
Po Box 231
Greenfield, MO 65661
Co-ed school, PK-10
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Faith Fellowship Christian Academy",'Greenfield=' + Greenfield.length); OFallon[OFallon.length] = createMarker(new GPoint(-90.71721100,38.81356500),"
First Baptist Christian
8750 Veterans Memorial Pkwy
O'Fallon, MO 63366
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("First Baptist Christian",'OFallon=' + OFallon.length); Foristell[Foristell.length] = createMarker(new GPoint(-90.94880000,38.81930000),"
Foristell Baptist Academy
Po Box 70
Foristell, MO 63348
Co-ed school, K-9
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Foristell Baptist Academy",'Foristell=' + Foristell.length); New_Franklin[New_Franklin.length] = createMarker(new GPoint(-92.73567600,39.01934900),"
Grace N Glory Christian Academy
205 North Howard Street
New Franklin, MO 65274
Co-ed school, 5-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Grace N Glory Christian Academy",'New_Franklin=' + New_Franklin.length); Belton[Belton.length] = createMarker(new GPoint(-94.53128600,38.80178900),"
Heartland Family Schools
810 S Cedar Street
Belton, MO 64012
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Heartland Family Schools",'Belton=' + Belton.length); Pleasant_Hill[Pleasant_Hill.length] = createMarker(new GPoint(-94.27182300,38.78636300),"
Hope Baptist Christian School
400 Cedar St.
Pleasant Hill, MO 64080
Co-ed school, 1-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Hope Baptist Christian School",'Pleasant_Hill=' + Pleasant_Hill.length); St_Robert[St_Robert.length] = createMarker(new GPoint(-92.14208600,37.80738400),"
Maranatha Baptist Academy
200 Acorn Drive
St. Robert, MO 65584
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Maranatha Baptist Academy",'St_Robert=' + St_Robert.length); Sullivan[Sullivan.length] = createMarker(new GPoint(-91.12160000,38.19310000),"
Meramec Valley Christian School
Po Box 566
Sullivan, MO 63080
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Meramec Valley Christian School",'Sullivan=' + Sullivan.length); Falcon[Falcon.length] = createMarker(new GPoint(-92.43138700,37.48523900),"
New Christian Academy
33037 Alpine Lane
Falcon, MO 65470
Co-ed school, 2-11
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("New Christian Academy",'Falcon=' + Falcon.length); Salem[Salem.length] = createMarker(new GPoint(-91.48872900,37.55763600),"
New Harmony Christian Academy
Po Box 724
Salem, MO 65560
Co-ed school, PK-3
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("New Harmony Christian Academy",'Salem=' + Salem.length); Marble_Hill[Marble_Hill.length] = createMarker(new GPoint(-89.96290000,37.31210000),"
New Salem Baptist Academy
Hc 64 Box 4220
Marble Hill, MO 63764
Co-ed school, 5-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("New Salem Baptist Academy",'Marble_Hill=' + Marble_Hill.length); Holt[Holt.length] = createMarker(new GPoint(-94.36949900,39.41812400),"
Northern Hills Christian School
17211 Ne 180th Street
Holt, MO 64048
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Northern Hills Christian School",'Holt=' + Holt.length); Blue_Springs[Blue_Springs.length] = createMarker(new GPoint(-94.28304300,39.00210200),"
Plaza Heights Christian Academy
1500 Southwest Clark Road
Blue Springs, MO 64015
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Plaza Heights Christian Academy",'Blue_Springs=' + Blue_Springs.length); Forsyth[Forsyth.length] = createMarker(new GPoint(-93.12532800,36.71715300),"
Riverview Bible Baptist Chr. School
13901 Us Hwy 160
Forsyth, MO 65653
Co-ed school, 5-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Riverview Bible Baptist Chr. School",'Forsyth=' + Forsyth.length); Miller[Miller.length] = createMarker(new GPoint(-93.83477300,37.22207400),"
Round Grove Christian Academy
884 North U Highway
Miller, MO 65707
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Round Grove Christian Academy",'Miller=' + Miller.length); Grandview[Grandview.length] = createMarker(new GPoint(-94.53202500,38.89841600),"
Second Missionary Baptist School
5111 Harry S Truman Drive
Grandview, MO 64030
Co-ed school, PK-2
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Second Missionary Baptist School",'Grandview=' + Grandview.length); Saint_Louis[Saint_Louis.length] = createMarker(new GPoint(-90.25653500,38.60880800),"
Tower Grove Christian School
4257 Magnolia Avenue
Saint Louis, MO 63110
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Tower Grove Christian School",'Saint_Louis=' + Saint_Louis.length); Independence[Independence.length] = createMarker(new GPoint(-94.34278900,39.03599000),"
Tri-city Christian School
4500 Little Blue Parkway
Independence, MO 64057
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Tri-city Christian School",'Independence=' + Independence.length); Festus[Festus.length] = createMarker(new GPoint(-90.40553800,38.22675800),"
Twin City Christian Academy
723 Horine Road
Festus, MO 63028
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Twin City Christian Academy",'Festus=' + Festus.length); Piedmont[Piedmont.length] = createMarker(new GPoint(-90.68790000,37.16510000),"
Victory Baptist Academy
Rr 2 Box 2577
Piedmont, MO 63957
Co-ed school, PK-11
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Victory Baptist Academy",'Piedmont=' + Piedmont.length); Poplar_Bluff[Poplar_Bluff.length] = createMarker(new GPoint(-90.45776300,36.73000300),"
Westwood Baptist Academy
419 County Road 5231
Poplar Bluff, MO 63901
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Westwood Baptist Academy",'Poplar_Bluff=' + Poplar_Bluff.length); Saint_Peters[Saint_Peters.length] = createMarker(new GPoint(-90.59472300,38.77588600),"
Willott Road Christian Academy
1610 Willott Road
Saint Peters, MO 63376
Co-ed school, NS-9
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Willott Road Christian Academy",'Saint_Peters=' + Saint_Peters.length); map.removeOverlays(Aurora); map.removeOverlays(Ballwin); map.removeOverlays(Belton); map.removeOverlays(Blue_Springs); map.removeOverlays(Camdenton); map.removeOverlays(Falcon); map.removeOverlays(Festus); map.removeOverlays(Foristell); map.removeOverlays(Forsyth); map.removeOverlays(Grandview); map.removeOverlays(Greenfield); map.removeOverlays(Holt); map.removeOverlays(Independence); map.removeOverlays(Jefferson_City); map.removeOverlays(Kansas_City); map.removeOverlays(Marble_Hill); map.removeOverlays(Marshall); map.removeOverlays(Miller); map.removeOverlays(Nevada); map.removeOverlays(New_Franklin); map.removeOverlays(OFallon); map.removeOverlays(Piedmont); map.removeOverlays(Pleasant_Hill); map.removeOverlays(Poplar_Bluff); map.removeOverlays(Saint_Louis); map.removeOverlays(Saint_Peters); map.removeOverlays(Salem); map.removeOverlays(Spokane); map.removeOverlays(Springfield); map.removeOverlays(St_Robert); map.removeOverlays(Stockton); map.removeOverlays(Sullivan); setTimeout(function(){map.addOverlays(Aurora)},1000); setTimeout(function(){map.addOverlays(Ballwin)},1000); setTimeout(function(){map.addOverlays(Belton)},1000); setTimeout(function(){map.addOverlays(Blue_Springs)},1000); setTimeout(function(){map.addOverlays(Camdenton)},1000); setTimeout(function(){map.addOverlays(Falcon)},1000); setTimeout(function(){map.addOverlays(Festus)},1000); setTimeout(function(){map.addOverlays(Foristell)},1000); setTimeout(function(){map.addOverlays(Forsyth)},1000); setTimeout(function(){map.addOverlays(Grandview)},1000); setTimeout(function(){map.addOverlays(Greenfield)},1000); setTimeout(function(){map.addOverlays(Holt)},1000); setTimeout(function(){map.addOverlays(Independence)},1000); setTimeout(function(){map.addOverlays(Jefferson_City)},1000); setTimeout(function(){map.addOverlays(Kansas_City)},1000); setTimeout(function(){map.addOverlays(Marble_Hill)},1000); setTimeout(function(){map.addOverlays(Marshall)},1000); setTimeout(function(){map.addOverlays(Miller)},1000); setTimeout(function(){map.addOverlays(Nevada)},1000); setTimeout(function(){map.addOverlays(New_Franklin)},1000); setTimeout(function(){map.addOverlays(OFallon)},1000); setTimeout(function(){map.addOverlays(Piedmont)},1000); setTimeout(function(){map.addOverlays(Pleasant_Hill)},1000); setTimeout(function(){map.addOverlays(Poplar_Bluff)},1000); setTimeout(function(){map.addOverlays(Saint_Louis)},1000); setTimeout(function(){map.addOverlays(Saint_Peters)},1000); setTimeout(function(){map.addOverlays(Salem)},1000); setTimeout(function(){map.addOverlays(Spokane)},1000); setTimeout(function(){map.addOverlays(Springfield)},1000); setTimeout(function(){map.addOverlays(St_Robert)},1000); setTimeout(function(){map.addOverlays(Stockton)},1000); setTimeout(function(){map.addOverlays(Sullivan)},1000); maxLng = -89.96290000; maxLat = 39.41812400; minLng = -94.56705300; minLat = 33.35120000; 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,11); /* 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(Aurora); map.removeOverlays(Ballwin); map.removeOverlays(Belton); map.removeOverlays(Blue_Springs); map.removeOverlays(Camdenton); map.removeOverlays(Falcon); map.removeOverlays(Festus); map.removeOverlays(Foristell); map.removeOverlays(Forsyth); map.removeOverlays(Grandview); map.removeOverlays(Greenfield); map.removeOverlays(Holt); map.removeOverlays(Independence); map.removeOverlays(Jefferson_City); map.removeOverlays(Kansas_City); map.removeOverlays(Marble_Hill); map.removeOverlays(Marshall); map.removeOverlays(Miller); map.removeOverlays(Nevada); map.removeOverlays(New_Franklin); map.removeOverlays(OFallon); map.removeOverlays(Piedmont); map.removeOverlays(Pleasant_Hill); map.removeOverlays(Poplar_Bluff); map.removeOverlays(Saint_Louis); map.removeOverlays(Saint_Peters); map.removeOverlays(Salem); map.removeOverlays(Spokane); map.removeOverlays(Springfield); map.removeOverlays(St_Robert); map.removeOverlays(Stockton); map.removeOverlays(Sullivan); 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(Stockton);map.removeOverlays(Aurora); map.removeOverlays(Ballwin); map.removeOverlays(Belton); map.removeOverlays(Blue_Springs); map.removeOverlays(Camdenton); map.removeOverlays(Falcon); map.removeOverlays(Festus); map.removeOverlays(Foristell); map.removeOverlays(Forsyth); map.removeOverlays(Grandview); map.removeOverlays(Greenfield); map.removeOverlays(Holt); map.removeOverlays(Independence); map.removeOverlays(Jefferson_City); map.removeOverlays(Kansas_City); map.removeOverlays(Marble_Hill); map.removeOverlays(Marshall); map.removeOverlays(Miller); map.removeOverlays(Nevada); map.removeOverlays(New_Franklin); map.removeOverlays(OFallon); map.removeOverlays(Piedmont); map.removeOverlays(Pleasant_Hill); map.removeOverlays(Poplar_Bluff); map.removeOverlays(Saint_Louis); map.removeOverlays(Saint_Peters); map.removeOverlays(Salem); map.removeOverlays(Spokane); map.removeOverlays(Springfield); map.removeOverlays(St_Robert); map.removeOverlays(Stockton); map.removeOverlays(Sullivan); map.addOverlays(Aurora); centerByArray(Aurora, false, false); cntMarker += Aurora.length; map.addOverlays(Ballwin); centerByArray(Ballwin, false, false); cntMarker += Ballwin.length; map.addOverlays(Belton); centerByArray(Belton, false, false); cntMarker += Belton.length; map.addOverlays(Blue_Springs); centerByArray(Blue_Springs, false, false); cntMarker += Blue_Springs.length; map.addOverlays(Camdenton); centerByArray(Camdenton, false, false); cntMarker += Camdenton.length; map.addOverlays(Falcon); centerByArray(Falcon, false, false); cntMarker += Falcon.length; map.addOverlays(Festus); centerByArray(Festus, false, false); cntMarker += Festus.length; map.addOverlays(Foristell); centerByArray(Foristell, false, false); cntMarker += Foristell.length; map.addOverlays(Forsyth); centerByArray(Forsyth, false, false); cntMarker += Forsyth.length; map.addOverlays(Grandview); centerByArray(Grandview, false, false); cntMarker += Grandview.length; map.addOverlays(Greenfield); centerByArray(Greenfield, false, false); cntMarker += Greenfield.length; map.addOverlays(Holt); centerByArray(Holt, false, false); cntMarker += Holt.length; map.addOverlays(Independence); centerByArray(Independence, false, false); cntMarker += Independence.length; map.addOverlays(Jefferson_City); centerByArray(Jefferson_City, false, false); cntMarker += Jefferson_City.length; map.addOverlays(Kansas_City); centerByArray(Kansas_City, false, false); cntMarker += Kansas_City.length; map.addOverlays(Marble_Hill); centerByArray(Marble_Hill, false, false); cntMarker += Marble_Hill.length; map.addOverlays(Marshall); centerByArray(Marshall, false, false); cntMarker += Marshall.length; map.addOverlays(Miller); centerByArray(Miller, false, false); cntMarker += Miller.length; map.addOverlays(Nevada); centerByArray(Nevada, false, false); cntMarker += Nevada.length; map.addOverlays(New_Franklin); centerByArray(New_Franklin, false, false); cntMarker += New_Franklin.length; map.addOverlays(OFallon); centerByArray(OFallon, false, false); cntMarker += OFallon.length; map.addOverlays(Piedmont); centerByArray(Piedmont, false, false); cntMarker += Piedmont.length; map.addOverlays(Pleasant_Hill); centerByArray(Pleasant_Hill, false, false); cntMarker += Pleasant_Hill.length; map.addOverlays(Poplar_Bluff); centerByArray(Poplar_Bluff, false, false); cntMarker += Poplar_Bluff.length; map.addOverlays(Saint_Louis); centerByArray(Saint_Louis, false, false); cntMarker += Saint_Louis.length; map.addOverlays(Saint_Peters); centerByArray(Saint_Peters, false, false); cntMarker += Saint_Peters.length; map.addOverlays(Salem); centerByArray(Salem, false, false); cntMarker += Salem.length; map.addOverlays(Spokane); centerByArray(Spokane, false, false); cntMarker += Spokane.length; map.addOverlays(Springfield); centerByArray(Springfield, false, false); cntMarker += Springfield.length; map.addOverlays(St_Robert); centerByArray(St_Robert, false, false); cntMarker += St_Robert.length; map.addOverlays(Stockton); centerByArray(Stockton, false, false); cntMarker += Stockton.length; map.addOverlays(Sullivan); centerByArray(Sullivan, false, false); cntMarker += Sullivan.length; centerByArray(Stockton,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///15629,15747,15890,15649,33176,16161,15728,884,16150,33174,15712,15646,15647,15740,16166,15765,34390,16146,16187,15726,15681,15821,15613,15833,15629,31424,15747,15890,15649,33176,16161,15728,15902,15929,884,33598,16150,33174,33292,31431,15712,15854,15646,32547,15647,15740,34200,16166,15765,34390,16146,16187,33597,15726,15681,15821,15613,15833,/all'); //window.open('/map.php?type=2&schools=15629,15747,15890,15649,33176,16161,15728,884,16150,33174,15712,15646,15647,15740,16166,15765,34390,16146,16187,15726,15681,15821,15613,15833,15629,31424,15747,15890,15649,33176,16161,15728,15902,15929,884,33598,16150,33174,33292,31431,15712,15854,15646,32547,15647,15740,34200,16166,15765,34390,16146,16187,33597,15726,15681,15821,15613,15833,&school_level=&radius=&zipcode=&school_type_search=&school_type_code='); } } function createMarker(point, label, icon) { var marker = new GMarker(point, icon); var html = label; GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml(html); }); return marker; }