function addMarkers(){ mySelect = document.getElementById('selection'); Abbotsford = [];Appleton = [];Antigo = [];Augusta = [];Arpin = [];Ashland = [];Almena = [];Arcadia = [];Altoona = [];Athens = [];Algoma = [];Auburndale = [];Amberg = [];mySelect.options[mySelect.options.length] = new Option("Abbotsford schools",'all=Abbotsford'); mySelect.options[mySelect.options.length] = new Option("Algoma schools",'all=Algoma'); mySelect.options[mySelect.options.length] = new Option("Almena schools",'all=Almena'); mySelect.options[mySelect.options.length] = new Option("Altoona schools",'all=Altoona'); mySelect.options[mySelect.options.length] = new Option("Amberg schools",'all=Amberg'); mySelect.options[mySelect.options.length] = new Option("Antigo schools",'all=Antigo'); mySelect.options[mySelect.options.length] = new Option("Appleton schools",'all=Appleton'); mySelect.options[mySelect.options.length] = new Option("Arcadia schools",'all=Arcadia'); mySelect.options[mySelect.options.length] = new Option("Arpin schools",'all=Arpin'); mySelect.options[mySelect.options.length] = new Option("Ashland schools",'all=Ashland'); mySelect.options[mySelect.options.length] = new Option("Athens schools",'all=Athens'); mySelect.options[mySelect.options.length] = new Option("Auburndale schools",'all=Auburndale'); mySelect.options[mySelect.options.length] = new Option("Augusta schools",'all=Augusta'); Abbotsford[Abbotsford.length] = createMarker(new GPoint(-90.28458200,44.94603600),"
Abbotsford Christian Academy
4868 Cemetary Avenue
Abbotsford, WI 54405
Co-ed school, 1-12
[ View School Profile ]
",iconGr); Appleton[Appleton.length] = createMarker(new GPoint(-88.44615200,44.26777800),"
Academy Of The Fox Cities
555 N Lynndale Drive
Appleton, WI 54914
Co-ed school, PK-10
[ View School Profile ]
",iconGr); Antigo[Antigo.length] = createMarker(new GPoint(-89.14686300,45.13886300),"
All Saints Catholic School
419 6th Avenue
Antigo, WI 54409
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Appleton[Appleton.length] = createMarker(new GPoint(-88.40389900,44.27276300),"
Appleton Christian Schools
217 E Wisconsin Avenue
Appleton, WI 54911
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Augusta[Augusta.length] = createMarker(new GPoint(-91.12630000,44.70510000),"
Augusta Mennonite School
S8820 Bartig Road
Augusta, WI 54722
Co-ed school, 1-10
[ View School Profile ]
",iconGr); Arpin[Arpin.length] = createMarker(new GPoint(-90.08970600,44.53866700),"
Bethel Junior Academy
8054 Bethel Road
Arpin, WI 54410
Co-ed school, 1-7
[ View School Profile ]
",iconGr); Appleton[Appleton.length] = createMarker(new GPoint(-88.41386400,44.25953700),"
Catholic Central Elementary School
313 South State Street
Appleton, WI 54911
Co-ed school, PK-5
[ View School Profile ]
",iconGr); Ashland[Ashland.length] = createMarker(new GPoint(-90.89830000,46.59370000),"
Celebration Christian Academy
Po Box 651
Ashland, WI 54806
Co-ed school, K-12
[ View School Profile ]
",iconGr); Appleton[Appleton.length] = createMarker(new GPoint(-88.36271900,44.30177100),"
Celebration Lutheran School
3100 E Evergreen Drive
Appleton, WI 54913
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Appleton[Appleton.length] = createMarker(new GPoint(-88.41599100,44.27948200),"
Creative Child
1901 N Richmond Street
Appleton, WI 54911
Co-ed school, PK-K
[ View School Profile ]
",iconGr); Augusta[Augusta.length] = createMarker(new GPoint(-91.12630000,44.70510000),"
Forest View School
E22560 Karow Road
Augusta, WI 54722
Co-ed school, 1-8
[ View School Profile ]
",iconGr); Appleton[Appleton.length] = createMarker(new GPoint(-88.39490900,44.31864200),"
Fox Valley Lutheran High School
5300 North Meade Street
Appleton, WI 54913
Co-ed school, 9-12
[ View School Profile ]
",iconGr); Almena[Almena.length] = createMarker(new GPoint(-92.02990000,45.41420000),"
Gospel Mennonite School
1677 6 12 Street
Almena, WI 54805
Co-ed school, K-8
[ View School Profile ]
",iconGr); Arcadia[Arcadia.length] = createMarker(new GPoint(-91.49980700,44.24986600),"
Holy Family Catholic School
341 Washington Street
Arcadia, WI 54612
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Appleton[Appleton.length] = createMarker(new GPoint(-88.32995000,44.24367900),"
Holy Spirit School
W2796 County Road Kk
Appleton, WI 54915
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Appleton[Appleton.length] = createMarker(new GPoint(-88.40976000,44.29477800),"
Montessori Adventure Schools
350 W Capitol Drive
Appleton, WI 54911
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); Appleton[Appleton.length] = createMarker(new GPoint(-88.39136200,44.29113700),"
Mount Olive Lutheran School
930 E Florida Avenue
Appleton, WI 54911
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Augusta[Augusta.length] = createMarker(new GPoint(-91.10485200,44.64718300),"
Oak Ridge School
E20995 Oak Ridge Road
Augusta, WI 54722
Co-ed school, 1-8
[ View School Profile ]
",iconGr); Altoona[Altoona.length] = createMarker(new GPoint(-91.44767700,44.80065900),"
Otter Creek Christian Academy
919 10th Street W
Altoona, WI 54720
Co-ed school, 2-9
[ View School Profile ]
",iconGr); Ashland[Ashland.length] = createMarker(new GPoint(-90.88250200,46.59324300),"
Our Lady Of The Lake Catholic School
215 Lake Shore Drive E
Ashland, WI 54806
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Antigo[Antigo.length] = createMarker(new GPoint(-89.16045300,45.13625900),"
Peace Lutheran School
300 Lincoln Street
Antigo, WI 54409
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Augusta[Augusta.length] = createMarker(new GPoint(-91.13803300,44.65459400),"
Plain View School
E19355 Sieg Rd
Augusta, WI 54722
Co-ed school, 1-8
[ View School Profile ]
",iconGr); Appleton[Appleton.length] = createMarker(new GPoint(-88.40507100,44.24791700),"
Riverview Lutheran School
136 W Seymour Street
Appleton, WI 54915
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Appleton[Appleton.length] = createMarker(new GPoint(-88.37128300,44.25242900),"
St. Bernadette
2331 E Lourdes Drive
Appleton, WI 54915
Co-ed school, PK-5
[ View School Profile ]
",iconGr); Altoona[Altoona.length] = createMarker(new GPoint(-91.43935100,44.80653700),"
St. Mary's Elementary School
1828 Lynn Ave
Altoona, WI 54720
Co-ed school, PK-5
[ View School Profile ]
",iconGr); Athens[Athens.length] = createMarker(new GPoint(-90.03860000,45.03970000),"
St Anthony School
Po Box I 309 Mueller St
Athens, WI 54411
Co-ed school, K-8
[ View School Profile ]
",iconGr); Appleton[Appleton.length] = createMarker(new GPoint(-88.41507600,44.34488100),"
St Edward School
N2944 State Road 47
Appleton, WI 54913
Co-ed school, K-5
[ View School Profile ]
",iconGr); Appleton[Appleton.length] = createMarker(new GPoint(-88.40567300,44.28539900),"
St Joseph Middle School
2626 N Oneida Street
Appleton, WI 54911
Co-ed school, 6-8
[ View School Profile ]
",iconGr); Algoma[Algoma.length] = createMarker(new GPoint(-87.43330600,44.61326200),"
St Mary Elementary School
214 Church Street
Algoma, WI 54201
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Auburndale[Auburndale.length] = createMarker(new GPoint(-90.00460000,44.65060000),"
St Mary School
Po Box 177 5866 Main Street
Auburndale, WI 54412
Co-ed school, PK-6
[ View School Profile ]
",iconGr); Appleton[Appleton.length] = createMarker(new GPoint(-88.40382600,44.26476300),"
St Paul Lutheran School
225 E Harris Street
Appleton, WI 54911
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Algoma[Algoma.length] = createMarker(new GPoint(-87.44400500,44.60295300),"
St Pauls Ev Lutheran School
1115 Division Street
Algoma, WI 54201
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Appleton[Appleton.length] = createMarker(new GPoint(-88.35280300,44.33690400),"
St Peter Lutheran School
N2740 French Road
Appleton, WI 54913
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Appleton[Appleton.length] = createMarker(new GPoint(-88.41216000,44.28213400),"
St Pius X Elementary School
500 West Marquette Street
Appleton, WI 54911
Co-ed school, PK-5
[ View School Profile ]
",iconGr); Appleton[Appleton.length] = createMarker(new GPoint(-88.38674100,44.27804200),"
St Thomas More Elementary School
1810 N McDonald Street
Appleton, WI 54911
Co-ed school, PK-5
[ View School Profile ]
",iconGr); Athens[Athens.length] = createMarker(new GPoint(-90.03860000,45.03970000),"
Trinity Lutheran School
Po Box 100
Athens, WI 54411
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Amberg[Amberg.length] = createMarker(new GPoint(-87.82612300,45.52879700),"
Victory Homes For Boys
W4705 Wallace Rd
Amberg, WI 54102
All-boys school, 6-12
[ View School Profile ]
",iconBl); Algoma[Algoma.length] = createMarker(new GPoint(-87.44730200,44.59576300),"
Wings Of Eagles Christian Academy
916 Feld Street
Algoma, WI 54201
Co-ed school, 4-12
[ View School Profile ]
",iconGr); Appleton[Appleton.length] = createMarker(new GPoint(-88.43086400,44.24854200),"
Xavier High School
1600 W Prospect Avenue
Appleton, WI 54914
Co-ed school, 9-12
[ View School Profile ]
",iconGr); Ashland[Ashland.length] = createMarker(new GPoint(-90.91020000,46.56910000),"
Zion Lutheran Crhistian School
1111 11th Ave Po Box 31
Ashland, WI 54806
Co-ed school, K-7
[ View School Profile ]
",iconGr); } // 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(Abbotsford); map.removeOverlays(Algoma); map.removeOverlays(Almena); map.removeOverlays(Altoona); map.removeOverlays(Amberg); map.removeOverlays(Antigo); map.removeOverlays(Appleton); map.removeOverlays(Arcadia); map.removeOverlays(Arpin); map.removeOverlays(Ashland); map.removeOverlays(Athens); map.removeOverlays(Auburndale); map.removeOverlays(Augusta); 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(Abbotsford);map.removeOverlays(Abbotsford); map.removeOverlays(Algoma); map.removeOverlays(Almena); map.removeOverlays(Altoona); map.removeOverlays(Amberg); map.removeOverlays(Antigo); map.removeOverlays(Appleton); map.removeOverlays(Arcadia); map.removeOverlays(Arpin); map.removeOverlays(Ashland); map.removeOverlays(Athens); map.removeOverlays(Auburndale); map.removeOverlays(Augusta); map.addOverlays(Abbotsford); centerByArray(Abbotsford, false, false); cntMarker += Abbotsford.length; map.addOverlays(Algoma); centerByArray(Algoma, false, false); cntMarker += Algoma.length; map.addOverlays(Almena); centerByArray(Almena, false, false); cntMarker += Almena.length; map.addOverlays(Altoona); centerByArray(Altoona, false, false); cntMarker += Altoona.length; map.addOverlays(Amberg); centerByArray(Amberg, false, false); cntMarker += Amberg.length; map.addOverlays(Antigo); centerByArray(Antigo, false, false); cntMarker += Antigo.length; map.addOverlays(Appleton); centerByArray(Appleton, false, false); cntMarker += Appleton.length; map.addOverlays(Arcadia); centerByArray(Arcadia, false, false); cntMarker += Arcadia.length; map.addOverlays(Arpin); centerByArray(Arpin, false, false); cntMarker += Arpin.length; map.addOverlays(Ashland); centerByArray(Ashland, false, false); cntMarker += Ashland.length; map.addOverlays(Athens); centerByArray(Athens, false, false); cntMarker += Athens.length; map.addOverlays(Auburndale); centerByArray(Auburndale, false, false); cntMarker += Auburndale.length; map.addOverlays(Augusta); centerByArray(Augusta, false, false); cntMarker += Augusta.length; centerByArray(Abbotsford,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=&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; }