function addMarkers(){ mySelect = document.getElementById('selection'); Sheboygan = [];Plymouth = [];Oostburg = [];Random_Lake = [];Howards_Grove = [];Sheboygan_Falls = [];mySelect.options[mySelect.options.length] = new Option("Howards Grove schools",'all=Howards_Grove'); mySelect.options[mySelect.options.length] = new Option("Oostburg schools",'all=Oostburg'); mySelect.options[mySelect.options.length] = new Option("Plymouth schools",'all=Plymouth'); mySelect.options[mySelect.options.length] = new Option("Random Lake schools",'all=Random_Lake'); mySelect.options[mySelect.options.length] = new Option("Sheboygan schools",'all=Sheboygan'); mySelect.options[mySelect.options.length] = new Option("Sheboygan Falls schools",'all=Sheboygan_Falls'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Sheboygan[Sheboygan.length] = createMarker(new GPoint(-87.71837000,43.73976300),"
Bethlehem Lutheran School
1121 Georgia Avenue
Sheboygan, WI 53081
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bethlehem Lutheran School",'Sheboygan=' + Sheboygan.length); Sheboygan[Sheboygan.length] = createMarker(new GPoint(-87.74138900,43.76769500),"
Calvary Evang Lutheran School
2132 North 27th Street
Sheboygan, WI 53081
Co-ed school, KG-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Calvary Evang Lutheran School",'Sheboygan=' + Sheboygan.length); Sheboygan[Sheboygan.length] = createMarker(new GPoint(-87.71940900,43.73910800),"
Christ Child Academy
2722 Henry Street
Sheboygan, WI 53081
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Christ Child Academy",'Sheboygan=' + Sheboygan.length); Sheboygan[Sheboygan.length] = createMarker(new GPoint(-87.72240100,43.72567400),"
Christ Child Academy (middle School
2722 Henry Street
Sheboygan, WI 53081
Co-ed school, 6-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Christ Child Academy (middle School",'Sheboygan=' + Sheboygan.length); Sheboygan[Sheboygan.length] = createMarker(new GPoint(-87.72579600,43.76416300),"
Cornerstone Christian Academy
4015a Superior Avenue
Sheboygan, WI 53081
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Cornerstone Christian Academy",'Sheboygan=' + Sheboygan.length); Sheboygan[Sheboygan.length] = createMarker(new GPoint(-87.73988900,43.75103500),"
Ebenezer Christian School
610 North 25th Street
Sheboygan, WI 53081
Co-ed school, KG-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ebenezer Christian School",'Sheboygan=' + Sheboygan.length); Plymouth[Plymouth.length] = createMarker(new GPoint(-87.98611000,43.76102000),"
Faith Christian Academy
1223 Krumrey Street
Plymouth, WI 53073
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Faith Christian Academy",'Plymouth=' + Plymouth.length); Sheboygan[Sheboygan.length] = createMarker(new GPoint(-87.71329900,43.76085900),"
Holy Family School
814 Superior Avenue
Sheboygan, WI 53081
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Holy Family School",'Sheboygan=' + Sheboygan.length); Sheboygan[Sheboygan.length] = createMarker(new GPoint(-87.72681000,43.74443700),"
Immanuel Lutheran School
1626 Illinois Avenue
Sheboygan, WI 53081
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Immanuel Lutheran School",'Sheboygan=' + Sheboygan.length); Sheboygan[Sheboygan.length] = createMarker(new GPoint(-87.75747000,43.84876500),"
Jansen Learning Center Willowg
W1236 Hwy Ff
Sheboygan, WI 53081
Co-ed school, 3-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Jansen Learning Center Willowg",'Sheboygan=' + Sheboygan.length); Sheboygan[Sheboygan.length] = createMarker(new GPoint(-87.76148600,43.79496300),"
Lake Country Academy
4101 Technology Parkway
Sheboygan, WI 53083
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lake Country Academy",'Sheboygan=' + Sheboygan.length); Sheboygan[Sheboygan.length] = createMarker(new GPoint(-87.74700900,43.75911600),"
Landmark Christian Academy
1341 N 31st Street
Sheboygan, WI 53081
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Landmark Christian Academy",'Sheboygan=' + Sheboygan.length); Sheboygan[Sheboygan.length] = createMarker(new GPoint(-87.73245500,43.76591800),"
Montessori Childrens House
1907 N 20th Street
Sheboygan, WI 53081
All-girls school, PK-K
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Montessori Childrens House",'Sheboygan=' + Sheboygan.length); Sheboygan[Sheboygan.length] = createMarker(new GPoint(-87.72104600,43.70203700),"
New World Montessori School
1224 Weeden Creek Road
Sheboygan, WI 53081
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("New World Montessori School",'Sheboygan=' + Sheboygan.length); Oostburg[Oostburg.length] = createMarker(new GPoint(-87.79583900,43.61901500),"
Oostburg Christian School
Po Box 700319
Oostburg, WI 53070
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Oostburg Christian School",'Oostburg=' + Oostburg.length); Random_Lake[Random_Lake.length] = createMarker(new GPoint(-87.96081000,43.55228700),"
Our Lady Of The Lakes School
306 Butler Street
Random Lake, WI 53075
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Our Lady Of The Lakes School",'Random_Lake=' + Random_Lake.length); Sheboygan[Sheboygan.length] = createMarker(new GPoint(-87.73408900,43.76732000),"
St. Dominic Elementary School
2108 N 21st Street
Sheboygan, WI 53081
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Dominic Elementary School",'Sheboygan=' + Sheboygan.length); Random_Lake[Random_Lake.length] = createMarker(new GPoint(-87.96611000,43.58640000),"
St. John Lutheran School
W5407 Highway Ss
Random Lake, WI 53075
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. John Lutheran School",'Random_Lake=' + Random_Lake.length); Plymouth[Plymouth.length] = createMarker(new GPoint(-87.97751600,43.74903500),"
St. John Lutheran School
222 N Stafford Street
Plymouth, WI 53073
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. John Lutheran School",'Plymouth=' + Plymouth.length); Howards_Grove[Howards_Grove.length] = createMarker(new GPoint(-87.81369300,43.81906300),"
St. Pauls Lutheran School
441 Millersville Avenue
Howards Grove, WI 53083
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Pauls Lutheran School",'Howards_Grove=' + Howards_Grove.length); Sheboygan[Sheboygan.length] = createMarker(new GPoint(-87.70664100,43.76847700),"
Sheboygan Christian School
418 Geele Avenue
Sheboygan, WI 53083
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sheboygan Christian School",'Sheboygan=' + Sheboygan.length); Plymouth[Plymouth.length] = createMarker(new GPoint(-87.98388900,43.74778700),"
St John The Baptist Catholic School
116 N Pleasant Street
Plymouth, WI 53073
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St John The Baptist Catholic School",'Plymouth=' + Plymouth.length); Sheboygan_Falls[Sheboygan_Falls.length] = createMarker(new GPoint(-87.81535300,43.72379900),"
St Mary S School
313 Giddings Avenue
Sheboygan Falls, WI 53085
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Mary S School",'Sheboygan_Falls=' + Sheboygan_Falls.length); Sheboygan[Sheboygan.length] = createMarker(new GPoint(-87.72180900,43.76424100),"
St Paul Lutheran School
1819 N 13th Street
Sheboygan, WI 53081
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Paul Lutheran School",'Sheboygan=' + Sheboygan.length); Sheboygan[Sheboygan.length] = createMarker(new GPoint(-87.71348500,43.75323700),"
Trinity Lutheran School
824 Wisconsin Avenue
Sheboygan, WI 53081
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Trinity Lutheran School",'Sheboygan=' + Sheboygan.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(Howards_Grove); map.removeOverlays(Oostburg); map.removeOverlays(Plymouth); map.removeOverlays(Random_Lake); map.removeOverlays(Sheboygan); map.removeOverlays(Sheboygan_Falls); 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(Sheboygan);map.removeOverlays(Howards_Grove); map.removeOverlays(Oostburg); map.removeOverlays(Plymouth); map.removeOverlays(Random_Lake); map.removeOverlays(Sheboygan); map.removeOverlays(Sheboygan_Falls); map.addOverlays(Howards_Grove); centerByArray(Howards_Grove, false, false); cntMarker += Howards_Grove.length; map.addOverlays(Oostburg); centerByArray(Oostburg, false, false); cntMarker += Oostburg.length; map.addOverlays(Plymouth); centerByArray(Plymouth, false, false); cntMarker += Plymouth.length; map.addOverlays(Random_Lake); centerByArray(Random_Lake, false, false); cntMarker += Random_Lake.length; map.addOverlays(Sheboygan); centerByArray(Sheboygan, false, false); cntMarker += Sheboygan.length; map.addOverlays(Sheboygan_Falls); centerByArray(Sheboygan_Falls, false, false); cntMarker += Sheboygan_Falls.length; centerByArray(Sheboygan,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; }