function addMarkers(){ mySelect = document.getElementById('selection'); Carrollton = [];Amarillo = [];Humble = [];Austin = [];Colleyville = [];Houston = [];Cedar_Park = [];San_Antonio = [];Corinth = [];Rockwall = [];Sugar_Land = [];Fort_Worth = [];Greenville = [];Pearland = [];Beaumont = [];El_Paso = [];Longview = [];Bellaire = [];Odessa = [];Rockport = [];Nederland = [];Pasadena = [];Huntsville = [];Dallas = [];mySelect.options[mySelect.options.length] = new Option("Amarillo schools",'all=Amarillo'); mySelect.options[mySelect.options.length] = new Option("Austin schools",'all=Austin'); mySelect.options[mySelect.options.length] = new Option("Beaumont schools",'all=Beaumont'); mySelect.options[mySelect.options.length] = new Option("Bellaire schools",'all=Bellaire'); mySelect.options[mySelect.options.length] = new Option("Carrollton schools",'all=Carrollton'); mySelect.options[mySelect.options.length] = new Option("Cedar Park schools",'all=Cedar_Park'); mySelect.options[mySelect.options.length] = new Option("Colleyville schools",'all=Colleyville'); mySelect.options[mySelect.options.length] = new Option("Corinth schools",'all=Corinth'); 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("Fort Worth schools",'all=Fort_Worth'); mySelect.options[mySelect.options.length] = new Option("Greenville schools",'all=Greenville'); 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("Huntsville schools",'all=Huntsville'); mySelect.options[mySelect.options.length] = new Option("Longview schools",'all=Longview'); mySelect.options[mySelect.options.length] = new Option("Nederland schools",'all=Nederland'); mySelect.options[mySelect.options.length] = new Option("Odessa schools",'all=Odessa'); mySelect.options[mySelect.options.length] = new Option("Pasadena schools",'all=Pasadena'); mySelect.options[mySelect.options.length] = new Option("Pearland schools",'all=Pearland'); mySelect.options[mySelect.options.length] = new Option("Rockport schools",'all=Rockport'); mySelect.options[mySelect.options.length] = new Option("Rockwall schools",'all=Rockwall'); mySelect.options[mySelect.options.length] = new Option("San Antonio schools",'all=San_Antonio'); mySelect.options[mySelect.options.length] = new Option("Sugar Land schools",'all=Sugar_Land'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Carrollton[Carrollton.length] = createMarker(new GPoint(-96.91237200,32.96684500),"
A Childs Garden Montessori School
1935 Old Denton Road
Carrollton, TX 75006
Co-ed school, NS-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("A Childs Garden Montessori School",'Carrollton=' + Carrollton.length); Amarillo[Amarillo.length] = createMarker(new GPoint(-101.85756700,35.17270100),"
Amarillo Montessori Academy
3806 Bowie Street
Amarillo, TX 79110
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Amarillo Montessori Academy",'Amarillo=' + Amarillo.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); Houston[Houston.length] = createMarker(new GPoint(-95.36097300,29.75996800),"
Cathedral House Montessori School
1112 Prairie Street
Houston, TX 77002
Co-ed school, K-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Cathedral House Montessori School",'Houston=' + Houston.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); Corinth[Corinth.length] = createMarker(new GPoint(-97.07728000,33.15739500),"
Corinth Montessori School
1300 E Pecan Creek Circle
Corinth, TX 76210
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Corinth Montessori School",'Corinth=' + Corinth.length); Rockwall[Rockwall.length] = createMarker(new GPoint(-96.44996300,32.90512400),"
Country Day Montessori School
2305 Plaza Drive
Rockwall, TX 75032
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Country Day Montessori School",'Rockwall=' + Rockwall.length); Sugar_Land[Sugar_Land.length] = createMarker(new GPoint(-95.59371800,29.59344800),"
First Colony Montessori
2229 Settlers Way Blvd
Sugar Land, TX 77478
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("First Colony Montessori",'Sugar_Land=' + Sugar_Land.length); Sugar_Land[Sugar_Land.length] = createMarker(new GPoint(-95.60496100,29.59135200),"
First Colony Montessori South
2511 Williams Trace Blvd
Sugar Land, TX 77479
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("First Colony Montessori South",'Sugar_Land=' + Sugar_Land.length); Fort_Worth[Fort_Worth.length] = createMarker(new GPoint(-97.40136100,32.64217100),"
Fort Worth Montessori School
7148 Trail Lake Drive
Fort Worth, TX 76123
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Fort Worth Montessori School",'Fort_Worth=' + Fort_Worth.length); San_Antonio[San_Antonio.length] = createMarker(new GPoint(-98.49962200,29.44931800),"
Kriterion Montessori School
611 West Ashby Place
San Antonio, TX 78212
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Kriterion Montessori School",'San_Antonio=' + San_Antonio.length); Greenville[Greenville.length] = createMarker(new GPoint(-96.23508700,32.92392300),"
Lakeland Academy
4271 CR 2546
Greenville, TX 75474
Co-ed school, PK-7
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lakeland Academy",'Greenville=' + Greenville.length); Houston[Houston.length] = createMarker(new GPoint(-95.60600300,29.99636300),"
Lakewood Montessori School
12127 Malcomson Road
Houston, TX 77070
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lakewood Montessori School",'Houston=' + Houston.length); Austin[Austin.length] = createMarker(new GPoint(-97.74791000,30.24711600),"
Montessori House Of Children
1601 Brackenridge Street
Austin, TX 78704
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Montessori House Of Children",'Austin=' + Austin.length); Houston[Houston.length] = createMarker(new GPoint(-95.53174800,29.77423300),"
Montessori Morning Glory School
737 Bunker Hill Road
Houston, TX 77024
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Montessori Morning Glory School",'Houston=' + Houston.length); Pearland[Pearland.length] = createMarker(new GPoint(-95.28371600,29.56878000),"
Montessori School Of Dt
2121 Grand Blvd
Pearland, TX 77581
Co-ed school, PK-1
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Montessori School Of Dt",'Pearland=' + Pearland.length); Beaumont[Beaumont.length] = createMarker(new GPoint(-94.13051600,30.10162900),"
The Montessori School On 11th Street
2510c N 11th Street
Beaumont, TX 77703
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Montessori School On 11th Street",'Beaumont=' + Beaumont.length); Sugar_Land[Sugar_Land.length] = createMarker(new GPoint(-95.60708100,29.65307500),"
New Southwest Montessori Center
12707 Alston Road
Sugar Land, TX 77478
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("New Southwest Montessori Center",'Sugar_Land=' + Sugar_Land.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); Longview[Longview.length] = createMarker(new GPoint(-94.77006100,32.53626300),"
Oak Forest Montessori School
2000 Greenleaf Street
Longview, TX 75605
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Oak Forest Montessori School",'Longview=' + Longview.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); Odessa[Odessa.length] = createMarker(new GPoint(-102.35852000,31.88830100),"
Rainey School Of Montessori
1811 E 42nd Street
Odessa, TX 79762
Co-ed school, PK-4
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Rainey School Of Montessori",'Odessa=' + Odessa.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); Rockport[Rockport.length] = createMarker(new GPoint(-97.05368300,28.02379800),"
Sacred Heart School
111 N Church Street
Rockport, TX 78382
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sacred Heart School",'Rockport=' + Rockport.length); Houston[Houston.length] = createMarker(new GPoint(-95.40756300,29.70142600),"
Saint Nicholas School, II
1920 N. Braeswood
Houston, TX 77030
Co-ed school, NS-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Saint Nicholas School, II",'Houston=' + Houston.length); Houston[Houston.length] = createMarker(new GPoint(-95.63443000,29.90269400),"
Sand Castle Montessori Academy
15226 West Road
Houston, TX 77095
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sand Castle Montessori Academy",'Houston=' + Houston.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); Pasadena[Pasadena.length] = createMarker(new GPoint(-95.15298900,29.68996300),"
Small Planet Montessori
3902 San Augustine Avenue
Pasadena, TX 77503
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Small Planet Montessori",'Pasadena=' + Pasadena.length); Houston[Houston.length] = createMarker(new GPoint(-95.40761300,29.70165100),"
St Nicholas Schools
1920 N Braeswood Blvd
Houston, TX 77030
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Nicholas Schools",'Houston=' + Houston.length); Huntsville[Huntsville.length] = createMarker(new GPoint(-95.54023900,30.70027600),"
Tomorrow S Promise
2817 Old Houston Road
Huntsville, TX 77340
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Tomorrow S Promise",'Huntsville=' + Huntsville.length); Houston[Houston.length] = createMarker(new GPoint(-95.41350100,29.72543000),"
The Village Montessori School
2329 Bissonnet Street
Houston, TX 77005
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Village Montessori School",'Houston=' + Houston.length); Houston[Houston.length] = createMarker(new GPoint(-95.64347300,29.89215400),"
West Montessori School Of Copperfield
15810 Longenbaugh Drive
Houston, TX 77095
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("West Montessori School Of Copperfield",'Houston=' + Houston.length); Dallas[Dallas.length] = createMarker(new GPoint(-96.68841000,32.82186500),"
White Rock Montessori School
1601 Oates Drive
Dallas, TX 75228
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("White Rock Montessori School",'Dallas=' + Dallas.length); map.removeOverlays(Amarillo); map.removeOverlays(Austin); map.removeOverlays(Beaumont); map.removeOverlays(Bellaire); map.removeOverlays(Carrollton); map.removeOverlays(Cedar_Park); map.removeOverlays(Colleyville); map.removeOverlays(Corinth); map.removeOverlays(Dallas); map.removeOverlays(El_Paso); map.removeOverlays(Fort_Worth); map.removeOverlays(Greenville); map.removeOverlays(Houston); map.removeOverlays(Humble); map.removeOverlays(Huntsville); map.removeOverlays(Longview); map.removeOverlays(Nederland); map.removeOverlays(Odessa); map.removeOverlays(Pasadena); map.removeOverlays(Pearland); map.removeOverlays(Rockport); map.removeOverlays(Rockwall); map.removeOverlays(San_Antonio); map.removeOverlays(Sugar_Land); setTimeout(function(){map.addOverlays(Amarillo)},1000); setTimeout(function(){map.addOverlays(Austin)},1000); setTimeout(function(){map.addOverlays(Beaumont)},1000); setTimeout(function(){map.addOverlays(Bellaire)},1000); setTimeout(function(){map.addOverlays(Carrollton)},1000); setTimeout(function(){map.addOverlays(Cedar_Park)},1000); setTimeout(function(){map.addOverlays(Colleyville)},1000); setTimeout(function(){map.addOverlays(Corinth)},1000); setTimeout(function(){map.addOverlays(Dallas)},1000); setTimeout(function(){map.addOverlays(El_Paso)},1000); setTimeout(function(){map.addOverlays(Fort_Worth)},1000); setTimeout(function(){map.addOverlays(Greenville)},1000); setTimeout(function(){map.addOverlays(Houston)},1000); setTimeout(function(){map.addOverlays(Humble)},1000); setTimeout(function(){map.addOverlays(Huntsville)},1000); setTimeout(function(){map.addOverlays(Longview)},1000); setTimeout(function(){map.addOverlays(Nederland)},1000); setTimeout(function(){map.addOverlays(Odessa)},1000); setTimeout(function(){map.addOverlays(Pasadena)},1000); setTimeout(function(){map.addOverlays(Pearland)},1000); setTimeout(function(){map.addOverlays(Rockport)},1000); setTimeout(function(){map.addOverlays(Rockwall)},1000); setTimeout(function(){map.addOverlays(San_Antonio)},1000); setTimeout(function(){map.addOverlays(Sugar_Land)},1000); maxLng = -93.98014600; maxLat = 35.17270100; minLng = -106.33192600; minLat = 28.02379800; 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(Amarillo); map.removeOverlays(Austin); map.removeOverlays(Beaumont); map.removeOverlays(Bellaire); map.removeOverlays(Carrollton); map.removeOverlays(Cedar_Park); map.removeOverlays(Colleyville); map.removeOverlays(Corinth); map.removeOverlays(Dallas); map.removeOverlays(El_Paso); map.removeOverlays(Fort_Worth); map.removeOverlays(Greenville); map.removeOverlays(Houston); map.removeOverlays(Humble); map.removeOverlays(Huntsville); map.removeOverlays(Longview); map.removeOverlays(Nederland); map.removeOverlays(Odessa); map.removeOverlays(Pasadena); map.removeOverlays(Pearland); map.removeOverlays(Rockport); map.removeOverlays(Rockwall); map.removeOverlays(San_Antonio); map.removeOverlays(Sugar_Land); 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(Carrollton);map.removeOverlays(Amarillo); map.removeOverlays(Austin); map.removeOverlays(Beaumont); map.removeOverlays(Bellaire); map.removeOverlays(Carrollton); map.removeOverlays(Cedar_Park); map.removeOverlays(Colleyville); map.removeOverlays(Corinth); map.removeOverlays(Dallas); map.removeOverlays(El_Paso); map.removeOverlays(Fort_Worth); map.removeOverlays(Greenville); map.removeOverlays(Houston); map.removeOverlays(Humble); map.removeOverlays(Huntsville); map.removeOverlays(Longview); map.removeOverlays(Nederland); map.removeOverlays(Odessa); map.removeOverlays(Pasadena); map.removeOverlays(Pearland); map.removeOverlays(Rockport); map.removeOverlays(Rockwall); map.removeOverlays(San_Antonio); map.removeOverlays(Sugar_Land); map.addOverlays(Amarillo); centerByArray(Amarillo, false, false); cntMarker += Amarillo.length; map.addOverlays(Austin); centerByArray(Austin, false, false); cntMarker += Austin.length; map.addOverlays(Beaumont); centerByArray(Beaumont, false, false); cntMarker += Beaumont.length; map.addOverlays(Bellaire); centerByArray(Bellaire, false, false); cntMarker += Bellaire.length; map.addOverlays(Carrollton); centerByArray(Carrollton, false, false); cntMarker += Carrollton.length; map.addOverlays(Cedar_Park); centerByArray(Cedar_Park, false, false); cntMarker += Cedar_Park.length; map.addOverlays(Colleyville); centerByArray(Colleyville, false, false); cntMarker += Colleyville.length; map.addOverlays(Corinth); centerByArray(Corinth, false, false); cntMarker += Corinth.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(Fort_Worth); centerByArray(Fort_Worth, false, false); cntMarker += Fort_Worth.length; map.addOverlays(Greenville); centerByArray(Greenville, false, false); cntMarker += Greenville.length; map.addOverlays(Houston); centerByArray(Houston, false, false); cntMarker += Houston.length; map.addOverlays(Humble); centerByArray(Humble, false, false); cntMarker += Humble.length; map.addOverlays(Huntsville); centerByArray(Huntsville, false, false); cntMarker += Huntsville.length; map.addOverlays(Longview); centerByArray(Longview, false, false); cntMarker += Longview.length; map.addOverlays(Nederland); centerByArray(Nederland, false, false); cntMarker += Nederland.length; map.addOverlays(Odessa); centerByArray(Odessa, false, false); cntMarker += Odessa.length; map.addOverlays(Pasadena); centerByArray(Pasadena, false, false); cntMarker += Pasadena.length; map.addOverlays(Pearland); centerByArray(Pearland, false, false); cntMarker += Pearland.length; map.addOverlays(Rockport); centerByArray(Rockport, false, false); cntMarker += Rockport.length; map.addOverlays(Rockwall); centerByArray(Rockwall, false, false); cntMarker += Rockwall.length; map.addOverlays(San_Antonio); centerByArray(San_Antonio, false, false); cntMarker += San_Antonio.length; map.addOverlays(Sugar_Land); centerByArray(Sugar_Land, false, false); cntMarker += Sugar_Land.length; centerByArray(Carrollton,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,27256,26510,26537,27080,34813,34812,26469,34808,26546,34807,27693,26742,34809,34810,26550,26616,26433,34811,27225,27256,26450,36191,27605,27681,34806,27612,27133,27277,34814,26414,27086,27248,26703,26632,26987,34804,34805,27115,/all'); //window.open('/map.php?type=2&schools=26537,27256,26510,26537,27080,34813,34812,26469,34808,26546,34807,27693,26742,34809,34810,26550,26616,26433,34811,27225,27256,26450,36191,27605,27681,34806,27612,27133,27277,34814,26414,27086,27248,26703,26632,26987,34804,34805,27115,&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; }