function addMarkers(){ mySelect = document.getElementById('selection'); Arkansas_City = [];Elbing = [];Ottawa = [];Wichita = [];Hutchinson = [];Great_Bend = [];Chanute = [];Sublette = [];Mcpherson = [];Salina = [];Emporia = [];Topeka = [];Manhattan = [];Colby = [];Hugoton = [];Independence = [];Iola = [];Shawnee = [];Marienthal = [];Kansas_City = [];Newton = [];Overland_Park = [];Paola = [];Olathe = [];Tyro = [];Lawrence = [];Leavenworth = [];mySelect.options[mySelect.options.length] = new Option("Arkansas City schools",'all=Arkansas_City'); mySelect.options[mySelect.options.length] = new Option("Chanute schools",'all=Chanute'); mySelect.options[mySelect.options.length] = new Option("Colby schools",'all=Colby'); mySelect.options[mySelect.options.length] = new Option("Elbing schools",'all=Elbing'); mySelect.options[mySelect.options.length] = new Option("Emporia schools",'all=Emporia'); mySelect.options[mySelect.options.length] = new Option("Great Bend schools",'all=Great_Bend'); mySelect.options[mySelect.options.length] = new Option("Hugoton schools",'all=Hugoton'); mySelect.options[mySelect.options.length] = new Option("Hutchinson schools",'all=Hutchinson'); mySelect.options[mySelect.options.length] = new Option("Independence schools",'all=Independence'); mySelect.options[mySelect.options.length] = new Option("Iola schools",'all=Iola'); mySelect.options[mySelect.options.length] = new Option("Kansas City schools",'all=Kansas_City'); mySelect.options[mySelect.options.length] = new Option("Lawrence schools",'all=Lawrence'); mySelect.options[mySelect.options.length] = new Option("Leavenworth schools",'all=Leavenworth'); mySelect.options[mySelect.options.length] = new Option("Manhattan schools",'all=Manhattan'); mySelect.options[mySelect.options.length] = new Option("Marienthal schools",'all=Marienthal'); mySelect.options[mySelect.options.length] = new Option("Mcpherson schools",'all=Mcpherson'); mySelect.options[mySelect.options.length] = new Option("Newton schools",'all=Newton'); mySelect.options[mySelect.options.length] = new Option("Olathe schools",'all=Olathe'); mySelect.options[mySelect.options.length] = new Option("Ottawa schools",'all=Ottawa'); mySelect.options[mySelect.options.length] = new Option("Overland Park schools",'all=Overland_Park'); mySelect.options[mySelect.options.length] = new Option("Paola schools",'all=Paola'); mySelect.options[mySelect.options.length] = new Option("Salina schools",'all=Salina'); mySelect.options[mySelect.options.length] = new Option("Shawnee schools",'all=Shawnee'); mySelect.options[mySelect.options.length] = new Option("Sublette schools",'all=Sublette'); mySelect.options[mySelect.options.length] = new Option("Topeka schools",'all=Topeka'); mySelect.options[mySelect.options.length] = new Option("Tyro schools",'all=Tyro'); mySelect.options[mySelect.options.length] = new Option("Wichita schools",'all=Wichita'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Arkansas_City[Arkansas_City.length] = createMarker(new GPoint(-97.02020000,37.07040000),"
Ark City Christian Academy
Po Box 1181
Arkansas City, KS 67005
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ark City Christian Academy",'Arkansas_City=' + Arkansas_City.length); Elbing[Elbing.length] = createMarker(new GPoint(-97.12650000,38.05350000),"
Berean Academy
201 S Elbing Road Box 70
Elbing, KS 67041
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Berean Academy",'Elbing=' + Elbing.length); Ottawa[Ottawa.length] = createMarker(new GPoint(-95.21146900,38.65594800),"
Bethel Christian Academy
3755 Nevada Road
Ottawa, KS 66067
Co-ed school, K-11
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bethel Christian Academy",'Ottawa=' + Ottawa.length); Wichita[Wichita.length] = createMarker(new GPoint(-97.30229900,37.67896300),"
Calvary Christian School
3003 E Kellogg Drive
Wichita, KS 67211
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Calvary Christian School",'Wichita=' + Wichita.length); Wichita[Wichita.length] = createMarker(new GPoint(-97.24445800,37.73609600),"
Central Christian Academy
2900 N Rock Road
Wichita, KS 67226
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Central Christian Academy",'Wichita=' + Wichita.length); Hutchinson[Hutchinson.length] = createMarker(new GPoint(-97.88803600,38.08663700),"
Central Christian Schools
1910 East 30th Avenue
Hutchinson, KS 67502
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Central Christian Schools",'Hutchinson=' + Hutchinson.length); Great_Bend[Great_Bend.length] = createMarker(new GPoint(-98.79307400,38.35478700),"
Central Kansas Christian Academy
215 Mckinley Street
Great Bend, KS 67530
Co-ed school, K-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Central Kansas Christian Academy",'Great_Bend=' + Great_Bend.length); Chanute[Chanute.length] = createMarker(new GPoint(-95.46657300,37.66753700),"
Chanute Christian Academy
1000 W 14th Street
Chanute, KS 66720
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Chanute Christian Academy",'Chanute=' + Chanute.length); Hutchinson[Hutchinson.length] = createMarker(new GPoint(-97.94073300,38.10182600),"
The Community School Of Hutchinson
4310 N Monroe Street
Hutchinson, KS 67502
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Community School Of Hutchinson",'Hutchinson=' + Hutchinson.length); Sublette[Sublette.length] = createMarker(new GPoint(-100.81040000,37.54300000),"
Crosswalk Christian School
Po Box 730 Hwy 56 Lark Avenue
Sublette, KS 67877
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Crosswalk Christian School",'Sublette=' + Sublette.length); Mcpherson[Mcpherson.length] = createMarker(new GPoint(-97.61877800,38.28979400),"
Elyria Christian School
1644 Comanche Road
Mcpherson, KS 67460
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Elyria Christian School",'Mcpherson=' + Mcpherson.length); Salina[Salina.length] = createMarker(new GPoint(-97.59093300,38.81263700),"
Emmanuel Christian School
1325 E. Cloud Street
Salina, KS 67401
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Emmanuel Christian School",'Salina=' + Salina.length); Emporia[Emporia.length] = createMarker(new GPoint(-96.19519300,38.41339700),"
Emporia Christian School
1325 C Of E Drive
Emporia, KS 66801
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Emporia Christian School",'Emporia=' + Emporia.length); Topeka[Topeka.length] = createMarker(new GPoint(-95.67190000,39.05410000),"
Faith Christian School
Po Box 2864
Topeka, KS 66601
Co-ed school, PK-9
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Faith Christian School",'Topeka=' + Topeka.length); Manhattan[Manhattan.length] = createMarker(new GPoint(-96.51042500,39.20026200),"
Flint Hills Christian School
3905 Green Valley Road
Manhattan, KS 66502
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Flint Hills Christian School",'Manhattan=' + Manhattan.length); Colby[Colby.length] = createMarker(new GPoint(-101.07350000,39.39130000),"
Heartland Christian School
420 Main Mingo Street
Colby, KS 67701
Co-ed school, PK-11
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Heartland Christian School",'Colby=' + Colby.length); Hugoton[Hugoton.length] = createMarker(new GPoint(-101.31670000,37.13510000),"
Heritage Christian Academy
Po Box 744
Hugoton, KS 67951
Co-ed school, PK-7
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Heritage Christian Academy",'Hugoton=' + Hugoton.length); Topeka[Topeka.length] = createMarker(new GPoint(-95.67855400,39.08538400),"
Heritage Christian School
2000 NW Clay St
Topeka, KS 66608
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Heritage Christian School",'Topeka=' + Topeka.length); Independence[Independence.length] = createMarker(new GPoint(-95.71031400,37.19637000),"
Independence Bible School
2246 S 10th Street
Independence, KS 67301
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Independence Bible School",'Independence=' + Independence.length); Iola[Iola.length] = createMarker(new GPoint(-95.39720000,37.93030000),"
Iola Area Community Christian School
Po Box 652
Iola, KS 66749
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Iola Area Community Christian School",'Iola=' + Iola.length); Shawnee[Shawnee.length] = createMarker(new GPoint(-94.76132000,39.00621400),"
Maranatha Academy
6826 Lackman Road
Shawnee, KS 66217
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Maranatha Academy",'Shawnee=' + Shawnee.length); Marienthal[Marienthal.length] = createMarker(new GPoint(-101.03230000,38.47400000),"
Marienthal Christian School
Po Box 163
Marienthal, KS 67863
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Marienthal Christian School",'Marienthal=' + Marienthal.length); Kansas_City[Kansas_City.length] = createMarker(new GPoint(-94.73399300,39.15326000),"
Muncie Christian School
3650 N 67th Street
Kansas City, KS 66104
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Muncie Christian School",'Kansas_City=' + Kansas_City.length); Newton[Newton.length] = createMarker(new GPoint(-97.34575200,38.11543700),"
Newton Christian High School
224 Northwest 60th Street
Newton, KS 67114
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Newton Christian High School",'Newton=' + Newton.length); Kansas_City[Kansas_City.length] = createMarker(new GPoint(-94.81444700,39.14132300),"
Open Door Christian School
3033 N 103rd Terrace
Kansas City, KS 66109
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Open Door Christian School",'Kansas_City=' + Kansas_City.length); Overland_Park[Overland_Park.length] = createMarker(new GPoint(-94.66752200,38.99494500),"
Overland Christian Schools
7401 Metcalf Avenue
Overland Park, KS 66204
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Overland Christian Schools",'Overland_Park=' + Overland_Park.length); Paola[Paola.length] = createMarker(new GPoint(-94.87427300,38.58171400),"
Paola Christian Academy
1016 N Pearl Street
Paola, KS 66071
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Paola Christian Academy",'Paola=' + Paola.length); Olathe[Olathe.length] = createMarker(new GPoint(-94.78852200,38.88437200),"
Pioneer Christian Academy
220 N Rogers Rd
Olathe, KS 66062
Co-ed school, PK-11
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Pioneer Christian Academy",'Olathe=' + Olathe.length); Wichita[Wichita.length] = createMarker(new GPoint(-97.37192900,37.76153800),"
Riverlawn Christian Academy
4243 N Meridian Avenue
Wichita, KS 67204
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Riverlawn Christian Academy",'Wichita=' + Wichita.length); Salina[Salina.length] = createMarker(new GPoint(-97.61121800,38.81966900),"
Salina Christian Academy
1009 Highland Street
Salina, KS 67401
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Salina Christian Academy",'Salina=' + Salina.length); Wichita[Wichita.length] = createMarker(new GPoint(-97.19527400,37.72296300),"
Trinity Academy
12345 E 21st Street N
Wichita, KS 67206
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Trinity Academy",'Wichita=' + Wichita.length); Tyro[Tyro.length] = createMarker(new GPoint(-95.82410000,37.03620000),"
Tyro Community Christian School
Po Box 308
Tyro, KS 67364
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Tyro Community Christian School",'Tyro=' + Tyro.length); Lawrence[Lawrence.length] = createMarker(new GPoint(-95.23230000,38.97810000),"
Veritas Christian School
Po Box 1571
Lawrence, KS 66044
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Veritas Christian School",'Lawrence=' + Lawrence.length); Hutchinson[Hutchinson.length] = createMarker(new GPoint(-97.92978900,38.06075000),"
Victory Village Christian Academy
201 S Victory Rd
Hutchinson, KS 67504
Co-ed school, 6-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Victory Village Christian Academy",'Hutchinson=' + Hutchinson.length); Leavenworth[Leavenworth.length] = createMarker(new GPoint(-94.90056900,39.20552700),"
Wallula Christian Preschool
23785 139th Street
Leavenworth, KS 66048
Co-ed school, PK-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Wallula Christian Preschool",'Leavenworth=' + Leavenworth.length); Overland_Park[Overland_Park.length] = createMarker(new GPoint(-94.69326800,38.83991100),"
Westminster Christian Academy
9333 W 159th Street
Overland Park, KS 66221
Co-ed school, PK-10
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Westminster Christian Academy",'Overland_Park=' + Overland_Park.length); Overland_Park[Overland_Park.length] = createMarker(new GPoint(-94.69326800,38.83991100),"
Westminster Christian Academy
9333 W. 159th Street
Overland Park, KS 66221
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Westminster Christian Academy",'Overland_Park=' + Overland_Park.length); map.removeOverlays(Arkansas_City); map.removeOverlays(Chanute); map.removeOverlays(Colby); map.removeOverlays(Elbing); map.removeOverlays(Emporia); map.removeOverlays(Great_Bend); map.removeOverlays(Hugoton); map.removeOverlays(Hutchinson); map.removeOverlays(Independence); map.removeOverlays(Iola); map.removeOverlays(Kansas_City); map.removeOverlays(Lawrence); map.removeOverlays(Leavenworth); map.removeOverlays(Manhattan); map.removeOverlays(Marienthal); map.removeOverlays(Mcpherson); map.removeOverlays(Newton); map.removeOverlays(Olathe); map.removeOverlays(Ottawa); map.removeOverlays(Overland_Park); map.removeOverlays(Paola); map.removeOverlays(Salina); map.removeOverlays(Shawnee); map.removeOverlays(Sublette); map.removeOverlays(Topeka); map.removeOverlays(Tyro); map.removeOverlays(Wichita); setTimeout(function(){map.addOverlays(Arkansas_City)},1000); setTimeout(function(){map.addOverlays(Chanute)},1000); setTimeout(function(){map.addOverlays(Colby)},1000); setTimeout(function(){map.addOverlays(Elbing)},1000); setTimeout(function(){map.addOverlays(Emporia)},1000); setTimeout(function(){map.addOverlays(Great_Bend)},1000); setTimeout(function(){map.addOverlays(Hugoton)},1000); setTimeout(function(){map.addOverlays(Hutchinson)},1000); setTimeout(function(){map.addOverlays(Independence)},1000); setTimeout(function(){map.addOverlays(Iola)},1000); setTimeout(function(){map.addOverlays(Kansas_City)},1000); setTimeout(function(){map.addOverlays(Lawrence)},1000); setTimeout(function(){map.addOverlays(Leavenworth)},1000); setTimeout(function(){map.addOverlays(Manhattan)},1000); setTimeout(function(){map.addOverlays(Marienthal)},1000); setTimeout(function(){map.addOverlays(Mcpherson)},1000); setTimeout(function(){map.addOverlays(Newton)},1000); setTimeout(function(){map.addOverlays(Olathe)},1000); setTimeout(function(){map.addOverlays(Ottawa)},1000); setTimeout(function(){map.addOverlays(Overland_Park)},1000); setTimeout(function(){map.addOverlays(Paola)},1000); setTimeout(function(){map.addOverlays(Salina)},1000); setTimeout(function(){map.addOverlays(Shawnee)},1000); setTimeout(function(){map.addOverlays(Sublette)},1000); setTimeout(function(){map.addOverlays(Topeka)},1000); setTimeout(function(){map.addOverlays(Tyro)},1000); setTimeout(function(){map.addOverlays(Wichita)},1000); maxLng = -94.66752200; maxLat = 39.39130000; minLng = -101.31670000; minLat = 37.03620000; 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(Arkansas_City); map.removeOverlays(Chanute); map.removeOverlays(Colby); map.removeOverlays(Elbing); map.removeOverlays(Emporia); map.removeOverlays(Great_Bend); map.removeOverlays(Hugoton); map.removeOverlays(Hutchinson); map.removeOverlays(Independence); map.removeOverlays(Iola); map.removeOverlays(Kansas_City); map.removeOverlays(Lawrence); map.removeOverlays(Leavenworth); map.removeOverlays(Manhattan); map.removeOverlays(Marienthal); map.removeOverlays(Mcpherson); map.removeOverlays(Newton); map.removeOverlays(Olathe); map.removeOverlays(Ottawa); map.removeOverlays(Overland_Park); map.removeOverlays(Paola); map.removeOverlays(Salina); map.removeOverlays(Shawnee); map.removeOverlays(Sublette); map.removeOverlays(Topeka); map.removeOverlays(Tyro); map.removeOverlays(Wichita); 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(Arkansas_City);map.removeOverlays(Arkansas_City); map.removeOverlays(Chanute); map.removeOverlays(Colby); map.removeOverlays(Elbing); map.removeOverlays(Emporia); map.removeOverlays(Great_Bend); map.removeOverlays(Hugoton); map.removeOverlays(Hutchinson); map.removeOverlays(Independence); map.removeOverlays(Iola); map.removeOverlays(Kansas_City); map.removeOverlays(Lawrence); map.removeOverlays(Leavenworth); map.removeOverlays(Manhattan); map.removeOverlays(Marienthal); map.removeOverlays(Mcpherson); map.removeOverlays(Newton); map.removeOverlays(Olathe); map.removeOverlays(Ottawa); map.removeOverlays(Overland_Park); map.removeOverlays(Paola); map.removeOverlays(Salina); map.removeOverlays(Shawnee); map.removeOverlays(Sublette); map.removeOverlays(Topeka); map.removeOverlays(Tyro); map.removeOverlays(Wichita); map.addOverlays(Arkansas_City); centerByArray(Arkansas_City, false, false); cntMarker += Arkansas_City.length; map.addOverlays(Chanute); centerByArray(Chanute, false, false); cntMarker += Chanute.length; map.addOverlays(Colby); centerByArray(Colby, false, false); cntMarker += Colby.length; map.addOverlays(Elbing); centerByArray(Elbing, false, false); cntMarker += Elbing.length; map.addOverlays(Emporia); centerByArray(Emporia, false, false); cntMarker += Emporia.length; map.addOverlays(Great_Bend); centerByArray(Great_Bend, false, false); cntMarker += Great_Bend.length; map.addOverlays(Hugoton); centerByArray(Hugoton, false, false); cntMarker += Hugoton.length; map.addOverlays(Hutchinson); centerByArray(Hutchinson, false, false); cntMarker += Hutchinson.length; map.addOverlays(Independence); centerByArray(Independence, false, false); cntMarker += Independence.length; map.addOverlays(Iola); centerByArray(Iola, false, false); cntMarker += Iola.length; map.addOverlays(Kansas_City); centerByArray(Kansas_City, false, false); cntMarker += Kansas_City.length; map.addOverlays(Lawrence); centerByArray(Lawrence, false, false); cntMarker += Lawrence.length; map.addOverlays(Leavenworth); centerByArray(Leavenworth, false, false); cntMarker += Leavenworth.length; map.addOverlays(Manhattan); centerByArray(Manhattan, false, false); cntMarker += Manhattan.length; map.addOverlays(Marienthal); centerByArray(Marienthal, false, false); cntMarker += Marienthal.length; map.addOverlays(Mcpherson); centerByArray(Mcpherson, false, false); cntMarker += Mcpherson.length; map.addOverlays(Newton); centerByArray(Newton, false, false); cntMarker += Newton.length; map.addOverlays(Olathe); centerByArray(Olathe, false, false); cntMarker += Olathe.length; map.addOverlays(Ottawa); centerByArray(Ottawa, false, false); cntMarker += Ottawa.length; map.addOverlays(Overland_Park); centerByArray(Overland_Park, false, false); cntMarker += Overland_Park.length; map.addOverlays(Paola); centerByArray(Paola, false, false); cntMarker += Paola.length; map.addOverlays(Salina); centerByArray(Salina, false, false); cntMarker += Salina.length; map.addOverlays(Shawnee); centerByArray(Shawnee, false, false); cntMarker += Shawnee.length; map.addOverlays(Sublette); centerByArray(Sublette, false, false); cntMarker += Sublette.length; map.addOverlays(Topeka); centerByArray(Topeka, false, false); cntMarker += Topeka.length; map.addOverlays(Tyro); centerByArray(Tyro, false, false); cntMarker += Tyro.length; map.addOverlays(Wichita); centerByArray(Wichita, false, false); cntMarker += Wichita.length; centerByArray(Arkansas_City,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///10872,10894,10918,10877,10893,11068,10943,10964,10968,10902,10911,10903,10967,10975,10880,10971,34348,10946,10955,10900,10909,10921,11066,10889,11060,10872,10894,10918,10877,33536,10915,10920,10893,33539,11068,10943,10899,10964,10968,10902,33540,10911,10957,10903,10975,10880,10971,34348,10946,10973,10904,33538,10955,10900,10909,10921,11066,10889,10892,33537,/all'); //window.open('/map.php?type=2&schools=10872,10894,10918,10877,10893,11068,10943,10964,10968,10902,10911,10903,10967,10975,10880,10971,34348,10946,10955,10900,10909,10921,11066,10889,11060,10872,10894,10918,10877,33536,10915,10920,10893,33539,11068,10943,10899,10964,10968,10902,33540,10911,10957,10903,10975,10880,10971,34348,10946,10973,10904,33538,10955,10900,10909,10921,11066,10889,10892,33537,&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; }