function addMarkers(){ mySelect = document.getElementById('selection'); San_Antonio = [];Universal_City = [];Adkins = [];mySelect.options[mySelect.options.length] = new Option("Adkins schools",'all=Adkins'); mySelect.options[mySelect.options.length] = new Option("San Antonio schools",'all=San_Antonio'); mySelect.options[mySelect.options.length] = new Option("Universal City schools",'all=Universal_City'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); San_Antonio[San_Antonio.length] = createMarker(new GPoint(-98.49535400,29.64814000),"
The Montessori School of San Antonio
17722 Rogers Ranch Parkway
San Antonio, TX 78258
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Montessori School of San Antonio",'San_Antonio=' + San_Antonio.length); San_Antonio[San_Antonio.length] = createMarker(new GPoint(-98.52605700,29.52222300),"
Antonian College Prep
6425 West Avenue
San Antonio, TX 78213
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Antonian College Prep",'San_Antonio=' + San_Antonio.length); San_Antonio[San_Antonio.length] = createMarker(new GPoint(-98.64375300,29.58805400),"
The Atonement Academy
15415 Red Robin Rd
San Antonio, TX 78255
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Atonement Academy",'San_Antonio=' + San_Antonio.length); San_Antonio[San_Antonio.length] = createMarker(new GPoint(-98.36997700,29.56357500),"
Believers Academy
13714 Lookout Road
San Antonio, TX 78233
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Believers Academy",'San_Antonio=' + San_Antonio.length); San_Antonio[San_Antonio.length] = createMarker(new GPoint(-98.60080500,29.56133100),"
Blessed Hope Academy
12721 Mountain Air Suite 101
San Antonio, TX 78249
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Blessed Hope Academy",'San_Antonio=' + San_Antonio.length); San_Antonio[San_Antonio.length] = createMarker(new GPoint(-98.47921500,29.66430600),"
Buckner Fanning Christian School At Mission Springs
975 Mission Springs
San Antonio, TX 78258
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Buckner Fanning Christian School At Mission Springs",'San_Antonio=' + San_Antonio.length); San_Antonio[San_Antonio.length] = createMarker(new GPoint(-98.52524200,29.53603500),"
Castle Hills First Baptist School
2220 NW Military Hwy
San Antonio, TX 78213
Co-ed school, NS-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Castle Hills First Baptist School",'San_Antonio=' + San_Antonio.length); San_Antonio[San_Antonio.length] = createMarker(new GPoint(-98.48124500,29.43839500),"
Central Catholic High School
1403 N. St. Mary''s
San Antonio, TX 78215
All-boys school, 9-12
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Central Catholic High School",'San_Antonio=' + San_Antonio.length); San_Antonio[San_Antonio.length] = createMarker(new GPoint(-98.54306100,29.41926600),"
Christian Academy Of San Antonio
325 Castroville Road
San Antonio, TX 78207
Co-ed school, PK-11
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Christian Academy Of San Antonio",'San_Antonio=' + San_Antonio.length); San_Antonio[San_Antonio.length] = createMarker(new GPoint(-98.47354200,29.58963000),"
Christian Heritage Schools
16316 San Pedro Avenue
San Antonio, TX 78232
Co-ed school, NS-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Christian Heritage Schools",'San_Antonio=' + San_Antonio.length); San_Antonio[San_Antonio.length] = createMarker(new GPoint(-98.57206700,29.51678900),"
City Church Academy
8308 Fredricksburg Rd
San Antonio, TX 78229
Co-ed school, 1-11
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("City Church Academy",'San_Antonio=' + San_Antonio.length); San_Antonio[San_Antonio.length] = createMarker(new GPoint(-98.53535200,29.52141200),"
Cornerstone Christian School
4802 Vance Jackson Road
San Antonio, TX 78230
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Cornerstone Christian School",'San_Antonio=' + San_Antonio.length); Universal_City[Universal_City.length] = createMarker(new GPoint(-98.30115800,29.55122300),"
First Baptist Academy
1401 Pat Booker Rd
Universal City, TX 78148
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("First Baptist Academy",'Universal_City=' + Universal_City.length); San_Antonio[San_Antonio.length] = createMarker(new GPoint(-98.61511000,29.36849100),"
Gateway Christian School
6623 Five Palms Dr
San Antonio, TX 78242
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Gateway Christian School",'San_Antonio=' + San_Antonio.length); San_Antonio[San_Antonio.length] = createMarker(new GPoint(-98.47585700,29.60987100),"
Harvest Schools
1270 N Loop 1604 E
San Antonio, TX 78232
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Harvest Schools",'San_Antonio=' + San_Antonio.length); San_Antonio[San_Antonio.length] = createMarker(new GPoint(-98.47673200,29.46566900),"
Incarnate Word High School
727 E Hildebrand Avenue
San Antonio, TX 78212
All-girls school, 9-12
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Incarnate Word High School",'San_Antonio=' + San_Antonio.length); San_Antonio[San_Antonio.length] = createMarker(new GPoint(-98.49342500,29.45211500),"
Keystone School
119 East Craig Place
San Antonio, TX 78212
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Keystone School",'San_Antonio=' + San_Antonio.length); San_Antonio[San_Antonio.length] = createMarker(new GPoint(-98.62924200,29.61160200),"
Lutheran High School Of San An
18104 Babcock Road
San Antonio, TX 78255
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lutheran High School Of San An",'San_Antonio=' + San_Antonio.length); San_Antonio[San_Antonio.length] = createMarker(new GPoint(-98.61859600,29.40382000),"
New Life Christian Academy
6622 Hwy 90 West
San Antonio, TX 78227
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("New Life Christian Academy",'San_Antonio=' + San_Antonio.length); San_Antonio[San_Antonio.length] = createMarker(new GPoint(-98.48143100,29.34997000),"
Omega School
3737 Roosevelt
San Antonio, TX 78214
Co-ed school, 6-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Omega School",'San_Antonio=' + San_Antonio.length); San_Antonio[San_Antonio.length] = createMarker(new GPoint(-98.48610100,29.43438000),"
Providence High School
1215 N St Marys
San Antonio, TX 78215
All-girls school, 6-12
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Providence High School",'San_Antonio=' + San_Antonio.length); San_Antonio[San_Antonio.length] = createMarker(new GPoint(-98.65495600,29.41725200),"
Rainbow Hills Baptist School
2255 Horal Street
San Antonio, TX 78227
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Rainbow Hills Baptist School",'San_Antonio=' + San_Antonio.length); San_Antonio[San_Antonio.length] = createMarker(new GPoint(-98.50664100,29.50770500),"
River City Christian School
5810 Blanco Rd.
San Antonio, TX 78216
Co-ed school, 1-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("River City Christian School",'San_Antonio=' + San_Antonio.length); San_Antonio[San_Antonio.length] = createMarker(new GPoint(-98.49164100,29.46003700),"
St. Anthony Catholic High School
3200 Mccullough Avenue
San Antonio, TX 78212
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Anthony Catholic High School",'San_Antonio=' + San_Antonio.length); San_Antonio[San_Antonio.length] = createMarker(new GPoint(-98.53816800,29.37686900),"
St. Francis Academy
1807 Centennial
San Antonio, TX 78211
All-girls school, 9-12
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("St. Francis Academy",'San_Antonio=' + San_Antonio.length); San_Antonio[San_Antonio.length] = createMarker(new GPoint(-98.50051600,29.38148000),"
St. Leo The Great Catholic School
119 Octavia Pl
San Antonio, TX 78214
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Leo The Great Catholic School",'San_Antonio=' + San_Antonio.length); San_Antonio[San_Antonio.length] = createMarker(new GPoint(-98.42473700,29.52745900),"
Saint Mary's Hall
9401 Starcrest Dr
San Antonio, TX 78217
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Saint Mary's Hall",'San_Antonio=' + San_Antonio.length); San_Antonio[San_Antonio.length] = createMarker(new GPoint(-98.42475600,29.52762600),"
St. Mary's Hall Middle School
9401 Starcrest Drive
San Antonio, TX 78217
Co-ed school, 6-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Mary's Hall Middle School",'San_Antonio=' + San_Antonio.length); San_Antonio[San_Antonio.length] = createMarker(new GPoint(-98.42475600,29.52762600),"
St. Mary's Hall Upper School
9401 Starcrest Drive
San Antonio, TX 78217
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Mary's Hall Upper School",'San_Antonio=' + San_Antonio.length); Adkins[Adkins.length] = createMarker(new GPoint(-98.24220000,29.35270000),"
Salem Sayers Baptist Academy
Po Box 397 5212 Fm 1628
Adkins, TX 78101
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Salem Sayers Baptist Academy",'Adkins=' + Adkins.length); San_Antonio[San_Antonio.length] = createMarker(new GPoint(-98.46075300,29.62043300),"
San Antonio Christian Schools
19202 Redland Rd Bldg I
San Antonio, TX 78259
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("San Antonio Christian Schools",'San_Antonio=' + San_Antonio.length); San_Antonio[San_Antonio.length] = createMarker(new GPoint(-98.66045500,29.54642000),"
Scenic Hills SDA Christian School
11223 Bandera Rd
San Antonio, TX 78250
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Scenic Hills SDA Christian School",'San_Antonio=' + San_Antonio.length); San_Antonio[San_Antonio.length] = createMarker(new GPoint(-98.59196200,29.48366500),"
Sendero Christian Academy
5408 Daughtry Drive
San Antonio, TX 78238
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sendero Christian Academy",'San_Antonio=' + San_Antonio.length); San_Antonio[San_Antonio.length] = createMarker(new GPoint(-98.56550000,29.52190000),"
Spirit Cristian Center
3800 Nw Loop 410 Ste 1
San Antonio, TX 78229
Co-ed school, Ungraded
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Spirit Cristian Center",'San_Antonio=' + San_Antonio.length); San_Antonio[San_Antonio.length] = createMarker(new GPoint(-98.46145700,29.41424400),"
St Gerard Catholic School
521 S New Braunfels Avenue
San Antonio, TX 78203
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Gerard Catholic School",'San_Antonio=' + San_Antonio.length); San_Antonio[San_Antonio.length] = createMarker(new GPoint(-98.47815500,29.46394800),"
Sunshine Cottage School For Deaf Children
103 Tuleta Drive
San Antonio, TX 78212
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sunshine Cottage School For Deaf Children",'San_Antonio=' + San_Antonio.length); San_Antonio[San_Antonio.length] = createMarker(new GPoint(-98.60176100,29.63559400),"
TMI-The Episcopal School of Texas
20955 West Tejas Trail
San Antonio, TX 78257
Co-ed school, 6-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("TMI-The Episcopal School of Texas",'San_Antonio=' + San_Antonio.length); San_Antonio[San_Antonio.length] = createMarker(new GPoint(-98.40036300,29.40158600),"
Town East Christian School
2030 Bible Boulevard
San Antonio, TX 78220
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Town East Christian School",'San_Antonio=' + San_Antonio.length); San_Antonio[San_Antonio.length] = createMarker(new GPoint(-98.38470400,29.60313700),"
Trinity Christian Academy
5401 North Loop 1604 East
San Antonio, TX 78247
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Trinity Christian Academy",'San_Antonio=' + San_Antonio.length); San_Antonio[San_Antonio.length] = createMarker(new GPoint(-98.57986300,29.51937100),"
The Winston School San Antonio
8565 Ewing Halsell Drive
San Antonio, TX 78229
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Winston School San Antonio",'San_Antonio=' + San_Antonio.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/////2/' + showArray); map.removeOverlays(Adkins); map.removeOverlays(San_Antonio); map.removeOverlays(Universal_City); 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(San_Antonio);map.removeOverlays(Adkins); map.removeOverlays(San_Antonio); map.removeOverlays(Universal_City); map.addOverlays(Adkins); centerByArray(Adkins, false, false); cntMarker += Adkins.length; map.addOverlays(San_Antonio); centerByArray(San_Antonio, false, false); cntMarker += San_Antonio.length; map.addOverlays(Universal_City); centerByArray(Universal_City, false, false); cntMarker += Universal_City.length; centerByArray(San_Antonio,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=2&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; }