function addMarkers() { mySelect = document.getElementById('selection'); Castle_Rock = [];Littleton = [];Lone_Tree = [];Highlands_Ranch = [];Parker = [];Franktown = [];Larkspur = [];Sedalia = [];mySelect.options[mySelect.options.length] = new Option("Castle Rock schools",'all=Castle_Rock'); mySelect.options[mySelect.options.length] = new Option("Franktown schools",'all=Franktown'); mySelect.options[mySelect.options.length] = new Option("Highlands Ranch schools",'all=Highlands_Ranch'); mySelect.options[mySelect.options.length] = new Option("Larkspur schools",'all=Larkspur'); mySelect.options[mySelect.options.length] = new Option("Littleton schools",'all=Littleton'); mySelect.options[mySelect.options.length] = new Option("Lone Tree schools",'all=Lone_Tree'); mySelect.options[mySelect.options.length] = new Option("Parker schools",'all=Parker'); mySelect.options[mySelect.options.length] = new Option("Sedalia schools",'all=Sedalia'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Castle_Rock[Castle_Rock.length] = createMarker(new GPoint(-104.86959076,39.38027191),"
Academy Charter School
1551 Prairie Hawk Drive
Castle Rock, CO 80104

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Academy Charter School",'Castle_Rock=' + Castle_Rock.length); Littleton[Littleton.length] = createMarker(new GPoint(-104.89669037,39.55795288),"
Acres Green Elementary School
13524 North Acres Green Drive
Littleton, CO 80124

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Acres Green Elementary School",'Littleton=' + Littleton.length); Lone_Tree[Lone_Tree.length] = createMarker(new GPoint(-104.88129400,39.55426900),"
American Academy At Castle Pines Charter
6800 Park Meadows Drive
Lone Tree, CO 80124

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("American Academy At Castle Pines Charter",'Lone_Tree=' + Lone_Tree.length); Highlands_Ranch[Highlands_Ranch.length] = createMarker(new GPoint(-104.93331146,39.52802658),"
Arrowwood Elementary School
10345 Arrowwood Drive
Highlands Ranch, CO 80130

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Arrowwood Elementary School",'Highlands_Ranch=' + Highlands_Ranch.length); Highlands_Ranch[Highlands_Ranch.length] = createMarker(new GPoint(-104.98714447,39.54070282),"
Bear Canyon Elementary School
9660 Salford Lane
Highlands Ranch, CO 80126

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Bear Canyon Elementary School",'Highlands_Ranch=' + Highlands_Ranch.length); Castle_Rock[Castle_Rock.length] = createMarker(new GPoint(-104.89387512,39.46543884),"
Buffalo Ridge Elementary School
7075 North Shoreham Drive
Castle Rock, CO 80108

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Buffalo Ridge Elementary School",'Castle_Rock=' + Castle_Rock.length); Castle_Rock[Castle_Rock.length] = createMarker(new GPoint(-104.85633087,39.37255096),"
Cantril School
312 Cantril
Castle Rock, CO 80104

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Cantril School",'Castle_Rock=' + Castle_Rock.length); Castle_Rock[Castle_Rock.length] = createMarker(new GPoint(-104.84996796,39.38117218),"
Castle Rock Elementary School
1103 Canyon Drive
Castle Rock, CO 80104

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Castle Rock Elementary School",'Castle_Rock=' + Castle_Rock.length); Castle_Rock[Castle_Rock.length] = createMarker(new GPoint(-104.87498474,39.40871811),"
Castle Rock Middle School
2575 Meadows Boulevard
Castle Rock, CO 80109

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Castle Rock Middle School",'Castle_Rock=' + Castle_Rock.length); Parker[Parker.length] = createMarker(new GPoint(-104.79256439,39.54591370),"
Challenge To Excellence Charter School
16995 East Carlson Drive
Parker, CO 80134

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Challenge To Excellence Charter School",'Parker=' + Parker.length); Parker[Parker.length] = createMarker(new GPoint(-104.80750275,39.53899384),"
Chaparral High School
15655 Brookstone Drive
Parker, CO 80134

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Chaparral High School",'Parker=' + Parker.length); Parker[Parker.length] = createMarker(new GPoint(-104.78664700,39.52513300),"
Cherokee Trail Elementary School
17302 Clarke Farms Drive
Parker, CO 80134

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Cherokee Trail Elementary School",'Parker=' + Parker.length); Franktown[Franktown.length] = createMarker(new GPoint(-104.76021576,39.43438339),"
Cherry Valley Elementary School
9244 South State Highway 83
Franktown, CO 80116

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Cherry Valley Elementary School",'Franktown=' + Franktown.length); Highlands_Ranch[Highlands_Ranch.length] = createMarker(new GPoint(-104.94692700,39.51824400),"
Copper Mesa Elementary School
3501 Poston Parkway
Highlands Ranch, CO 80126

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Copper Mesa Elementary School",'Highlands_Ranch=' + Highlands_Ranch.length); Parker[Parker.length] = createMarker(new GPoint(-104.75586700,39.53542328),"
Core Knowledge Charter School
1161 Pine Drive
Parker, CO 80138

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Core Knowledge Charter School",'Parker=' + Parker.length); Highlands_Ranch[Highlands_Ranch.length] = createMarker(new GPoint(-104.95103455,39.55529785),"
Cougar Run Elementary School
8780 Venneford Ranch Road
Highlands Ranch, CO 80126

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Cougar Run Elementary School",'Highlands_Ranch=' + Highlands_Ranch.length); Highlands_Ranch[Highlands_Ranch.length] = createMarker(new GPoint(-105.02275085,39.52761459),"
Coyote Creek Elementary School
2861 Baneberry Court
Highlands Ranch, CO 80129

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Coyote Creek Elementary School",'Highlands_Ranch=' + Highlands_Ranch.length); Highlands_Ranch[Highlands_Ranch.length] = createMarker(new GPoint(-104.92893219,39.55271912),"
Cresthill Middle School
9195 Cresthill Lane
Highlands Ranch, CO 80130

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Cresthill Middle School",'Highlands_Ranch=' + Highlands_Ranch.length); Castle_Rock[Castle_Rock.length] = createMarker(new GPoint(-104.87856293,39.47209167),"
D C S Montessori Charter School
311 East Castle Pines Parkway
Castle Rock, CO 80108

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("D C S Montessori Charter School",'Castle_Rock=' + Castle_Rock.length); Parker[Parker.length] = createMarker(new GPoint(-104.77082062,39.52215195),"
Daniel C Oakes High School
11722 Dransfelt Road
Parker, CO 80134

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Daniel C Oakes High School",'Parker=' + Parker.length); Castle_Rock[Castle_Rock.length] = createMarker(new GPoint(-104.85353088,39.36944199),"
Daniel C Oakes High School--castle Rock
961 Plum Creek Blvd.
Castle Rock, CO 80104

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Daniel C Oakes High School--castle Rock",'Castle_Rock=' + Castle_Rock.length); Castle_Rock[Castle_Rock.length] = createMarker(new GPoint(-104.85947418,39.39690781),"
Douglas County High School
2842 Front Street
Castle Rock, CO 80104

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Douglas County High School",'Castle_Rock=' + Castle_Rock.length); Highlands_Ranch[Highlands_Ranch.length] = createMarker(new GPoint(-104.92887878,39.54772949),"
Eagle Academy
9375 Cresthill Lane
Highlands Ranch, CO 80130

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Eagle Academy",'Highlands_Ranch=' + Highlands_Ranch.length); Lone_Tree[Lone_Tree.length] = createMarker(new GPoint(-104.90102386,39.54600143),"
Eagle Ridge Elementary School
7716 Timberline Road
Lone Tree, CO 80124

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Eagle Ridge Elementary School",'Lone_Tree=' + Lone_Tree.length); Highlands_Ranch[Highlands_Ranch.length] = createMarker(new GPoint(-104.99402618,39.54199219),"
Eldorado Elementary School
1305 Timbervale Trail
Highlands Ranch, CO 80126

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Eldorado Elementary School",'Highlands_Ranch=' + Highlands_Ranch.length); Castle_Rock[Castle_Rock.length] = createMarker(new GPoint(-104.87544250,39.38386154),"
Flagstone Elementary School
104 Lovington Street
Castle Rock, CO 80104

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Flagstone Elementary School",'Castle_Rock=' + Castle_Rock.length); Highlands_Ranch[Highlands_Ranch.length] = createMarker(new GPoint(-104.91028595,39.54666519),"
Fox Creek Elementary School
6585 Collegiate Drive
Highlands Ranch, CO 80130

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Fox Creek Elementary School",'Highlands_Ranch=' + Highlands_Ranch.length); Franktown[Franktown.length] = createMarker(new GPoint(-104.70880127,39.35630035),"
Franktown Elementary School
1384 N. Hwy 83
Franktown, CO 80116

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Franktown Elementary School",'Franktown=' + Franktown.length); Parker[Parker.length] = createMarker(new GPoint(-104.71534729,39.50170135),"
Frontier Valley Elementary School
23919 East Canterberry Trail
Parker, CO 80138

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Frontier Valley Elementary School",'Parker=' + Parker.length); Highlands_Ranch[Highlands_Ranch.length] = createMarker(new GPoint(-104.95049286,39.53150177),"
Heritage Elementary School
3350 Summit View Parkway
Highlands Ranch, CO 80126

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Heritage Elementary School",'Highlands_Ranch=' + Highlands_Ranch.length); Highlands_Ranch[Highlands_Ranch.length] = createMarker(new GPoint(-104.92887878,39.54772949),"
Highlands Ranch High School
9375 Cresthill Lane
Highlands Ranch, CO 80130

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Highlands Ranch High School",'Highlands_Ranch=' + Highlands_Ranch.length); Littleton[Littleton.length] = createMarker(new GPoint(-105.01170600,39.51931000),"
Hope Online Learning Academy Co-op
6728 Lakeside Circle
Littleton, CO 80125

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Hope Online Learning Academy Co-op",'Littleton=' + Littleton.length); Parker[Parker.length] = createMarker(new GPoint(-104.75708771,39.50431061),"
Iron Horse Elementary School
20151 Tallman Drive
Parker, CO 80138

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Iron Horse Elementary School",'Parker=' + Parker.length); Larkspur[Larkspur.length] = createMarker(new GPoint(-104.90564728,39.23212051),"
Larkspur Elementary School
1103 West Perry Park Avenue
Larkspur, CO 80118

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Larkspur Elementary School",'Larkspur=' + Larkspur.length); Parker[Parker.length] = createMarker(new GPoint(-104.78459930,39.56019974),"
Legacy Point Elementary School
12736 South Red Rosa Circle
Parker, CO 80134

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Legacy Point Elementary School",'Parker=' + Parker.length); Castle_Rock[Castle_Rock.length] = createMarker(new GPoint(-104.84279633,39.35900497),"
Meadow View Elementary School
3700 Butterfield Crossing
Castle Rock, CO 80109

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Meadow View Elementary School",'Castle_Rock=' + Castle_Rock.length); Highlands_Ranch[Highlands_Ranch.length] = createMarker(new GPoint(-104.96378326,39.52312469),"
Mountain Ridge Middle School
10590 Mountain Vista Ridge
Highlands Ranch, CO 80126

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Mountain Ridge Middle School",'Highlands_Ranch=' + Highlands_Ranch.length); Parker[Parker.length] = createMarker(new GPoint(-104.72796631,39.45489883),"
Mountain View Elementary School
8502 East Pinery Parkway
Parker, CO 80134

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Mountain View Elementary School",'Parker=' + Parker.length); Highlands_Ranch[Highlands_Ranch.length] = createMarker(new GPoint(-104.96414948,39.52317429),"
Mountain Vista High School
10585 Mountain Vista Ridge
Highlands Ranch, CO 80126

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mountain Vista High School",'Highlands_Ranch=' + Highlands_Ranch.length); Parker[Parker.length] = createMarker(new GPoint(-104.75883484,39.46315002),"
Northeast Elementary School
6598 North State Highway 83
Parker, CO 80134

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Northeast Elementary School",'Parker=' + Parker.length); Highlands_Ranch[Highlands_Ranch.length] = createMarker(new GPoint(-104.98352051,39.55095291),"
Northridge Elementary School
555 South Park Road
Highlands Ranch, CO 80126

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Northridge Elementary School",'Highlands_Ranch=' + Highlands_Ranch.length); Parker[Parker.length] = createMarker(new GPoint(-104.80696869,39.52658463),"
Pine Grove Elementary School
10450 Stonegate Parkway
Parker, CO 80134

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Pine Grove Elementary School",'Parker=' + Parker.length); Parker[Parker.length] = createMarker(new GPoint(-104.76572418,39.54408264),"
Pine Lane Intermediate School
6485 E Ponderosa Drive
Parker, CO 80138

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Pine Lane Intermediate School",'Parker=' + Parker.length); Parker[Parker.length] = createMarker(new GPoint(-104.76828766,39.54105377),"
Pine Lane Primary School
6475 East Ponderosa Drive
Parker, CO 80138

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Pine Lane Primary School",'Parker=' + Parker.length); Parker[Parker.length] = createMarker(new GPoint(-104.73761749,39.51268768),"
Pioneer Elementary School
10881 Riva Ridge Street
Parker, CO 80138

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Pioneer Elementary School",'Parker=' + Parker.length); Highlands_Ranch[Highlands_Ranch.length] = createMarker(new GPoint(-104.94056702,39.55002213),"
Platte River Charter Academy
4085 S. Lark Sparrow St.
Highlands Ranch, CO 80130

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Platte River Charter Academy",'Highlands_Ranch=' + Highlands_Ranch.length); Littleton[Littleton.length] = createMarker(new GPoint(-105.04100037,39.55077744),"
Plum Creek Academy Day Treatment
8236 Carder Court
Littleton, CO 80125

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Plum Creek Academy Day Treatment",'Littleton=' + Littleton.length); Parker[Parker.length] = createMarker(new GPoint(-104.75813293,39.43453979),"
Ponderosa High School
7007 East Bayou Gulch Road
Parker, CO 80134

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ponderosa High School",'Parker=' + Parker.length); Parker[Parker.length] = createMarker(new GPoint(-104.79777527,39.51038742),"
Prairie Crossing Elementary School
11605 South Bradbury Ranch Dri
Parker, CO 80134

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Prairie Crossing Elementary School",'Parker=' + Parker.length); Highlands_Ranch[Highlands_Ranch.length] = createMarker(new GPoint(-105.00922394,39.53150177),"
Ranch View Middle School
1731 Wildcat Reserve Parkway
Highlands Ranch, CO 80129

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Ranch View Middle School",'Highlands_Ranch=' + Highlands_Ranch.length); Highlands_Ranch[Highlands_Ranch.length] = createMarker(new GPoint(-104.91980200,39.53499900),"
Redstone Elementary School
9970 Glenstone Circle
Highlands Ranch, CO 80130

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Redstone Elementary School",'Highlands_Ranch=' + Highlands_Ranch.length); Parker[Parker.length] = createMarker(new GPoint(-104.80348969,39.52904129),"
Renaissance Charter School
16700 Keystone Boulevard
Parker, CO 80134

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Renaissance Charter School",'Parker=' + Parker.length); Parker[Parker.length] = createMarker(new GPoint(-104.79684448,39.53719711),"
Renaissance Expedition Learn Outward Bound School
16700 Keystone Boulevard
Parker, CO 80134

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Renaissance Expedition Learn Outward Bound School",'Parker=' + Parker.length); Littleton[Littleton.length] = createMarker(new GPoint(-104.89025879,39.52909851),"
Rock Canyon High School
5810 Mac Arthur Ranch Road
Littleton, CO 80124

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Rock Canyon High School",'Littleton=' + Littleton.length); Castle_Rock[Castle_Rock.length] = createMarker(new GPoint(-104.81445312,39.37213898),"
Rock Ridge Elementary School
400 North Heritage Road
Castle Rock, CO 80104

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Rock Ridge Elementary School",'Castle_Rock=' + Castle_Rock.length); Littleton[Littleton.length] = createMarker(new GPoint(-104.89025879,39.52909851),"
Rocky Heights Middle School
11033 Monarch Boulevard
Littleton, CO 80124

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Rocky Heights Middle School",'Littleton=' + Littleton.length); Littleton[Littleton.length] = createMarker(new GPoint(-105.08034515,39.47826385),"
Roxborough Elementary School
8000 Village Circle West
Littleton, CO 80125

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Roxborough Elementary School",'Littleton=' + Littleton.length); Highlands_Ranch[Highlands_Ranch.length] = createMarker(new GPoint(-104.99564362,39.53122330),"
Saddle Ranch Elementary School
805 West English Sparrow Trail
Highlands Ranch, CO 80129

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Saddle Ranch Elementary School",'Highlands_Ranch=' + Highlands_Ranch.length); Parker[Parker.length] = createMarker(new GPoint(-104.73977200,39.43159200),"
Sagewood Middle School
4725 Fox Sparrow Road
Parker, CO 80134

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Sagewood Middle School",'Parker=' + Parker.length); Highlands_Ranch[Highlands_Ranch.length] = createMarker(new GPoint(-104.96462250,39.56111908),"
Sand Creek Elementary School
8898 South Maplewood Drive
Highlands Ranch, CO 80126

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Sand Creek Elementary School",'Highlands_Ranch=' + Highlands_Ranch.length); Sedalia[Sedalia.length] = createMarker(new GPoint(-104.96939087,39.43692017),"
Sedalia Elementary School
5449 North Huxtable Street
Sedalia, CO 80135

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Sedalia Elementary School",'Sedalia=' + Sedalia.length); Parker[Parker.length] = createMarker(new GPoint(-104.76324463,39.54409027),"
Sierra Middle School
6651 Pine Lane Avenue
Parker, CO 80138

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Sierra Middle School",'Parker=' + Parker.length); Castle_Rock[Castle_Rock.length] = createMarker(new GPoint(-104.91322600,39.39294400),"
Soaring Hawk Elementary School
4665 Tanglevine Drive
Castle Rock, CO 80109

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Soaring Hawk Elementary School",'Castle_Rock=' + Castle_Rock.length); Castle_Rock[Castle_Rock.length] = createMarker(new GPoint(-104.84489441,39.37003326),"
South Street Elementary School
1100 South Street
Castle Rock, CO 80104

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("South Street Elementary School",'Castle_Rock=' + Castle_Rock.length); Highlands_Ranch[Highlands_Ranch.length] = createMarker(new GPoint(-104.96273804,39.53251266),"
Summit View Elementary School
10200 South Piedmont Drive
Highlands Ranch, CO 80126

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Summit View Elementary School",'Highlands_Ranch=' + Highlands_Ranch.length); Highlands_Ranch[Highlands_Ranch.length] = createMarker(new GPoint(-105.01390839,39.53445816),"
Thunderridge High School
1991 Wildcat Reserve Parkway
Highlands Ranch, CO 80129

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Thunderridge High School",'Highlands_Ranch=' + Highlands_Ranch.length); Castle_Rock[Castle_Rock.length] = createMarker(new GPoint(-104.87544250,39.38386154),"
Timber Trail Elementary School
690 West Castle Pines Parkway
Castle Rock, CO 80108

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Timber Trail Elementary School",'Castle_Rock=' + Castle_Rock.length); Highlands_Ranch[Highlands_Ranch.length] = createMarker(new GPoint(-105.01950836,39.53876877),"
Trailblazer Elementary School
9760 South Hackberry
Highlands Ranch, CO 80126

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Trailblazer Elementary School",'Highlands_Ranch=' + Highlands_Ranch.length); Littleton[Littleton.length] = createMarker(new GPoint(-104.91043854,39.52305222),"
Wildcat Mountain Elementary School
6585 Lionshead Parkway
Littleton, CO 80124

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Wildcat Mountain Elementary School",'Littleton=' + Littleton.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(Castle_Rock); map.removeOverlays(Franktown); map.removeOverlays(Highlands_Ranch); map.removeOverlays(Larkspur); map.removeOverlays(Littleton); map.removeOverlays(Lone_Tree); map.removeOverlays(Parker); map.removeOverlays(Sedalia); 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(Castle_Rock);map.removeOverlays(Castle_Rock); map.removeOverlays(Franktown); map.removeOverlays(Highlands_Ranch); map.removeOverlays(Larkspur); map.removeOverlays(Littleton); map.removeOverlays(Lone_Tree); map.removeOverlays(Parker); map.removeOverlays(Sedalia); map.addOverlays(Castle_Rock); centerByArray(Castle_Rock, false, false); cntMarker += Castle_Rock.length; map.addOverlays(Franktown); centerByArray(Franktown, false, false); cntMarker += Franktown.length; map.addOverlays(Highlands_Ranch); centerByArray(Highlands_Ranch, false, false); cntMarker += Highlands_Ranch.length; map.addOverlays(Larkspur); centerByArray(Larkspur, false, false); cntMarker += Larkspur.length; map.addOverlays(Littleton); centerByArray(Littleton, false, false); cntMarker += Littleton.length; map.addOverlays(Lone_Tree); centerByArray(Lone_Tree, false, false); cntMarker += Lone_Tree.length; map.addOverlays(Parker); centerByArray(Parker, false, false); cntMarker += Parker.length; map.addOverlays(Sedalia); centerByArray(Sedalia, false, false); cntMarker += Sedalia.length; centerByArray(Castle_Rock,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'); } }