function addMarkers(){ mySelect = document.getElementById('selection'); Scottsdale = [];Scottsdale[Scottsdale.length] = createMarker(new GPoint(-111.92623800,33.59927600),"
Arizona International Academy
12430 N Scottsdale Road
Scottsdale, AZ 85254
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Arizona International Academy",'Scottsdale=' + Scottsdale.length); Scottsdale[Scottsdale.length] = createMarker(new GPoint(-111.94346500,33.58869400),"
Blessed Sacrament Preschool And Kindergarten
11300 N 64th Street
Scottsdale, AZ 85254
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Blessed Sacrament Preschool And Kindergarten",'Scottsdale=' + Scottsdale.length); Scottsdale[Scottsdale.length] = createMarker(new GPoint(-111.87333100,33.59083100),"
Camelback Desert School
9606 E. Kalil Drive
Scottsdale, AZ 85260
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Camelback Desert School",'Scottsdale=' + Scottsdale.length); Scottsdale[Scottsdale.length] = createMarker(new GPoint(-111.94173800,33.58190000),"
Chaparral Christian School
6451 E Shea Blvd
Scottsdale, AZ 85254
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Chaparral Christian School",'Scottsdale=' + Scottsdale.length); Scottsdale[Scottsdale.length] = createMarker(new GPoint(-111.95307200,33.61169700),"
Children's Meeting House
5922 East Thunderbird Road
Scottsdale, AZ 85254
Co-ed school, PK-KG
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Children's Meeting House",'Scottsdale=' + Scottsdale.length); Scottsdale[Scottsdale.length] = createMarker(new GPoint(-111.92616400,33.60265000),"
Desert Sky Montessori
12850 N Scottsdale Rd
Scottsdale, AZ 85254
Co-ed school, PK-KG
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Desert Sky Montessori",'Scottsdale=' + Scottsdale.length); Scottsdale[Scottsdale.length] = createMarker(new GPoint(-111.94245400,33.60423700),"
Devereux
6436 E Sweetwater Avenue
Scottsdale, AZ 85254
Co-ed school, 4-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Devereux",'Scottsdale=' + Scottsdale.length); Scottsdale[Scottsdale.length] = createMarker(new GPoint(-111.87476200,33.60056300),"
El Dorado Private School
9575 E Larkspur Dr
Scottsdale, AZ 85260
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("El Dorado Private School",'Scottsdale=' + Scottsdale.length); Scottsdale[Scottsdale.length] = createMarker(new GPoint(-111.90906300,33.48359300),"
First Impressions Preschool
3110 N. Hayden Rd
Scottsdale, AZ 85251
Co-ed school, NS-1
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("First Impressions Preschool",'Scottsdale=' + Scottsdale.length); Scottsdale[Scottsdale.length] = createMarker(new GPoint(-111.90170600,33.54318800),"
Great Beginnings Montessori
7300 Via Paseo Del Sur
Scottsdale, AZ 85258
Co-ed school, NS-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Great Beginnings Montessori",'Scottsdale=' + Scottsdale.length); Scottsdale[Scottsdale.length] = createMarker(new GPoint(-111.92470700,33.56786300),"
Great Beginnings Montessori Inc
7272 E Gainey Ranch Road 62
Scottsdale, AZ 85258
Co-ed school, PK-1
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Great Beginnings Montessori Inc",'Scottsdale=' + Scottsdale.length); Scottsdale[Scottsdale.length] = createMarker(new GPoint(-111.88616500,33.58468100),"
Hand In Hand Of Scottsdale
10850 N 90th St
Scottsdale, AZ 85260
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Hand In Hand Of Scottsdale",'Scottsdale=' + Scottsdale.length); Scottsdale[Scottsdale.length] = createMarker(new GPoint(-111.91817100,33.48384800),"
Howard S Gray Education Program
7575 E Earll Drive
Scottsdale, AZ 85251
Co-ed school, 5-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Howard S Gray Education Program",'Scottsdale=' + Scottsdale.length); Scottsdale[Scottsdale.length] = createMarker(new GPoint(-111.88277400,33.56953000),"
International School of Arizona
9128 E. San Salvador Dr.
Scottsdale, AZ 85258
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("International School of Arizona",'Scottsdale=' + Scottsdale.length); Scottsdale[Scottsdale.length] = createMarker(new GPoint(-111.97632000,33.62633700),"
Kinder Care Learning Center #1324
4856 E Greenway
Scottsdale, AZ 85254
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Kinder Care Learning Center #1324",'Scottsdale=' + Scottsdale.length); Scottsdale[Scottsdale.length] = createMarker(new GPoint(-111.92565000,33.60173600),"
The King David School
12753 N Scottsdale Road
Scottsdale, AZ 85254
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The King David School",'Scottsdale=' + Scottsdale.length); Scottsdale[Scottsdale.length] = createMarker(new GPoint(-111.89937400,33.61825100),"
La Petite Academy
8433 E Raintree Drive
Scottsdale, AZ 85260
Co-ed school, NS-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("La Petite Academy",'Scottsdale=' + Scottsdale.length); Scottsdale[Scottsdale.length] = createMarker(new GPoint(-111.92113900,33.49398000),"
The Marion Burton School
Po Box 3828
Scottsdale, AZ 85271
Co-ed school, 5-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Marion Burton School",'Scottsdale=' + Scottsdale.length); Scottsdale[Scottsdale.length] = createMarker(new GPoint(-111.80094000,33.58263700),"
Mission Montessori On The Desert
12990 E Shea Blvd
Scottsdale, AZ 85259
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mission Montessori On The Desert",'Scottsdale=' + Scottsdale.length); Scottsdale[Scottsdale.length] = createMarker(new GPoint(-111.91398600,33.46316300),"
New Way Learning Academy
1300 N 77th Street
Scottsdale, AZ 85257
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("New Way Learning Academy",'Scottsdale=' + Scottsdale.length); Scottsdale[Scottsdale.length] = createMarker(new GPoint(-111.87626600,33.63994400),"
Notre Dame Preparatory School
9701 E Bell Road
Scottsdale, AZ 85260
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Notre Dame Preparatory School",'Scottsdale=' + Scottsdale.length); Scottsdale[Scottsdale.length] = createMarker(new GPoint(-111.91733900,33.49201200),"
Our Lady Of Perpetual Help School
3801 N Miller Road
Scottsdale, AZ 85251
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Our Lady Of Perpetual Help School",'Scottsdale=' + Scottsdale.length); Scottsdale[Scottsdale.length] = createMarker(new GPoint(-111.95143400,33.63436200),"
Pope John Xxiii Catholic School Community
16235 N 60th Street
Scottsdale, AZ 85254
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Pope John Xxiii Catholic School Community",'Scottsdale=' + Scottsdale.length); Scottsdale[Scottsdale.length] = createMarker(new GPoint(-111.94299600,33.61003700),"
Rainbow Montessori School
6402 East Voltaire Avenue
Scottsdale, AZ 85254
Co-ed school, PK-2
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Rainbow Montessori School",'Scottsdale=' + Scottsdale.length); Scottsdale[Scottsdale.length] = createMarker(new GPoint(-111.95881500,33.62619900),"
Rancho Solano Private Schools-greenway Campus
5656 E Greenway Road
Scottsdale, AZ 85254
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Rancho Solano Private Schools-greenway Campus",'Scottsdale=' + Scottsdale.length); Scottsdale[Scottsdale.length] = createMarker(new GPoint(-111.89993400,33.52851700),"
St. Maria Goretti Preschool
6261 N. Granite Reef Road
Scottsdale, AZ 85260
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Maria Goretti Preschool",'Scottsdale=' + Scottsdale.length); Scottsdale[Scottsdale.length] = createMarker(new GPoint(-111.87814400,33.61201300),"
Scottsdale Child Care & Learning Center
13831 N 94th Street
Scottsdale, AZ 85260
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Scottsdale Child Care & Learning Center",'Scottsdale=' + Scottsdale.length); Scottsdale[Scottsdale.length] = createMarker(new GPoint(-111.94201300,33.62614600),"
Scottsdale Child Care & Learning Center-kierland
6440 E Greenway Parkway
Scottsdale, AZ 85254
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Scottsdale Child Care & Learning Center-kierland",'Scottsdale=' + Scottsdale.length); Scottsdale[Scottsdale.length] = createMarker(new GPoint(-111.87434300,33.62019400),"
The Scottsdale School Inc
14684 North Frank Lloyd Wright Blvd
Scottsdale, AZ 85260
Co-ed school, K-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Scottsdale School Inc",'Scottsdale=' + Scottsdale.length); Scottsdale[Scottsdale.length] = createMarker(new GPoint(-111.91769800,33.49586100),"
Scottsdale United Methodist Co Operative Preschool and Kindergarten
4140 N. Miller Rd
Scottsdale, AZ 85251
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Scottsdale United Methodist Co Operative Preschool and Kindergarten",'Scottsdale=' + Scottsdale.length); Scottsdale[Scottsdale.length] = createMarker(new GPoint(-111.87428800,33.58273700),"
Shep. Of The Desert Luth School
9590 E Shea Blvd
Scottsdale, AZ 85260
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Shep. Of The Desert Luth School",'Scottsdale=' + Scottsdale.length); Scottsdale[Scottsdale.length] = createMarker(new GPoint(-111.89320600,33.58596300),"
Spatula Soup/the Right Track
8707 E. Mescal St.
Scottsdale, AZ 85260
Co-ed school, PK-4
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Spatula Soup/the Right Track",'Scottsdale=' + Scottsdale.length); Scottsdale[Scottsdale.length] = createMarker(new GPoint(-111.91009200,33.46056300),"
St Daniel The Prophet School
1030 N Hayden Road
Scottsdale, AZ 85257
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Daniel The Prophet School",'Scottsdale=' + Scottsdale.length); Scottsdale[Scottsdale.length] = createMarker(new GPoint(-111.92087300,33.60770000),"
Thunderbird Adventist Academy
7410 East Sutton Drive
Scottsdale, AZ 85260
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Thunderbird Adventist Academy",'Scottsdale=' + Scottsdale.length); Scottsdale[Scottsdale.length] = createMarker(new GPoint(-111.92053200,33.60771600),"
Thunderbird Christian Elementary School
7440 E Sutton Drive
Scottsdale, AZ 85260
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Thunderbird Christian Elementary School",'Scottsdale=' + Scottsdale.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//////' + showArray); map.removeOverlays(Scottsdale); 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(Scottsdale);map.removeOverlays(Scottsdale); map.addOverlays(Scottsdale); centerByArray(Scottsdale, false, false); cntMarker += Scottsdale.length; centerByArray(Scottsdale,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=&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; }