function addMarkers() { mySelect = document.getElementById('selection'); Santa_Fe = [];Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.98281097,35.65986633),"
Academy Charter
2516 Cerrillos Road
Santa Fe, NM 87505

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Academy Charter",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.94000244,35.64720154),"
AcademyTech. & Classic High School
P.o. Box 8646
Santa Fe, NM 87505

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("AcademyTech. & Classic High School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.93017578,35.68003082),"
Acequia Madre Elementary School
700 Acequia Madre St
Santa Fe, NM 87501

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Acequia Madre Elementary School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.92089844,35.72639847),"
Agua Fria Elementary School
3160 Agia Fria St
Santa Fe, NM 87501

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Agua Fria Elementary School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.96083832,35.68401337),"
Alameda Middle School
450 La Madera Street
Santa Fe, NM 87501

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Alameda Middle School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.95227814,35.68226242),"
Alvord Elementary School
551 Alarid Street
Santa Fe, NM 87501

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Alvord Elementary School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.91457367,35.67523193),"
Atalaya Elementary School
721 Camino Cabra
Santa Fe, NM 87501

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Atalaya Elementary School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.96107483,35.68463135),"
Becc Elementary School
430 La Madera
Santa Fe, NM 87501

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Becc Elementary School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-106.04093170,35.62477493),"
Caesar Chavez Elementary School
6251 Jaguar Drive
Santa Fe, NM 87505

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Caesar Chavez Elementary School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-106.04019928,35.62387085),"
Capital High School
4851 Paseo Del Sol
Santa Fe, NM 87505

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Capital High School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.93467712,35.65172958),"
Capshaw Junior High School
351 East Zia Road
Santa Fe, NM 87501

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Capshaw Junior High School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.94177246,35.69113159),"
Carlos Gilbert Elementary School
300 Griffin Street
Santa Fe, NM 87501

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Carlos Gilbert Elementary School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.92089844,35.72639847),"
Chaparral Elementary School
2451 Avenida Chaparr
Santa Fe, NM 87501

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Chaparral Elementary School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.97212219,35.65732574),"
De Vargas Junior High School
1750 Llano Rd
Santa Fe, NM 87505

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("De Vargas Junior High School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.95095062,35.66371536),"
E J Martinez Elementary School
401 N. San Mateo
Santa Fe, NM 87501

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("E J Martinez Elementary School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.93939972,35.64699936),"
El Dorado Elementary School
2 Avenida Torreon
Santa Fe, NM 87505

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("El Dorado Elementary School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.98233032,35.65209961),"
Francis X Nava Elementary School
2655 Siringo Road
Santa Fe, NM 87505

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Francis X Nava Elementary School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.95579529,35.68865967),"
Gonzales Elementary School
851 West Alameda
Santa Fe, NM 87501

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Gonzales Elementary School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.96202850,35.66986084),"
Kaune Elementary School
1409 Monterey Drive
Santa Fe, NM 87501

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Kaune Elementary School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.92089844,35.72639847),"
Kearny Elementary School
901 Avenida Campanas
Santa Fe, NM 87501

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Kearny Elementary School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.92089844,35.72639847),"
La Nueva Vida
La Maderaagua Fria
Santa Fe, NM 87501

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("La Nueva Vida",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.92089844,35.72639847),"
Larragoite Elementary School
1604 Aqua Fria St
Santa Fe, NM 87501

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Larragoite Elementary School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.93939972,35.64699936),"
Monte Del Sol Charte High School
P.o. Box 4068
Santa Fe, NM 87505

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Monte Del Sol Charte High School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.96440125,35.63625336),"
Ortiz Middle School
4164 South Meadows
Santa Fe, NM 87501

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Ortiz Middle School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.93939972,35.64699936),"
Pinon Elementary School
2921 Camino Caballos
Santa Fe, NM 87505

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Pinon Elementary School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.92089844,35.72639847),"
Pojoaque High School
P.o.box 3468 Poj Sta
Santa Fe, NM 87501

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Pojoaque High School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.92089844,35.72639847),"
Pojoaque Intermed Middle School
P.o.box 3468 Poj Sta
Santa Fe, NM 87501

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Pojoaque Intermed Middle School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.92089844,35.72639847),"
Pojoaque Middle School
P.o.box 3468 Poj Sta
Santa Fe, NM 87501

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Pojoaque Middle School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.92089844,35.72639847),"
Pojoaque Primary Elementary School
P.o.box 3468 Poj Sta
Santa Fe, NM 87501

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Pojoaque Primary Elementary School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-106.03047943,35.63766479),"
R M Sweeney Elementary School
501 Airport Road
Santa Fe, NM 87505

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("R M Sweeney Elementary School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.94000244,35.64720154),"
Ramirez Thomas Elementary School
610 Alta Vista
Santa Fe, NM 87505

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Ramirez Thomas Elementary School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.97767639,35.66382980),"
Salazar Elementary School
1300 Osage
Santa Fe, NM 87501

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Salazar Elementary School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-106.04989624,35.88339996),"
San Ildefonso Day School
Route 5, Box 308
Santa Fe, NM 87501

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("San Ildefonso Day School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.98475647,35.63582611),"
Santa Fe High School
2100 Yucca Road
Santa Fe, NM 87501

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Santa Fe High School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.98500061,35.80989838),"
Santa Fe Indian School
P.o. Box 5340
Santa Fe, NM 87501

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Santa Fe Indian School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.98469300,35.65875100),"
Ser Program
2516 Cerrillos Road
Santa Fe, NM 87501

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Ser Program",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-106.06052399,35.63358307),"
Sf County Jdc
4250 Airport Rd
Santa Fe, NM 87505

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sf County Jdc",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.91877300,35.67960000),"
Sfe Hdst
1150 Canyon Road
Santa Fe, NM 87501

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Sfe Hdst",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.95635223,35.67609406),"
Ssps/nmsd Elementary School
1060 Cerrillos Rd.
Santa Fe, NM 87503

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Ssps/nmsd Elementary School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.93715668,35.68666077),"
Te Tsu Geh Oweenge Day School (tesuque)
Route 42, Box 2
Santa Fe, NM 87506

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Te Tsu Geh Oweenge Day School (tesuque)",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.92089844,35.72639847),"
Turquoise Trail Elementary School
13 A San Marcos Loop
Santa Fe, NM 87508

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Turquoise Trail Elementary School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.94055939,35.67940903),"
Wood-gormley Elementary School
141 East Booth St
Santa Fe, NM 87501

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Wood-gormley Elementary School",'Santa_Fe=' + Santa_Fe.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(Santa_Fe); 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(Santa_Fe);map.removeOverlays(Santa_Fe); map.addOverlays(Santa_Fe); centerByArray(Santa_Fe, false, false); cntMarker += Santa_Fe.length; centerByArray(Santa_Fe,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'); } }