function addMarkers(){ mySelect = document.getElementById('selection'); Wichita = [];Derby = [];Goddard = [];Cheney = [];Haysville = [];mySelect.options[mySelect.options.length] = new Option("Cheney schools",'all=Cheney'); mySelect.options[mySelect.options.length] = new Option("Derby schools",'all=Derby'); mySelect.options[mySelect.options.length] = new Option("Goddard schools",'all=Goddard'); mySelect.options[mySelect.options.length] = new Option("Haysville schools",'all=Haysville'); mySelect.options[mySelect.options.length] = new Option("Wichita schools",'all=Wichita'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Wichita[Wichita.length] = createMarker(new GPoint(-97.29742100,37.66626300),"
All Saints Catholic Elementary School
3313 Grand Street
Wichita, KS 67218
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("All Saints Catholic Elementary School",'Wichita=' + Wichita.length); Wichita[Wichita.length] = createMarker(new GPoint(-97.26107600,37.74726300),"
Annoor Islamic School
6655 E 34th Street N
Wichita, KS 67226
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Annoor Islamic School",'Wichita=' + Wichita.length); Wichita[Wichita.length] = createMarker(new GPoint(-97.35127100,37.64666900),"
Bethany Lutheran School
1000 W 26th Street S
Wichita, KS 67217
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bethany Lutheran School",'Wichita=' + Wichita.length); Wichita[Wichita.length] = createMarker(new GPoint(-97.37087200,37.62675800),"
Bethel Life School
3777 S Meridian Ave
Wichita, KS 67217
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bethel Life School",'Wichita=' + Wichita.length); Wichita[Wichita.length] = createMarker(new GPoint(-97.29163900,37.68657600),"
Blessed Sacrament Catholic School
3810 E Douglas Avenue
Wichita, KS 67208
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Blessed Sacrament Catholic School",'Wichita=' + Wichita.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); Wichita[Wichita.length] = createMarker(new GPoint(-97.39515500,37.68011200),"
Christ The King Elementary School
4501 W Maple Street
Wichita, KS 67209
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Christ The King Elementary School",'Wichita=' + Wichita.length); Derby[Derby.length] = createMarker(new GPoint(-97.26644100,37.54205800),"
Faith Lutheran School
208 S Derby
Derby, KS 67037
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Faith Lutheran School",'Derby=' + Derby.length); Wichita[Wichita.length] = createMarker(new GPoint(-97.23649500,37.73788500),"
Heartspring
8700 E 29th St N
Wichita, KS 67226
Co-ed school, NS-NS
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Heartspring",'Wichita=' + Wichita.length); Wichita[Wichita.length] = createMarker(new GPoint(-97.20762900,37.69594400),"
Holy Cross Lutheran School
600 N Greenwich Road
Wichita, KS 67206
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Holy Cross Lutheran School",'Wichita=' + Wichita.length); Wichita[Wichita.length] = createMarker(new GPoint(-97.30228900,37.70885900),"
Holy Savior Catholic Academy
6355 Willowbrook Street
Wichita, KS 67218
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Holy Savior Catholic Academy",'Wichita=' + Wichita.length); Goddard[Goddard.length] = createMarker(new GPoint(-97.54960000,37.66444000),"
Holy Spirit Catholic School
18218 W Highway 54
Goddard, KS 67052
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Holy Spirit Catholic School",'Goddard=' + Goddard.length); Wichita[Wichita.length] = createMarker(new GPoint(-97.23917600,37.68646300),"
Independent School
8317 E Douglas Avenue
Wichita, KS 67207
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Independent School",'Wichita=' + Wichita.length); Wichita[Wichita.length] = createMarker(new GPoint(-97.18987300,37.72126500),"
Magdalen Catholic School
2221 N 127th Street E
Wichita, KS 67226
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Magdalen Catholic School",'Wichita=' + Wichita.length); Wichita[Wichita.length] = createMarker(new GPoint(-97.26232500,37.77193900),"
Resurrection Catholic School
4900 N Woodlawn Street
Wichita, KS 67220
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Resurrection Catholic School",'Wichita=' + Wichita.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); Wichita[Wichita.length] = createMarker(new GPoint(-97.35318500,37.64318900),"
St. Anne Elementary School
1121 W Regal Street
Wichita, KS 67217
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Anne Elementary School",'Wichita=' + Wichita.length); Wichita[Wichita.length] = createMarker(new GPoint(-97.48087200,37.69214900),"
St. Elizabeth Ann Seton
645 N 119th Street W
Wichita, KS 67235
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Elizabeth Ann Seton",'Wichita=' + Wichita.length); Wichita[Wichita.length] = createMarker(new GPoint(-97.36034200,37.68316000),"
St. Joseph Catholic School
139 S Millwood St
Wichita, KS 67213
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Joseph Catholic School",'Wichita=' + Wichita.length); Derby[Derby.length] = createMarker(new GPoint(-97.26663300,37.54918700),"
St. Mary Parish Catholic School
700 North Derby Ave
Derby, KS 67037
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Mary Parish Catholic School",'Derby=' + Derby.length); Cheney[Cheney.length] = createMarker(new GPoint(-97.78568600,37.63179500),"
St. Pauls Lutheran School
Po Box 268 612 Lincoln Street
Cheney, KS 67025
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Pauls Lutheran School",'Cheney=' + Cheney.length); Haysville[Haysville.length] = createMarker(new GPoint(-97.37327000,37.56443700),"
St Cecilia Catholic School
1912 W Grand Avenue
Haysville, KS 67060
Co-ed school, PK-7
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Cecilia Catholic School",'Haysville=' + Haysville.length); Wichita[Wichita.length] = createMarker(new GPoint(-97.43805400,37.69714800),"
St Francis Of Assisi School
853 N Socora Street
Wichita, KS 67212
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Francis Of Assisi School",'Wichita=' + Wichita.length); Wichita[Wichita.length] = createMarker(new GPoint(-97.36292500,37.73808300),"
St Jude Catholic School
3030 Amidon Street
Wichita, KS 67204
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Jude Catholic School",'Wichita=' + Wichita.length); Wichita[Wichita.length] = createMarker(new GPoint(-97.32237200,37.64524100),"
St Margaret Mary School
2635 Pattie Street
Wichita, KS 67216
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Margaret Mary School",'Wichita=' + Wichita.length); Wichita[Wichita.length] = createMarker(new GPoint(-97.34489900,37.71938700),"
St Patrick Elementary School
2023 N Arkansas Avenue
Wichita, KS 67203
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Patrick Elementary School",'Wichita=' + Wichita.length); Wichita[Wichita.length] = createMarker(new GPoint(-97.47100000,37.62333700),"
St Peter Catholic School
11010 Southwest Blvd
Wichita, KS 67215
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Peter Catholic School",'Wichita=' + Wichita.length); Wichita[Wichita.length] = createMarker(new GPoint(-97.25871000,37.70678600),"
St Thomas Aquinas Elementary School
1215 N Stratford Lane
Wichita, KS 67206
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Thomas Aquinas Elementary School",'Wichita=' + Wichita.length); Wichita[Wichita.length] = createMarker(new GPoint(-97.31732500,37.76561300),"
Three Angels School
4558 N Hydraulic Street
Wichita, KS 67219
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Three Angels School",'Wichita=' + Wichita.length); Wichita[Wichita.length] = createMarker(new GPoint(-97.34887200,37.64570300),"
Wichita Adventist Christian Academy
2725 South Osage Avenue
Wichita, KS 67217
Co-ed school, K-10
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Wichita Adventist Christian Academy",'Wichita=' + Wichita.length); Wichita[Wichita.length] = createMarker(new GPoint(-97.23241700,37.70825000),"
Wichita Collegiate School
9115 E 13th Street N
Wichita, KS 67206
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Wichita Collegiate School",'Wichita=' + Wichita.length); Wichita[Wichita.length] = createMarker(new GPoint(-97.51078900,37.66443700),"
Wichita Friends School Inc.
14700 W Us Highway 54
Wichita, KS 67235
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Wichita Friends School Inc.",'Wichita=' + Wichita.length); } // 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/////1/' + showArray); map.removeOverlays(Cheney); map.removeOverlays(Derby); map.removeOverlays(Goddard); map.removeOverlays(Haysville); 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(Wichita);map.removeOverlays(Cheney); map.removeOverlays(Derby); map.removeOverlays(Goddard); map.removeOverlays(Haysville); map.removeOverlays(Wichita); map.addOverlays(Cheney); centerByArray(Cheney, false, false); cntMarker += Cheney.length; map.addOverlays(Derby); centerByArray(Derby, false, false); cntMarker += Derby.length; map.addOverlays(Goddard); centerByArray(Goddard, false, false); cntMarker += Goddard.length; map.addOverlays(Haysville); centerByArray(Haysville, false, false); cntMarker += Haysville.length; map.addOverlays(Wichita); centerByArray(Wichita, false, false); cntMarker += Wichita.length; centerByArray(Wichita,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////all'); //window.open('/map.php?type=1&schools=&school_level=1&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; }