function addMarkers() { mySelect = document.getElementById('selection'); North_Las_Vegas = [];North_Las_Vegas[North_Las_Vegas.length] = createMarker(new GPoint(-115.15700531,36.26906204),"
Antonello, Lee Elementary School
1101 W Tropical Pkwy
North Las Vegas, NV 89031

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Antonello, Lee Elementary School",'North_Las_Vegas=' + North_Las_Vegas.length); North_Las_Vegas[North_Las_Vegas.length] = createMarker(new GPoint(-115.14589691,36.21433640),"
Area Technical Trade Center
444 West Brooks Avenue
North Las Vegas, NV 89030

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Area Technical Trade Center",'North_Las_Vegas=' + North_Las_Vegas.length); North_Las_Vegas[North_Las_Vegas.length] = createMarker(new GPoint(-115.12536621,36.20524216),"
Bridger Middle School
2505 N Bruce St
North Las Vegas, NV 89030

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Bridger Middle School",'North_Las_Vegas=' + North_Las_Vegas.length); North_Las_Vegas[North_Las_Vegas.length] = createMarker(new GPoint(-115.18956757,36.23740005),"
Bruner, Lucile Elementary School
4289 Allen Ln
North Las Vegas, NV 89032

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Bruner, Lucile Elementary School",'North_Las_Vegas=' + North_Las_Vegas.length); North_Las_Vegas[North_Las_Vegas.length] = createMarker(new GPoint(-115.12536621,36.21054077),"
Cahlan, Marion Elementary School
2801 Fort Sumter Dr
North Las Vegas, NV 89030

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Cahlan, Marion Elementary School",'North_Las_Vegas=' + North_Las_Vegas.length); North_Las_Vegas[North_Las_Vegas.length] = createMarker(new GPoint(-115.13724700,36.23409000),"
Canyon Springs High School And Leadership And
350 E Alexander Rd
North Las Vegas, NV 89032

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Canyon Springs High School And Leadership And",'North_Las_Vegas=' + North_Las_Vegas.length); North_Las_Vegas[North_Las_Vegas.length] = createMarker(new GPoint(-115.18349457,36.23213577),"
Cheyenne High School
3200 W Alexander Rd
North Las Vegas, NV 89032

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Cheyenne High School",'North_Las_Vegas=' + North_Las_Vegas.length); North_Las_Vegas[North_Las_Vegas.length] = createMarker(new GPoint(-115.14605900,36.26715300),"
Clifford Findlay Middle School
333 W Tropical Pkwy
North Las Vegas, NV 89031

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Clifford Findlay Middle School",'North_Las_Vegas=' + North_Las_Vegas.length); North_Las_Vegas[North_Las_Vegas.length] = createMarker(new GPoint(-115.10562897,36.21783829),"
Com College East High School
3200 E Cheyenne Ave
North Las Vegas, NV 89030

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Com College East High School",'North_Las_Vegas=' + North_Las_Vegas.length); North_Las_Vegas[North_Las_Vegas.length] = createMarker(new GPoint(-115.17560577,36.25638962),"
Cozine Elementary School
5335 Coleman St
North Las Vegas, NV 89031

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Cozine Elementary School",'North_Las_Vegas=' + North_Las_Vegas.length); North_Las_Vegas[North_Las_Vegas.length] = createMarker(new GPoint(-115.11358643,36.22486877),"
Craig, Lois Elementary School
2637 E Gowan Rd
North Las Vegas, NV 89030

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Craig, Lois Elementary School",'North_Las_Vegas=' + North_Las_Vegas.length); North_Las_Vegas[North_Las_Vegas.length] = createMarker(new GPoint(-115.14426422,36.28394318),"
Cram Middle School
1900 W Deer Springs Way
North Las Vegas, NV 89084

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Cram Middle School",'North_Las_Vegas=' + North_Las_Vegas.length); North_Las_Vegas[North_Las_Vegas.length] = createMarker(new GPoint(-115.13957214,36.24765396),"
Elizondo, Raul Elementary School
4865 Goldfield St
North Las Vegas, NV 89031

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Elizondo, Raul Elementary School",'North_Las_Vegas=' + North_Las_Vegas.length); North_Las_Vegas[North_Las_Vegas.length] = createMarker(new GPoint(-115.17466500,36.26732600),"
Eva G. Simmons Elementary School
2328 Silver Clouds Dr
North Las Vegas, NV 89031

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Eva G. Simmons Elementary School",'North_Las_Vegas=' + North_Las_Vegas.length); North_Las_Vegas[North_Las_Vegas.length] = createMarker(new GPoint(-115.15206909,36.20709229),"
Fitzgerald, H P Elementary School
2651 N Revere St
North Las Vegas, NV 89030

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Fitzgerald, H P Elementary School",'North_Las_Vegas=' + North_Las_Vegas.length); North_Las_Vegas[North_Las_Vegas.length] = createMarker(new GPoint(-115.17107391,36.20645523),"
Gilbert, C V T Elementary School
2101 W Cartier
North Las Vegas, NV 89032

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Gilbert, C V T Elementary School",'North_Las_Vegas=' + North_Las_Vegas.length); North_Las_Vegas[North_Las_Vegas.length] = createMarker(new GPoint(-115.22190094,36.25009918),"
Guy, Addeliar Elementary School
4028 La Madre Way
North Las Vegas, NV 89031

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Guy, Addeliar Elementary School",'North_Las_Vegas=' + North_Las_Vegas.length); North_Las_Vegas[North_Las_Vegas.length] = createMarker(new GPoint(-115.10147095,36.20356369),"
Herron, Fay Elementary School
2421 N Kenneth
North Las Vegas, NV 89030

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Herron, Fay Elementary School",'North_Las_Vegas=' + North_Las_Vegas.length); North_Las_Vegas[North_Las_Vegas.length] = createMarker(new GPoint(-115.14589691,36.21433640),"
Jeffery Credit Retrieval - Horizon North High Scho
602 W Brooks Ave
North Las Vegas, NV 89030

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Jeffery Credit Retrieval - Horizon North High Scho",'North_Las_Vegas=' + North_Las_Vegas.length); North_Las_Vegas[North_Las_Vegas.length] = createMarker(new GPoint(-115.14814758,36.21433640),"
Jeffrey - Sunset No High School
602 Brooks Avenue
North Las Vegas, NV 89030

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Jeffrey - Sunset No High School",'North_Las_Vegas=' + North_Las_Vegas.length); North_Las_Vegas[North_Las_Vegas.length] = createMarker(new GPoint(-115.10645200,36.27013700),"
John Tartan Elementary School
3030 E Tropical Pkwy
North Las Vegas, NV 89081

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("John Tartan Elementary School",'North_Las_Vegas=' + North_Las_Vegas.length); North_Las_Vegas[North_Las_Vegas.length] = createMarker(new GPoint(-115.11273193,36.21441269),"
Lincoln Elementary School
3010 Berg St
North Las Vegas, NV 89030

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Lincoln Elementary School",'North_Las_Vegas=' + North_Las_Vegas.length); North_Las_Vegas[North_Las_Vegas.length] = createMarker(new GPoint(-115.14749908,36.20947647),"
Mackey, Jo Elementary School
2726 Englestad
North Las Vegas, NV 89030

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Mackey, Jo Elementary School",'North_Las_Vegas=' + North_Las_Vegas.length); North_Las_Vegas[North_Las_Vegas.length] = createMarker(new GPoint(-115.13513184,36.19963837),"
Martinez, Reynaldo Elementary School
350 E Judson Ave
North Las Vegas, NV 89030

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Martinez, Reynaldo Elementary School",'North_Las_Vegas=' + North_Las_Vegas.length); North_Las_Vegas[North_Las_Vegas.length] = createMarker(new GPoint(-115.13067627,36.20336914),"
Mccall, Quannah Elementary School
800 E Carey Ave
North Las Vegas, NV 89030

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Mccall, Quannah Elementary School",'North_Las_Vegas=' + North_Las_Vegas.length); North_Las_Vegas[North_Las_Vegas.length] = createMarker(new GPoint(-115.02417900,36.15534000),"
Mojave High School
5302 Goldfield St
North Las Vegas, NV 89031

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mojave High School",'North_Las_Vegas=' + North_Las_Vegas.length); North_Las_Vegas[North_Las_Vegas.length] = createMarker(new GPoint(-115.12657166,36.19477081),"
Opportunity Jefferson
602 W Brooks Ave
North Las Vegas, NV 89030

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Opportunity Jefferson",'North_Las_Vegas=' + North_Las_Vegas.length); North_Las_Vegas[North_Las_Vegas.length] = createMarker(new GPoint(-115.17410278,36.22359848),"
Priest, Richard Elementary School
4150 Fuselier Dr
North Las Vegas, NV 89032

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Priest, Richard Elementary School",'North_Las_Vegas=' + North_Las_Vegas.length); North_Las_Vegas[North_Las_Vegas.length] = createMarker(new GPoint(-115.12113190,36.18863678),"
Rancho High School
1900 E Owens Ave
North Las Vegas, NV 89030

[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Rancho High School",'North_Las_Vegas=' + North_Las_Vegas.length); North_Las_Vegas[North_Las_Vegas.length] = createMarker(new GPoint(-115.14789581,36.22298050),"
Sedway Middle School
3465 Englestad St
North Las Vegas, NV 89032

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Sedway Middle School",'North_Las_Vegas=' + North_Las_Vegas.length); North_Las_Vegas[North_Las_Vegas.length] = createMarker(new GPoint(-115.12490845,36.19196320),"
Smith, J. D. Middle School
1301 E Tonopah Ave
North Las Vegas, NV 89030

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Smith, J. D. Middle School",'North_Las_Vegas=' + North_Las_Vegas.length); North_Las_Vegas[North_Las_Vegas.length] = createMarker(new GPoint(-115.12465668,36.19223785),"
Squires, C P Elementary School
1312 E Tonopah Ave
North Las Vegas, NV 89030

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Squires, C P Elementary School",'North_Las_Vegas=' + North_Las_Vegas.length); North_Las_Vegas[North_Las_Vegas.length] = createMarker(new GPoint(-115.18742400,36.28044200),"
Theron H. & Naomi D. Goynes Elementary School
3409 Deer Springs Way
North Las Vegas, NV 89084

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Theron H. & Naomi D. Goynes Elementary School",'North_Las_Vegas=' + North_Las_Vegas.length); North_Las_Vegas[North_Las_Vegas.length] = createMarker(new GPoint(-115.06938171,36.04571915),"
Washington Continuation - Opportunity Middle School
1901 N White St
North Las Vegas, NV 89030

[ View School Profile ]
",iconBl); mySelect.options[mySelect.options.length] = new Option("Washington Continuation - Opportunity Middle School",'North_Las_Vegas=' + North_Las_Vegas.length); North_Las_Vegas[North_Las_Vegas.length] = createMarker(new GPoint(-115.14412689,36.26747131),"
Watson, Fredric Elementary School
5845 N Commerce St
North Las Vegas, NV 89031

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Watson, Fredric Elementary School",'North_Las_Vegas=' + North_Las_Vegas.length); North_Las_Vegas[North_Las_Vegas.length] = createMarker(new GPoint(-115.14837646,36.23212814),"
Wilhelm, Elizabeth Elementary School
609 W Alexander Rd
North Las Vegas, NV 89032

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Wilhelm, Elizabeth Elementary School",'North_Las_Vegas=' + North_Las_Vegas.length); North_Las_Vegas[North_Las_Vegas.length] = createMarker(new GPoint(-115.10662842,36.19223785),"
Williams, Tom Elementary School
3000 E Tonopah Ave
North Las Vegas, NV 89030

[ View School Profile ]
",iconRd); mySelect.options[mySelect.options.length] = new Option("Williams, Tom Elementary School",'North_Las_Vegas=' + North_Las_Vegas.length); North_Las_Vegas[North_Las_Vegas.length] = createMarker(new GPoint(-115.19495392,36.25396347),"
Wolfe, Eva Elementary School
4027 W Washburn Rd
North Las Vegas, NV 89031

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