function addMarkers(){ mySelect = document.getElementById('selection'); Santa_Fe = [];Edgewood = [];Santa_Cruz = [];mySelect.options[mySelect.options.length] = new Option("Edgewood schools",'all=Edgewood'); mySelect.options[mySelect.options.length] = new Option("Santa Cruz schools",'all=Santa_Cruz'); mySelect.options[mySelect.options.length] = new Option("Santa Fe schools",'all=Santa_Fe'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.95577800,35.67655300),"
The Childrens School
1060 Cerrillos Road
Santa Fe, NM 87501
Co-ed school, PK-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Childrens School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.95299200,35.65213700),"
Christian Life Academy
121 Siringo Road
Santa Fe, NM 87505
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Christian Life Academy",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.91867300,35.67876900),"
Cristo Rey Elementary School
316 Camino Delora
Santa Fe, NM 87505
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Cristo Rey Elementary School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.96500800,35.68297100),"
Desert Academy
313 Camino Alire
Santa Fe, NM 87501
Co-ed school, 7-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Desert Academy",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.91865200,35.67871600),"
Desert Montessori School
316 Camino Delora
Santa Fe, NM 87505
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Desert Montessori School",'Santa_Fe=' + Santa_Fe.length); Edgewood[Edgewood.length] = createMarker(new GPoint(-106.19300000,35.08160000),"
Edgewood Christian School
Po Box 949
Edgewood, NM 87015
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Edgewood Christian School",'Edgewood=' + Edgewood.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.96333400,35.67794700),"
Fayette St Academy
830 Fayette Street
Santa Fe, NM 87505
Co-ed school, 1-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Fayette St Academy",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.93189000,35.67791900),"
Garcia Street Club, Inc.
569 Garcia St
Santa Fe, NM 87505
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Garcia Street Club, Inc.",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.91057600,35.67882000),"
The Gentle Nudge
1341 Canyon Road
Santa Fe, NM 87501
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Gentle Nudge",'Santa_Fe=' + Santa_Fe.length); Santa_Cruz[Santa_Cruz.length] = createMarker(new GPoint(-106.02640000,35.94810000),"
Holy Cross Catholic School
Po Box 1260
Santa Cruz, NM 87567
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Holy Cross Catholic School",'Santa_Cruz=' + Santa_Cruz.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.95455900,35.69649100),"
La Casita Pre School And Kindergarten
438 Alamo Drive
Santa Fe, NM 87501
Co-ed school, PK-KG
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("La Casita Pre School And Kindergarten",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.92739300,35.63281800),"
La Mariposa Montessori
18 Puesta Del Sol
Santa Fe, NM 87508
Co-ed school, PK-7
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("La Mariposa Montessori",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.94841400,35.64587800),"
Little Earth School
321 W Zia Road
Santa Fe, NM 87505
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Little Earth School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.99848000,35.62450600),"
Mission Viejo Christian Academy
4601 Mission Bend
Santa Fe, NM 87505
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mission Viejo Christian Academy",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.90931300,35.53923900),"
Monte Vista Montessori School
172 Avenida Vista Grande
Santa Fe, NM 87508
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Monte Vista Montessori School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.97779600,35.63451700),"
The Montessori Childrens House
2638 Via Caballero Del Nort
Santa Fe, NM 87505
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Montessori Childrens House",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.95336900,35.65686500),"
Montessori Discovery School
2047 Galisteo Street
Santa Fe, NM 87505
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Montessori Discovery School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.92305200,35.64045100),"
New Mexico Academy For Sci
7300 Old Santa Fe Trail
Santa Fe, NM 87505
Co-ed school, 6-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("New Mexico Academy For Sci",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.96422500,35.68042200),"
Philos School
1320 Aqua Fria
Santa Fe, NM 87501
Co-ed school, 3-9
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Philos School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.95652100,35.68733600),"
Reach The Children School
935 Alto Street
Santa Fe, NM 87501
Co-ed school, 1-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Reach The Children School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.91343900,35.67287800),"
Rio Grande School
715 Camino Cabra
Santa Fe, NM 87505
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Rio Grande School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.94823000,35.64561600),"
Santa Fe Girls' School
310 W Zia Road
Santa Fe, NM 87505
All-girls school, 6-8
[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Santa Fe Girls' School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.91326100,35.66918600),"
Santa Fe Preparatory School
1101 Camino De Cruz Blanca
Santa Fe, NM 87505
Co-ed school, 8-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Santa Fe Preparatory School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-106.03666300,35.62780000),"
Santa Fe School For The Arts
5912 Jaguar Drive
Santa Fe, NM 87507
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Santa Fe School For The Arts",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.95459300,35.68705600),"
Santa Fe Secondary School
230 St. Francis Dr.
Santa Fe, NM 87501
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Santa Fe Secondary School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.92858900,35.63329500),"
Santa Fe Waldorf School
26 Puesta Del Sol
Santa Fe, NM 87508
Co-ed school, NS-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Santa Fe Waldorf School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.97459500,35.64859600),"
Small World Learning
2520 Cactus Yucca C4z
Santa Fe, NM 87505
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Small World Learning",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.93475000,35.68453600),"
St Francis Cathedral School
275 E Alameda Street
Santa Fe, NM 87501
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Francis Cathedral School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.95036700,35.65186300),"
St Michaels High School
100 Siringo Road
Santa Fe, NM 87505
Co-ed school, 8-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Michaels High School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.96426900,35.68041200),"
Tara School
1320 Aqua Fria Street
Santa Fe, NM 87501
Co-ed school, 1-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Tara School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.97396800,35.65159000),"
Temple Baptist Christian School
2103 Yucca Street
Santa Fe, NM 87505
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Temple Baptist Christian School",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.94023600,35.67243700),"
Temple Beth Shalom Preschool
205 E Barcelona Road
Santa Fe, NM 87505
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Temple Beth Shalom Preschool",'Santa_Fe=' + Santa_Fe.length); Santa_Fe[Santa_Fe.length] = createMarker(new GPoint(-105.95100100,35.65448400),"
The Tutorial School
400 Brunn School Rd
Santa Fe, NM 87505
Co-ed school, NS-NS
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Tutorial 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,11); /* 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/////3/' + showArray); map.removeOverlays(Edgewood); map.removeOverlays(Santa_Cruz); 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(Edgewood); map.removeOverlays(Santa_Cruz); map.removeOverlays(Santa_Fe); map.addOverlays(Edgewood); centerByArray(Edgewood, false, false); cntMarker += Edgewood.length; map.addOverlays(Santa_Cruz); centerByArray(Santa_Cruz, false, false); cntMarker += Santa_Cruz.length; 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'); //window.open('/map.php?type=1&schools=&school_level=3&radius=&zipcode=&school_type_search=&school_type_code='); } } function createMarker(point, label, icon) { var marker = new GMarker(point, icon); var html = label; GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml(html); }); return marker; }