function addMarkers(){ mySelect = document.getElementById('selection'); Ames = [];Ankeny = [];Cedar_Rapids = [];Grinnell = [];Fort_Dodge = [];Urbandale = [];Estherville = [];Fairfield = [];Muscatine = [];Forest_City = [];Des_Moines = [];Burlington = [];Council_Bluffs = [];Eldridge = [];North_Liberty = [];Coralville = [];Hull = [];Inwood = [];West_Des_Moines = [];Kanawha = [];Keokuk = [];Creston = [];Bettendorf = [];Mount_Pleasant = [];Newton = [];Mason_City = [];Ocheyedan = [];Ottumwa = [];Pella = [];Sanborn = [];Sheldon = [];Sioux_City = [];Waterloo = [];Wellsburg = [];Indianola = [];mySelect.options[mySelect.options.length] = new Option("Ames schools",'all=Ames'); mySelect.options[mySelect.options.length] = new Option("Ankeny schools",'all=Ankeny'); mySelect.options[mySelect.options.length] = new Option("Bettendorf schools",'all=Bettendorf'); mySelect.options[mySelect.options.length] = new Option("Burlington schools",'all=Burlington'); mySelect.options[mySelect.options.length] = new Option("Cedar Rapids schools",'all=Cedar_Rapids'); mySelect.options[mySelect.options.length] = new Option("Coralville schools",'all=Coralville'); mySelect.options[mySelect.options.length] = new Option("Council Bluffs schools",'all=Council_Bluffs'); mySelect.options[mySelect.options.length] = new Option("Creston schools",'all=Creston'); mySelect.options[mySelect.options.length] = new Option("Des Moines schools",'all=Des_Moines'); mySelect.options[mySelect.options.length] = new Option("Eldridge schools",'all=Eldridge'); mySelect.options[mySelect.options.length] = new Option("Estherville schools",'all=Estherville'); mySelect.options[mySelect.options.length] = new Option("Fairfield schools",'all=Fairfield'); mySelect.options[mySelect.options.length] = new Option("Forest City schools",'all=Forest_City'); mySelect.options[mySelect.options.length] = new Option("Fort Dodge schools",'all=Fort_Dodge'); mySelect.options[mySelect.options.length] = new Option("Grinnell schools",'all=Grinnell'); mySelect.options[mySelect.options.length] = new Option("Hull schools",'all=Hull'); mySelect.options[mySelect.options.length] = new Option("Indianola schools",'all=Indianola'); mySelect.options[mySelect.options.length] = new Option("Inwood schools",'all=Inwood'); mySelect.options[mySelect.options.length] = new Option("Kanawha schools",'all=Kanawha'); mySelect.options[mySelect.options.length] = new Option("Keokuk schools",'all=Keokuk'); mySelect.options[mySelect.options.length] = new Option("Mason City schools",'all=Mason_City'); mySelect.options[mySelect.options.length] = new Option("Mount Pleasant schools",'all=Mount_Pleasant'); mySelect.options[mySelect.options.length] = new Option("Muscatine schools",'all=Muscatine'); mySelect.options[mySelect.options.length] = new Option("Newton schools",'all=Newton'); mySelect.options[mySelect.options.length] = new Option("North Liberty schools",'all=North_Liberty'); mySelect.options[mySelect.options.length] = new Option("Ocheyedan schools",'all=Ocheyedan'); mySelect.options[mySelect.options.length] = new Option("Ottumwa schools",'all=Ottumwa'); mySelect.options[mySelect.options.length] = new Option("Pella schools",'all=Pella'); mySelect.options[mySelect.options.length] = new Option("Sanborn schools",'all=Sanborn'); mySelect.options[mySelect.options.length] = new Option("Sheldon schools",'all=Sheldon'); mySelect.options[mySelect.options.length] = new Option("Sioux City schools",'all=Sioux_City'); mySelect.options[mySelect.options.length] = new Option("Urbandale schools",'all=Urbandale'); mySelect.options[mySelect.options.length] = new Option("Waterloo schools",'all=Waterloo'); mySelect.options[mySelect.options.length] = new Option("Wellsburg schools",'all=Wellsburg'); mySelect.options[mySelect.options.length] = new Option("West Des Moines schools",'all=West_Des_Moines'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Ames[Ames.length] = createMarker(new GPoint(-93.62411300,42.00850200),"
Ames Christian School
925 South 16th Street
Ames, IA 50010
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ames Christian School",'Ames=' + Ames.length); Ankeny[Ankeny.length] = createMarker(new GPoint(-93.62190600,41.73199300),"
Ankeny Christian Academy
1604 West 1st St
Ankeny, IA 50023
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ankeny Christian Academy",'Ankeny=' + Ankeny.length); Cedar_Rapids[Cedar_Rapids.length] = createMarker(new GPoint(-91.61524100,41.99526800),"
Cedar Valley Christian School
3636 Cottage Grove Ave Se
Cedar Rapids, IA 52403
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Cedar Valley Christian School",'Cedar_Rapids=' + Cedar_Rapids.length); Grinnell[Grinnell.length] = createMarker(new GPoint(-92.74645500,41.74633700),"
Central Iowa Christian School
201 380th Avenue
Grinnell, IA 50112
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Central Iowa Christian School",'Grinnell=' + Grinnell.length); Fort_Dodge[Fort_Dodge.length] = createMarker(new GPoint(-94.15252200,42.51583700),"
Community Christian School
3058 10th Avenue N
Fort Dodge, IA 50501
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Community Christian School",'Fort_Dodge=' + Fort_Dodge.length); Urbandale[Urbandale.length] = createMarker(new GPoint(-93.68281200,41.61142700),"
Des Moines Christian School
13007 Douglas Parkway
Urbandale, IA 50323
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Des Moines Christian School",'Urbandale=' + Urbandale.length); Estherville[Estherville.length] = createMarker(new GPoint(-94.87599500,43.41499100),"
Estherville Community Christian School
3647 Highway 9
Estherville, IA 51334
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Estherville Community Christian School",'Estherville=' + Estherville.length); Fairfield[Fairfield.length] = createMarker(new GPoint(-91.96297300,40.98606700),"
Fairfield Christian School
2009 S Main Street
Fairfield, IA 52556
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Fairfield Christian School",'Fairfield=' + Fairfield.length); Muscatine[Muscatine.length] = createMarker(new GPoint(-91.03889600,41.44591300),"
Faith Academy
736 Lake Park Blvd
Muscatine, IA 52761
Co-ed school, KG-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Faith Academy",'Muscatine=' + Muscatine.length); Forest_City[Forest_City.length] = createMarker(new GPoint(-93.63938800,43.27707200),"
Forest City Christian School
305 Walnut Street
Forest City, IA 50436
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Forest City Christian School",'Forest_City=' + Forest_City.length); Des_Moines[Des_Moines.length] = createMarker(new GPoint(-93.71691500,41.64185400),"
Gospel Assembly Christian Academy
4665 72nd Street
Des Moines, IA 50322
Co-ed school, 3-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Gospel Assembly Christian Academy",'Des_Moines=' + Des_Moines.length); Burlington[Burlington.length] = createMarker(new GPoint(-91.10303400,40.81213000),"
Great River Christian School
426 Harrison Avenue
Burlington, IA 52601
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Great River Christian School",'Burlington=' + Burlington.length); Council_Bluffs[Council_Bluffs.length] = createMarker(new GPoint(-95.85148600,41.21831100),"
Heartland Christian School
400 Wright Road
Council Bluffs, IA 51501
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Heartland Christian School",'Council_Bluffs=' + Council_Bluffs.length); Eldridge[Eldridge.length] = createMarker(new GPoint(-90.54549700,41.69218600),"
Heritage Christian School
507 Parkview Drive
Eldridge, IA 52748
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Heritage Christian School",'Eldridge=' + Eldridge.length); North_Liberty[North_Liberty.length] = createMarker(new GPoint(-91.57664300,41.73350400),"
Heritage Christian School
2709 Dubuque St. Ne
North Liberty, IA 52317
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Heritage Christian School",'North_Liberty=' + North_Liberty.length); Coralville[Coralville.length] = createMarker(new GPoint(-91.58214200,41.69033300),"
Hillside Christian School
1250 12th Avenue
Coralville, IA 52241
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Hillside Christian School",'Coralville=' + Coralville.length); Cedar_Rapids[Cedar_Rapids.length] = createMarker(new GPoint(-91.65196200,42.02276300),"
Holloway House
1147 Clifton Street Ne
Cedar Rapids, IA 52402
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Holloway House",'Cedar_Rapids=' + Cedar_Rapids.length); Hull[Hull.length] = createMarker(new GPoint(-96.14300000,43.19300000),"
Hull Christian School
Po Box 550
Hull, IA 51239
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Hull Christian School",'Hull=' + Hull.length); Inwood[Inwood.length] = createMarker(new GPoint(-96.42905000,43.30530900),"
Inwood Christian School
Po Box C 302 E Madison Street
Inwood, IA 51240
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Inwood Christian School",'Inwood=' + Inwood.length); West_Des_Moines[West_Des_Moines.length] = createMarker(new GPoint(-93.73943900,41.57951300),"
Iowa Christian Academy
2501 Vine Street
West Des Moines, IA 50265
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Iowa Christian Academy",'West_Des_Moines=' + West_Des_Moines.length); Cedar_Rapids[Cedar_Rapids.length] = createMarker(new GPoint(-91.67210900,42.00562200),"
Isaac Newton Christian Academy
1635 Linmar Dr Ne
Cedar Rapids, IA 52402
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Isaac Newton Christian Academy",'Cedar_Rapids=' + Cedar_Rapids.length); Kanawha[Kanawha.length] = createMarker(new GPoint(-93.79033100,42.93790000),"
Kanawha Christian School
470 E 5th Street
Kanawha, IA 50447
Co-ed school, PK-7
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Kanawha Christian School",'Kanawha=' + Kanawha.length); Keokuk[Keokuk.length] = createMarker(new GPoint(-91.40865200,40.39633700),"
Keokuk Christian Academy
1578 Hilton Road
Keokuk, IA 52632
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Keokuk Christian Academy",'Keokuk=' + Keokuk.length); Creston[Creston.length] = createMarker(new GPoint(-94.37572700,41.06448000),"
Mayflower Heritage Christian School
1211 N Poplar St PO Box 304
Creston, IA 50801
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mayflower Heritage Christian School",'Creston=' + Creston.length); Bettendorf[Bettendorf.length] = createMarker(new GPoint(-90.51225900,41.56047300),"
Morning Star Academy
1426 Tanglefoot Lane
Bettendorf, IA 52722
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Morning Star Academy",'Bettendorf=' + Bettendorf.length); Mount_Pleasant[Mount_Pleasant.length] = createMarker(new GPoint(-91.53124100,40.96318900),"
Mt Pleasant Christian School
1505 E Washington Street
Mount Pleasant, IA 52641
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mt Pleasant Christian School",'Mount_Pleasant=' + Mount_Pleasant.length); Newton[Newton.length] = createMarker(new GPoint(-93.03190300,41.71009500),"
Newton Christian School
1710 N 11th Avenue E
Newton, IA 50208
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Newton Christian School",'Newton=' + Newton.length); Mason_City[Mason_City.length] = createMarker(new GPoint(-93.18098600,43.15943600),"
North Iowa Christian School
811 North Kentucky Avenue
Mason City, IA 50401
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("North Iowa Christian School",'Mason_City=' + Mason_City.length); Ocheyedan[Ocheyedan.length] = createMarker(new GPoint(-95.53928800,43.40979900),"
Ocheyedan Christian School
1155 Oak Street
Ocheyedan, IA 51354
Co-ed school, 1-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ocheyedan Christian School",'Ocheyedan=' + Ocheyedan.length); Ottumwa[Ottumwa.length] = createMarker(new GPoint(-92.40867600,41.02442300),"
Ottumwa Christian School
458 North Court
Ottumwa, IA 52501
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ottumwa Christian School",'Ottumwa=' + Ottumwa.length); Pella[Pella.length] = createMarker(new GPoint(-92.91014400,41.40523100),"
Pella Christian Grade School
216 Liberty Street
Pella, IA 50219
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Pella Christian Grade School",'Pella=' + Pella.length); Pella[Pella.length] = createMarker(new GPoint(-92.84770000,41.44370000),"
Peoria Christian School
110 Peoria West Street
Pella, IA 50219
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Peoria Christian School",'Pella=' + Pella.length); Sanborn[Sanborn.length] = createMarker(new GPoint(-95.66007100,43.18137600),"
Sanborn Christian School
405 W 2nd Street
Sanborn, IA 51248
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sanborn Christian School",'Sanborn=' + Sanborn.length); Sheldon[Sheldon.length] = createMarker(new GPoint(-95.83761100,43.17883700),"
Sheldon Christian School
1425 E 9th Street
Sheldon, IA 51201
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sheldon Christian School",'Sheldon=' + Sheldon.length); Sioux_City[Sioux_City.length] = createMarker(new GPoint(-96.32963600,42.46200800),"
Siouxland Community Christian School
6100 Morningside Avenue
Sioux City, IA 51106
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Siouxland Community Christian School",'Sioux_City=' + Sioux_City.length); Waterloo[Waterloo.length] = createMarker(new GPoint(-92.33727500,42.49189700),"
Sonrise Christian School And Daycare
928 Jefferson Street
Waterloo, IA 50702
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sonrise Christian School And Daycare",'Waterloo=' + Waterloo.length); Wellsburg[Wellsburg.length] = createMarker(new GPoint(-92.92540300,42.45180000),"
Timothy Christian School
Po Box 70
Wellsburg, IA 50680
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Timothy Christian School",'Wellsburg=' + Wellsburg.length); Indianola[Indianola.length] = createMarker(new GPoint(-93.57060000,41.35360000),"
Victory Christian Academy
805 N 1st Street
Indianola, IA 50125
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Victory Christian Academy",'Indianola=' + Indianola.length); map.removeOverlays(Ames); map.removeOverlays(Ankeny); map.removeOverlays(Bettendorf); map.removeOverlays(Burlington); map.removeOverlays(Cedar_Rapids); map.removeOverlays(Coralville); map.removeOverlays(Council_Bluffs); map.removeOverlays(Creston); map.removeOverlays(Des_Moines); map.removeOverlays(Eldridge); map.removeOverlays(Estherville); map.removeOverlays(Fairfield); map.removeOverlays(Forest_City); map.removeOverlays(Fort_Dodge); map.removeOverlays(Grinnell); map.removeOverlays(Hull); map.removeOverlays(Indianola); map.removeOverlays(Inwood); map.removeOverlays(Kanawha); map.removeOverlays(Keokuk); map.removeOverlays(Mason_City); map.removeOverlays(Mount_Pleasant); map.removeOverlays(Muscatine); map.removeOverlays(Newton); map.removeOverlays(North_Liberty); map.removeOverlays(Ocheyedan); map.removeOverlays(Ottumwa); map.removeOverlays(Pella); map.removeOverlays(Sanborn); map.removeOverlays(Sheldon); map.removeOverlays(Sioux_City); map.removeOverlays(Urbandale); map.removeOverlays(Waterloo); map.removeOverlays(Wellsburg); map.removeOverlays(West_Des_Moines); setTimeout(function(){map.addOverlays(Ames)},1000); setTimeout(function(){map.addOverlays(Ankeny)},1000); setTimeout(function(){map.addOverlays(Bettendorf)},1000); setTimeout(function(){map.addOverlays(Burlington)},1000); setTimeout(function(){map.addOverlays(Cedar_Rapids)},1000); setTimeout(function(){map.addOverlays(Coralville)},1000); setTimeout(function(){map.addOverlays(Council_Bluffs)},1000); setTimeout(function(){map.addOverlays(Creston)},1000); setTimeout(function(){map.addOverlays(Des_Moines)},1000); setTimeout(function(){map.addOverlays(Eldridge)},1000); setTimeout(function(){map.addOverlays(Estherville)},1000); setTimeout(function(){map.addOverlays(Fairfield)},1000); setTimeout(function(){map.addOverlays(Forest_City)},1000); setTimeout(function(){map.addOverlays(Fort_Dodge)},1000); setTimeout(function(){map.addOverlays(Grinnell)},1000); setTimeout(function(){map.addOverlays(Hull)},1000); setTimeout(function(){map.addOverlays(Indianola)},1000); setTimeout(function(){map.addOverlays(Inwood)},1000); setTimeout(function(){map.addOverlays(Kanawha)},1000); setTimeout(function(){map.addOverlays(Keokuk)},1000); setTimeout(function(){map.addOverlays(Mason_City)},1000); setTimeout(function(){map.addOverlays(Mount_Pleasant)},1000); setTimeout(function(){map.addOverlays(Muscatine)},1000); setTimeout(function(){map.addOverlays(Newton)},1000); setTimeout(function(){map.addOverlays(North_Liberty)},1000); setTimeout(function(){map.addOverlays(Ocheyedan)},1000); setTimeout(function(){map.addOverlays(Ottumwa)},1000); setTimeout(function(){map.addOverlays(Pella)},1000); setTimeout(function(){map.addOverlays(Sanborn)},1000); setTimeout(function(){map.addOverlays(Sheldon)},1000); setTimeout(function(){map.addOverlays(Sioux_City)},1000); setTimeout(function(){map.addOverlays(Urbandale)},1000); setTimeout(function(){map.addOverlays(Waterloo)},1000); setTimeout(function(){map.addOverlays(Wellsburg)},1000); setTimeout(function(){map.addOverlays(West_Des_Moines)},1000); maxLng = -90.51225900; maxLat = 43.41499100; minLng = -96.42905000; minLat = 40.39633700; 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(Ames); map.removeOverlays(Ankeny); map.removeOverlays(Bettendorf); map.removeOverlays(Burlington); map.removeOverlays(Cedar_Rapids); map.removeOverlays(Coralville); map.removeOverlays(Council_Bluffs); map.removeOverlays(Creston); map.removeOverlays(Des_Moines); map.removeOverlays(Eldridge); map.removeOverlays(Estherville); map.removeOverlays(Fairfield); map.removeOverlays(Forest_City); map.removeOverlays(Fort_Dodge); map.removeOverlays(Grinnell); map.removeOverlays(Hull); map.removeOverlays(Indianola); map.removeOverlays(Inwood); map.removeOverlays(Kanawha); map.removeOverlays(Keokuk); map.removeOverlays(Mason_City); map.removeOverlays(Mount_Pleasant); map.removeOverlays(Muscatine); map.removeOverlays(Newton); map.removeOverlays(North_Liberty); map.removeOverlays(Ocheyedan); map.removeOverlays(Ottumwa); map.removeOverlays(Pella); map.removeOverlays(Sanborn); map.removeOverlays(Sheldon); map.removeOverlays(Sioux_City); map.removeOverlays(Urbandale); map.removeOverlays(Waterloo); map.removeOverlays(Wellsburg); map.removeOverlays(West_Des_Moines); 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(Ames);map.removeOverlays(Ames); map.removeOverlays(Ankeny); map.removeOverlays(Bettendorf); map.removeOverlays(Burlington); map.removeOverlays(Cedar_Rapids); map.removeOverlays(Coralville); map.removeOverlays(Council_Bluffs); map.removeOverlays(Creston); map.removeOverlays(Des_Moines); map.removeOverlays(Eldridge); map.removeOverlays(Estherville); map.removeOverlays(Fairfield); map.removeOverlays(Forest_City); map.removeOverlays(Fort_Dodge); map.removeOverlays(Grinnell); map.removeOverlays(Hull); map.removeOverlays(Indianola); map.removeOverlays(Inwood); map.removeOverlays(Kanawha); map.removeOverlays(Keokuk); map.removeOverlays(Mason_City); map.removeOverlays(Mount_Pleasant); map.removeOverlays(Muscatine); map.removeOverlays(Newton); map.removeOverlays(North_Liberty); map.removeOverlays(Ocheyedan); map.removeOverlays(Ottumwa); map.removeOverlays(Pella); map.removeOverlays(Sanborn); map.removeOverlays(Sheldon); map.removeOverlays(Sioux_City); map.removeOverlays(Urbandale); map.removeOverlays(Waterloo); map.removeOverlays(Wellsburg); map.removeOverlays(West_Des_Moines); map.addOverlays(Ames); centerByArray(Ames, false, false); cntMarker += Ames.length; map.addOverlays(Ankeny); centerByArray(Ankeny, false, false); cntMarker += Ankeny.length; map.addOverlays(Bettendorf); centerByArray(Bettendorf, false, false); cntMarker += Bettendorf.length; map.addOverlays(Burlington); centerByArray(Burlington, false, false); cntMarker += Burlington.length; map.addOverlays(Cedar_Rapids); centerByArray(Cedar_Rapids, false, false); cntMarker += Cedar_Rapids.length; map.addOverlays(Coralville); centerByArray(Coralville, false, false); cntMarker += Coralville.length; map.addOverlays(Council_Bluffs); centerByArray(Council_Bluffs, false, false); cntMarker += Council_Bluffs.length; map.addOverlays(Creston); centerByArray(Creston, false, false); cntMarker += Creston.length; map.addOverlays(Des_Moines); centerByArray(Des_Moines, false, false); cntMarker += Des_Moines.length; map.addOverlays(Eldridge); centerByArray(Eldridge, false, false); cntMarker += Eldridge.length; map.addOverlays(Estherville); centerByArray(Estherville, false, false); cntMarker += Estherville.length; map.addOverlays(Fairfield); centerByArray(Fairfield, false, false); cntMarker += Fairfield.length; map.addOverlays(Forest_City); centerByArray(Forest_City, false, false); cntMarker += Forest_City.length; map.addOverlays(Fort_Dodge); centerByArray(Fort_Dodge, false, false); cntMarker += Fort_Dodge.length; map.addOverlays(Grinnell); centerByArray(Grinnell, false, false); cntMarker += Grinnell.length; map.addOverlays(Hull); centerByArray(Hull, false, false); cntMarker += Hull.length; map.addOverlays(Indianola); centerByArray(Indianola, false, false); cntMarker += Indianola.length; map.addOverlays(Inwood); centerByArray(Inwood, false, false); cntMarker += Inwood.length; map.addOverlays(Kanawha); centerByArray(Kanawha, false, false); cntMarker += Kanawha.length; map.addOverlays(Keokuk); centerByArray(Keokuk, false, false); cntMarker += Keokuk.length; map.addOverlays(Mason_City); centerByArray(Mason_City, false, false); cntMarker += Mason_City.length; map.addOverlays(Mount_Pleasant); centerByArray(Mount_Pleasant, false, false); cntMarker += Mount_Pleasant.length; map.addOverlays(Muscatine); centerByArray(Muscatine, false, false); cntMarker += Muscatine.length; map.addOverlays(Newton); centerByArray(Newton, false, false); cntMarker += Newton.length; map.addOverlays(North_Liberty); centerByArray(North_Liberty, false, false); cntMarker += North_Liberty.length; map.addOverlays(Ocheyedan); centerByArray(Ocheyedan, false, false); cntMarker += Ocheyedan.length; map.addOverlays(Ottumwa); centerByArray(Ottumwa, false, false); cntMarker += Ottumwa.length; map.addOverlays(Pella); centerByArray(Pella, false, false); cntMarker += Pella.length; map.addOverlays(Sanborn); centerByArray(Sanborn, false, false); cntMarker += Sanborn.length; map.addOverlays(Sheldon); centerByArray(Sheldon, false, false); cntMarker += Sheldon.length; map.addOverlays(Sioux_City); centerByArray(Sioux_City, false, false); cntMarker += Sioux_City.length; map.addOverlays(Urbandale); centerByArray(Urbandale, false, false); cntMarker += Urbandale.length; map.addOverlays(Waterloo); centerByArray(Waterloo, false, false); cntMarker += Waterloo.length; map.addOverlays(Wellsburg); centerByArray(Wellsburg, false, false); cntMarker += Wellsburg.length; map.addOverlays(West_Des_Moines); centerByArray(West_Des_Moines, false, false); cntMarker += West_Des_Moines.length; centerByArray(Ames,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///10600,10601,8998,10652,10620,10684,10680,31301,10649,10660,10644,10646,10718,10710,10726,10708,10637,10679,10600,10601,8998,10652,10620,10859,10684,10680,31301,33535,10649,10660,10856,10644,10646,10629,10653,10672,10847,10678,10687,10688,10718,10710,10645,10717,10658,10723,10726,10729,10731,10750,10762,10708,10637,32432,10833,10679,/all'); //window.open('/map.php?type=2&schools=10600,10601,8998,10652,10620,10684,10680,31301,10649,10660,10644,10646,10718,10710,10726,10708,10637,10679,10600,10601,8998,10652,10620,10859,10684,10680,31301,33535,10649,10660,10856,10644,10646,10629,10653,10672,10847,10678,10687,10688,10718,10710,10645,10717,10658,10723,10726,10729,10731,10750,10762,10708,10637,32432,10833,10679,&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; }