function addMarkers(){ mySelect = document.getElementById('selection'); Burbank = [];Burbank[Burbank.length] = createMarker(new GPoint(-118.34537500,34.16376100),"
American Lutheran Elementary School
755 N Whitnall Highway
Burbank, CA 91505
Co-ed school, K-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("American Lutheran Elementary School",'Burbank=' + Burbank.length); Burbank[Burbank.length] = createMarker(new GPoint(-118.30560300,34.18404700),"
Bellarmine-jefferson High School
465 E Olive Avenue
Burbank, CA 91501
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bellarmine-jefferson High School",'Burbank=' + Burbank.length); Burbank[Burbank.length] = createMarker(new GPoint(-118.32981900,34.18463700),"
Burbank Edu-care Preschool
1709 W Victory Blvd
Burbank, CA 91506
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Burbank Edu-care Preschool",'Burbank=' + Burbank.length); Burbank[Burbank.length] = createMarker(new GPoint(-118.34063100,34.15448500),"
Burbank Montessori Academy
217 N Hollywood Way
Burbank, CA 91505
Co-ed school, PK-1
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Burbank Montessori Academy",'Burbank=' + Burbank.length); Burbank[Burbank.length] = createMarker(new GPoint(-118.29747900,34.17650700),"
First Lutheran School
1001 S. Glenoaks Blvd.
Burbank, CA 91502
Co-ed school, KG-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("First Lutheran School",'Burbank=' + Burbank.length); Burbank[Burbank.length] = createMarker(new GPoint(-118.33222000,34.16701600),"
Learning Academy, The
510 N. Buena Vista Ave.
Burbank, CA 91505
Co-ed school, PK-4
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Learning Academy, The",'Burbank=' + Burbank.length); Burbank[Burbank.length] = createMarker(new GPoint(-118.30260700,34.17621600),"
Little Angels
721 S San Fernando Blvd
Burbank, CA 91502
Co-ed school, K-2
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Little Angels",'Burbank=' + Burbank.length); Burbank[Burbank.length] = createMarker(new GPoint(-118.32582900,34.17516100),"
Media Center Montessori Preschool
1601 W Magnolia Blvd
Burbank, CA 91506
school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Media Center Montessori Preschool",'Burbank=' + Burbank.length); Burbank[Burbank.length] = createMarker(new GPoint(-118.33731000,34.17882900),"
Montessori Children's Academie
2400 W Burbank Blvd
Burbank, CA 91506
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Montessori Children's Academie",'Burbank=' + Burbank.length); Burbank[Burbank.length] = createMarker(new GPoint(-118.31290600,34.16641900),"
Music Box Preschool & Kindergarten
720 S Main Street
Burbank, CA 91506
Co-ed school, NS-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Music Box Preschool & Kindergarten",'Burbank=' + Burbank.length); Burbank[Burbank.length] = createMarker(new GPoint(-118.35282700,34.18493700),"
New Generation
3821 W Victory Blvd
Burbank, CA 91505
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("New Generation",'Burbank=' + Burbank.length); Burbank[Burbank.length] = createMarker(new GPoint(-118.32700100,34.15550800),"
Providence High School
511 S Buena Vista Street
Burbank, CA 91505
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Providence High School",'Burbank=' + Burbank.length); Burbank[Burbank.length] = createMarker(new GPoint(-118.32639600,34.16398700),"
St. Finbar School
2120 W Olive Avenue
Burbank, CA 91506
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Finbar School",'Burbank=' + Burbank.length); Burbank[Burbank.length] = createMarker(new GPoint(-118.33549100,34.20988400),"
St. Francis Xavier School
3601 Scott Road
Burbank, CA 91504
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. Francis Xavier School",'Burbank=' + Burbank.length); Burbank[Burbank.length] = createMarker(new GPoint(-118.30548500,34.18488500),"
St Robert Bellarmine Elementary School
154 N 5th Street
Burbank, CA 91501
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Robert Bellarmine Elementary School",'Burbank=' + Burbank.length); Burbank[Burbank.length] = createMarker(new GPoint(-82.38178800,29.70353600),"
Stepping Stones Preschool And Kindergarten
332 E Valencia Avenue
Burbank, CA 91502
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Stepping Stones Preschool And Kindergarten",'Burbank=' + Burbank.length); Burbank[Burbank.length] = createMarker(new GPoint(-118.29840800,34.17564000),"
Study Circle Preschool And Kindergarten
310 E Alameda Avenue
Burbank, CA 91502
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Study Circle Preschool And Kindergarten",'Burbank=' + Burbank.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(Burbank); 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(Burbank);map.removeOverlays(Burbank); map.addOverlays(Burbank); centerByArray(Burbank, false, false); cntMarker += Burbank.length; centerByArray(Burbank,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; }