function addMarkers() { mySelect = document.getElementById('selection'); Sheridan = [];Fishers = [];Westfield = [];Carmel = [];Noblesville = [];Fortville = [];Arcadia = [];Indianapolis = [];mySelect.options[mySelect.options.length] = new Option("Arcadia schools",'all=Arcadia'); mySelect.options[mySelect.options.length] = new Option("Carmel schools",'all=Carmel'); mySelect.options[mySelect.options.length] = new Option("Fishers schools",'all=Fishers'); mySelect.options[mySelect.options.length] = new Option("Fortville schools",'all=Fortville'); mySelect.options[mySelect.options.length] = new Option("Indianapolis schools",'all=Indianapolis'); mySelect.options[mySelect.options.length] = new Option("Noblesville schools",'all=Noblesville'); mySelect.options[mySelect.options.length] = new Option("Sheridan schools",'all=Sheridan'); mySelect.options[mySelect.options.length] = new Option("Westfield schools",'all=Westfield'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Sheridan[Sheridan.length] = createMarker(new GPoint(-86.21562195,40.13543701),"
Adams Elementary School
509 E 4th St
Sheridan, IN 46069

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Adams Elementary School",'Sheridan=' + Sheridan.length); Fishers[Fishers.length] = createMarker(new GPoint(-85.99838257,39.98772049),"
Brooks School Elementary School
12451 Brooks School Rd
Fishers, IN 46037

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Brooks School Elementary School",'Fishers=' + Fishers.length); Westfield[Westfield.length] = createMarker(new GPoint(-86.10852051,40.02408218),"
Carey Ridge Elementary School
16231 Carey Rd
Westfield, IN 46074

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Carey Ridge Elementary School",'Westfield=' + Westfield.length); Carmel[Carmel.length] = createMarker(new GPoint(-86.12242126,39.97728729),"
Carmel Elementary School
101 4th Ave Se
Carmel, IN 46032

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Carmel Elementary School",'Carmel=' + Carmel.length); Carmel[Carmel.length] = createMarker(new GPoint(-86.11984253,39.97863770),"
Carmel High School
520 E Main St
Carmel, IN 46032

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Carmel High School",'Carmel=' + Carmel.length); Carmel[Carmel.length] = createMarker(new GPoint(-86.14128113,39.97464752),"
Carmel Middle School
300 S Guilford Rd
Carmel, IN 46032

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Carmel Middle School",'Carmel=' + Carmel.length); Carmel[Carmel.length] = createMarker(new GPoint(-86.07077789,39.99180222),"
Cherry Tree Elementary School
13989 Hazeldell
Carmel, IN 46033

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Cherry Tree Elementary School",'Carmel=' + Carmel.length); Carmel[Carmel.length] = createMarker(new GPoint(-86.08126831,39.97133636),"
Clay Middle School
5150 E 126th St
Carmel, IN 46033

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Clay Middle School",'Carmel=' + Carmel.length); Carmel[Carmel.length] = createMarker(new GPoint(-86.14128113,39.97366333),"
College Wood Elementary School
12415 Shelborne Rd
Carmel, IN 46032

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("College Wood Elementary School",'Carmel=' + Carmel.length); Carmel[Carmel.length] = createMarker(new GPoint(-86.21937100,39.96823600),"
Creekside Middle School
3525 W 126th St
Carmel, IN 46032

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Creekside Middle School",'Carmel=' + Carmel.length); Fishers[Fishers.length] = createMarker(new GPoint(-85.99411774,39.98557281),"
Cumberland Road Elementary School
13535 Cumberland Rd
Fishers, IN 46038

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Cumberland Road Elementary School",'Fishers=' + Fishers.length); Noblesville[Noblesville.length] = createMarker(new GPoint(-85.91012573,40.05131912),"
Durbin Elementary School
18000 Durbin Rd
Noblesville, IN 46060

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Durbin Elementary School",'Noblesville=' + Noblesville.length); Fishers[Fishers.length] = createMarker(new GPoint(-85.91883087,39.96133041),"
Fall Creek Elementary School
12131 Olio Rd
Fishers, IN 46037

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Fall Creek Elementary School",'Fishers=' + Fishers.length); Fishers[Fishers.length] = createMarker(new GPoint(-85.91884613,39.96118927),"
Fall Creek Intermediate School
12011 Olio Rd
Fishers, IN 46037

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Fall Creek Intermediate School",'Fishers=' + Fishers.length); Fishers[Fishers.length] = createMarker(new GPoint(-86.01361847,39.95491409),"
Fishers Elementary School
11442 Lantern Rd
Fishers, IN 46038

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Fishers Elementary School",'Fishers=' + Fishers.length); Fishers[Fishers.length] = createMarker(new GPoint(-85.99411774,39.98138046),"
Fishers Junior High School
13257 Cumberland Rd
Fishers, IN 46038

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Fishers Junior High School",'Fishers=' + Fishers.length); Carmel[Carmel.length] = createMarker(new GPoint(-86.11125183,39.94382477),"
Forest Dale Elementary School
10721 Lakeshore Dr W
Carmel, IN 46033

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Forest Dale Elementary School",'Carmel=' + Carmel.length); Noblesville[Noblesville.length] = createMarker(new GPoint(-86.02391815,40.05529785),"
Forest Hill Elementary School
470 Lakeview Dr
Noblesville, IN 46060

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Forest Hill Elementary School",'Noblesville=' + Noblesville.length); Fortville[Fortville.length] = createMarker(new GPoint(-85.91696200,39.93863100),"
Geist Elementary School
14051 E 104th St
Fortville, IN 46040

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Geist Elementary School",'Fortville=' + Fortville.length); Arcadia[Arcadia.length] = createMarker(new GPoint(-86.02259827,40.17290115),"
Hamilton Heights Elementary School
Po Box 400 - 25150 Sr 19
Arcadia, IN 46030

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Hamilton Heights Elementary School",'Arcadia=' + Arcadia.length); Arcadia[Arcadia.length] = createMarker(new GPoint(-86.02259827,40.17290115),"
Hamilton Heights High School
Po Box 379
Arcadia, IN 46030

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Hamilton Heights High School",'Arcadia=' + Arcadia.length); Arcadia[Arcadia.length] = createMarker(new GPoint(-86.02259827,40.17290115),"
Hamilton Heights Middle School
Po Box 609 - 420 W North St
Arcadia, IN 46030

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Hamilton Heights Middle School",'Arcadia=' + Arcadia.length); Arcadia[Arcadia.length] = createMarker(new GPoint(-86.03089905,40.17219925),"
Hamilton Heights Primary School
Po Box 419
Arcadia, IN 46030

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Hamilton Heights Primary School",'Arcadia=' + Arcadia.length); Fishers[Fishers.length] = createMarker(new GPoint(-85.91619873,39.97267914),"
Hamilton Southeastern High School
13910 E 126th St
Fishers, IN 46037

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Hamilton Southeastern High School",'Fishers=' + Fishers.length); Fishers[Fishers.length] = createMarker(new GPoint(-85.91884613,39.96117783),"
Hamilton Southeastern Junior High School
12001 Olio Rd
Fishers, IN 46037

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Hamilton Southeastern Junior High School",'Fishers=' + Fishers.length); Fishers[Fishers.length] = createMarker(new GPoint(-86.01107788,39.99418259),"
Harrison Parkway Elementary School
14135 Harrison Pky
Fishers, IN 46038

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Harrison Parkway Elementary School",'Fishers=' + Fishers.length); Noblesville[Noblesville.length] = createMarker(new GPoint(-86.07780457,40.04306412),"
Hazel Dell Elementary School
3025 Westfield Rd
Noblesville, IN 46062

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Hazel Dell Elementary School",'Noblesville=' + Noblesville.length); Carmel[Carmel.length] = createMarker(new GPoint(-86.21546173,39.93695831),"
Hbm Special Education Coop
400 S Guilford Rd
Carmel, IN 46032

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Hbm Special Education Coop",'Carmel=' + Carmel.length); Noblesville[Noblesville.length] = createMarker(new GPoint(-86.04988098,40.06564331),"
Hinkle Creek Elementary School
595 S Harbor Dr
Noblesville, IN 46062

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Hinkle Creek Elementary School",'Noblesville=' + Noblesville.length); Fishers[Fishers.length] = createMarker(new GPoint(-85.96659851,39.96480942),"
Hoosier Road Elementary School
11300 E 121st St
Fishers, IN 46037

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Hoosier Road Elementary School",'Fishers=' + Fishers.length); Fishers[Fishers.length] = createMarker(new GPoint(-86.01361847,39.94179916),"
Lantern Road Elementary School
10595 Lantern Rd
Fishers, IN 46037

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lantern Road Elementary School",'Fishers=' + Fishers.length); Carmel[Carmel.length] = createMarker(new GPoint(-86.09580994,39.97133636),"
Mohawk Trails Elementary School
4242 E 126th St
Carmel, IN 46033

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Mohawk Trails Elementary School",'Carmel=' + Carmel.length); Carmel[Carmel.length] = createMarker(new GPoint(-85.94999695,40.01382065),"
Mosaics School
400 S Guilford Rd
Carmel, IN 46032

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mosaics School",'Carmel=' + Carmel.length); Fishers[Fishers.length] = createMarker(new GPoint(-86.01659393,39.97883606),"
New Britton Elementary School
8660 E 131st St
Fishers, IN 46038

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("New Britton Elementary School",'Fishers=' + Fishers.length); Noblesville[Noblesville.length] = createMarker(new GPoint(-85.99591827,40.05336380),"
Noblesville High School
18111 Cumberland Rd
Noblesville, IN 46060

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Noblesville High School",'Noblesville=' + Noblesville.length); Noblesville[Noblesville.length] = createMarker(new GPoint(-86.00473785,40.05825424),"
Noblesville Intermediate School
1625 Field Dr
Noblesville, IN 46060

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Noblesville Intermediate School",'Noblesville=' + Noblesville.length); Noblesville[Noblesville.length] = createMarker(new GPoint(-86.00341797,40.04776382),"
Noblesville Middle School
300 N 17th St
Noblesville, IN 46060

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Noblesville Middle School",'Noblesville=' + Noblesville.length); Noblesville[Noblesville.length] = createMarker(new GPoint(-86.01209259,40.04973984),"
North Elementary School
440 N 10th
Noblesville, IN 46060

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("North Elementary School",'Noblesville=' + Noblesville.length); Westfield[Westfield.length] = createMarker(new GPoint(-86.14617920,40.02729797),"
Oak Trace Elementary School
16504 Oak Ridge Rd
Westfield, IN 46074

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Oak Trace Elementary School",'Westfield=' + Westfield.length); Carmel[Carmel.length] = createMarker(new GPoint(-86.21691895,39.93719864),"
Options Charter School
530 W Carmel Dr
Carmel, IN 46032

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Options Charter School",'Carmel=' + Carmel.length); Indianapolis[Indianapolis.length] = createMarker(new GPoint(-86.15808105,39.76789856),"
Orchard Park Elementary School
10404 Orchard Park S Dr
Indianapolis, IN 46280

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Orchard Park Elementary School",'Indianapolis=' + Indianapolis.length); Carmel[Carmel.length] = createMarker(new GPoint(-86.03690338,39.99389648),"
Prairie Trace Elementary School
14200 N River Rd
Carmel, IN 46033

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Prairie Trace Elementary School",'Carmel=' + Carmel.length); Fishers[Fishers.length] = createMarker(new GPoint(-85.96483100,39.98111300),"
Sand Creek Elementary School
11420 E 131st St
Fishers, IN 46038

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Sand Creek Elementary School",'Fishers=' + Fishers.length); Fishers[Fishers.length] = createMarker(new GPoint(-85.95932770,39.97946930),"
Sand Creek Intermediate School
11550 E 131st St
Fishers, IN 46038

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Sand Creek Intermediate School",'Fishers=' + Fishers.length); Westfield[Westfield.length] = createMarker(new GPoint(-86.17140961,40.02084351),"
Shamrock Springs Elementary School
747 W 161st St
Westfield, IN 46074

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Shamrock Springs Elementary School",'Westfield=' + Westfield.length); Sheridan[Sheridan.length] = createMarker(new GPoint(-86.21811676,40.13929749),"
Sheridan High School
24185 N Hinesley Rd
Sheridan, IN 46069

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sheridan High School",'Sheridan=' + Sheridan.length); Sheridan[Sheridan.length] = createMarker(new GPoint(-86.22299957,40.13639832),"
Sheridan Middle School
3030 W 246th St
Sheridan, IN 46069

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Sheridan Middle School",'Sheridan=' + Sheridan.length); Carmel[Carmel.length] = createMarker(new GPoint(-86.17359924,39.98503876),"
Smoky Row Elementary School
900 W 136th St
Carmel, IN 46032

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Smoky Row Elementary School",'Carmel=' + Carmel.length); Noblesville[Noblesville.length] = createMarker(new GPoint(-86.00803375,40.03264236),"
Stony Creek Elementary School
1350 Greenfield Pike
Noblesville, IN 46060

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Stony Creek Elementary School",'Noblesville=' + Noblesville.length); Carmel[Carmel.length] = createMarker(new GPoint(-86.20326233,39.94429779),"
Towne Meadow Elementary School
10850 Towne Rd
Carmel, IN 46032

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Towne Meadow Elementary School",'Carmel=' + Carmel.length); Westfield[Westfield.length] = createMarker(new GPoint(-86.13152313,40.04283524),"
Washington Elementary School
324 W Main St
Westfield, IN 46074

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Washington Elementary School",'Westfield=' + Westfield.length); Westfield[Westfield.length] = createMarker(new GPoint(-86.15630341,40.02830124),"
Washington Woods Elementary School
17950 Grassy Branch Rd
Westfield, IN 46074

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Washington Woods Elementary School",'Westfield=' + Westfield.length); Westfield[Westfield.length] = createMarker(new GPoint(-86.12787628,40.05598831),"
Westfield High School
18250 N Union St
Westfield, IN 46074

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Westfield High School",'Westfield=' + Westfield.length); Westfield[Westfield.length] = createMarker(new GPoint(-86.13155365,40.04283524),"
Westfield Intermediate School
326 W Main St
Westfield, IN 46074

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Westfield Intermediate School",'Westfield=' + Westfield.length); Westfield[Westfield.length] = createMarker(new GPoint(-86.13157654,40.04283524),"
Westfield Middle School
345 W Hoover St
Westfield, IN 46074

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Westfield Middle School",'Westfield=' + Westfield.length); Noblesville[Noblesville.length] = createMarker(new GPoint(-85.99562073,40.06324005),"
White River Elementary School
19000 Cumberland Rd
Noblesville, IN 46060

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("White River Elementary School",'Noblesville=' + Noblesville.length); Carmel[Carmel.length] = createMarker(new GPoint(-86.09256744,39.95648575),"
Woodbrook Elementary School
4311 E 116th St
Carmel, IN 46033

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Woodbrook Elementary School",'Carmel=' + Carmel.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(Arcadia); map.removeOverlays(Carmel); map.removeOverlays(Fishers); map.removeOverlays(Fortville); map.removeOverlays(Indianapolis); map.removeOverlays(Noblesville); map.removeOverlays(Sheridan); map.removeOverlays(Westfield); 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(Sheridan);map.removeOverlays(Arcadia); map.removeOverlays(Carmel); map.removeOverlays(Fishers); map.removeOverlays(Fortville); map.removeOverlays(Indianapolis); map.removeOverlays(Noblesville); map.removeOverlays(Sheridan); map.removeOverlays(Westfield); map.addOverlays(Arcadia); centerByArray(Arcadia, false, false); cntMarker += Arcadia.length; map.addOverlays(Carmel); centerByArray(Carmel, false, false); cntMarker += Carmel.length; map.addOverlays(Fishers); centerByArray(Fishers, false, false); cntMarker += Fishers.length; map.addOverlays(Fortville); centerByArray(Fortville, false, false); cntMarker += Fortville.length; map.addOverlays(Indianapolis); centerByArray(Indianapolis, false, false); cntMarker += Indianapolis.length; map.addOverlays(Noblesville); centerByArray(Noblesville, false, false); cntMarker += Noblesville.length; map.addOverlays(Sheridan); centerByArray(Sheridan, false, false); cntMarker += Sheridan.length; map.addOverlays(Westfield); centerByArray(Westfield, false, false); cntMarker += Westfield.length; centerByArray(Sheridan,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'); } }