function addMarkers(){ mySelect = document.getElementById('selection'); Youngstown = [];Austintown = [];Boardman = [];Poland = [];Campbell = [];Salem = [];Struthers = [];Canfield = [];mySelect.options[mySelect.options.length] = new Option("Austintown schools",'all=Austintown'); mySelect.options[mySelect.options.length] = new Option("Boardman schools",'all=Boardman'); mySelect.options[mySelect.options.length] = new Option("Campbell schools",'all=Campbell'); mySelect.options[mySelect.options.length] = new Option("Canfield schools",'all=Canfield'); mySelect.options[mySelect.options.length] = new Option("Poland schools",'all=Poland'); mySelect.options[mySelect.options.length] = new Option("Salem schools",'all=Salem'); mySelect.options[mySelect.options.length] = new Option("Struthers schools",'all=Struthers'); mySelect.options[mySelect.options.length] = new Option("Youngstown schools",'all=Youngstown'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Youngstown[Youngstown.length] = createMarker(new GPoint(-80.65964100,41.13356300),"
Akiva Academy
505 Gypsy Lane
Youngstown, OH 44504
Co-ed school, KG-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Akiva Academy",'Youngstown=' + Youngstown.length); Youngstown[Youngstown.length] = createMarker(new GPoint(-80.64764800,41.10187100),"
All Children Learn Differently
201 Wick Avenue
Youngstown, OH 44503
Co-ed school, 2-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("All Children Learn Differently",'Youngstown=' + Youngstown.length); Youngstown[Youngstown.length] = createMarker(new GPoint(-80.61586600,41.04159700),"
Byzantine Catholic Central
5512 Youngstown Poland Road
Youngstown, OH 44514
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Byzantine Catholic Central",'Youngstown=' + Youngstown.length); Youngstown[Youngstown.length] = createMarker(new GPoint(-80.65261700,41.07406100),"
Cardinal Mooney High School
2545 Erie Street
Youngstown, OH 44507
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Cardinal Mooney High School",'Youngstown=' + Youngstown.length); Youngstown[Youngstown.length] = createMarker(new GPoint(-80.65111700,41.11820000),"
The Father's Heart Elementary School
1361 Fifth Ave
Youngstown, OH 44504
Co-ed school, KG-4
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Father's Heart Elementary School",'Youngstown=' + Youngstown.length); Austintown[Austintown.length] = createMarker(new GPoint(-80.73258100,41.07521100),"
The Growing Place
2432 S Raccoon Road
Austintown, OH 44515
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Growing Place",'Austintown=' + Austintown.length); Boardman[Boardman.length] = createMarker(new GPoint(-80.67688100,40.99265400),"
Hitchcock Woods School
8482 Hitchcock Road
Boardman, OH 44512
Co-ed school, K-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Hitchcock Woods School",'Boardman=' + Boardman.length); Youngstown[Youngstown.length] = createMarker(new GPoint(-80.60068200,41.02356300),"
Holy Family Elementary School
2731 Center Road
Youngstown, OH 44514
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Holy Family Elementary School",'Youngstown=' + Youngstown.length); Youngstown[Youngstown.length] = createMarker(new GPoint(-80.63417300,41.10083700),"
Immaculate Conception School
810 Oak Street
Youngstown, OH 44506
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Immaculate Conception School",'Youngstown=' + Youngstown.length); Austintown[Austintown.length] = createMarker(new GPoint(-80.73529800,41.10368600),"
Immaculate Heart Of Mary School
4470 Norquest Blvd
Austintown, OH 44515
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Immaculate Heart Of Mary School",'Austintown=' + Austintown.length); Boardman[Boardman.length] = createMarker(new GPoint(-80.66076400,40.99543700),"
Lads N Lasses Academy
22 Mcclurg Road
Boardman, OH 44512
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lads N Lasses Academy",'Boardman=' + Boardman.length); Youngstown[Youngstown.length] = createMarker(new GPoint(-80.61804100,41.05215800),"
The Montessori School Of The Mahoning Valley
2008 Lynn Avenue
Youngstown, OH 44514
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Montessori School Of The Mahoning Valley",'Youngstown=' + Youngstown.length); Poland[Poland.length] = createMarker(new GPoint(-80.60989100,40.98803000),"
New Life Christian Preschool &
2250 E Western Reserve Rd
Poland, OH 44514
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("New Life Christian Preschool &",'Poland=' + Poland.length); Youngstown[Youngstown.length] = createMarker(new GPoint(-80.58952500,41.12616300),"
Open Door Christian Academy Elementary School
2943 Wardle Ave
Youngstown, OH 44505
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Open Door Christian Academy Elementary School",'Youngstown=' + Youngstown.length); Youngstown[Youngstown.length] = createMarker(new GPoint(-80.72938100,41.06884100),"
St. Anne Ukrainian Catholic
4310 Kirk Rd
Youngstown, OH 44511
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Anne Ukrainian Catholic",'Youngstown=' + Youngstown.length); Youngstown[Youngstown.length] = createMarker(new GPoint(-80.70008100,41.10608400),"
St. Brendan School
144 N. Schenley Ave.
Youngstown, OH 44509
Co-ed school, KG-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Brendan School",'Youngstown=' + Youngstown.length); Youngstown[Youngstown.length] = createMarker(new GPoint(-80.64698800,41.12317100),"
St. Edward Elementary School
211 Redondo Road
Youngstown, OH 44504
Co-ed school, KG-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Edward Elementary School",'Youngstown=' + Youngstown.length); Campbell[Campbell.length] = createMarker(new GPoint(-80.58559900,41.08126300),"
St. Joseph The Provider School
633 Porter Avenue
Campbell, OH 44405
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Joseph The Provider School",'Campbell=' + Campbell.length); Youngstown[Youngstown.length] = createMarker(new GPoint(-80.63471700,41.04578300),"
St. Luke School
5225 South Avenue
Youngstown, OH 44514
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Luke School",'Youngstown=' + Youngstown.length); Salem[Salem.length] = createMarker(new GPoint(-80.87810700,40.93623000),"
Sharon Lynn School For Girls
12616 Sharon Lynn Drive
Salem, OH 44460
All-girls school, 9-11
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Sharon Lynn School For Girls",'Salem=' + Salem.length); Youngstown[Youngstown.length] = createMarker(new GPoint(-80.66716400,41.02356300),"
St Charles Elementary School
7325 Westview Drive
Youngstown, OH 44512
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Charles Elementary School",'Youngstown=' + Youngstown.length); Youngstown[Youngstown.length] = createMarker(new GPoint(-80.69941700,41.06621900),"
St Christine Elementary School
3125 S Schenley Avenue
Youngstown, OH 44511
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Christine Elementary School",'Youngstown=' + Youngstown.length); Austintown[Austintown.length] = createMarker(new GPoint(-80.73778700,41.08332900),"
St Joseph School Youngstown
4565 New Road
Austintown, OH 44515
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Joseph School Youngstown",'Austintown=' + Austintown.length); Youngstown[Youngstown.length] = createMarker(new GPoint(-80.63434100,41.07142700),"
St Matthias School
2800 Shady Run Road
Youngstown, OH 44502
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Matthias School",'Youngstown=' + Youngstown.length); Struthers[Struthers.length] = createMarker(new GPoint(-80.60331700,41.05028000),"
St Nicholas School
762 5th Street
Struthers, OH 44471
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Nicholas School",'Struthers=' + Struthers.length); Youngstown[Youngstown.length] = createMarker(new GPoint(-80.64213300,41.10959800),"
Ursuline High School
750 Wick Avenue
Youngstown, OH 44505
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ursuline High School",'Youngstown=' + Youngstown.length); Canfield[Canfield.length] = createMarker(new GPoint(-80.72857200,41.04254700),"
Ursuline Preschool And Kindergarten
4300 Shields Road
Canfield, OH 44406
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ursuline Preschool And Kindergarten",'Canfield=' + Canfield.length); Youngstown[Youngstown.length] = createMarker(new GPoint(-80.61075400,41.10269000),"
Watkins Christian Academy
2122 East High Avenue
Youngstown, OH 44505
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Watkins Christian Academy",'Youngstown=' + Youngstown.length); Youngstown[Youngstown.length] = createMarker(new GPoint(-80.67514000,40.98813700),"
Willow Creek Learning Center
1322 W Western Reserve Road
Youngstown, OH 44514
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Willow Creek Learning Center",'Youngstown=' + Youngstown.length); Youngstown[Youngstown.length] = createMarker(new GPoint(-80.65736300,41.05457500),"
Youngstown Christian School
4401 Southern Blvd
Youngstown, OH 44512
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Youngstown Christian School",'Youngstown=' + Youngstown.length); Youngstown[Youngstown.length] = createMarker(new GPoint(-80.62603500,41.11897200),"
Youngstown Youth Academy High School
1387 Commonwealth Ave
Youngstown, OH 44505
All-boys school, 8-10
[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Youngstown Youth Academy High School",'Youngstown=' + Youngstown.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/////3/' + showArray); map.removeOverlays(Austintown); map.removeOverlays(Boardman); map.removeOverlays(Campbell); map.removeOverlays(Canfield); map.removeOverlays(Poland); map.removeOverlays(Salem); map.removeOverlays(Struthers); map.removeOverlays(Youngstown); 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(Youngstown);map.removeOverlays(Austintown); map.removeOverlays(Boardman); map.removeOverlays(Campbell); map.removeOverlays(Canfield); map.removeOverlays(Poland); map.removeOverlays(Salem); map.removeOverlays(Struthers); map.removeOverlays(Youngstown); map.addOverlays(Austintown); centerByArray(Austintown, false, false); cntMarker += Austintown.length; map.addOverlays(Boardman); centerByArray(Boardman, false, false); cntMarker += Boardman.length; map.addOverlays(Campbell); centerByArray(Campbell, false, false); cntMarker += Campbell.length; map.addOverlays(Canfield); centerByArray(Canfield, false, false); cntMarker += Canfield.length; map.addOverlays(Poland); centerByArray(Poland, false, false); cntMarker += Poland.length; map.addOverlays(Salem); centerByArray(Salem, false, false); cntMarker += Salem.length; map.addOverlays(Struthers); centerByArray(Struthers, false, false); cntMarker += Struthers.length; map.addOverlays(Youngstown); centerByArray(Youngstown, false, false); cntMarker += Youngstown.length; centerByArray(Youngstown,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=3&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; }