function addMarkers(){ mySelect = document.getElementById('selection'); Bethany = [];Oklahoma_City = [];Del_City = [];Midwest_City = [];Edmond = [];Harrah = [];Spencer = [];mySelect.options[mySelect.options.length] = new Option("Bethany schools",'all=Bethany'); mySelect.options[mySelect.options.length] = new Option("Del City schools",'all=Del_City'); mySelect.options[mySelect.options.length] = new Option("Edmond schools",'all=Edmond'); mySelect.options[mySelect.options.length] = new Option("Harrah schools",'all=Harrah'); mySelect.options[mySelect.options.length] = new Option("Midwest City schools",'all=Midwest_City'); mySelect.options[mySelect.options.length] = new Option("Oklahoma City schools",'all=Oklahoma_City'); mySelect.options[mySelect.options.length] = new Option("Spencer schools",'all=Spencer'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Bethany[Bethany.length] = createMarker(new GPoint(-97.63053900,35.49348500),"
Bethany Christian Academy
6719 Nw 23rd Street
Bethany, OK 73008
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bethany Christian Academy",'Bethany=' + Bethany.length); Bethany[Bethany.length] = createMarker(new GPoint(-97.63686800,35.49124700),"
Bethany Montessori Preschool A
2201 N Rockwell Avenue
Bethany, OK 73008
Co-ed school, PK-KG
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bethany Montessori Preschool A",'Bethany=' + Bethany.length); Oklahoma_City[Oklahoma_City.length] = createMarker(new GPoint(-97.53006700,35.50276300),"
Bishop John Carroll School
1100 Nw 32nd Street
Oklahoma City, OK 73118
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bishop John Carroll School",'Oklahoma_City=' + Oklahoma_City.length); Oklahoma_City[Oklahoma_City.length] = createMarker(new GPoint(-97.54913800,35.56735900),"
Casady School
9500 North Pennsylvania Ave
Oklahoma City, OK 73120
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Casady School",'Oklahoma_City=' + Oklahoma_City.length); Oklahoma_City[Oklahoma_City.length] = createMarker(new GPoint(-97.51770000,35.47300000),"
Celebrations Preschool
Po Box 2656
Oklahoma City, OK 73101
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Celebrations Preschool",'Oklahoma_City=' + Oklahoma_City.length); Oklahoma_City[Oklahoma_City.length] = createMarker(new GPoint(-97.60719900,35.53693700),"
Central Sda School
4747 Nw 63rd Street
Oklahoma City, OK 73132
Co-ed school, 2-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Central Sda School",'Oklahoma_City=' + Oklahoma_City.length); Oklahoma_City[Oklahoma_City.length] = createMarker(new GPoint(-97.57443000,35.52665300),"
The Childrens Place Integris
5600 N Independence Avenue
Oklahoma City, OK 73112
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Childrens Place Integris",'Oklahoma_City=' + Oklahoma_City.length); Oklahoma_City[Oklahoma_City.length] = createMarker(new GPoint(-97.55509500,35.55204000),"
Christ The King Catholic School
1905 Elmhurst Avenue
Oklahoma City, OK 73120
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Christ The King Catholic School",'Oklahoma_City=' + Oklahoma_City.length); Del_City[Del_City.length] = createMarker(new GPoint(-97.43848100,35.43707100),"
Christian Heritage Academy
4400 SE 27th STREET
Del City, OK 73115
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Christian Heritage Academy",'Del_City=' + Del_City.length); Oklahoma_City[Oklahoma_City.length] = createMarker(new GPoint(-97.54946800,35.57357100),"
Crescent Academy
10105 N Pennsylvania Avenue
Oklahoma City, OK 73120
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Crescent Academy",'Oklahoma_City=' + Oklahoma_City.length); Oklahoma_City[Oklahoma_City.length] = createMarker(new GPoint(-97.58490100,35.62012000),"
Crossings Christian School
14400 N Portland Ave
Oklahoma City, OK 73134
Co-ed school, PK-10
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Crossings Christian School",'Oklahoma_City=' + Oklahoma_City.length); Oklahoma_City[Oklahoma_City.length] = createMarker(new GPoint(-97.52967400,35.51168000),"
Crown Heights Christian Center
4020 N Western Avenue
Oklahoma City, OK 73118
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Crown Heights Christian Center",'Oklahoma_City=' + Oklahoma_City.length); Midwest_City[Midwest_City.length] = createMarker(new GPoint(-97.40760300,35.45146300),"
Faith Academy Christian School
504 Askew Drive
Midwest City, OK 73110
Co-ed school, PK-10
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Faith Academy Christian School",'Midwest_City=' + Midwest_City.length); Edmond[Edmond.length] = createMarker(new GPoint(-97.47384400,35.64390100),"
First Presbyterian Ecp
1001 S Rankin Street
Edmond, OK 73034
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("First Presbyterian Ecp",'Edmond=' + Edmond.length); Oklahoma_City[Oklahoma_City.length] = createMarker(new GPoint(-97.67062700,35.55123700),"
Gethsemane Lutheran School
8811 W Wilshire Blvd
Oklahoma City, OK 73132
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Gethsemane Lutheran School",'Oklahoma_City=' + Oklahoma_City.length); Midwest_City[Midwest_City.length] = createMarker(new GPoint(-97.40615400,35.47374900),"
Good Shepherd Lutheran School
700 N Air Depot Blvd
Midwest City, OK 73110
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Good Shepherd Lutheran School",'Midwest_City=' + Midwest_City.length); Oklahoma_City[Oklahoma_City.length] = createMarker(new GPoint(-97.54229700,35.59446300),"
Heritage Hall
1800 Nw 122nd Street
Oklahoma City, OK 73120
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Heritage Hall",'Oklahoma_City=' + Oklahoma_City.length); Edmond[Edmond.length] = createMarker(new GPoint(-97.52234200,35.63837800),"
Holy Trinity Christian School
308 Nw 164th Street
Edmond, OK 73013
Co-ed school, PK-1
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Holy Trinity Christian School",'Edmond=' + Edmond.length); Oklahoma_City[Oklahoma_City.length] = createMarker(new GPoint(-97.58484300,35.58479300),"
King's Gate Christian School
11400 N Portland Avenue
Oklahoma City, OK 73120
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("King's Gate Christian School",'Oklahoma_City=' + Oklahoma_City.length); Oklahoma_City[Oklahoma_City.length] = createMarker(new GPoint(-97.31791400,35.39931200),"
Life Christian Academy
6801 S Anderson Rd
Oklahoma City, OK 73150
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Life Christian Academy",'Oklahoma_City=' + Oklahoma_City.length); Oklahoma_City[Oklahoma_City.length] = createMarker(new GPoint(-97.58738000,35.51107500),"
Mercy School Institute
3900 Nw 39th Street
Oklahoma City, OK 73112
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mercy School Institute",'Oklahoma_City=' + Oklahoma_City.length); Oklahoma_City[Oklahoma_City.length] = createMarker(new GPoint(-97.58181600,35.53295400),"
Messiah Lutheran School
3600 NW Expressway
Oklahoma City, OK 73112
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Messiah Lutheran School",'Oklahoma_City=' + Oklahoma_City.length); Oklahoma_City[Oklahoma_City.length] = createMarker(new GPoint(-97.43760000,35.42030000),"
Mid-del Christian School
Po Box 15300
Oklahoma City, OK 73155
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mid-del Christian School",'Oklahoma_City=' + Oklahoma_City.length); Oklahoma_City[Oklahoma_City.length] = createMarker(new GPoint(-97.63682100,35.48352500),"
New Life Christian Academy
1429 N Rockwell Avenue Ste A
Oklahoma City, OK 73127
Co-ed school, 1-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("New Life Christian Academy",'Oklahoma_City=' + Oklahoma_City.length); Oklahoma_City[Oklahoma_City.length] = createMarker(new GPoint(-97.65423000,35.54864100),"
Northwest Christian School
7700 N Council Road
Oklahoma City, OK 73132
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Northwest Christian School",'Oklahoma_City=' + Oklahoma_City.length); Oklahoma_City[Oklahoma_City.length] = createMarker(new GPoint(-97.56576700,35.38837300),"
Okc Comm. College Cdc
7777 S May Ave
Oklahoma City, OK 73159
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Okc Comm. College Cdc",'Oklahoma_City=' + Oklahoma_City.length); Oklahoma_City[Oklahoma_City.length] = createMarker(new GPoint(-97.52776900,35.51926300),"
Okc Jewish Community Day School
900 Nw 47th St
Oklahoma City, OK 73118
Co-ed school, PK-4
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Okc Jewish Community Day School",'Oklahoma_City=' + Oklahoma_City.length); Harrah[Harrah.length] = createMarker(new GPoint(-97.20213000,35.53422100),"
Oklahoma Academy
6100 Academy Lane
Harrah, OK 73045
Co-ed school, 1-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Oklahoma Academy",'Harrah=' + Harrah.length); Edmond[Edmond.length] = createMarker(new GPoint(-97.46631500,35.64563700),"
Oklahoma Christian Academy
1101 E 9th Street
Edmond, OK 73034
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Oklahoma Christian Academy",'Edmond=' + Edmond.length); Edmond[Edmond.length] = createMarker(new GPoint(-97.47795800,35.65447100),"
Oklahoma Christian School
Po Box 509
Edmond, OK 73083
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Oklahoma Christian School",'Edmond=' + Edmond.length); Oklahoma_City[Oklahoma_City.length] = createMarker(new GPoint(-97.47679000,35.51417200),"
Parkview Adventist Academy
4201 N Martin Luther King Avenue
Oklahoma City, OK 73111
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Parkview Adventist Academy",'Oklahoma_City=' + Oklahoma_City.length); Edmond[Edmond.length] = createMarker(new GPoint(-97.53151400,35.61768600),"
Providence Hall
14504 N Western Avenue
Edmond, OK 73013
Co-ed school, K-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Providence Hall",'Edmond=' + Edmond.length); Oklahoma_City[Oklahoma_City.length] = createMarker(new GPoint(-97.54365500,35.48906300),"
Rosary School
1910 Nw 19th Street
Oklahoma City, OK 73106
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Rosary School",'Oklahoma_City=' + Oklahoma_City.length); Oklahoma_City[Oklahoma_City.length] = createMarker(new GPoint(-97.52589000,35.43819300),"
Sacred Heart Catholic School
2700 South Shartel Avenue
Oklahoma City, OK 73109
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sacred Heart Catholic School",'Oklahoma_City=' + Oklahoma_City.length); Oklahoma_City[Oklahoma_City.length] = createMarker(new GPoint(-97.61433000,35.52160000),"
St. Charles Borromeo School
5000 N Grove Avenue
Oklahoma City, OK 73122
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Charles Borromeo School",'Oklahoma_City=' + Oklahoma_City.length); Oklahoma_City[Oklahoma_City.length] = createMarker(new GPoint(-97.54890000,35.56590000),"
St. Eugene Catholic School
Po Box 20930
Oklahoma City, OK 73156
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Eugene Catholic School",'Oklahoma_City=' + Oklahoma_City.length); Oklahoma_City[Oklahoma_City.length] = createMarker(new GPoint(-97.49415400,35.52833900),"
St. John Christian Heritage Academy
5700 N Kelley Avenue
Oklahoma City, OK 73111
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. John Christian Heritage Academy",'Oklahoma_City=' + Oklahoma_City.length); Oklahoma_City[Oklahoma_City.length] = createMarker(new GPoint(-97.56806800,35.52300800),"
St. John's Episcopal School
5201 N Brookline Avenue
Oklahoma City, OK 73112
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. John's Episcopal School",'Oklahoma_City=' + Oklahoma_City.length); Midwest_City[Midwest_City.length] = createMarker(new GPoint(-97.39676700,35.44742100),"
St. Philip Neri School
1121 Felix Place
Midwest City, OK 73110
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Philip Neri School",'Midwest_City=' + Midwest_City.length); Bethany[Bethany.length] = createMarker(new GPoint(-97.63113600,35.51220100),"
SNU School For Children
6729 NW 39th Expressway
Bethany, OK 73008
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("SNU School For Children",'Bethany=' + Bethany.length); Spencer[Spencer.length] = createMarker(new GPoint(-97.37941500,35.49563700),"
Spencer Road Christian School
8515 Ne 25th Street
Spencer, OK 73084
Co-ed school, PK-7
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Spencer Road Christian School",'Spencer=' + Spencer.length); Edmond[Edmond.length] = createMarker(new GPoint(-97.47829600,35.64474200),"
St Elizabeth Ann Seton Catholic School
925 S Boulevard St
Edmond, OK 73034
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Elizabeth Ann Seton Catholic School",'Edmond=' + Edmond.length); Oklahoma_City[Oklahoma_City.length] = createMarker(new GPoint(-97.53751900,35.42306300),"
St James Catholic School
1224 Sw 41st Street
Oklahoma City, OK 73109
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St James Catholic School",'Oklahoma_City=' + Oklahoma_City.length); Edmond[Edmond.length] = createMarker(new GPoint(-97.47609900,35.65390800),"
St Marys Episcopal School
505 E Covell Road
Edmond, OK 73034
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Marys Episcopal School",'Edmond=' + Edmond.length); Oklahoma_City[Oklahoma_City.length] = createMarker(new GPoint(-97.49325500,35.57996300),"
Trinity School
1120 East Hefner Road
Oklahoma City, OK 73131
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Trinity School",'Oklahoma_City=' + Oklahoma_City.length); Oklahoma_City[Oklahoma_City.length] = createMarker(new GPoint(-97.52289000,35.48037700),"
Villa Teresa School
1216 Classen Drive
Oklahoma City, OK 73103
Co-ed school, PK-4
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Villa Teresa School",'Oklahoma_City=' + Oklahoma_City.length); Oklahoma_City[Oklahoma_City.length] = createMarker(new GPoint(-97.52328400,35.51636300),"
Westminster School
600 NW 44th Street
Oklahoma City, OK 73118
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Westminster School",'Oklahoma_City=' + Oklahoma_City.length); Oklahoma_City[Oklahoma_City.length] = createMarker(new GPoint(-97.61355900,35.49341000),"
Windsor Hills Baptist School
5517 Nw 23rd Street
Oklahoma City, OK 73127
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Windsor Hills Baptist School",'Oklahoma_City=' + Oklahoma_City.length); Oklahoma_City[Oklahoma_City.length] = createMarker(new GPoint(-97.50293000,35.51664600),"
Young Achievers Christian Academy
4500 N Lincoln Blvd
Oklahoma City, OK 73105
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Young Achievers Christian Academy",'Oklahoma_City=' + Oklahoma_City.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(Bethany); map.removeOverlays(Del_City); map.removeOverlays(Edmond); map.removeOverlays(Harrah); map.removeOverlays(Midwest_City); map.removeOverlays(Oklahoma_City); map.removeOverlays(Spencer); 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(Bethany);map.removeOverlays(Bethany); map.removeOverlays(Del_City); map.removeOverlays(Edmond); map.removeOverlays(Harrah); map.removeOverlays(Midwest_City); map.removeOverlays(Oklahoma_City); map.removeOverlays(Spencer); map.addOverlays(Bethany); centerByArray(Bethany, false, false); cntMarker += Bethany.length; map.addOverlays(Del_City); centerByArray(Del_City, false, false); cntMarker += Del_City.length; map.addOverlays(Edmond); centerByArray(Edmond, false, false); cntMarker += Edmond.length; map.addOverlays(Harrah); centerByArray(Harrah, false, false); cntMarker += Harrah.length; map.addOverlays(Midwest_City); centerByArray(Midwest_City, false, false); cntMarker += Midwest_City.length; map.addOverlays(Oklahoma_City); centerByArray(Oklahoma_City, false, false); cntMarker += Oklahoma_City.length; map.addOverlays(Spencer); centerByArray(Spencer, false, false); cntMarker += Spencer.length; centerByArray(Bethany,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; }