function addMarkers(){ mySelect = document.getElementById('selection'); Reno = [];Sparks = [];Incline_Villag = [];Washoe_Valley = [];mySelect.options[mySelect.options.length] = new Option("Incline Villag schools",'all=Incline_Villag'); mySelect.options[mySelect.options.length] = new Option("Reno schools",'all=Reno'); mySelect.options[mySelect.options.length] = new Option("Sparks schools",'all=Sparks'); mySelect.options[mySelect.options.length] = new Option("Washoe Valley schools",'all=Washoe_Valley'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Reno[Reno.length] = createMarker(new GPoint(-119.80263100,39.51843700),"
A Child's World
441 Cheney St
Reno, NV 89502
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("A Child's World",'Reno=' + Reno.length); Reno[Reno.length] = createMarker(new GPoint(-119.80554100,39.47658400),"
Brookfield School
6800 S McCarran Blvd
Reno, NV 89509
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Brookfield School",'Reno=' + Reno.length); Reno[Reno.length] = createMarker(new GPoint(-119.83548900,39.53423700),"
Cambridge School
627 Sunnyside Drive
Reno, NV 89503
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Cambridge School",'Reno=' + Reno.length); Reno[Reno.length] = createMarker(new GPoint(-119.88600500,39.52512000),"
Caughlin Preschool
1508 Ambassador Drive
Reno, NV 89523
Co-ed school, NS-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Caughlin Preschool",'Reno=' + Reno.length); Reno[Reno.length] = createMarker(new GPoint(-119.86844900,39.49435400),"
Caughlin Preschool & Child Care
4100 Caughlin Parkway
Reno, NV 89519
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Caughlin Preschool & Child Care",'Reno=' + Reno.length); Reno[Reno.length] = createMarker(new GPoint(-119.82010000,39.54520000),"
Child & Family Research Center
Mail Stop 141
Reno, NV 89557
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Child & Family Research Center",'Reno=' + Reno.length); Reno[Reno.length] = createMarker(new GPoint(-119.81379600,39.52060700),"
Child Garden
455 Hill Street
Reno, NV 89501
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Child Garden",'Reno=' + Reno.length); Reno[Reno.length] = createMarker(new GPoint(-119.76208000,39.44850200),"
Child Garden At South Meadows
9315 Prototype Drive
Reno, NV 89521
Co-ed school, K-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Child Garden At South Meadows",'Reno=' + Reno.length); Sparks[Sparks.length] = createMarker(new GPoint(-119.70579900,39.54176900),"
Children's World Learning Center
2055 E Prater Way
Sparks, NV 89434
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Children's World Learning Center",'Sparks=' + Sparks.length); Reno[Reno.length] = createMarker(new GPoint(-119.85777100,39.48352800),"
Childrens World Learning Center
4895 Village Green Parkway
Reno, NV 89519
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Childrens World Learning Center",'Reno=' + Reno.length); Reno[Reno.length] = createMarker(new GPoint(-119.79514000,39.55663700),"
The Church Academy
1205 North Mccarran Blvd
Reno, NV 89512
Co-ed school, 1-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Church Academy",'Reno=' + Reno.length); Reno[Reno.length] = createMarker(new GPoint(-119.79846500,39.55103900),"
E L Cord Foundation Child Care Center
7000 Dandini Blvd Ccc100
Reno, NV 89512
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("E L Cord Foundation Child Care Center",'Reno=' + Reno.length); Sparks[Sparks.length] = createMarker(new GPoint(-119.77628000,39.54907200),"
Early Basics Learning Academy Inc
1855 El Rancho Blvd, Suite A
Sparks, NV 89431
Co-ed school, NS-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Early Basics Learning Academy Inc",'Sparks=' + Sparks.length); Sparks[Sparks.length] = createMarker(new GPoint(-119.77526100,39.54531600),"
Excel Christian School
2285 Oddie Blvd.
Sparks, NV 89431
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Excel Christian School",'Sparks=' + Sparks.length); Reno[Reno.length] = createMarker(new GPoint(-119.83241300,39.51607600),"
First Baptist Children's Center
1330 Foster Drive
Reno, NV 89509
Co-ed school, PK-3
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("First Baptist Children's Center",'Reno=' + Reno.length); Sparks[Sparks.length] = createMarker(new GPoint(-119.75287700,39.54487200),"
Happy Days Preschool & Kindergarten
1231 Pyramid Way
Sparks, NV 89431
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Happy Days Preschool & Kindergarten",'Sparks=' + Sparks.length); Sparks[Sparks.length] = createMarker(new GPoint(-119.75011400,39.56164400),"
His Little School
445 Queen Way
Sparks, NV 89431
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("His Little School",'Sparks=' + Sparks.length); Reno[Reno.length] = createMarker(new GPoint(-119.81606000,39.51676300),"
Holy Child Day Home
440 Reno Avenue
Reno, NV 89509
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Holy Child Day Home",'Reno=' + Reno.length); Sparks[Sparks.length] = createMarker(new GPoint(-119.71740200,39.58042700),"
Imagination Station
1410 Iratcabal Drive
Sparks, NV 89436
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Imagination Station",'Sparks=' + Sparks.length); Reno[Reno.length] = createMarker(new GPoint(-119.76107300,39.50445100),"
Jenny's Garden School
565 Reactor Way
Reno, NV 89502
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Jenny's Garden School",'Reno=' + Reno.length); Reno[Reno.length] = createMarker(new GPoint(-119.74781200,39.44541700),"
Kids R Kids
9410 Double Diamond Parkway
Reno, NV 89521
Co-ed school, PK-2
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Kids R Kids",'Reno=' + Reno.length); Reno[Reno.length] = createMarker(new GPoint(-119.85611800,39.52801200),"
The King's Academy
3195 Everett Drive
Reno, NV 89503
Co-ed school, K-4
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The King's Academy",'Reno=' + Reno.length); Incline_Villag[Incline_Villag.length] = createMarker(new GPoint(-119.93896800,39.24591700),"
Lake Tahoe School
995 Tahoe Blvd.
Incline Villag, NV 89451
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lake Tahoe School",'Incline_Villag=' + Incline_Villag.length); Sparks[Sparks.length] = createMarker(new GPoint(-119.73329400,39.53684800),"
Lamplight Christian School
780 E. Lincoln
Sparks, NV 89434
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lamplight Christian School",'Sparks=' + Sparks.length); Sparks[Sparks.length] = createMarker(new GPoint(-119.74247900,39.58548000),"
Legacy Christian School K-12
6255 Pyramid Highway
Sparks, NV 89436
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Legacy Christian School K-12",'Sparks=' + Sparks.length); Reno[Reno.length] = createMarker(new GPoint(-119.88202100,39.52610700),"
The Lion And The Lamb
1220 Robb Drive
Reno, NV 89523
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Lion And The Lamb",'Reno=' + Reno.length); Reno[Reno.length] = createMarker(new GPoint(-119.78972100,39.50736300),"
Little Flower School
1300 Casazza Drive
Reno, NV 89502
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Little Flower School",'Reno=' + Reno.length); Reno[Reno.length] = createMarker(new GPoint(-119.80548200,39.51843700),"
Little Golden Goose
273 Cheney Street
Reno, NV 89502
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Little Golden Goose",'Reno=' + Reno.length); Reno[Reno.length] = createMarker(new GPoint(-119.80505400,39.49036900),"
London Bridges Learning Center
3670 Warren Way
Reno, NV 89509
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("London Bridges Learning Center",'Reno=' + Reno.length); Sparks[Sparks.length] = createMarker(new GPoint(-119.75023200,39.53897600),"
Magic Treehouse (the)
606 6th Street
Sparks, NV 89431
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Magic Treehouse (the)",'Sparks=' + Sparks.length); Washoe_Valley[Washoe_Valley.length] = createMarker(new GPoint(-119.76781000,39.28880900),"
New Beginnings Child Development Center
145 Esmeralda Drive
Washoe Valley, NV 89704
Co-ed school, PK-1
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("New Beginnings Child Development Center",'Washoe_Valley=' + Washoe_Valley.length); Reno[Reno.length] = createMarker(new GPoint(-119.81540700,39.51350800),"
Our Lady of the Snows Parochial School
1125 Lander Street
Reno, NV 89509
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Our Lady of the Snows Parochial School",'Reno=' + Reno.length); Reno[Reno.length] = createMarker(new GPoint(-119.81270000,39.52970000),"
Reno Christian Academy
Po Box 70723
Reno, NV 89570
Co-ed school, K-11
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Reno Christian Academy",'Reno=' + Reno.length); Reno[Reno.length] = createMarker(new GPoint(-119.79957700,39.40530100),"
Sage Ridge School
2515 Crossbow Court
Reno, NV 89511
Co-ed school, 5-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sage Ridge School",'Reno=' + Reno.length); Reno[Reno.length] = createMarker(new GPoint(-119.80717900,39.48763700),"
Shepherd Of The Mountains Lutheran
953 West Peckham Lane
Reno, NV 89509
Co-ed school, 1-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Shepherd Of The Mountains Lutheran",'Reno=' + Reno.length); Reno[Reno.length] = createMarker(new GPoint(-119.87472300,39.65386600),"
Sierra Nevada High School
5005 Echo Ave
Reno, NV 89506
Co-ed school, Ungraded
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sierra Nevada High School",'Reno=' + Reno.length); Reno[Reno.length] = createMarker(new GPoint(-119.80670600,39.47656300),"
Sierra Vista Childrens Academy
6850 S Mccarran Blvd
Reno, NV 89509
Co-ed school, PK-1
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sierra Vista Childrens Academy",'Reno=' + Reno.length); Reno[Reno.length] = createMarker(new GPoint(-119.56680000,39.76930000),"
Silver State Adventist School
Po Box 11950
Reno, NV 89510
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Silver State Adventist School",'Reno=' + Reno.length); Reno[Reno.length] = createMarker(new GPoint(-119.84501900,39.53561000),"
St Albert The Great School
1255 Saint Alberts Drive
Reno, NV 89503
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Albert The Great School",'Reno=' + Reno.length); Reno[Reno.length] = createMarker(new GPoint(-119.82416900,39.50526300),"
St John's Children's Center
1070 W Plumb Lane
Reno, NV 89509
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St John's Children's Center",'Reno=' + Reno.length); Reno[Reno.length] = createMarker(new GPoint(-119.82303100,39.53085500),"
St Mary's Children's Garden
595 Bell Street
Reno, NV 89503
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St Mary's Children's Garden",'Reno=' + Reno.length); Reno[Reno.length] = createMarker(new GPoint(-119.75053400,39.50988200),"
Stepping Stones Childrens Center
1230 Corporate Blvd
Reno, NV 89502
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Stepping Stones Childrens Center",'Reno=' + Reno.length); Sparks[Sparks.length] = createMarker(new GPoint(-119.71925100,39.55119500),"
The Summit School/lpa
2301 Sparks Blvd
Sparks, NV 89434
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Summit School/lpa",'Sparks=' + Sparks.length); Reno[Reno.length] = createMarker(new GPoint(-119.80956200,39.49356600),"
Sunflower Preschool
1080 Berrum Lane
Reno, NV 89509
Co-ed school, K-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sunflower Preschool",'Reno=' + Reno.length); Reno[Reno.length] = createMarker(new GPoint(-119.76350200,39.47810100),"
Truckee Meadows Christian Academy
3940 Spring Drive
Reno, NV 89502
Co-ed school, K-11
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Truckee Meadows Christian Academy",'Reno=' + Reno.length); Reno[Reno.length] = createMarker(new GPoint(-119.75786400,39.50109600),"
Truckee Meadows School
690 Edison Way
Reno, NV 89502
Co-ed school, 2-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Truckee Meadows School",'Reno=' + Reno.length); Reno[Reno.length] = createMarker(new GPoint(-119.78109100,39.54912500),"
Wcsd High Desert Montessori Preschool
2590 Orovada Street
Reno, NV 89512
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Wcsd High Desert Montessori Preschool",'Reno=' + Reno.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/////1/' + showArray); map.removeOverlays(Incline_Villag); map.removeOverlays(Reno); map.removeOverlays(Sparks); map.removeOverlays(Washoe_Valley); 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(Reno);map.removeOverlays(Incline_Villag); map.removeOverlays(Reno); map.removeOverlays(Sparks); map.removeOverlays(Washoe_Valley); map.addOverlays(Incline_Villag); centerByArray(Incline_Villag, false, false); cntMarker += Incline_Villag.length; map.addOverlays(Reno); centerByArray(Reno, false, false); cntMarker += Reno.length; map.addOverlays(Sparks); centerByArray(Sparks, false, false); cntMarker += Sparks.length; map.addOverlays(Washoe_Valley); centerByArray(Washoe_Valley, false, false); cntMarker += Washoe_Valley.length; centerByArray(Reno,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=1&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; }