function addMarkers() { mySelect = document.getElementById('selection'); Pompano_Beach = [];Pompano_Beach[Pompano_Beach.length] = createMarker(new GPoint(-80.13076782,26.24290848),"
Blanche Ely High School
1201 Nw 6th Avenue
Pompano Beach, FL 33060

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Blanche Ely High School",'Pompano_Beach=' + Pompano_Beach.length); Pompano_Beach[Pompano_Beach.length] = createMarker(new GPoint(-80.12366486,26.27905846),"
Bright Horizons
3901 Ne 1st Terrace
Pompano Beach, FL 33064

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bright Horizons",'Pompano_Beach=' + Pompano_Beach.length); Pompano_Beach[Pompano_Beach.length] = createMarker(new GPoint(-80.20726776,26.20486069),"
Broadview Elementary School
1800 Sw 62nd Avenue
Pompano Beach, FL 33068

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Broadview Elementary School",'Pompano_Beach=' + Pompano_Beach.length); Pompano_Beach[Pompano_Beach.length] = createMarker(new GPoint(-82.46710100,29.05127800),"
Broward Children's Center
8200 Se 19 Avenue
Pompano Beach, FL 33060

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Broward Children's Center",'Pompano_Beach=' + Pompano_Beach.length); Pompano_Beach[Pompano_Beach.length] = createMarker(new GPoint(-82.08665700,29.07122800),"
Broward Children's Center North
325 Se 20 Avenue
Pompano Beach, FL 33060

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Broward Children's Center North",'Pompano_Beach=' + Pompano_Beach.length); Pompano_Beach[Pompano_Beach.length] = createMarker(new GPoint(-80.15206909,26.26818848),"
Broward Intensive Halfway
3090 N Powerline Road
Pompano Beach, FL 33069

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Broward Intensive Halfway",'Pompano_Beach=' + Pompano_Beach.length); Pompano_Beach[Pompano_Beach.length] = createMarker(new GPoint(-80.16560364,26.24073792),"
Charles Drew Elementary School
1000 Nw 31st Avenue
Pompano Beach, FL 33060

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Charles Drew Elementary School",'Pompano_Beach=' + Pompano_Beach.length); Pompano_Beach[Pompano_Beach.length] = createMarker(new GPoint(-80.11206818,26.26195717),"
Cresthavenuen Elementary School
801 Ne 25th Street
Pompano Beach, FL 33064

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Cresthavenuen Elementary School",'Pompano_Beach=' + Pompano_Beach.length); Pompano_Beach[Pompano_Beach.length] = createMarker(new GPoint(-80.16558838,26.24082565),"
Cross Creek School
1010 Nw 31st Avenue
Pompano Beach, FL 33069

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Cross Creek School",'Pompano_Beach=' + Pompano_Beach.length); Pompano_Beach[Pompano_Beach.length] = createMarker(new GPoint(-80.11962128,26.27447510),"
Crystal Lake Community Middle School
3551 Ne 3rd Avenue
Pompano Beach, FL 33064

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Crystal Lake Community Middle School",'Pompano_Beach=' + Pompano_Beach.length); Pompano_Beach[Pompano_Beach.length] = createMarker(new GPoint(-80.12746429,26.21888733),"
Cypress Elementary School
851 Sw 3rd Avenue
Pompano Beach, FL 33060

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Cypress Elementary School",'Pompano_Beach=' + Pompano_Beach.length); Pompano_Beach[Pompano_Beach.length] = createMarker(new GPoint(-80.15351105,26.25305939),"
Cypress Run Alternative/ese
2251 Nw 18 Street
Pompano Beach, FL 33069

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Cypress Run Alternative/ese",'Pompano_Beach=' + Pompano_Beach.length); Pompano_Beach[Pompano_Beach.length] = createMarker(new GPoint(-80.12583160,26.22936058),"
Dave Thomas Education Center
180 Sw 2nd Street
Pompano Beach, FL 33060

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Dave Thomas Education Center",'Pompano_Beach=' + Pompano_Beach.length); Pompano_Beach[Pompano_Beach.length] = createMarker(new GPoint(-80.09826300,26.28182000),"
Eagles Nest Elementary Charter School
1840 Ne 41 St
Pompano Beach, FL 33064

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Eagles Nest Elementary Charter School",'Pompano_Beach=' + Pompano_Beach.length); Pompano_Beach[Pompano_Beach.length] = createMarker(new GPoint(-80.09826300,26.28182000),"
Eagles Nest Middle Charter School
1840 Ne 41 St
Pompano Beach, FL 33064

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Eagles Nest Middle Charter School",'Pompano_Beach=' + Pompano_Beach.length); Pompano_Beach[Pompano_Beach.length] = createMarker(new GPoint(-80.11031342,26.21272278),"
Mcnab Elementary School
1350 Se 9th Avenue
Pompano Beach, FL 33060

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Mcnab Elementary School",'Pompano_Beach=' + Pompano_Beach.length); Pompano_Beach[Pompano_Beach.length] = createMarker(new GPoint(-80.10216522,26.27952766),"
Norcrest Elementary School
3951 Ne 16th Avenue
Pompano Beach, FL 33064

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Norcrest Elementary School",'Pompano_Beach=' + Pompano_Beach.length); Pompano_Beach[Pompano_Beach.length] = createMarker(new GPoint(-80.12316895,26.26615715),"
Palmview Elementary School
2601 Ne 1st Avenue
Pompano Beach, FL 33064

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Palmview Elementary School",'Pompano_Beach=' + Pompano_Beach.length); Pompano_Beach[Pompano_Beach.length] = createMarker(new GPoint(-80.13591700,26.27140100),"
Paragon Elementary Charter School
3311 N Andrews Ave
Pompano Beach, FL 33064

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Paragon Elementary Charter School",'Pompano_Beach=' + Pompano_Beach.length); Pompano_Beach[Pompano_Beach.length] = createMarker(new GPoint(-80.11176300,26.29515648),"
Park Ridge Elementary School
5200 Ne 9th Avenue
Pompano Beach, FL 33064

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Park Ridge Elementary School",'Pompano_Beach=' + Pompano_Beach.length); Pompano_Beach[Pompano_Beach.length] = createMarker(new GPoint(-80.11076355,26.23805809),"
Pompano Beach Elementary School
700 Ne 13th Avenue
Pompano Beach, FL 33060

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Pompano Beach Elementary School",'Pompano_Beach=' + Pompano_Beach.length); Pompano_Beach[Pompano_Beach.length] = createMarker(new GPoint(-80.10958099,26.23698425),"
Pompano Beach High School Institute
600 Ne 13th Avenue
Pompano Beach, FL 33060

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Pompano Beach High School Institute",'Pompano_Beach=' + Pompano_Beach.length); Pompano_Beach[Pompano_Beach.length] = createMarker(new GPoint(-80.12085724,26.23695946),"
Pompano Beach Middle School
310 Ne 6th Street
Pompano Beach, FL 33060

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Pompano Beach Middle School",'Pompano_Beach=' + Pompano_Beach.length); Pompano_Beach[Pompano_Beach.length] = createMarker(new GPoint(-80.14347076,26.24565887),"
Robert C. Markham Elementary School
1501 Nw 15th Avenue
Pompano Beach, FL 33060

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Robert C. Markham Elementary School",'Pompano_Beach=' + Pompano_Beach.length); Pompano_Beach[Pompano_Beach.length] = createMarker(new GPoint(-80.13211823,26.24925995),"
Sanders Park Elementary School
800 Nw 16th Street
Pompano Beach, FL 33060

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Sanders Park Elementary School",'Pompano_Beach=' + Pompano_Beach.length); Pompano_Beach[Pompano_Beach.length] = createMarker(new GPoint(-80.12374878,26.28249359),"
Tedder Elementary School
4157 Ne 1st Terrace
Pompano Beach, FL 33064

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