function addMarkers(){ mySelect = document.getElementById('selection'); Glendale = [];Glendale[Glendale.length] = createMarker(new GPoint(-112.18963300,33.58168300),"
Abcs/smithey-link Education Center
6015 W Peoria Avenue
Glendale, AZ 85302
Co-ed school, 4-4
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Abcs/smithey-link Education Center",'Glendale=' + Glendale.length); Glendale[Glendale.length] = createMarker(new GPoint(-112.15193500,33.55323700),"
Adams' Oaks Academy
4312 West Northern Ave
Glendale, AZ 85301
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Adams' Oaks Academy",'Glendale=' + Glendale.length); Glendale[Glendale.length] = createMarker(new GPoint(-112.14597100,33.66201000),"
Arrowhead Christian Academy
4030 W Yorkshire Drive
Glendale, AZ 85308
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Arrowhead Christian Academy",'Glendale=' + Glendale.length); Glendale[Glendale.length] = createMarker(new GPoint(-112.14578100,33.66904800),"
Atonement Lutheran School
4001 W Beardsley Road
Glendale, AZ 85308
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Atonement Lutheran School",'Glendale=' + Glendale.length); Glendale[Glendale.length] = createMarker(new GPoint(-112.16864900,33.63628400),"
Cathedral Christian Academy
16635 N 51st Avenue
Glendale, AZ 85306
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Cathedral Christian Academy",'Glendale=' + Glendale.length); Glendale[Glendale.length] = createMarker(new GPoint(-112.17597000,33.53993700),"
Children's Center For Neurodev
5430 West Glenn Drive
Glendale, AZ 85301
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Children's Center For Neurodev",'Glendale=' + Glendale.length); Glendale[Glendale.length] = createMarker(new GPoint(-112.16903700,33.58002900),"
Childrens World Learning Center
10406 N 51st Avenue
Glendale, AZ 85302
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Childrens World Learning Center",'Glendale=' + Glendale.length); Glendale[Glendale.length] = createMarker(new GPoint(-112.18613400,33.51988000),"
Community Campus
5635 North 59th Ave.
Glendale, AZ 85301
Co-ed school, 7-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Community Campus",'Glendale=' + Glendale.length); Glendale[Glendale.length] = createMarker(new GPoint(-112.23323000,33.53444700),"
The Foundation For Blind Children
6805 N 81st Avenue
Glendale, AZ 85303
Co-ed school, PK-2
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Foundation For Blind Children",'Glendale=' + Glendale.length); Glendale[Glendale.length] = createMarker(new GPoint(-112.18008300,33.54110100),"
Grace Lutheran School
5600 W Palmaire Avenue
Glendale, AZ 85301
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Grace Lutheran School",'Glendale=' + Glendale.length); Glendale[Glendale.length] = createMarker(new GPoint(-112.18390000,33.62520000),"
Hi-star Center For Children
Box 6466
Glendale, AZ 85312
Co-ed school, NS-NS
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Hi-star Center For Children",'Glendale=' + Glendale.length); Glendale[Glendale.length] = createMarker(new GPoint(-112.28695000,33.51286500),"
Hope Montessori School Llc
5348 N 106th Avenue
Glendale, AZ 85307
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Hope Montessori School Llc",'Glendale=' + Glendale.length); Glendale[Glendale.length] = createMarker(new GPoint(-112.22052400,33.67487800),"
Joy Christian School
21000 N 75th Ave
Glendale, AZ 85308
Co-ed school, NS-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Joy Christian School",'Glendale=' + Glendale.length); Glendale[Glendale.length] = createMarker(new GPoint(-112.13513700,33.65480900),"
Kinder Care Learning Center #1103
3524 W Union Hill Drive
Glendale, AZ 85308
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Kinder Care Learning Center #1103",'Glendale=' + Glendale.length); Glendale[Glendale.length] = createMarker(new GPoint(-112.20273400,33.67009800),"
Kindercare Learning Center
20245 North 67th Avenue
Glendale, AZ 85308
Co-ed school, K-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Kindercare Learning Center",'Glendale=' + Glendale.length); Glendale[Glendale.length] = createMarker(new GPoint(-112.20276500,33.66711200),"
La Petite Academy
20195 N 67th Avenue
Glendale, AZ 85308
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("La Petite Academy",'Glendale=' + Glendale.length); Glendale[Glendale.length] = createMarker(new GPoint(-112.18103400,33.54639000),"
Our Lady Of Perpetual Help
7521 N 57th Ave
Glendale, AZ 85301
Co-ed school, NS-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Our Lady Of Perpetual Help",'Glendale=' + Glendale.length); Glendale[Glendale.length] = createMarker(new GPoint(-112.13543500,33.65478000),"
Rancho Solano Private School
3540 W Union Hills Drive
Glendale, AZ 85308
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Rancho Solano Private School",'Glendale=' + Glendale.length); Glendale[Glendale.length] = createMarker(new GPoint(-112.19076400,33.56476700),"
Saguaro Center For Exceptional Education
8802 North 61st Avenue
Glendale, AZ 85302
Co-ed school, 3-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Saguaro Center For Exceptional Education",'Glendale=' + Glendale.length); Glendale[Glendale.length] = createMarker(new GPoint(-112.15222600,33.53100900),"
St. Louis The King Elementary School
4331 W Maryland Avenue
Glendale, AZ 85301
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Louis The King Elementary School",'Glendale=' + Glendale.length); Glendale[Glendale.length] = createMarker(new GPoint(-112.15967900,33.61472200),"
Sunrise Montessori School
14233 North 47th Avenue
Glendale, AZ 85306
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sunrise Montessori School",'Glendale=' + Glendale.length); Glendale[Glendale.length] = createMarker(new GPoint(-112.20301700,33.57893300),"
Tutor Time
10260 N 67th Avenue
Glendale, AZ 85302
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Tutor Time",'Glendale=' + Glendale.length); Glendale[Glendale.length] = createMarker(new GPoint(-112.17912900,33.63906700),"
Tutor Time Child Care Learning Center
5550 W Bell Road
Glendale, AZ 85308
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Tutor Time Child Care Learning Center",'Glendale=' + Glendale.length); Glendale[Glendale.length] = createMarker(new GPoint(-112.16829500,33.65434800),"
Valley Child Care
5041 West Union Hills
Glendale, AZ 85308
Co-ed school, NS-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Valley Child Care",'Glendale=' + Glendale.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(Glendale); 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(Glendale);map.removeOverlays(Glendale); map.addOverlays(Glendale); centerByArray(Glendale, false, false); cntMarker += Glendale.length; centerByArray(Glendale,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; }