function addMarkers(){ mySelect = document.getElementById('selection'); Granger = [];South_Bend = [];Mishawaka = [];Notre_Dame = [];North_Liberty = [];Walkerton = [];mySelect.options[mySelect.options.length] = new Option("Granger schools",'all=Granger'); mySelect.options[mySelect.options.length] = new Option("Mishawaka schools",'all=Mishawaka'); mySelect.options[mySelect.options.length] = new Option("North Liberty schools",'all=North_Liberty'); mySelect.options[mySelect.options.length] = new Option("Notre Dame schools",'all=Notre_Dame'); mySelect.options[mySelect.options.length] = new Option("South Bend schools",'all=South_Bend'); mySelect.options[mySelect.options.length] = new Option("Walkerton schools",'all=Walkerton'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Granger[Granger.length] = createMarker(new GPoint(-86.16319700,41.71651300),"
Calvary Christian School
53494 Fir Road
Granger, IN 46530
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Calvary Christian School",'Granger=' + Granger.length); South_Bend[South_Bend.length] = createMarker(new GPoint(-86.25080600,41.73098200),"
Christ The King School
52473 State Road 933
South Bend, IN 46637
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Christ The King School",'South_Bend=' + South_Bend.length); South_Bend[South_Bend.length] = createMarker(new GPoint(-86.24252800,41.62897500),"
Christian Center Academy
530 E Ireland Road
South Bend, IN 46614
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Christian Center Academy",'South_Bend=' + South_Bend.length); South_Bend[South_Bend.length] = createMarker(new GPoint(-86.23485400,41.61434400),"
Community Baptist Christian School
5715 Miami St
South Bend, IN 46614
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Community Baptist Christian School",'South_Bend=' + South_Bend.length); South_Bend[South_Bend.length] = createMarker(new GPoint(-86.28564000,41.71456700),"
Corpus Christi School
2817 Corpus Christi Drive
South Bend, IN 46628
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Corpus Christi School",'South_Bend=' + South_Bend.length); South_Bend[South_Bend.length] = createMarker(new GPoint(-86.21430000,41.69440000),"
Countryside Montessori School
Po Box 6563
South Bend, IN 46660
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Countryside Montessori School",'South_Bend=' + South_Bend.length); Mishawaka[Mishawaka.length] = createMarker(new GPoint(-86.15813000,41.69914900),"
Covenant Christian School
54790 Fir Road
Mishawaka, IN 46545
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Covenant Christian School",'Mishawaka=' + Mishawaka.length); Notre_Dame[Notre_Dame.length] = createMarker(new GPoint(-86.23390000,41.70530000),"
Early Childhood Develop Center
10 Child Care Center
Notre Dame, IN 46556
Co-ed school, PK-KG
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Early Childhood Develop Center",'Notre_Dame=' + Notre_Dame.length); Mishawaka[Mishawaka.length] = createMarker(new GPoint(-86.18111500,41.66736400),"
First Baptist Christian School
724 N Main Street
Mishawaka, IN 46545
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("First Baptist Christian School",'Mishawaka=' + Mishawaka.length); South_Bend[South_Bend.length] = createMarker(new GPoint(-86.22438300,41.72242200),"
Friends School And Day Care
53061 Nadine Street
South Bend, IN 46637
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Friends School And Day Care",'South_Bend=' + South_Bend.length); Granger[Granger.length] = createMarker(new GPoint(-86.11071500,41.74727600),"
Friends School/day Care Inc.
51410 Bittersweet Rd
Granger, IN 46530
Co-ed school, PK-KG
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Friends School/day Care Inc.",'Granger=' + Granger.length); South_Bend[South_Bend.length] = createMarker(new GPoint(-86.23485700,41.67532800),"
Good Shepherd Montessori School
1101 East Jefferson Blvd
South Bend, IN 46617
Co-ed school, 1-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Good Shepherd Montessori School",'South_Bend=' + South_Bend.length); Granger[Granger.length] = createMarker(new GPoint(-86.17857000,41.73807000),"
Granger Christian School
52025 Gumwood Road
Granger, IN 46530
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Granger Christian School",'Granger=' + Granger.length); South_Bend[South_Bend.length] = createMarker(new GPoint(-86.20512100,41.70857700),"
Growing Kids Learning Center
17475 State Road 23
South Bend, IN 46635
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Growing Kids Learning Center",'South_Bend=' + South_Bend.length); South_Bend[South_Bend.length] = createMarker(new GPoint(-86.27381500,41.68794700),"
Holy Cross Elementary School
1020 Wilber Street
South Bend, IN 46628
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Holy Cross Elementary School",'South_Bend=' + South_Bend.length); South_Bend[South_Bend.length] = createMarker(new GPoint(-86.32228300,41.66833700),"
Holy Family Elementary School
56407 Mayflower Road
South Bend, IN 46619
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Holy Family Elementary School",'South_Bend=' + South_Bend.length); South_Bend[South_Bend.length] = createMarker(new GPoint(-86.21578300,41.62776100),"
Ironwood Christian School
4609 South Ironwood Road
South Bend, IN 46614
Co-ed school, 1-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ironwood Christian School",'South_Bend=' + South_Bend.length); South_Bend[South_Bend.length] = createMarker(new GPoint(-86.24902400,41.68217600),"
La Petite Academy
521 N Saint Joseph Street
South Bend, IN 46601
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("La Petite Academy",'South_Bend=' + South_Bend.length); South_Bend[South_Bend.length] = createMarker(new GPoint(-86.24902800,41.68219500),"
Lapetite Academy
521 North St.joseph St
South Bend, IN 46601
Co-ed school, K-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lapetite Academy",'South_Bend=' + South_Bend.length); South_Bend[South_Bend.length] = createMarker(new GPoint(-86.21551500,41.64472900),"
Michiana Christian School
2730 S Ironwood Drive
South Bend, IN 46614
Co-ed school, 1-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Michiana Christian School",'South_Bend=' + South_Bend.length); Mishawaka[Mishawaka.length] = createMarker(new GPoint(-86.17396000,41.69875300),"
The Montessori Academy
530 East Day Road
Mishawaka, IN 46545
Co-ed school, 1-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Montessori Academy",'Mishawaka=' + Mishawaka.length); South_Bend[South_Bend.length] = createMarker(new GPoint(-86.23158500,41.66080500),"
The Montessori Center
1236 Lincoln Way E
South Bend, IN 46601
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Montessori Center",'South_Bend=' + South_Bend.length); North_Liberty[North_Liberty.length] = createMarker(new GPoint(-86.42718200,41.54622400),"
North Liberty Christian School
65225 State Road 23
North Liberty, IN 46554
Co-ed school, K-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("North Liberty Christian School",'North_Liberty=' + North_Liberty.length); South_Bend[South_Bend.length] = createMarker(new GPoint(-86.26019300,41.65423700),"
Our Lady Of Hungary School
735 W Calvert Street
South Bend, IN 46613
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Our Lady Of Hungary School",'South_Bend=' + South_Bend.length); Granger[Granger.length] = createMarker(new GPoint(-86.19327100,41.72399600),"
Peace Lutheran School
16791 Cleveland Road
Granger, IN 46530
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Peace Lutheran School",'Granger=' + Granger.length); Mishawaka[Mishawaka.length] = createMarker(new GPoint(-86.11034100,41.66768200),"
Queen Of Peace School
4508 Vistula Road
Mishawaka, IN 46544
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Queen Of Peace School",'Mishawaka=' + Mishawaka.length); South_Bend[South_Bend.length] = createMarker(new GPoint(-86.33296600,41.72243900),"
Resurrection Lutheran Academy
6048 Nimtz Pkwy
South Bend, IN 46628
Co-ed school, PK-7
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Resurrection Lutheran Academy",'South_Bend=' + South_Bend.length); South_Bend[South_Bend.length] = createMarker(new GPoint(-86.28348300,41.66965500),"
St. Adalbert Elementary School
519 South Olive Street
South Bend, IN 46619
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Adalbert Elementary School",'South_Bend=' + South_Bend.length); South_Bend[South_Bend.length] = createMarker(new GPoint(-86.29953300,41.69146600),"
St. John The Baptist Elementary School
3616 Saint Johns Way
South Bend, IN 46628
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. John The Baptist Elementary School",'South_Bend=' + South_Bend.length); Mishawaka[Mishawaka.length] = createMarker(new GPoint(-86.18311500,41.65974800),"
St. Joseph Elementary School
230 S Spring Street
Mishawaka, IN 46544
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Joseph Elementary School",'Mishawaka=' + Mishawaka.length); South_Bend[South_Bend.length] = createMarker(new GPoint(-86.24271500,41.67812200),"
St. Joseph Elementary School
216 North Hill Street
South Bend, IN 46617
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Joseph Elementary School",'South_Bend=' + South_Bend.length); South_Bend[South_Bend.length] = createMarker(new GPoint(-86.24749800,41.61574300),"
St. Jude Elementary School
19657 Hildebrand Street
South Bend, IN 46614
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Jude Elementary School",'South_Bend=' + South_Bend.length); South_Bend[South_Bend.length] = createMarker(new GPoint(-86.28271500,41.63983700),"
St. Mary Of The Assumption School
3402 South Locust Road
South Bend, IN 46614
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Mary Of The Assumption School",'South_Bend=' + South_Bend.length); Mishawaka[Mishawaka.length] = createMarker(new GPoint(-86.18353600,41.66688000),"
St. Monica Elementary School
223 W Grove Street
Mishawaka, IN 46545
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Monica Elementary School",'Mishawaka=' + Mishawaka.length); Mishawaka[Mishawaka.length] = createMarker(new GPoint(-86.18223900,41.65533700),"
South Bend Hebrew Day School
206 West 8th Street
Mishawaka, IN 46544
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("South Bend Hebrew Day School",'Mishawaka=' + Mishawaka.length); South_Bend[South_Bend.length] = createMarker(new GPoint(-86.21726300,41.65010200),"
South Bend Junior Academy
1910 Altgeld Street
South Bend, IN 46614
Co-ed school, 1-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("South Bend Junior Academy",'South_Bend=' + South_Bend.length); South_Bend[South_Bend.length] = createMarker(new GPoint(-86.21468200,41.67281700),"
St Anthony De Padua School
2310 E Jefferson Blvd
South Bend, IN 46615
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Anthony De Padua School",'South_Bend=' + South_Bend.length); Mishawaka[Mishawaka.length] = createMarker(new GPoint(-86.18664100,41.65536800),"
St Bavo School
524 W 8th Street
Mishawaka, IN 46544
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Bavo School",'Mishawaka=' + Mishawaka.length); South_Bend[South_Bend.length] = createMarker(new GPoint(-86.23572000,41.65623700),"
St Matthew Elementary School
1015 E Dayton Street
South Bend, IN 46613
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Matthew Elementary School",'South_Bend=' + South_Bend.length); Walkerton[Walkerton.length] = createMarker(new GPoint(-86.47915700,41.46702800),"
St Patrick School
811 Tyler Street
Walkerton, IN 46574
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Patrick School",'Walkerton=' + Walkerton.length); South_Bend[South_Bend.length] = createMarker(new GPoint(-86.23498300,41.64226700),"
Stanley Clark School
3123 Miami Street
South Bend, IN 46614
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Stanley Clark School",'South_Bend=' + South_Bend.length); Granger[Granger.length] = createMarker(new GPoint(-86.12665000,41.76060000),"
Starz Academy
13377 State Road 23
Granger, IN 46530
Co-ed school, PK-3
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Starz Academy",'Granger=' + Granger.length); South_Bend[South_Bend.length] = createMarker(new GPoint(-86.21683500,41.67318100),"
Starz Academy
2117 East Jefferson
South Bend, IN 46617
Co-ed school, PK-KG
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Starz Academy",'South_Bend=' + South_Bend.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(Granger); map.removeOverlays(Mishawaka); map.removeOverlays(North_Liberty); map.removeOverlays(Notre_Dame); map.removeOverlays(South_Bend); map.removeOverlays(Walkerton); 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(Granger);map.removeOverlays(Granger); map.removeOverlays(Mishawaka); map.removeOverlays(North_Liberty); map.removeOverlays(Notre_Dame); map.removeOverlays(South_Bend); map.removeOverlays(Walkerton); map.addOverlays(Granger); centerByArray(Granger, false, false); cntMarker += Granger.length; map.addOverlays(Mishawaka); centerByArray(Mishawaka, false, false); cntMarker += Mishawaka.length; map.addOverlays(North_Liberty); centerByArray(North_Liberty, false, false); cntMarker += North_Liberty.length; map.addOverlays(Notre_Dame); centerByArray(Notre_Dame, false, false); cntMarker += Notre_Dame.length; map.addOverlays(South_Bend); centerByArray(South_Bend, false, false); cntMarker += South_Bend.length; map.addOverlays(Walkerton); centerByArray(Walkerton, false, false); cntMarker += Walkerton.length; centerByArray(Granger,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; }