function addMarkers(){ mySelect = document.getElementById('selection'); College_Station = [];Alpine = [];Humble = [];Austin = [];Colleyville = [];Houston = [];Flower_Mound = [];Cedar_Park = [];San_Antonio = [];Southlake = [];Georgetown = [];Cypress = [];Mount_Pleasant = [];El_Paso = [];Pflugerville = [];Kingwood = [];Bellaire = [];Dallas = [];Nederland = [];Port_Arthur = [];Harker_Heights = [];Spicewood = [];Farmers_Branch = [];mySelect.options[mySelect.options.length] = new Option("Alpine schools",'all=Alpine'); mySelect.options[mySelect.options.length] = new Option("Austin schools",'all=Austin'); mySelect.options[mySelect.options.length] = new Option("Bellaire schools",'all=Bellaire'); mySelect.options[mySelect.options.length] = new Option("Cedar Park schools",'all=Cedar_Park'); mySelect.options[mySelect.options.length] = new Option("College Station schools",'all=College_Station'); mySelect.options[mySelect.options.length] = new Option("Colleyville schools",'all=Colleyville'); mySelect.options[mySelect.options.length] = new Option("Cypress schools",'all=Cypress'); 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("Farmers Branch schools",'all=Farmers_Branch'); mySelect.options[mySelect.options.length] = new Option("Flower Mound schools",'all=Flower_Mound'); mySelect.options[mySelect.options.length] = new Option("Georgetown schools",'all=Georgetown'); mySelect.options[mySelect.options.length] = new Option("Harker Heights schools",'all=Harker_Heights'); 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("Kingwood schools",'all=Kingwood'); mySelect.options[mySelect.options.length] = new Option("Mount Pleasant schools",'all=Mount_Pleasant'); mySelect.options[mySelect.options.length] = new Option("Nederland schools",'all=Nederland'); mySelect.options[mySelect.options.length] = new Option("Pflugerville schools",'all=Pflugerville'); mySelect.options[mySelect.options.length] = new Option("Port Arthur schools",'all=Port_Arthur'); mySelect.options[mySelect.options.length] = new Option("San Antonio schools",'all=San_Antonio'); mySelect.options[mySelect.options.length] = new Option("Southlake schools",'all=Southlake'); mySelect.options[mySelect.options.length] = new Option("Spicewood schools",'all=Spicewood'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); College_Station[College_Station.length] = createMarker(new GPoint(-96.28930000,30.57460000),"
Aggieland Country School
1500 Quail Run
College Station, TX 77845
Co-ed school, PK-4
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Aggieland Country School",'College_Station=' + College_Station.length); Alpine[Alpine.length] = createMarker(new GPoint(-103.66515700,30.36427100),"
Alpine Montessori School
908 N 6th Street
Alpine, TX 79830
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Alpine Montessori School",'Alpine=' + Alpine.length); Humble[Humble.length] = createMarker(new GPoint(-95.16226600,29.99931600),"
Atascocita Montessori School
19120 W Lake Houston Parkway
Humble, TX 77346
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Atascocita Montessori School",'Humble=' + Humble.length); Austin[Austin.length] = createMarker(new GPoint(-97.80486200,30.22769300),"
Austin Montessori School
5006 Sunset Trail
Austin, TX 78745
Co-ed school, PK-9
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Austin Montessori School",'Austin=' + Austin.length); Colleyville[Colleyville.length] = createMarker(new GPoint(-97.14530200,32.89226300),"
The Barbara Gordon Montessori School
1513 Hall Johnson Road
Colleyville, TX 76034
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Barbara Gordon Montessori School",'Colleyville=' + Colleyville.length); Houston[Houston.length] = createMarker(new GPoint(-95.11706400,29.55116900),"
Bay Area Montessori House
17222 Mercury Drive
Houston, TX 77058
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bay Area Montessori House",'Houston=' + Houston.length); Flower_Mound[Flower_Mound.length] = createMarker(new GPoint(-97.07849200,33.03456300),"
Castle Mound Montessori
3200 Peters Colony Road
Flower Mound, TX 75022
Co-ed school, PK-3
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Castle Mound Montessori",'Flower_Mound=' + Flower_Mound.length); Cedar_Park[Cedar_Park.length] = createMarker(new GPoint(-97.82607800,30.52207100),"
Cedar Park Montessori School
400 E Whitestone Blvd
Cedar Park, TX 78613
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Cedar Park Montessori School",'Cedar_Park=' + Cedar_Park.length); San_Antonio[San_Antonio.length] = createMarker(new GPoint(-98.53974100,29.56973100),"
Child Montessori
2829 Hunters Green St.
San Antonio, TX 78231
Co-ed school, PK-3
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Child Montessori",'San_Antonio=' + San_Antonio.length); San_Antonio[San_Antonio.length] = createMarker(new GPoint(-98.58425800,29.47807000),"
Children's House & Montessori
4927 Evers Road
San Antonio, TX 78228
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Children's House & Montessori",'San_Antonio=' + San_Antonio.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); Houston[Houston.length] = createMarker(new GPoint(-95.11086500,29.57476500),"
Clear Lake Montessori
2486 Falcon Pass
Houston, TX 77062
Co-ed school, NS-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Clear Lake Montessori",'Houston=' + Houston.length); Georgetown[Georgetown.length] = createMarker(new GPoint(-97.67695900,30.61667000),"
Community Montessori School
500 Pleasant Valley Drive
Georgetown, TX 78626
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Community Montessori School",'Georgetown=' + Georgetown.length); Houston[Houston.length] = createMarker(new GPoint(-95.59595600,29.73653700),"
Innovative Montessori School
12280 Westheimer
Houston, TX 77077
Co-ed school, PK-3
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Innovative Montessori School",'Houston=' + Houston.length); Houston[Houston.length] = createMarker(new GPoint(-95.38795000,29.72806300),"
Montessori Country Day School
30 Oakdale St
Houston, TX 77006
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Montessori Country Day School",'Houston=' + Houston.length); Flower_Mound[Flower_Mound.length] = createMarker(new GPoint(-97.14195300,33.05558000),"
Montessori Country Day School
7400 Hawk Rd
Flower Mound, TX 75022
Co-ed school, PK-4
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Montessori Country Day School",'Flower_Mound=' + Flower_Mound.length); Cypress[Cypress.length] = createMarker(new GPoint(-95.61670800,29.99616300),"
Montessori-longwood
12839 Louetta Road
Cypress, TX 77429
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Montessori-longwood",'Cypress=' + Cypress.length); Mount_Pleasant[Mount_Pleasant.length] = createMarker(new GPoint(-94.97691800,33.16885600),"
Mount Pleasant Montessori School
1408 N Edwards Avenue
Mount Pleasant, TX 75455
Co-ed school, PK-4
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mount Pleasant Montessori School",'Mount_Pleasant=' + Mount_Pleasant.length); El_Paso[El_Paso.length] = createMarker(new GPoint(-106.33192600,31.79641000),"
New World Montessori School
3510 N Yarbrough Drive
El Paso, TX 79925
Co-ed school, PK-7
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("New World Montessori School",'El_Paso=' + El_Paso.length); Houston[Houston.length] = createMarker(new GPoint(-95.47012000,29.99565200),"
Northwood Montessori School
14901 Welcome Lane
Houston, TX 77014
Co-ed school, 1-1
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Northwood Montessori School",'Houston=' + Houston.length); Austin[Austin.length] = createMarker(new GPoint(-97.74270000,30.26690000),"
Parkside Community School
Po Box 3628
Austin, TX 78764
Co-ed school, PK-4
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Parkside Community School",'Austin=' + Austin.length); Pflugerville[Pflugerville.length] = createMarker(new GPoint(-97.65346000,30.44773700),"
Pflugerville Montessori School
2500 W Pecan Street
Pflugerville, TX 78660
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Pflugerville Montessori School",'Pflugerville=' + Pflugerville.length); Kingwood[Kingwood.length] = createMarker(new GPoint(-95.20139600,30.05441200),"
Pines Montessori School
3535 Cedar Knolls Drive
Kingwood, TX 77339
Co-ed school, NS-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Pines Montessori School",'Kingwood=' + Kingwood.length); Bellaire[Bellaire.length] = createMarker(new GPoint(-95.45594300,29.71388300),"
The Post Oak School
4600 Bissonnet Street
Bellaire, TX 77401
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Post Oak School",'Bellaire=' + Bellaire.length); Houston[Houston.length] = createMarker(new GPoint(-95.41530000,29.72321800),"
River Oaks Montessori
2414 Sunset Blvd
Houston, TX 77005
Co-ed school, K-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("River Oaks Montessori",'Houston=' + Houston.length); Dallas[Dallas.length] = createMarker(new GPoint(-96.79992100,32.91686300),"
St. Alcuin Montessori School
6144 Churchill Way
Dallas, TX 75230
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Alcuin Montessori School",'Dallas=' + Dallas.length); Nederland[Nederland.length] = createMarker(new GPoint(-93.98014600,29.96319200),"
The School Of Montessori
1503 S 16th Street
Nederland, TX 77627
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The School Of Montessori",'Nederland=' + Nederland.length); Houston[Houston.length] = createMarker(new GPoint(-95.48515700,29.79339100),"
School Of The Woods
1321 Wirt Road
Houston, TX 77055
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("School Of The Woods",'Houston=' + Houston.length); Houston[Houston.length] = createMarker(new GPoint(-95.21299700,29.58494600),"
Southbelt Country Meadows Mont
10904 Scarsdale Blvd 225
Houston, TX 77089
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Southbelt Country Meadows Mont",'Houston=' + Houston.length); Port_Arthur[Port_Arthur.length] = createMarker(new GPoint(-93.92129600,29.90711000),"
Sr Thea Bowman Academy
3617 Gulfway Drive
Port Arthur, TX 77642
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sr Thea Bowman Academy",'Port_Arthur=' + Port_Arthur.length); Houston[Houston.length] = createMarker(new GPoint(-95.41611200,29.68226800),"
St Catherines Montessori
2510 Westridge Street
Houston, TX 77054
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Catherines Montessori",'Houston=' + Houston.length); Austin[Austin.length] = createMarker(new GPoint(-97.68525500,30.27163100),"
St James Episcopal School
3701 East M L K Jr Blvd
Austin, TX 78721
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St James Episcopal School",'Austin=' + Austin.length); Harker_Heights[Harker_Heights.length] = createMarker(new GPoint(-97.36030600,31.08789800),"
Temple Montessori School
Po Box 2969
Harker Heights, TX 76548
Co-ed school, PK-4
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Temple Montessori School",'Harker_Heights=' + Harker_Heights.length); Spicewood[Spicewood.length] = createMarker(new GPoint(-98.06430900,30.40043000),"
Tierra Vista Montessori School
1919 Pace Bend Road S
Spicewood, TX 78669
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Tierra Vista Montessori School",'Spicewood=' + Spicewood.length); Houston[Houston.length] = createMarker(new GPoint(-95.62755500,29.75550800),"
Westside Montessori School
13555 Briar Forest Drive
Houston, TX 77077
Co-ed school, PK-3
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Westside Montessori School",'Houston=' + Houston.length); Farmers_Branch[Farmers_Branch.length] = createMarker(new GPoint(-96.88410800,32.92463700),"
Windsong Montessori School Inc
2825 Valley View 100
Farmers Branch, TX 75234
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Windsong Montessori School Inc",'Farmers_Branch=' + Farmers_Branch.length); map.removeOverlays(Alpine); map.removeOverlays(Austin); map.removeOverlays(Bellaire); map.removeOverlays(Cedar_Park); map.removeOverlays(College_Station); map.removeOverlays(Colleyville); map.removeOverlays(Cypress); map.removeOverlays(Dallas); map.removeOverlays(El_Paso); map.removeOverlays(Farmers_Branch); map.removeOverlays(Flower_Mound); map.removeOverlays(Georgetown); map.removeOverlays(Harker_Heights); map.removeOverlays(Houston); map.removeOverlays(Humble); map.removeOverlays(Kingwood); map.removeOverlays(Mount_Pleasant); map.removeOverlays(Nederland); map.removeOverlays(Pflugerville); map.removeOverlays(Port_Arthur); map.removeOverlays(San_Antonio); map.removeOverlays(Southlake); map.removeOverlays(Spicewood); setTimeout(function(){map.addOverlays(Alpine)},1000); setTimeout(function(){map.addOverlays(Austin)},1000); setTimeout(function(){map.addOverlays(Bellaire)},1000); setTimeout(function(){map.addOverlays(Cedar_Park)},1000); setTimeout(function(){map.addOverlays(College_Station)},1000); setTimeout(function(){map.addOverlays(Colleyville)},1000); setTimeout(function(){map.addOverlays(Cypress)},1000); setTimeout(function(){map.addOverlays(Dallas)},1000); setTimeout(function(){map.addOverlays(El_Paso)},1000); setTimeout(function(){map.addOverlays(Farmers_Branch)},1000); setTimeout(function(){map.addOverlays(Flower_Mound)},1000); setTimeout(function(){map.addOverlays(Georgetown)},1000); setTimeout(function(){map.addOverlays(Harker_Heights)},1000); setTimeout(function(){map.addOverlays(Houston)},1000); setTimeout(function(){map.addOverlays(Humble)},1000); setTimeout(function(){map.addOverlays(Kingwood)},1000); setTimeout(function(){map.addOverlays(Mount_Pleasant)},1000); setTimeout(function(){map.addOverlays(Nederland)},1000); setTimeout(function(){map.addOverlays(Pflugerville)},1000); setTimeout(function(){map.addOverlays(Port_Arthur)},1000); setTimeout(function(){map.addOverlays(San_Antonio)},1000); setTimeout(function(){map.addOverlays(Southlake)},1000); setTimeout(function(){map.addOverlays(Spicewood)},1000); maxLng = -93.92129600; maxLat = 33.16885600; minLng = -106.33192600; minLat = 29.47807000; 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(Alpine); map.removeOverlays(Austin); map.removeOverlays(Bellaire); map.removeOverlays(Cedar_Park); map.removeOverlays(College_Station); map.removeOverlays(Colleyville); map.removeOverlays(Cypress); map.removeOverlays(Dallas); map.removeOverlays(El_Paso); map.removeOverlays(Farmers_Branch); map.removeOverlays(Flower_Mound); map.removeOverlays(Georgetown); map.removeOverlays(Harker_Heights); map.removeOverlays(Houston); map.removeOverlays(Humble); map.removeOverlays(Kingwood); map.removeOverlays(Mount_Pleasant); map.removeOverlays(Nederland); map.removeOverlays(Pflugerville); map.removeOverlays(Port_Arthur); map.removeOverlays(San_Antonio); map.removeOverlays(Southlake); map.removeOverlays(Spicewood); 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(College_Station);map.removeOverlays(Alpine); map.removeOverlays(Austin); map.removeOverlays(Bellaire); map.removeOverlays(Cedar_Park); map.removeOverlays(College_Station); map.removeOverlays(Colleyville); map.removeOverlays(Cypress); map.removeOverlays(Dallas); map.removeOverlays(El_Paso); map.removeOverlays(Farmers_Branch); map.removeOverlays(Flower_Mound); map.removeOverlays(Georgetown); map.removeOverlays(Harker_Heights); map.removeOverlays(Houston); map.removeOverlays(Humble); map.removeOverlays(Kingwood); map.removeOverlays(Mount_Pleasant); map.removeOverlays(Nederland); map.removeOverlays(Pflugerville); map.removeOverlays(Port_Arthur); map.removeOverlays(San_Antonio); map.removeOverlays(Southlake); map.removeOverlays(Spicewood); map.addOverlays(Alpine); centerByArray(Alpine, false, false); cntMarker += Alpine.length; map.addOverlays(Austin); centerByArray(Austin, false, false); cntMarker += Austin.length; map.addOverlays(Bellaire); centerByArray(Bellaire, false, false); cntMarker += Bellaire.length; map.addOverlays(Cedar_Park); centerByArray(Cedar_Park, false, false); cntMarker += Cedar_Park.length; map.addOverlays(College_Station); centerByArray(College_Station, false, false); cntMarker += College_Station.length; map.addOverlays(Colleyville); centerByArray(Colleyville, false, false); cntMarker += Colleyville.length; map.addOverlays(Cypress); centerByArray(Cypress, false, false); cntMarker += Cypress.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(Farmers_Branch); centerByArray(Farmers_Branch, false, false); cntMarker += Farmers_Branch.length; map.addOverlays(Flower_Mound); centerByArray(Flower_Mound, false, false); cntMarker += Flower_Mound.length; map.addOverlays(Georgetown); centerByArray(Georgetown, false, false); cntMarker += Georgetown.length; map.addOverlays(Harker_Heights); centerByArray(Harker_Heights, false, false); cntMarker += Harker_Heights.length; map.addOverlays(Houston); centerByArray(Houston, false, false); cntMarker += Houston.length; map.addOverlays(Humble); centerByArray(Humble, false, false); cntMarker += Humble.length; map.addOverlays(Kingwood); centerByArray(Kingwood, false, false); cntMarker += Kingwood.length; map.addOverlays(Mount_Pleasant); centerByArray(Mount_Pleasant, false, false); cntMarker += Mount_Pleasant.length; map.addOverlays(Nederland); centerByArray(Nederland, false, false); cntMarker += Nederland.length; map.addOverlays(Pflugerville); centerByArray(Pflugerville, false, false); cntMarker += Pflugerville.length; map.addOverlays(Port_Arthur); centerByArray(Port_Arthur, false, false); cntMarker += Port_Arthur.length; map.addOverlays(San_Antonio); centerByArray(San_Antonio, false, false); cntMarker += San_Antonio.length; map.addOverlays(Southlake); centerByArray(Southlake, false, false); cntMarker += Southlake.length; map.addOverlays(Spicewood); centerByArray(Spicewood, false, false); cntMarker += Spicewood.length; centerByArray(College_Station,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///26537,27279,26668,26508,26537,27173,34689,34812,34808,26487,26546,26409,27319,26742,27697,36158,27077,34687,27553,26550,26671,26951,27078,27128,27225,27279,26446,36187,26441,34806,27187,27095,27277,34688,27312,26632,26638,26668,34690,/all'); //window.open('/map.php?type=2&schools=26537,27279,26668,26508,26537,27173,34689,34812,34808,26487,26546,26409,27319,26742,27697,36158,27077,34687,27553,26550,26671,26951,27078,27128,27225,27279,26446,36187,26441,34806,27187,27095,27277,34688,27312,26632,26638,26668,34690,&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; }