function addMarkers(){ mySelect = document.getElementById('selection'); Raleigh = [];Cary = [];Zebulon = [];Fuquay_Varina = [];Garner = [];Wake_Forest = [];Fuquay_varina = [];Holly_Springs = [];Apex = [];mySelect.options[mySelect.options.length] = new Option("Apex schools",'all=Apex'); mySelect.options[mySelect.options.length] = new Option("Cary schools",'all=Cary'); mySelect.options[mySelect.options.length] = new Option("Fuquay Varina schools",'all=Fuquay_Varina'); mySelect.options[mySelect.options.length] = new Option("Fuquay varina schools",'all=Fuquay_varina'); mySelect.options[mySelect.options.length] = new Option("Garner schools",'all=Garner'); mySelect.options[mySelect.options.length] = new Option("Holly Springs schools",'all=Holly_Springs'); mySelect.options[mySelect.options.length] = new Option("Raleigh schools",'all=Raleigh'); mySelect.options[mySelect.options.length] = new Option("Wake Forest schools",'all=Wake_Forest'); mySelect.options[mySelect.options.length] = new Option("Zebulon schools",'all=Zebulon'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Raleigh[Raleigh.length] = createMarker(new GPoint(-78.72126700,35.74860400),"
Adventist Christian Academy
4805 Dillard Drive
Raleigh, NC 27606
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Adventist Christian Academy",'Raleigh=' + Raleigh.length); Raleigh[Raleigh.length] = createMarker(new GPoint(-78.69127500,35.78928100),"
Al-iman School
3020 Ligon Street
Raleigh, NC 27607
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Al-iman School",'Raleigh=' + Raleigh.length); Raleigh[Raleigh.length] = createMarker(new GPoint(-78.56655200,35.85621800),"
Body Of Christ Christian Academy
4501 Spring Forest Road
Raleigh, NC 27616
Co-ed school, K-2
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Body Of Christ Christian Academy",'Raleigh=' + Raleigh.length); Raleigh[Raleigh.length] = createMarker(new GPoint(-78.68153000,35.87109800),"
Bonner Academy
6216 Hunter Street
Raleigh, NC 27612
Co-ed school, -
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bonner Academy",'Raleigh=' + Raleigh.length); Cary[Cary.length] = createMarker(new GPoint(-78.77128600,35.81938800),"
Cary Academy
1500 N Harrison Avenue
Cary, NC 27513
Co-ed school, 6-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Cary Academy",'Cary=' + Cary.length); Cary[Cary.length] = createMarker(new GPoint(-78.80643700,35.77476300),"
Cary Christian School
1330 Old Apex Road
Cary, NC 27513
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Cary Christian School",'Cary=' + Cary.length); Raleigh[Raleigh.length] = createMarker(new GPoint(-78.64192500,35.78063700),"
Cathedral School
204 Hillsborough Street
Raleigh, NC 27603
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Cathedral School",'Raleigh=' + Raleigh.length); Raleigh[Raleigh.length] = createMarker(new GPoint(-78.66596900,35.90231600),"
Chesterbrook Academy
10200 Strickland Road
Raleigh, NC 27615
Co-ed school, PK-2
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Chesterbrook Academy",'Raleigh=' + Raleigh.length); Cary[Cary.length] = createMarker(new GPoint(-78.83825400,35.78292800),"
Chesterbrook Academy
130 Towne Village Drive
Cary, NC 27513
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Chesterbrook Academy",'Cary=' + Cary.length); Raleigh[Raleigh.length] = createMarker(new GPoint(-78.61833500,35.80533000),"
Faith Lutheran School
1809 Capital Blvd
Raleigh, NC 27604
Co-ed school, K-9
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Faith Lutheran School",'Raleigh=' + Raleigh.length); Raleigh[Raleigh.length] = createMarker(new GPoint(-78.63134200,35.85647100),"
The Fletcher Academy
400 Cedarview Court
Raleigh, NC 27609
Co-ed school, 1-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Fletcher Academy",'Raleigh=' + Raleigh.length); Raleigh[Raleigh.length] = createMarker(new GPoint(-78.68760300,35.80356300),"
Follow The Child Montessori School
1215 Ridge Road
Raleigh, NC 27607
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Follow The Child Montessori School",'Raleigh=' + Raleigh.length); Raleigh[Raleigh.length] = createMarker(new GPoint(-78.69430000,35.87280000),"
The Franciscan School
10000 Saint Francis Drive
Raleigh, NC 27613
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Franciscan School",'Raleigh=' + Raleigh.length); Raleigh[Raleigh.length] = createMarker(new GPoint(-78.61576900,35.85699500),"
Friendship Christian School
5510 Falls Of Neuse Road
Raleigh, NC 27609
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Friendship Christian School",'Raleigh=' + Raleigh.length); Raleigh[Raleigh.length] = createMarker(new GPoint(-78.61382600,35.74480300),"
Gethsemane Sda School
2523 Sanderford Road
Raleigh, NC 27610
Co-ed school, K-7
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Gethsemane Sda School",'Raleigh=' + Raleigh.length); Raleigh[Raleigh.length] = createMarker(new GPoint(-78.73773400,35.77213200),"
Grace Christian School
801 Buck Jones Road
Raleigh, NC 27606
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Grace Christian School",'Raleigh=' + Raleigh.length); Raleigh[Raleigh.length] = createMarker(new GPoint(-78.53180000,35.97190000),"
The Growing Child
260 Horizon Drive
Raleigh, NC 27587
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Growing Child",'Raleigh=' + Raleigh.length); Cary[Cary.length] = createMarker(new GPoint(-78.78002800,35.78101700),"
Heartwood Montessori School
112 Byrum St.
Cary, NC 27511
Co-ed school, NS-9
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Heartwood Montessori School",'Cary=' + Cary.length); Zebulon[Zebulon.length] = createMarker(new GPoint(-78.32714700,35.81733300),"
Heritage Christian Academy
615 Mack Todd Road
Zebulon, NC 27597
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Heritage Christian Academy",'Zebulon=' + Zebulon.length); Raleigh[Raleigh.length] = createMarker(new GPoint(-78.62687000,35.88491900),"
Hillel Day School
7400 Falls Of Neuse Rd
Raleigh, NC 27615
Co-ed school, PK-7
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Hillel Day School",'Raleigh=' + Raleigh.length); Fuquay_Varina[Fuquay_Varina.length] = createMarker(new GPoint(-78.72071700,35.62704500),"
Hilltop Christian School
10212 Fayetteville Rd
Fuquay Varina, NC 27526
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Hilltop Christian School",'Fuquay_Varina=' + Fuquay_Varina.length); Cary[Cary.length] = createMarker(new GPoint(-78.80977400,35.81294200),"
Hopewell Academy
1001 Sheldon Drive
Cary, NC 27513
Co-ed school, 4-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Hopewell Academy",'Cary=' + Cary.length); Cary[Cary.length] = createMarker(new GPoint(-78.75109500,35.75303500),"
Little Treasures School
2117 Piney Plains Road
Cary, NC 27511
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Little Treasures School",'Cary=' + Cary.length); Garner[Garner.length] = createMarker(new GPoint(-78.62506700,35.67670800),"
Lord Of Life Preschool & Kindergarten
2100 Buffaloe Road
Garner, NC 27529
Co-ed school, PK-1
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lord Of Life Preschool & Kindergarten",'Garner=' + Garner.length); Raleigh[Raleigh.length] = createMarker(new GPoint(-78.60949500,35.78353700),"
Love Christian Ctr. Academy
410 Lord Berkley Rd.
Raleigh, NC 27610
Co-ed school, KG-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Love Christian Ctr. Academy",'Raleigh=' + Raleigh.length); Cary[Cary.length] = createMarker(new GPoint(-78.79875800,35.82776000),"
Lucy Daniels Center For Early Childhood
9003 Weston Parkway
Cary, NC 27513
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lucy Daniels Center For Early Childhood",'Cary=' + Cary.length); Wake_Forest[Wake_Forest.length] = createMarker(new GPoint(-78.50196000,35.98937700),"
Montessori Children's House Of Wake Forest
802 Mill Street
Wake Forest, NC 27587
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Montessori Children's House Of Wake Forest",'Wake_Forest=' + Wake_Forest.length); Raleigh[Raleigh.length] = createMarker(new GPoint(-78.63217500,35.79090700),"
Montessori Comm Children's Hou
824 N. Bloodworth Street
Raleigh, NC 27604
Co-ed school, Ungraded
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Montessori Comm Children's Hou",'Raleigh=' + Raleigh.length); Raleigh[Raleigh.length] = createMarker(new GPoint(-78.66180400,35.87633800),"
Montessori School Of Raleigh
7005 Lead Mine Road
Raleigh, NC 27615
Co-ed school, PK-9
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Montessori School Of Raleigh",'Raleigh=' + Raleigh.length); Fuquay_varina[Fuquay_varina.length] = createMarker(new GPoint(-78.80808700,35.52689500),"
Montessori World
25 Buttonwood Court
Fuquay-varina, NC 27526
Co-ed school, NS-NS
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Montessori World",'Fuquay_varina=' + Fuquay_varina.length); Raleigh[Raleigh.length] = createMarker(new GPoint(-78.55823300,35.89757500),"
Neuse Baptist Christian School
8700 Capital Blvd
Raleigh, NC 27616
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Neuse Baptist Christian School",'Raleigh=' + Raleigh.length); Holly_Springs[Holly_Springs.length] = createMarker(new GPoint(-78.78932700,35.65499300),"
The New School, A Montessori Center For Children
5617 Sunset Lake Road
Holly Springs, NC 27540
Co-ed school, NS-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The New School, A Montessori Center For Children",'Holly_Springs=' + Holly_Springs.length); Raleigh[Raleigh.length] = createMarker(new GPoint(-78.54539000,35.87903600),"
North Raleigh Christian Academy
7300 Perry Creek Road
Raleigh, NC 27616
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("North Raleigh Christian Academy",'Raleigh=' + Raleigh.length); Raleigh[Raleigh.length] = createMarker(new GPoint(-78.63449700,35.81871800),"
Our Lady Of Lourdes Elementary School
2710 Overbrook Drive
Raleigh, NC 27608
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Our Lady Of Lourdes Elementary School",'Raleigh=' + Raleigh.length); Cary[Cary.length] = createMarker(new GPoint(-78.78750200,35.71820200),"
Paideia Academy
200 Dancers Pointe Ln
Cary, NC 27511
Co-ed school, KG-7
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Paideia Academy",'Cary=' + Cary.length); Raleigh[Raleigh.length] = createMarker(new GPoint(-78.53233000,35.82686300),"
Raleigh Chr Community School
7000 Destiny Dr
Raleigh, NC 27604
school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Raleigh Chr Community School",'Raleigh=' + Raleigh.length); Raleigh[Raleigh.length] = createMarker(new GPoint(-78.57713000,35.80919100),"
Raleigh Christian Academy
2110 Trawick Road
Raleigh, NC 27604
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Raleigh Christian Academy",'Raleigh=' + Raleigh.length); Raleigh[Raleigh.length] = createMarker(new GPoint(-78.72520600,35.79648100),"
The Raleigh School
1141 Raleigh School Drive
Raleigh, NC 27607
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Raleigh School",'Raleigh=' + Raleigh.length); Raleigh[Raleigh.length] = createMarker(new GPoint(-78.62713900,35.88467500),"
Ravenscroft School
7409 Falls Of Neuse Rd
Raleigh, NC 27615
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ravenscroft School",'Raleigh=' + Raleigh.length); Cary[Cary.length] = createMarker(new GPoint(-78.77746800,35.72943600),"
Resurrection Lutheran School
100 Lochmere Drive West
Cary, NC 27518
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Resurrection Lutheran School",'Cary=' + Cary.length); Wake_Forest[Wake_Forest.length] = createMarker(new GPoint(-78.52307600,35.97343800),"
St. Catherine Of Siena Catholic
520 West Holding Ave
Wake Forest, NC 27587
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Catherine Of Siena Catholic",'Wake_Forest=' + Wake_Forest.length); Raleigh[Raleigh.length] = createMarker(new GPoint(-78.64922700,35.82250200),"
St. Davids School
3400 White Oak Rd
Raleigh, NC 27609
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Davids School",'Raleigh=' + Raleigh.length); Cary[Cary.length] = createMarker(new GPoint(-78.82222300,35.78604000),"
St. Michael The Archangel School
810 High House Road
Cary, NC 27513
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Michael The Archangel School",'Cary=' + Cary.length); Raleigh[Raleigh.length] = createMarker(new GPoint(-78.61922900,35.86106400),"
St. Raphael Catholic School
5815 Fall Of Neuse Rd
Raleigh, NC 27609
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Raphael Catholic School",'Raleigh=' + Raleigh.length); Raleigh[Raleigh.length] = createMarker(new GPoint(-78.63281600,35.84609200),"
St. Timothys School
4523 Six Forks Road
Raleigh, NC 27609
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Timothys School",'Raleigh=' + Raleigh.length); Apex[Apex.length] = createMarker(new GPoint(-78.87549300,35.72411900),"
St Mary Magdalene Catholic School
625 Magdala Place
Apex, NC 27502
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Mary Magdalene Catholic School",'Apex=' + Apex.length); Raleigh[Raleigh.length] = createMarker(new GPoint(-78.62658700,35.88393000),"
St Philip Lutheran Preschool
7304 Falls Of Neuse Road
Raleigh, NC 27615
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Philip Lutheran Preschool",'Raleigh=' + Raleigh.length); Raleigh[Raleigh.length] = createMarker(new GPoint(-78.62201800,35.90176700),"
Stevens Prep Academy
901 Oak Creek Road
Raleigh, NC 27615
Co-ed school, 3-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Stevens Prep Academy",'Raleigh=' + Raleigh.length); Raleigh[Raleigh.length] = createMarker(new GPoint(-78.63323000,35.82943100),"
The Trilogy School
3810 Merton Drive
Raleigh, NC 27609
Co-ed school, 2-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Trilogy School",'Raleigh=' + Raleigh.length); Raleigh[Raleigh.length] = createMarker(new GPoint(-78.69597200,35.91105100),"
Trinity Academy Of Raleigh
10224 Baileywick Road
Raleigh, NC 27613
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Trinity Academy Of Raleigh",'Raleigh=' + Raleigh.length); Raleigh[Raleigh.length] = createMarker(new GPoint(-105.01343500,39.85920900),"
Upper Room Christian Academy
3330 Idlewood Village Drive
Raleigh, NC 27610
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Upper Room Christian Academy",'Raleigh=' + Raleigh.length); Raleigh[Raleigh.length] = createMarker(new GPoint(-78.68863900,35.79125700),"
Vital Link Is Cross Link
608 Royal Street
Raleigh, NC 27607
school, PK-10
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Vital Link Is Cross Link",'Raleigh=' + Raleigh.length); Raleigh[Raleigh.length] = createMarker(new GPoint(-78.66888900,35.70443900),"
Wake Christian Academy
5500 Wake Academy Drive
Raleigh, NC 27603
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Wake Christian Academy",'Raleigh=' + Raleigh.length); Raleigh[Raleigh.length] = createMarker(new GPoint(-78.63880000,35.77190000),"
Word Of God Christian Academy
Po Box 14408
Raleigh, NC 27620
Co-ed school, NS-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Word Of God Christian Academy",'Raleigh=' + Raleigh.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(Apex); map.removeOverlays(Cary); map.removeOverlays(Fuquay_Varina); map.removeOverlays(Fuquay_varina); map.removeOverlays(Garner); map.removeOverlays(Holly_Springs); map.removeOverlays(Raleigh); map.removeOverlays(Wake_Forest); map.removeOverlays(Zebulon); 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(Raleigh);map.removeOverlays(Apex); map.removeOverlays(Cary); map.removeOverlays(Fuquay_Varina); map.removeOverlays(Fuquay_varina); map.removeOverlays(Garner); map.removeOverlays(Holly_Springs); map.removeOverlays(Raleigh); map.removeOverlays(Wake_Forest); map.removeOverlays(Zebulon); map.addOverlays(Apex); centerByArray(Apex, false, false); cntMarker += Apex.length; map.addOverlays(Cary); centerByArray(Cary, false, false); cntMarker += Cary.length; map.addOverlays(Fuquay_Varina); centerByArray(Fuquay_Varina, false, false); cntMarker += Fuquay_Varina.length; map.addOverlays(Fuquay_varina); centerByArray(Fuquay_varina, false, false); cntMarker += Fuquay_varina.length; map.addOverlays(Garner); centerByArray(Garner, false, false); cntMarker += Garner.length; map.addOverlays(Holly_Springs); centerByArray(Holly_Springs, false, false); cntMarker += Holly_Springs.length; map.addOverlays(Raleigh); centerByArray(Raleigh, false, false); cntMarker += Raleigh.length; map.addOverlays(Wake_Forest); centerByArray(Wake_Forest, false, false); cntMarker += Wake_Forest.length; map.addOverlays(Zebulon); centerByArray(Zebulon, false, false); cntMarker += Zebulon.length; centerByArray(Raleigh,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; }