function addMarkers() { mySelect = document.getElementById('selection'); Evansville = [];mySelect.options[mySelect.options.length] = new Option("Evansville schools",'all=Evansville'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Evansville[Evansville.length] = createMarker(new GPoint(-87.60952759,37.97900391),"
Barker Learning Center
101 N Barker Ave
Evansville, IN 47712

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Barker Learning Center",'Evansville=' + Evansville.length); Evansville[Evansville.length] = createMarker(new GPoint(-87.54062653,37.96293640),"
Benjamin Bosse High School
1300 Washington Ave
Evansville, IN 47714

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Benjamin Bosse High School",'Evansville=' + Evansville.length); Evansville[Evansville.length] = createMarker(new GPoint(-87.49312592,37.94886017),"
Caze Elementary School
2013 S Green River Rd
Evansville, IN 47715

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Caze Elementary School",'Evansville=' + Evansville.length); Evansville[Evansville.length] = createMarker(new GPoint(-87.58097076,37.99794006),"
Cedar Hall Elementary School
2100 N Fulton Ave
Evansville, IN 47710

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Cedar Hall Elementary School",'Evansville=' + Evansville.length); Evansville[Evansville.length] = createMarker(new GPoint(-87.57397461,38.02833557),"
Central High School
5400 1st Ave
Evansville, IN 47710

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Central High School",'Evansville=' + Evansville.length); Evansville[Evansville.length] = createMarker(new GPoint(-87.55916400,37.96385000),"
Christa Mcauliffe Alt Mid School
901 Sweetser Ave
Evansville, IN 47713

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Christa Mcauliffe Alt Mid School",'Evansville=' + Evansville.length); Evansville[Evansville.length] = createMarker(new GPoint(-87.63814545,38.04509735),"
Cynthia Heights Elementary School
7225 Cynthiana Rd
Evansville, IN 47720

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Cynthia Heights Elementary School",'Evansville=' + Evansville.length); Evansville[Evansville.length] = createMarker(new GPoint(-87.62848663,37.95856094),"
Daniel Wertz Elementary School
1701 S Red Bank Rd
Evansville, IN 47712

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Daniel Wertz Elementary School",'Evansville=' + Evansville.length); Evansville[Evansville.length] = createMarker(new GPoint(-87.46581100,37.97894900),"
Deaconess School
7200 E Indiana St
Evansville, IN 47715

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Deaconess School",'Evansville=' + Evansville.length); Evansville[Evansville.length] = createMarker(new GPoint(-87.55677032,37.98383713),"
Delaware Elementary School
700 N Garvin St
Evansville, IN 47711

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Delaware Elementary School",'Evansville=' + Evansville.length); Evansville[Evansville.length] = createMarker(new GPoint(-87.51377106,37.96394730),"
Dexter Elementary School
917 S Dexter Ave
Evansville, IN 47714

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Dexter Elementary School",'Evansville=' + Evansville.length); Evansville[Evansville.length] = createMarker(new GPoint(-87.55069733,38.00606155),"
Evans Middle School
837 Tulip Ave
Evansville, IN 47711

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Evans Middle School",'Evansville=' + Evansville.length); Evansville[Evansville.length] = createMarker(new GPoint(-87.57562256,37.97378159),"
Evansville Psychiatric Center
3300 E Morgan Ave
Evansville, IN 47715

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Evansville Psychiatric Center",'Evansville=' + Evansville.length); Evansville[Evansville.length] = createMarker(new GPoint(-87.56414900,37.97109900),"
Evs Juvenile Correctional Fac
310 Se 8th St
Evansville, IN 47713

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Evs Juvenile Correctional Fac",'Evansville=' + Evansville.length); Evansville[Evansville.length] = createMarker(new GPoint(-87.52537537,37.94863892),"
Fairlawn Elementary School
2021 S Alvord Blvd
Evansville, IN 47714

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Fairlawn Elementary School",'Evansville=' + Evansville.length); Evansville[Evansville.length] = createMarker(new GPoint(-87.60632324,37.97306442),"
Francis Joseph Reitz High School
350 Dreier Blvd
Evansville, IN 47712

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Francis Joseph Reitz High School",'Evansville=' + Evansville.length); Evansville[Evansville.length] = createMarker(new GPoint(-87.55001831,37.95176315),"
Glenwood Middle School
901 Sweetser Ave
Evansville, IN 47713

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Glenwood Middle School",'Evansville=' + Evansville.length); Evansville[Evansville.length] = createMarker(new GPoint(-87.52510071,37.97638702),"
Harper Elementary School
21 S Alvord Blvd
Evansville, IN 47714

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Harper Elementary School",'Evansville=' + Evansville.length); Evansville[Evansville.length] = createMarker(new GPoint(-87.57412720,38.00631714),"
Harwood Middle School
3013 1st Ave
Evansville, IN 47710

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Harwood Middle School",'Evansville=' + Evansville.length); Evansville[Evansville.length] = createMarker(new GPoint(-87.49665070,37.96715546),"
Hebron Elementary School
4400 Bellemeade Ave
Evansville, IN 47714

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Hebron Elementary School",'Evansville=' + Evansville.length); Evansville[Evansville.length] = createMarker(new GPoint(-87.60411835,37.98593521),"
Helfrich Park Middle School
2603 W Maryland St
Evansville, IN 47712

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Helfrich Park Middle School",'Evansville=' + Evansville.length); Evansville[Evansville.length] = createMarker(new GPoint(-87.55598450,37.99497986),"
Henry Reis Educ Cntr-alt High School
1900 Stringtown Rd
Evansville, IN 47711

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Henry Reis Educ Cntr-alt High School",'Evansville=' + Evansville.length); Evansville[Evansville.length] = createMarker(new GPoint(-87.57357788,38.04017639),"
Highland Elementary School
6701 Darmstadt Rd
Evansville, IN 47710

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Highland Elementary School",'Evansville=' + Evansville.length); Evansville[Evansville.length] = createMarker(new GPoint(-87.54245758,37.97913742),"
Howard Roosa Elementary School
1230 E Illinois St
Evansville, IN 47711

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Howard Roosa Elementary School",'Evansville=' + Evansville.length); Evansville[Evansville.length] = createMarker(new GPoint(-87.56147003,37.95785904),"
John M Culver Elementary School
1301 Judson St
Evansville, IN 47713

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("John M Culver Elementary School",'Evansville=' + Evansville.length); Evansville[Evansville.length] = createMarker(new GPoint(-87.56446700,37.97257100),"
Joshua Academy
867 Walnut St
Evansville, IN 47713

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Joshua Academy",'Evansville=' + Evansville.length); Evansville[Evansville.length] = createMarker(new GPoint(-87.57562256,37.97378159),"
Learning Center
607 E Iowa St
Evansville, IN 47711

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Learning Center",'Evansville=' + Evansville.length); Evansville[Evansville.length] = createMarker(new GPoint(-87.55644226,37.96996307),"
Lincoln Elementary School
635 Lincoln Ave
Evansville, IN 47713

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lincoln Elementary School",'Evansville=' + Evansville.length); Evansville[Evansville.length] = createMarker(new GPoint(-87.52510071,37.95880127),"
Lodge Elementary School
2000 Lodge Ave
Evansville, IN 47714

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lodge Elementary School",'Evansville=' + Evansville.length); Evansville[Evansville.length] = createMarker(new GPoint(-87.47819400,37.97404000),"
Mcgary Middle School
1535 S Joyce Ave
Evansville, IN 47715

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Mcgary Middle School",'Evansville=' + Evansville.length); Evansville[Evansville.length] = createMarker(new GPoint(-87.55393982,37.99863815),"
North High School
2319 Stringtown Rd
Evansville, IN 47711

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("North High School",'Evansville=' + Evansville.length); Evansville[Evansville.length] = createMarker(new GPoint(-87.50983429,38.04769135),"
Oak Hill Middle School
7700 Oak Hill Rd
Evansville, IN 47711

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Oak Hill Middle School",'Evansville=' + Evansville.length); Evansville[Evansville.length] = createMarker(new GPoint(-87.64594269,37.98223877),"
Perry Heights Middle School
5800 Hogue Rd
Evansville, IN 47712

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Perry Heights Middle School",'Evansville=' + Evansville.length); Evansville[Evansville.length] = createMarker(new GPoint(-87.55671692,37.97463989),"
Plaza Park Middle School
7301 Outer Lincoln Ave
Evansville, IN 47715

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Plaza Park Middle School",'Evansville=' + Evansville.length); Evansville[Evansville.length] = createMarker(new GPoint(-87.53742218,38.11363602),"
Scott Elementary School
14940 Old State Rd
Evansville, IN 47711

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Scott Elementary School",'Evansville=' + Evansville.length); Evansville[Evansville.length] = createMarker(new GPoint(-87.57562256,37.97378159),"
Signature School Inc
610 Main St
Evansville, IN 47708

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Signature School Inc",'Evansville=' + Evansville.length); Evansville[Evansville.length] = createMarker(new GPoint(-87.55889893,37.96400070),"
Stanley Hall Enrichment Cntr High School
800 S Evans Ave
Evansville, IN 47713

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Stanley Hall Enrichment Cntr High School",'Evansville=' + Evansville.length); Evansville[Evansville.length] = createMarker(new GPoint(-87.50152588,37.99680710),"
Stockwell Elementary School
2501 N Stockwell Rd
Evansville, IN 47715

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Stockwell Elementary School",'Evansville=' + Evansville.length); Evansville[Evansville.length] = createMarker(new GPoint(-87.56240082,38.02153397),"
Stringtown Elementary School
4720 Stringtown Rd
Evansville, IN 47711

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Stringtown Elementary School",'Evansville=' + Evansville.length); Evansville[Evansville.length] = createMarker(new GPoint(-87.61870575,37.97897720),"
Tekoppel Elementary School
111 N Tekoppel Ave
Evansville, IN 47712

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Tekoppel Elementary School",'Evansville=' + Evansville.length); Evansville[Evansville.length] = createMarker(new GPoint(-87.58147430,38.02192688),"
Thompkins Middle School
1300 W Mill Rd
Evansville, IN 47710

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Thompkins Middle School",'Evansville=' + Evansville.length); Evansville[Evansville.length] = createMarker(new GPoint(-87.52692413,37.99096680),"
Vogel Elementary School
1500 Oak Hill Rd
Evansville, IN 47711

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Vogel Elementary School",'Evansville=' + Evansville.length); Evansville[Evansville.length] = createMarker(new GPoint(-87.53282928,37.96256256),"
Washington Middle School
1801 Washington Ave
Evansville, IN 47714

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Washington Middle School",'Evansville=' + Evansville.length); Evansville[Evansville.length] = createMarker(new GPoint(-87.67037201,37.97266388),"
West Terrace Elementary School
8000 W Terrace Dr
Evansville, IN 47712

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("West Terrace Elementary School",'Evansville=' + Evansville.length); Evansville[Evansville.length] = createMarker(new GPoint(-87.48530579,37.97423172),"
William Henry Harrison High School
211 Fielding Rd
Evansville, IN 47715

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("William Henry Harrison High School",'Evansville=' + Evansville.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,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(Evansville); 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(Evansville);map.removeOverlays(Evansville); map.addOverlays(Evansville); centerByArray(Evansville, false, false); cntMarker += Evansville.length; centerByArray(Evansville,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'); } }