function addMarkers() { mySelect = document.getElementById('selection'); Bloomington = [];Bloomington[Bloomington.length] = createMarker(new GPoint(-93.33931500,44.81920400),"
271 - District Extended Year
4551 West 102nd Street
Bloomington, MN 55437

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("271 - District Extended Year",'Bloomington=' + Bloomington.length); Bloomington[Bloomington.length] = createMarker(new GPoint(-93.31099701,44.83319855),"
271 Hillcrest Elementary Ts
4571 W. 102nd St.
Bloomington, MN 55437

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("271 Hillcrest Elementary Ts",'Bloomington=' + Bloomington.length); Bloomington[Bloomington.length] = createMarker(new GPoint(-93.25050354,45.05139923),"
271 Indian Mounds El. Ts.
4571 West 102nd St.
Bloomington, MN 55437

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("271 Indian Mounds El. Ts.",'Bloomington=' + Bloomington.length); Bloomington[Bloomington.length] = createMarker(new GPoint(-93.25050354,45.05139923),"
271 Kennedy Alc High School
9701 Nicollet Ave. S.
Bloomington, MN 55421

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("271 Kennedy Alc High School",'Bloomington=' + Bloomington.length); Bloomington[Bloomington.length] = createMarker(new GPoint(-93.42810059,45.00659943),"
271 Kennedy High School. Reentry Is
9701 Nicollet Ave. S.
Bloomington, MN 55421

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("271 Kennedy High School. Reentry Is",'Bloomington=' + Bloomington.length); Bloomington[Bloomington.length] = createMarker(new GPoint(-93.31202200,44.84440700),"
271 Mindquest Oll
2575 W 88th Street
Bloomington, MN 55431

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("271 Mindquest Oll",'Bloomington=' + Bloomington.length); Bloomington[Bloomington.length] = createMarker(new GPoint(-93.34480286,44.82770157),"
271 Normandale Hills El. Ts.
4571 W. 102 St.
Bloomington, MN 55437

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("271 Normandale Hills El. Ts.",'Bloomington=' + Bloomington.length); Bloomington[Bloomington.length] = createMarker(new GPoint(-93.27970123,44.83919907),"
271 Oak Grove El. Ts.
4571 West 102nd St.
Bloomington, MN 55437

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("271 Oak Grove El. Ts.",'Bloomington=' + Bloomington.length); Bloomington[Bloomington.length] = createMarker(new GPoint(-93.31099701,44.83319855),"
271 Oak Grove Int. Ts.
4571 West 102nd St.
Bloomington, MN 55437

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("271 Oak Grove Int. Ts.",'Bloomington=' + Bloomington.length); Bloomington[Bloomington.length] = createMarker(new GPoint(-93.34480286,44.82770157),"
271 Olson El. Ts.
4571 West 102nd St.
Bloomington, MN 55437

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("271 Olson El. Ts.",'Bloomington=' + Bloomington.length); Bloomington[Bloomington.length] = createMarker(new GPoint(-93.34480286,44.82770157),"
271 Olson Middle Ts
4571 West 102nd St.
Bloomington, MN 55437

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("271 Olson Middle Ts",'Bloomington=' + Bloomington.length); Bloomington[Bloomington.length] = createMarker(new GPoint(-93.27970123,44.83919907),"
271 Pond El Ts
4571 W. 102nd St.
Bloomington, MN 55437

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("271 Pond El Ts",'Bloomington=' + Bloomington.length); Bloomington[Bloomington.length] = createMarker(new GPoint(-93.34480286,44.82770157),"
271 Poplar Bridge El Ts.
4571 West 102nd St.
Bloomington, MN 55437

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("271 Poplar Bridge El Ts.",'Bloomington=' + Bloomington.length); Bloomington[Bloomington.length] = createMarker(new GPoint(-93.31099701,44.83319855),"
271 Ridgeview El Ts
4571 West 102nd St.
Bloomington, MN 55437

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("271 Ridgeview El Ts",'Bloomington=' + Bloomington.length); Bloomington[Bloomington.length] = createMarker(new GPoint(-93.25050354,45.05139923),"
271 Shape Alc High School
2575 W. 88th St.
Bloomington, MN 55431

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("271 Shape Alc High School",'Bloomington=' + Bloomington.length); Bloomington[Bloomington.length] = createMarker(new GPoint(-93.27970123,44.83919907),"
271 Valley View El Ts.
4571 West 102nd St.
Bloomington, MN 55437

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("271 Valley View El Ts.",'Bloomington=' + Bloomington.length); Bloomington[Bloomington.length] = createMarker(new GPoint(-93.26822662,44.84241486),"
271 Valley View Middle Ts
4571 W. 102nd St.
Bloomington, MN 55437

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("271 Valley View Middle Ts",'Bloomington=' + Bloomington.length); Bloomington[Bloomington.length] = createMarker(new GPoint(-93.31099701,44.83319855),"
271 Washburn El Ts
4571 West 102nd St.
Bloomington, MN 55437

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("271 Washburn El Ts",'Bloomington=' + Bloomington.length); Bloomington[Bloomington.length] = createMarker(new GPoint(-93.31099701,44.83319855),"
271 Westwood El. Ts.
4571 West 102nd St.
Bloomington, MN 55437

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("271 Westwood El. Ts.",'Bloomington=' + Bloomington.length); Bloomington[Bloomington.length] = createMarker(new GPoint(-93.27847300,44.82803500),"
Beacon - (287)
9701 Nicollet Avenue
Bloomington, MN 55420

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Beacon - (287)",'Bloomington=' + Bloomington.length); Bloomington[Bloomington.length] = createMarker(new GPoint(-93.31572723,44.83556366),"
Hillcrest Elementary School
9301 Thomas Road
Bloomington, MN 55431

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Hillcrest Elementary School",'Bloomington=' + Bloomington.length); Bloomington[Bloomington.length] = createMarker(new GPoint(-93.25932312,44.82626343),"
Indian Mounds Elementary School
9801 11th Avenue S
Bloomington, MN 55420

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Indian Mounds Elementary School",'Bloomington=' + Bloomington.length); Bloomington[Bloomington.length] = createMarker(new GPoint(-93.33142853,44.81916428),"
Jefferson Senior High School
4001 W 102nd Street
Bloomington, MN 55437

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Jefferson Senior High School",'Bloomington=' + Bloomington.length); Bloomington[Bloomington.length] = createMarker(new GPoint(-93.27841949,44.82636261),"
Kennedy Senior High School
9701 Nicollet Avenue S
Bloomington, MN 55420

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Kennedy Senior High School",'Bloomington=' + Bloomington.length); Bloomington[Bloomington.length] = createMarker(new GPoint(-93.34912872,45.04056549),"
Metropolitan Learning Alliance
337 E Broadway
Bloomington, MN 55425

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Metropolitan Learning Alliance",'Bloomington=' + Bloomington.length); Bloomington[Bloomington.length] = createMarker(new GPoint(-93.34742737,44.83156586),"
Normandale Hills Elementary School
9501 Toledo Avenue S
Bloomington, MN 55437

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Normandale Hills Elementary School",'Bloomington=' + Bloomington.length); Bloomington[Bloomington.length] = createMarker(new GPoint(-93.29616547,44.81505203),"
Oak Grove Elementary School
1301 W 104th Street
Bloomington, MN 55431

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Oak Grove Elementary School",'Bloomington=' + Bloomington.length); Bloomington[Bloomington.length] = createMarker(new GPoint(-93.29592896,44.81186295),"
Oak Grove Middle School
1300 W 106th Street
Bloomington, MN 55431

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Oak Grove Middle School",'Bloomington=' + Bloomington.length); Bloomington[Bloomington.length] = createMarker(new GPoint(-93.33576965,44.81924820),"
Olson Elementary School
4501 W 102nd Street
Bloomington, MN 55437

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Olson Elementary School",'Bloomington=' + Bloomington.length); Bloomington[Bloomington.length] = createMarker(new GPoint(-93.33623505,44.81922150),"
Olson Middle School
4551 W 102nd Street
Bloomington, MN 55437

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Olson Middle School",'Bloomington=' + Bloomington.length); Bloomington[Bloomington.length] = createMarker(new GPoint(-93.29665375,44.81203842),"
Olson Middle School Alc 271
4551 W. 102nd St.
Bloomington, MN 55437

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Olson Middle School Alc 271",'Bloomington=' + Bloomington.length); Bloomington[Bloomington.length] = createMarker(new GPoint(-93.34282684,44.84856415),"
Poplar Bridge Elementary School
8401 Palmer Road
Bloomington, MN 55437

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Poplar Bridge Elementary School",'Bloomington=' + Bloomington.length); Bloomington[Bloomington.length] = createMarker(new GPoint(-93.35892487,44.83466339),"
Ridgeview Elementary School
9400 Nesbitt Road
Bloomington, MN 55438

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Ridgeview Elementary School",'Bloomington=' + Bloomington.length); Bloomington[Bloomington.length] = createMarker(new GPoint(-93.34437561,44.80096436),"
Southwood Early Childhood
4901 W 112th Street
Bloomington, MN 55437

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Southwood Early Childhood",'Bloomington=' + Bloomington.length); Bloomington[Bloomington.length] = createMarker(new GPoint(-93.27152252,44.84436417),"
Valley View Elementary School
351 E 88th Street
Bloomington, MN 55420

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Valley View Elementary School",'Bloomington=' + Bloomington.length); Bloomington[Bloomington.length] = createMarker(new GPoint(-93.26827200,44.84227800),"
Valley View Middle School
8900 Portland Avenue
Bloomington, MN 55420

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Valley View Middle School",'Bloomington=' + Bloomington.length); Bloomington[Bloomington.length] = createMarker(new GPoint(-93.31892395,44.85166550),"
Washburn Elementary School
8401 Xerxes Avenue S
Bloomington, MN 55431

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Washburn Elementary School",'Bloomington=' + Bloomington.length); Bloomington[Bloomington.length] = createMarker(new GPoint(-93.32548523,44.80836487),"
Westwood Elementary School
3701 W 108th Street
Bloomington, MN 55431

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Westwood Elementary School",'Bloomington=' + Bloomington.length); map.removeOverlays(Bloomington); setTimeout(function(){map.addOverlays(Bloomington)},1000); maxLng = -93.25050354; maxLat = 45.05139923; minLng = -93.42810059; minLat = 44.80096436; reCenterMap(); } // 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,10); /* 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(Bloomington); 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(Bloomington);map.removeOverlays(Bloomington); map.addOverlays(Bloomington); centerByArray(Bloomington, false, false); cntMarker += Bloomington.length; centerByArray(Bloomington,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'); } }