function addMarkers(){ mySelect = document.getElementById('selection'); League_City = [];El_Paso = [];San_Antonio = [];Lancaster = [];Lake_Jackson = [];Midland = [];Southlake = [];Pilot_Point = [];Sugar_Land = [];Houston = [];Conroe = [];Galena_Park = [];Arlington = [];Dallas = [];Webster = [];Humble = [];Universal_City = [];Adkins = [];Austin = [];Burleson = [];Spring = [];Sherman = [];The_Woodlands = [];mySelect.options[mySelect.options.length] = new Option("Adkins schools",'all=Adkins'); mySelect.options[mySelect.options.length] = new Option("Arlington schools",'all=Arlington'); mySelect.options[mySelect.options.length] = new Option("Austin schools",'all=Austin'); mySelect.options[mySelect.options.length] = new Option("Burleson schools",'all=Burleson'); mySelect.options[mySelect.options.length] = new Option("Conroe schools",'all=Conroe'); mySelect.options[mySelect.options.length] = new Option("Dallas schools",'all=Dallas'); mySelect.options[mySelect.options.length] = new Option("El Paso schools",'all=El_Paso'); mySelect.options[mySelect.options.length] = new Option("Galena Park schools",'all=Galena_Park'); mySelect.options[mySelect.options.length] = new Option("Houston schools",'all=Houston'); mySelect.options[mySelect.options.length] = new Option("Humble schools",'all=Humble'); mySelect.options[mySelect.options.length] = new Option("Lake Jackson schools",'all=Lake_Jackson'); mySelect.options[mySelect.options.length] = new Option("Lancaster schools",'all=Lancaster'); mySelect.options[mySelect.options.length] = new Option("League City schools",'all=League_City'); mySelect.options[mySelect.options.length] = new Option("Midland schools",'all=Midland'); mySelect.options[mySelect.options.length] = new Option("Pilot Point schools",'all=Pilot_Point'); mySelect.options[mySelect.options.length] = new Option("San Antonio schools",'all=San_Antonio'); mySelect.options[mySelect.options.length] = new Option("Sherman schools",'all=Sherman'); mySelect.options[mySelect.options.length] = new Option("Southlake schools",'all=Southlake'); mySelect.options[mySelect.options.length] = new Option("Spring schools",'all=Spring'); mySelect.options[mySelect.options.length] = new Option("Sugar Land schools",'all=Sugar_Land'); mySelect.options[mySelect.options.length] = new Option("The Woodlands schools",'all=The_Woodlands'); mySelect.options[mySelect.options.length] = new Option("Universal City schools",'all=Universal_City'); mySelect.options[mySelect.options.length] = new Option("Webster schools",'all=Webster'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); League_City[League_City.length] = createMarker(new GPoint(-95.11830000,29.43440000),"
The Academy Of Clear Lake
Po Box 1500
League City, TX 77574
Co-ed school, 3-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Academy Of Clear Lake",'League_City=' + League_City.length); El_Paso[El_Paso.length] = createMarker(new GPoint(-106.53842300,31.85917000),"
Ascension Lutheran Day School
6520 Loma De Cristo
El Paso, TX 79912
Co-ed school, PK-KG
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ascension Lutheran Day School",'El_Paso=' + El_Paso.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); Lancaster[Lancaster.length] = createMarker(new GPoint(-96.77076200,32.60559300),"
Berne Academy
1311 Johns Avenue
Lancaster, TX 75134
school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Berne Academy",'Lancaster=' + Lancaster.length); Lake_Jackson[Lake_Jackson.length] = createMarker(new GPoint(-95.42764200,29.04483700),"
Brazosport Christian School
200b Willow Drive
Lake Jackson, TX 77566
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Brazosport Christian School",'Lake_Jackson=' + Lake_Jackson.length); Midland[Midland.length] = createMarker(new GPoint(-102.07750000,31.99720000),"
Bynum School
P.o. Box 5788
Midland, TX 79703
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bynum School",'Midland=' + Midland.length); Southlake[Southlake.length] = createMarker(new GPoint(-97.15728800,32.99081600),"
Clariden School
100 Clariden Ranch Road
Southlake, TX 76092
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Clariden School",'Southlake=' + Southlake.length); Pilot_Point[Pilot_Point.length] = createMarker(new GPoint(-96.96828300,33.38870100),"
Education Plus+ Ministries
616 W. Georgia Ave.
Pilot Point, TX 76258
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Education Plus+ Ministries",'Pilot_Point=' + Pilot_Point.length); El_Paso[El_Paso.length] = createMarker(new GPoint(-106.48694200,31.76932700),"
El Paso Bridges Academy
901 Arizona
El Paso, TX 79902
Co-ed school, 1-9
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("El Paso Bridges Academy",'El_Paso=' + El_Paso.length); Sugar_Land[Sugar_Land.length] = createMarker(new GPoint(-95.63500900,29.61107200),"
Faith Lutheran School
800 Brooks St
Sugar Land, TX 77478
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Faith Lutheran School",'Sugar_Land=' + Sugar_Land.length); Houston[Houston.length] = createMarker(new GPoint(-95.45924800,29.78200300),"
First Baptist Academy
7450 Memorial Woods Dr
Houston, TX 77024
Co-ed school, NS-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("First Baptist Academy",'Houston=' + Houston.length); Conroe[Conroe.length] = createMarker(new GPoint(-95.45691400,30.31351900),"
First Baptist Academy
600 N Main Street
Conroe, TX 77301
Co-ed school, PK-3
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("First Baptist Academy",'Conroe=' + Conroe.length); Galena_Park[Galena_Park.length] = createMarker(new GPoint(-95.23909700,29.74401200),"
Galena Park Sda School
1800 16th Street
Galena Park, TX 77547
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Galena Park Sda School",'Galena_Park=' + Galena_Park.length); Houston[Houston.length] = createMarker(new GPoint(-95.11675200,29.55120900),"
Galloway School Upper School
17223 Mercury
Houston, TX 77058
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Galloway School Upper School",'Houston=' + Houston.length); Arlington[Arlington.length] = createMarker(new GPoint(-97.14795400,32.76602800),"
Gateway School
2070 Nw Green Oaks Blvd
Arlington, TX 76012
Co-ed school, 7-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Gateway School",'Arlington=' + Arlington.length); Houston[Houston.length] = createMarker(new GPoint(-95.55457200,29.73977500),"
Grace School
10219 Ella Lee
Houston, TX 77042
Co-ed school, NS-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Grace School",'Houston=' + Houston.length); Dallas[Dallas.length] = createMarker(new GPoint(-96.83837700,32.94013700),"
Greenhill School
4141 Spring Valley Road
Dallas, TX 75244
Co-ed school, KG-4
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Greenhill School",'Dallas=' + Dallas.length); Houston[Houston.length] = createMarker(new GPoint(-95.29103100,29.88323700),"
Helon's Academy
6619 Annunciation
Houston, TX 77016
Co-ed school, PK-KG
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Helon's Academy",'Houston=' + Houston.length); Dallas[Dallas.length] = createMarker(new GPoint(-96.77559100,32.91503900),"
The Hillcrest Academy
12302 Park Central Dr.
Dallas, TX 75251
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Hillcrest Academy",'Dallas=' + Dallas.length); Webster[Webster.length] = createMarker(new GPoint(-95.11846100,29.53780300),"
Houston Learning Academy
17926 Highway 3, Suite 103
Webster, TX 77598
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Houston Learning Academy",'Webster=' + Webster.length); Humble[Humble.length] = createMarker(new GPoint(-95.15740100,30.00067500),"
Lake Houston Academy
7810 Fm 1960 Rd E 3
Humble, TX 77346
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lake Houston Academy",'Humble=' + Humble.length); Houston[Houston.length] = createMarker(new GPoint(-95.32719900,29.77126300),"
Neighborhood Educational Cen
4308 12 Sondick
Houston, TX 77020
Co-ed school, PK-1
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Neighborhood Educational Cen",'Houston=' + Houston.length); San_Antonio[San_Antonio.length] = createMarker(new GPoint(-98.52414100,29.38706300),"
Palm Heights Baptist School
1106 W Malone Avenue
San Antonio, TX 78225
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Palm Heights Baptist School",'San_Antonio=' + San_Antonio.length); Arlington[Arlington.length] = createMarker(new GPoint(-97.14056400,32.72137600),"
Pantego Christian Academy
2201 W Park Row Dr
Arlington, TX 76013
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Pantego Christian Academy",'Arlington=' + Arlington.length); Houston[Houston.length] = createMarker(new GPoint(-95.50089500,29.73456700),"
The Phoenix Academy
2909 Hillcroft 315
Houston, TX 77057
Co-ed school, 8-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Phoenix Academy",'Houston=' + Houston.length); Universal_City[Universal_City.length] = createMarker(new GPoint(-98.29553400,29.55002800),"
Randolph Christian Academy
1032 Pat Booker Road
Universal City, TX 78148
Co-ed school, PK-KG
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Randolph Christian Academy",'Universal_City=' + Universal_City.length); San_Antonio[San_Antonio.length] = createMarker(new GPoint(-98.40359200,29.41367300),"
St. Benedict Catholic School
4547 Lord Rd
San Antonio, TX 78220
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Benedict Catholic School",'San_Antonio=' + San_Antonio.length); Houston[Houston.length] = createMarker(new GPoint(-95.38887500,29.72640100),"
St. Paul School
5501 South Main
Houston, TX 77004
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Paul School",'Houston=' + Houston.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.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); Austin[Austin.length] = createMarker(new GPoint(-97.72242500,30.29987200),"
Sri Atmananda Memorial School
4100 Red River
Austin, TX 78751
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sri Atmananda Memorial School",'Austin=' + Austin.length); Burleson[Burleson.length] = createMarker(new GPoint(-97.32050000,32.54190000),"
Steppingstone Christian Aca
P O Box 1403
Burleson, TX 76097
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Steppingstone Christian Aca",'Burleson=' + Burleson.length); Spring[Spring.length] = createMarker(new GPoint(-95.48625800,30.06442300),"
Summerfield Academy
21611 Bridgestone
Spring, TX 77388
Co-ed school, K-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Summerfield Academy",'Spring=' + Spring.length); Sherman[Sherman.length] = createMarker(new GPoint(-96.64774900,33.62716300),"
Texoma Christian School
3500 W. Houston
Sherman, TX 75092
Co-ed school, PK-11
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Texoma Christian School",'Sherman=' + Sherman.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); Houston[Houston.length] = createMarker(new GPoint(-95.45671700,29.66801900),"
Trafton Academy
4711 McDermed Dr
Houston, TX 77035
Co-ed school, 4-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Trafton Academy",'Houston=' + Houston.length); Houston[Houston.length] = createMarker(new GPoint(-95.47119500,29.73030600),"
Waldorf Education For Houston
5404 Beverly Hills
Houston, TX 77056
Co-ed school, KG-KG
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Waldorf Education For Houston",'Houston=' + Houston.length); The_Woodlands[The_Woodlands.length] = createMarker(new GPoint(-95.48038300,30.22292100),"
Woodlands Christian Academy
5800 Academy Way
The Woodlands, TX 77384
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Woodlands Christian Academy",'The_Woodlands=' + The_Woodlands.length); Houston[Houston.length] = createMarker(new GPoint(-95.59255200,29.77017800),"
Yorkshire Academy
14120 Memorial Dr
Houston, TX 77079
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Yorkshire Academy",'Houston=' + Houston.length); map.removeOverlays(Adkins); map.removeOverlays(Arlington); map.removeOverlays(Austin); map.removeOverlays(Burleson); map.removeOverlays(Conroe); map.removeOverlays(Dallas); map.removeOverlays(El_Paso); map.removeOverlays(Galena_Park); map.removeOverlays(Houston); map.removeOverlays(Humble); map.removeOverlays(Lake_Jackson); map.removeOverlays(Lancaster); map.removeOverlays(League_City); map.removeOverlays(Midland); map.removeOverlays(Pilot_Point); map.removeOverlays(San_Antonio); map.removeOverlays(Sherman); map.removeOverlays(Southlake); map.removeOverlays(Spring); map.removeOverlays(Sugar_Land); map.removeOverlays(The_Woodlands); map.removeOverlays(Universal_City); map.removeOverlays(Webster); setTimeout(function(){map.addOverlays(Adkins)},1000); setTimeout(function(){map.addOverlays(Arlington)},1000); setTimeout(function(){map.addOverlays(Austin)},1000); setTimeout(function(){map.addOverlays(Burleson)},1000); setTimeout(function(){map.addOverlays(Conroe)},1000); setTimeout(function(){map.addOverlays(Dallas)},1000); setTimeout(function(){map.addOverlays(El_Paso)},1000); setTimeout(function(){map.addOverlays(Galena_Park)},1000); setTimeout(function(){map.addOverlays(Houston)},1000); setTimeout(function(){map.addOverlays(Humble)},1000); setTimeout(function(){map.addOverlays(Lake_Jackson)},1000); setTimeout(function(){map.addOverlays(Lancaster)},1000); setTimeout(function(){map.addOverlays(League_City)},1000); setTimeout(function(){map.addOverlays(Midland)},1000); setTimeout(function(){map.addOverlays(Pilot_Point)},1000); setTimeout(function(){map.addOverlays(San_Antonio)},1000); setTimeout(function(){map.addOverlays(Sherman)},1000); setTimeout(function(){map.addOverlays(Southlake)},1000); setTimeout(function(){map.addOverlays(Spring)},1000); setTimeout(function(){map.addOverlays(Sugar_Land)},1000); setTimeout(function(){map.addOverlays(The_Woodlands)},1000); setTimeout(function(){map.addOverlays(Universal_City)},1000); setTimeout(function(){map.addOverlays(Webster)},1000); maxLng = -95.11675200; maxLat = 33.62716300; minLng = -106.53842300; minLat = 29.04483700; 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(Adkins); map.removeOverlays(Arlington); map.removeOverlays(Austin); map.removeOverlays(Burleson); map.removeOverlays(Conroe); map.removeOverlays(Dallas); map.removeOverlays(El_Paso); map.removeOverlays(Galena_Park); map.removeOverlays(Houston); map.removeOverlays(Humble); map.removeOverlays(Lake_Jackson); map.removeOverlays(Lancaster); map.removeOverlays(League_City); map.removeOverlays(Midland); map.removeOverlays(Pilot_Point); map.removeOverlays(San_Antonio); map.removeOverlays(Sherman); map.removeOverlays(Southlake); map.removeOverlays(Spring); map.removeOverlays(Sugar_Land); map.removeOverlays(The_Woodlands); map.removeOverlays(Universal_City); map.removeOverlays(Webster); 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(League_City);map.removeOverlays(Adkins); map.removeOverlays(Arlington); map.removeOverlays(Austin); map.removeOverlays(Burleson); map.removeOverlays(Conroe); map.removeOverlays(Dallas); map.removeOverlays(El_Paso); map.removeOverlays(Galena_Park); map.removeOverlays(Houston); map.removeOverlays(Humble); map.removeOverlays(Lake_Jackson); map.removeOverlays(Lancaster); map.removeOverlays(League_City); map.removeOverlays(Midland); map.removeOverlays(Pilot_Point); map.removeOverlays(San_Antonio); map.removeOverlays(Sherman); map.removeOverlays(Southlake); map.removeOverlays(Spring); map.removeOverlays(Sugar_Land); map.removeOverlays(The_Woodlands); map.removeOverlays(Universal_City); map.removeOverlays(Webster); map.addOverlays(Adkins); centerByArray(Adkins, false, false); cntMarker += Adkins.length; map.addOverlays(Arlington); centerByArray(Arlington, false, false); cntMarker += Arlington.length; map.addOverlays(Austin); centerByArray(Austin, false, false); cntMarker += Austin.length; map.addOverlays(Burleson); centerByArray(Burleson, false, false); cntMarker += Burleson.length; map.addOverlays(Conroe); centerByArray(Conroe, false, false); cntMarker += Conroe.length; map.addOverlays(Dallas); centerByArray(Dallas, false, false); cntMarker += Dallas.length; map.addOverlays(El_Paso); centerByArray(El_Paso, false, false); cntMarker += El_Paso.length; map.addOverlays(Galena_Park); centerByArray(Galena_Park, false, false); cntMarker += Galena_Park.length; map.addOverlays(Houston); centerByArray(Houston, false, false); cntMarker += Houston.length; map.addOverlays(Humble); centerByArray(Humble, false, false); cntMarker += Humble.length; map.addOverlays(Lake_Jackson); centerByArray(Lake_Jackson, false, false); cntMarker += Lake_Jackson.length; map.addOverlays(Lancaster); centerByArray(Lancaster, false, false); cntMarker += Lancaster.length; map.addOverlays(League_City); centerByArray(League_City, false, false); cntMarker += League_City.length; map.addOverlays(Midland); centerByArray(Midland, false, false); cntMarker += Midland.length; map.addOverlays(Pilot_Point); centerByArray(Pilot_Point, false, false); cntMarker += Pilot_Point.length; map.addOverlays(San_Antonio); centerByArray(San_Antonio, false, false); cntMarker += San_Antonio.length; map.addOverlays(Sherman); centerByArray(Sherman, false, false); cntMarker += Sherman.length; map.addOverlays(Southlake); centerByArray(Southlake, false, false); cntMarker += Southlake.length; map.addOverlays(Spring); centerByArray(Spring, false, false); cntMarker += Spring.length; map.addOverlays(Sugar_Land); centerByArray(Sugar_Land, false, false); cntMarker += Sugar_Land.length; map.addOverlays(The_Woodlands); centerByArray(The_Woodlands, false, false); cntMarker += The_Woodlands.length; map.addOverlays(Universal_City); centerByArray(Universal_City, false, false); cntMarker += Universal_City.length; map.addOverlays(Webster); centerByArray(Webster, false, false); cntMarker += Webster.length; centerByArray(League_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///27260,26835,27169,27313,27533,26584,26791,27182,27616,26991,26581,26559,26480,30620,26554,27273,27560,27563,26668,27702,26930,27260,27169,27313,27533,35791,26870,26897,26534,26584,26829,26791,26426,26864,26403,27106,27463,27616,26425,27706,26581,26559,26480,26596,30620,26554,27168,27341,27273,27560,27563,26668,26457,26782,27702,27210,/all'); //window.open('/map.php?type=2&schools=27260,26835,27169,27313,27533,26584,26791,27182,27616,26991,26581,26559,26480,30620,26554,27273,27560,27563,26668,27702,26930,27260,27169,27313,27533,35791,26870,26897,26534,26584,26829,26791,26426,26864,26403,27106,27463,27616,26425,27706,26581,26559,26480,26596,30620,26554,27168,27341,27273,27560,27563,26668,26457,26782,27702,27210,&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; }