function addMarkers(){ mySelect = document.getElementById('selection'); Baker = [];Bandon = [];Athena = [];Canyonville = [];Brookings = [];Tangent = [];The_Dalles = [];Pleasant_Hill = [];Enterprise = [];Madras = [];North_Bend = [];Grants_Pass = [];Pendleton = [];Hermiston = [];Boring = [];Klamath_Falls = [];La_Grande = [];Gaston = [];Lincoln_City = [];Salem = [];Cave_Junction = [];Mcminnville = [];Hood_River = [];Days_Creek = [];Milton_Freewater = [];Warrenton = [];Portland = [];Gresham = [];Gladstone = [];Roseburg = [];Scappoose = [];Eagle_Point = [];Sutherlin = [];Bend = [];Tillamook = [];Vale = [];Hillsboro = [];Willamina = [];mySelect.options[mySelect.options.length] = new Option("Athena schools",'all=Athena'); mySelect.options[mySelect.options.length] = new Option("Baker schools",'all=Baker'); mySelect.options[mySelect.options.length] = new Option("Bandon schools",'all=Bandon'); mySelect.options[mySelect.options.length] = new Option("Bend schools",'all=Bend'); mySelect.options[mySelect.options.length] = new Option("Boring schools",'all=Boring'); mySelect.options[mySelect.options.length] = new Option("Brookings schools",'all=Brookings'); mySelect.options[mySelect.options.length] = new Option("Canyonville schools",'all=Canyonville'); mySelect.options[mySelect.options.length] = new Option("Cave Junction schools",'all=Cave_Junction'); mySelect.options[mySelect.options.length] = new Option("Days Creek schools",'all=Days_Creek'); mySelect.options[mySelect.options.length] = new Option("Eagle Point schools",'all=Eagle_Point'); mySelect.options[mySelect.options.length] = new Option("Enterprise schools",'all=Enterprise'); mySelect.options[mySelect.options.length] = new Option("Gaston schools",'all=Gaston'); mySelect.options[mySelect.options.length] = new Option("Gladstone schools",'all=Gladstone'); mySelect.options[mySelect.options.length] = new Option("Grants Pass schools",'all=Grants_Pass'); mySelect.options[mySelect.options.length] = new Option("Gresham schools",'all=Gresham'); mySelect.options[mySelect.options.length] = new Option("Hermiston schools",'all=Hermiston'); mySelect.options[mySelect.options.length] = new Option("Hillsboro schools",'all=Hillsboro'); mySelect.options[mySelect.options.length] = new Option("Hood River schools",'all=Hood_River'); mySelect.options[mySelect.options.length] = new Option("Klamath Falls schools",'all=Klamath_Falls'); mySelect.options[mySelect.options.length] = new Option("La Grande schools",'all=La_Grande'); mySelect.options[mySelect.options.length] = new Option("Lincoln City schools",'all=Lincoln_City'); mySelect.options[mySelect.options.length] = new Option("Madras schools",'all=Madras'); mySelect.options[mySelect.options.length] = new Option("Mcminnville schools",'all=Mcminnville'); mySelect.options[mySelect.options.length] = new Option("Milton Freewater schools",'all=Milton_Freewater'); mySelect.options[mySelect.options.length] = new Option("North Bend schools",'all=North_Bend'); mySelect.options[mySelect.options.length] = new Option("Pendleton schools",'all=Pendleton'); mySelect.options[mySelect.options.length] = new Option("Pleasant Hill schools",'all=Pleasant_Hill'); mySelect.options[mySelect.options.length] = new Option("Portland schools",'all=Portland'); mySelect.options[mySelect.options.length] = new Option("Roseburg schools",'all=Roseburg'); mySelect.options[mySelect.options.length] = new Option("Salem schools",'all=Salem'); mySelect.options[mySelect.options.length] = new Option("Scappoose schools",'all=Scappoose'); mySelect.options[mySelect.options.length] = new Option("Sutherlin schools",'all=Sutherlin'); mySelect.options[mySelect.options.length] = new Option("Tangent schools",'all=Tangent'); mySelect.options[mySelect.options.length] = new Option("The Dalles schools",'all=The_Dalles'); mySelect.options[mySelect.options.length] = new Option("Tillamook schools",'all=Tillamook'); mySelect.options[mySelect.options.length] = new Option("Vale schools",'all=Vale'); mySelect.options[mySelect.options.length] = new Option("Warrenton schools",'all=Warrenton'); mySelect.options[mySelect.options.length] = new Option("Willamina schools",'all=Willamina'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Baker[Baker.length] = createMarker(new GPoint(-117.84980600,44.80370100),"
Baker Valley Sda School
42171 Chico Road
Baker, OR 97814
Co-ed school, 1-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Baker Valley Sda School",'Baker=' + Baker.length); Bandon[Bandon.length] = createMarker(new GPoint(-124.39990000,43.09490000),"
Bandon Seventh-day Adventist C
Po Box 1836
Bandon, OR 97411
Co-ed school, 2-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Bandon Seventh-day Adventist C",'Bandon=' + Bandon.length); Athena[Athena.length] = createMarker(new GPoint(-118.49320200,45.80492700),"
Blue Mt. Valley Adventist School
78606 1st St
Athena, OR 97813
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Blue Mt. Valley Adventist School",'Athena=' + Athena.length); Canyonville[Canyonville.length] = createMarker(new GPoint(-123.26880000,42.93670000),"
Canyonville Sda School
Po Box 1155
Canyonville, OR 97417
Co-ed school, 1-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Canyonville Sda School",'Canyonville=' + Canyonville.length); Brookings[Brookings.length] = createMarker(new GPoint(-124.33431400,42.11833700),"
Cape Ferrelo Sda School
18881 Cornett Rd
Brookings, OR 97415
Co-ed school, 1-7
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Cape Ferrelo Sda School",'Brookings=' + Brookings.length); Tangent[Tangent.length] = createMarker(new GPoint(-123.12272300,44.56076700),"
Central Valley Christian School
31630 Highway 34
Tangent, OR 97389
Co-ed school, PK-9
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Central Valley Christian School",'Tangent=' + Tangent.length); The_Dalles[The_Dalles.length] = createMarker(new GPoint(-121.13829700,45.59293700),"
The Dalles Adventist School
3339 E 13th Street
The Dalles, OR 97058
Co-ed school, K-9
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Dalles Adventist School",'The_Dalles=' + The_Dalles.length); Pleasant_Hill[Pleasant_Hill.length] = createMarker(new GPoint(-122.94922800,43.97980400),"
Emerald Christian Academy
35582 Zephyr Way
Pleasant Hill, OR 97455
Co-ed school, NS-10
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Emerald Christian Academy",'Pleasant_Hill=' + Pleasant_Hill.length); Enterprise[Enterprise.length] = createMarker(new GPoint(-117.41880000,45.70850000),"
Enterprise Sda School
Po Box N
Enterprise, OR 97828
Co-ed school, 1-10
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Enterprise Sda School",'Enterprise=' + Enterprise.length); Madras[Madras.length] = createMarker(new GPoint(-121.12809700,44.62773700),"
Gibson Sda Elementary School
66 Se H Street
Madras, OR 97741
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Gibson Sda Elementary School",'Madras=' + Madras.length); North_Bend[North_Bend.length] = createMarker(new GPoint(-124.23035600,43.39376200),"
Gold Coast Christian School
1251 Clark St
North Bend, OR 97459
Co-ed school, 1-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Gold Coast Christian School",'North_Bend=' + North_Bend.length); Grants_Pass[Grants_Pass.length] = createMarker(new GPoint(-123.33089200,42.46526500),"
Grants Pass Schooleventh Day Adv. School
2250 Nw Heidi Lane
Grants Pass, OR 97526
Co-ed school, K-10
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Grants Pass Schooleventh Day Adv. School",'Grants_Pass=' + Grants_Pass.length); Pendleton[Pendleton.length] = createMarker(new GPoint(-118.81789300,45.65805900),"
Harris Junior Academy
3121 Sw Hailey Avenue
Pendleton, OR 97801
Co-ed school, K-10
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Harris Junior Academy",'Pendleton=' + Pendleton.length); Hermiston[Hermiston.length] = createMarker(new GPoint(-119.31246100,45.85356300),"
Hermiston Junior Academy
1300 Nw Academy Lane
Hermiston, OR 97838
Co-ed school, K-9
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Hermiston Junior Academy",'Hermiston=' + Hermiston.length); Boring[Boring.length] = createMarker(new GPoint(-122.34850000,45.42920000),"
Hood View Jr. Academy
Po Box 128
Boring, OR 97009
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Hood View Jr. Academy",'Boring=' + Boring.length); Klamath_Falls[Klamath_Falls.length] = createMarker(new GPoint(-121.76110500,42.22853700),"
Klamath Falls Sda School
2499 Main Street
Klamath Falls, OR 97601
Co-ed school, 1-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Klamath Falls Sda School",'Klamath_Falls=' + Klamath_Falls.length); La_Grande[La_Grande.length] = createMarker(new GPoint(-118.18950000,45.27990000),"
La Grande Sda School
Po Box 1025 2702 Adams Ave
La Grande, OR 97850
Co-ed school, 1-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("La Grande Sda School",'La_Grande=' + La_Grande.length); Gaston[Gaston.length] = createMarker(new GPoint(-123.19880000,45.45300000),"
Laurelwood Elementary School
Po Box 39
Gaston, OR 97119
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Laurelwood Elementary School",'Gaston=' + Gaston.length); Lincoln_City[Lincoln_City.length] = createMarker(new GPoint(-124.00200500,44.97998500),"
Lincoln City Seventh-day Adventist School
2126 Ne Surf Avenue
Lincoln City, OR 97367
Co-ed school, 1-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lincoln City Seventh-day Adventist School",'Lincoln_City=' + Lincoln_City.length); Salem[Salem.length] = createMarker(new GPoint(-122.94267500,44.94091400),"
Livingstone Adventist Academy
5771 Fruitland Road Ne
Salem, OR 97317
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Livingstone Adventist Academy",'Salem=' + Salem.length); Cave_Junction[Cave_Junction.length] = createMarker(new GPoint(-123.59255300,42.12353400),"
Madrone Adventist Elementary School
4300 Holland Loop Road
Cave Junction, OR 97523
Co-ed school, 1-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Madrone Adventist Elementary School",'Cave_Junction=' + Cave_Junction.length); Mcminnville[Mcminnville.length] = createMarker(new GPoint(-123.20429400,45.21751900),"
Mcminnville Sda School
1349 Nw Elm Street
Mcminnville, OR 97128
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mcminnville Sda School",'Mcminnville=' + Mcminnville.length); Hood_River[Hood_River.length] = createMarker(new GPoint(-121.53449600,45.70256400),"
Mid-columbia Adventist School.
1100 22nd Street
Hood River, OR 97031
Co-ed school, PK-10
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mid-columbia Adventist School.",'Hood_River=' + Hood_River.length); Days_Creek[Days_Creek.length] = createMarker(new GPoint(-123.09371900,42.96995900),"
Milo Adventist Academy
Po Box 278
Days Creek, OR 97429
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Milo Adventist Academy",'Days_Creek=' + Days_Creek.length); Days_Creek[Days_Creek.length] = createMarker(new GPoint(-123.09350000,42.96930000),"
Milo Sda Elementary School
Po Box 278
Days Creek, OR 97429
Co-ed school, 2-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Milo Sda Elementary School",'Days_Creek=' + Days_Creek.length); Milton_Freewater[Milton_Freewater.length] = createMarker(new GPoint(-118.39396700,45.97310300),"
Milton-Stateline Adventist School
53565 W Crockett Road
Milton Freewater, OR 97862
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Milton-Stateline Adventist School",'Milton_Freewater=' + Milton_Freewater.length); Pendleton[Pendleton.length] = createMarker(new GPoint(-118.67952300,45.66737400),"
Mission Indian Adventist School
46576 Mission Road
Pendleton, OR 97801
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mission Indian Adventist School",'Pendleton=' + Pendleton.length); Warrenton[Warrenton.length] = createMarker(new GPoint(-123.92552700,46.11928100),"
Pleasant View Adventist School
91272 Highway 101
Warrenton, OR 97146
Co-ed school, 2-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Pleasant View Adventist School",'Warrenton=' + Warrenton.length); Portland[Portland.length] = createMarker(new GPoint(-122.56407100,45.51222000),"
Portland Adventist Academy
1500 Se 96th Avenue
Portland, OR 97216
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Portland Adventist Academy",'Portland=' + Portland.length); Gresham[Gresham.length] = createMarker(new GPoint(-122.47247800,45.49738600),"
Portland Adventist Elementary School
3990 Nw 1st Street
Gresham, OR 97030
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Portland Adventist Elementary School",'Gresham=' + Gresham.length); Gladstone[Gladstone.length] = createMarker(new GPoint(-122.57792200,45.39191300),"
Rivergate Adventist Elementary School
1505 Ohlson Road
Gladstone, OR 97027
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Rivergate Adventist Elementary School",'Gladstone=' + Gladstone.length); Roseburg[Roseburg.length] = createMarker(new GPoint(-123.38663600,43.22876700),"
Roseburg Junior Academy
1653 NW Troost Street
Roseburg, OR 97470
Co-ed school, K-10
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Roseburg Junior Academy",'Roseburg=' + Roseburg.length); Scappoose[Scappoose.length] = createMarker(new GPoint(-122.90789800,45.76719100),"
Scappoose Adventist School
Po Box 889 54285 Columbia River Highway
Scappoose, OR 97056
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Scappoose Adventist School",'Scappoose=' + Scappoose.length); Eagle_Point[Eagle_Point.length] = createMarker(new GPoint(-122.76120000,42.48210000),"
Shady Point Sda School
Po Box 216 14611 Highway 62
Eagle Point, OR 97524
Co-ed school, 2-7
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Shady Point Sda School",'Eagle_Point=' + Eagle_Point.length); Sutherlin[Sutherlin.length] = createMarker(new GPoint(-123.25930000,43.40000000),"
Sutherlin Seventh-day Adventist School
Po Box 1108
Sutherlin, OR 97479
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sutherlin Seventh-day Adventist School",'Sutherlin=' + Sutherlin.length); Bend[Bend.length] = createMarker(new GPoint(-121.26564700,44.15952100),"
Three Sisters Sda School
21155 Tumalo Road
Bend, OR 97701
Co-ed school, K-10
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Three Sisters Sda School",'Bend=' + Bend.length); Tillamook[Tillamook.length] = createMarker(new GPoint(-123.81545500,45.44883700),"
Tillamook Adventist School
4300 12th Street
Tillamook, OR 97141
Co-ed school, K-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Tillamook Adventist School",'Tillamook=' + Tillamook.length); Vale[Vale.length] = createMarker(new GPoint(-117.42366100,44.12855000),"
Timberline School
2582 10th Avenue W
Vale, OR 97918
Co-ed school, K-7
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Timberline School",'Vale=' + Vale.length); Hillsboro[Hillsboro.length] = createMarker(new GPoint(-122.90300700,45.51599700),"
Tualatin Valley Jr Academy
21975 Sw Baseline Road
Hillsboro, OR 97123
Co-ed school, PK-10
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Tualatin Valley Jr Academy",'Hillsboro=' + Hillsboro.length); Willamina[Willamina.length] = createMarker(new GPoint(-123.52110000,45.09510000),"
West Valley Christian School
Po Box 38
Willamina, OR 97396
Co-ed school, 1-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("West Valley Christian School",'Willamina=' + Willamina.length); map.removeOverlays(Athena); map.removeOverlays(Baker); map.removeOverlays(Bandon); map.removeOverlays(Bend); map.removeOverlays(Boring); map.removeOverlays(Brookings); map.removeOverlays(Canyonville); map.removeOverlays(Cave_Junction); map.removeOverlays(Days_Creek); map.removeOverlays(Eagle_Point); map.removeOverlays(Enterprise); map.removeOverlays(Gaston); map.removeOverlays(Gladstone); map.removeOverlays(Grants_Pass); map.removeOverlays(Gresham); map.removeOverlays(Hermiston); map.removeOverlays(Hillsboro); map.removeOverlays(Hood_River); map.removeOverlays(Klamath_Falls); map.removeOverlays(La_Grande); map.removeOverlays(Lincoln_City); map.removeOverlays(Madras); map.removeOverlays(Mcminnville); map.removeOverlays(Milton_Freewater); map.removeOverlays(North_Bend); map.removeOverlays(Pendleton); map.removeOverlays(Pleasant_Hill); map.removeOverlays(Portland); map.removeOverlays(Roseburg); map.removeOverlays(Salem); map.removeOverlays(Scappoose); map.removeOverlays(Sutherlin); map.removeOverlays(Tangent); map.removeOverlays(The_Dalles); map.removeOverlays(Tillamook); map.removeOverlays(Vale); map.removeOverlays(Warrenton); map.removeOverlays(Willamina); setTimeout(function(){map.addOverlays(Athena)},1000); setTimeout(function(){map.addOverlays(Baker)},1000); setTimeout(function(){map.addOverlays(Bandon)},1000); setTimeout(function(){map.addOverlays(Bend)},1000); setTimeout(function(){map.addOverlays(Boring)},1000); setTimeout(function(){map.addOverlays(Brookings)},1000); setTimeout(function(){map.addOverlays(Canyonville)},1000); setTimeout(function(){map.addOverlays(Cave_Junction)},1000); setTimeout(function(){map.addOverlays(Days_Creek)},1000); setTimeout(function(){map.addOverlays(Eagle_Point)},1000); setTimeout(function(){map.addOverlays(Enterprise)},1000); setTimeout(function(){map.addOverlays(Gaston)},1000); setTimeout(function(){map.addOverlays(Gladstone)},1000); setTimeout(function(){map.addOverlays(Grants_Pass)},1000); setTimeout(function(){map.addOverlays(Gresham)},1000); setTimeout(function(){map.addOverlays(Hermiston)},1000); setTimeout(function(){map.addOverlays(Hillsboro)},1000); setTimeout(function(){map.addOverlays(Hood_River)},1000); setTimeout(function(){map.addOverlays(Klamath_Falls)},1000); setTimeout(function(){map.addOverlays(La_Grande)},1000); setTimeout(function(){map.addOverlays(Lincoln_City)},1000); setTimeout(function(){map.addOverlays(Madras)},1000); setTimeout(function(){map.addOverlays(Mcminnville)},1000); setTimeout(function(){map.addOverlays(Milton_Freewater)},1000); setTimeout(function(){map.addOverlays(North_Bend)},1000); setTimeout(function(){map.addOverlays(Pendleton)},1000); setTimeout(function(){map.addOverlays(Pleasant_Hill)},1000); setTimeout(function(){map.addOverlays(Portland)},1000); setTimeout(function(){map.addOverlays(Roseburg)},1000); setTimeout(function(){map.addOverlays(Salem)},1000); setTimeout(function(){map.addOverlays(Scappoose)},1000); setTimeout(function(){map.addOverlays(Sutherlin)},1000); setTimeout(function(){map.addOverlays(Tangent)},1000); setTimeout(function(){map.addOverlays(The_Dalles)},1000); setTimeout(function(){map.addOverlays(Tillamook)},1000); setTimeout(function(){map.addOverlays(Vale)},1000); setTimeout(function(){map.addOverlays(Warrenton)},1000); setTimeout(function(){map.addOverlays(Willamina)},1000); maxLng = -117.41880000; maxLat = 46.11928100; minLng = -124.39990000; minLat = 42.11833700; reCenterMap(); } // 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(Athena); map.removeOverlays(Baker); map.removeOverlays(Bandon); map.removeOverlays(Bend); map.removeOverlays(Boring); map.removeOverlays(Brookings); map.removeOverlays(Canyonville); map.removeOverlays(Cave_Junction); map.removeOverlays(Days_Creek); map.removeOverlays(Eagle_Point); map.removeOverlays(Enterprise); map.removeOverlays(Gaston); map.removeOverlays(Gladstone); map.removeOverlays(Grants_Pass); map.removeOverlays(Gresham); map.removeOverlays(Hermiston); map.removeOverlays(Hillsboro); map.removeOverlays(Hood_River); map.removeOverlays(Klamath_Falls); map.removeOverlays(La_Grande); map.removeOverlays(Lincoln_City); map.removeOverlays(Madras); map.removeOverlays(Mcminnville); map.removeOverlays(Milton_Freewater); map.removeOverlays(North_Bend); map.removeOverlays(Pendleton); map.removeOverlays(Pleasant_Hill); map.removeOverlays(Portland); map.removeOverlays(Roseburg); map.removeOverlays(Salem); map.removeOverlays(Scappoose); map.removeOverlays(Sutherlin); map.removeOverlays(Tangent); map.removeOverlays(The_Dalles); map.removeOverlays(Tillamook); map.removeOverlays(Vale); map.removeOverlays(Warrenton); map.removeOverlays(Willamina); 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(Baker);map.removeOverlays(Athena); map.removeOverlays(Baker); map.removeOverlays(Bandon); map.removeOverlays(Bend); map.removeOverlays(Boring); map.removeOverlays(Brookings); map.removeOverlays(Canyonville); map.removeOverlays(Cave_Junction); map.removeOverlays(Days_Creek); map.removeOverlays(Eagle_Point); map.removeOverlays(Enterprise); map.removeOverlays(Gaston); map.removeOverlays(Gladstone); map.removeOverlays(Grants_Pass); map.removeOverlays(Gresham); map.removeOverlays(Hermiston); map.removeOverlays(Hillsboro); map.removeOverlays(Hood_River); map.removeOverlays(Klamath_Falls); map.removeOverlays(La_Grande); map.removeOverlays(Lincoln_City); map.removeOverlays(Madras); map.removeOverlays(Mcminnville); map.removeOverlays(Milton_Freewater); map.removeOverlays(North_Bend); map.removeOverlays(Pendleton); map.removeOverlays(Pleasant_Hill); map.removeOverlays(Portland); map.removeOverlays(Roseburg); map.removeOverlays(Salem); map.removeOverlays(Scappoose); map.removeOverlays(Sutherlin); map.removeOverlays(Tangent); map.removeOverlays(The_Dalles); map.removeOverlays(Tillamook); map.removeOverlays(Vale); map.removeOverlays(Warrenton); map.removeOverlays(Willamina); map.addOverlays(Athena); centerByArray(Athena, false, false); cntMarker += Athena.length; map.addOverlays(Baker); centerByArray(Baker, false, false); cntMarker += Baker.length; map.addOverlays(Bandon); centerByArray(Bandon, false, false); cntMarker += Bandon.length; map.addOverlays(Bend); centerByArray(Bend, false, false); cntMarker += Bend.length; map.addOverlays(Boring); centerByArray(Boring, false, false); cntMarker += Boring.length; map.addOverlays(Brookings); centerByArray(Brookings, false, false); cntMarker += Brookings.length; map.addOverlays(Canyonville); centerByArray(Canyonville, false, false); cntMarker += Canyonville.length; map.addOverlays(Cave_Junction); centerByArray(Cave_Junction, false, false); cntMarker += Cave_Junction.length; map.addOverlays(Days_Creek); centerByArray(Days_Creek, false, false); cntMarker += Days_Creek.length; map.addOverlays(Eagle_Point); centerByArray(Eagle_Point, false, false); cntMarker += Eagle_Point.length; map.addOverlays(Enterprise); centerByArray(Enterprise, false, false); cntMarker += Enterprise.length; map.addOverlays(Gaston); centerByArray(Gaston, false, false); cntMarker += Gaston.length; map.addOverlays(Gladstone); centerByArray(Gladstone, false, false); cntMarker += Gladstone.length; map.addOverlays(Grants_Pass); centerByArray(Grants_Pass, false, false); cntMarker += Grants_Pass.length; map.addOverlays(Gresham); centerByArray(Gresham, false, false); cntMarker += Gresham.length; map.addOverlays(Hermiston); centerByArray(Hermiston, false, false); cntMarker += Hermiston.length; map.addOverlays(Hillsboro); centerByArray(Hillsboro, false, false); cntMarker += Hillsboro.length; map.addOverlays(Hood_River); centerByArray(Hood_River, false, false); cntMarker += Hood_River.length; map.addOverlays(Klamath_Falls); centerByArray(Klamath_Falls, false, false); cntMarker += Klamath_Falls.length; map.addOverlays(La_Grande); centerByArray(La_Grande, false, false); cntMarker += La_Grande.length; map.addOverlays(Lincoln_City); centerByArray(Lincoln_City, false, false); cntMarker += Lincoln_City.length; map.addOverlays(Madras); centerByArray(Madras, false, false); cntMarker += Madras.length; map.addOverlays(Mcminnville); centerByArray(Mcminnville, false, false); cntMarker += Mcminnville.length; map.addOverlays(Milton_Freewater); centerByArray(Milton_Freewater, false, false); cntMarker += Milton_Freewater.length; map.addOverlays(North_Bend); centerByArray(North_Bend, false, false); cntMarker += North_Bend.length; map.addOverlays(Pendleton); centerByArray(Pendleton, false, false); cntMarker += Pendleton.length; map.addOverlays(Pleasant_Hill); centerByArray(Pleasant_Hill, false, false); cntMarker += Pleasant_Hill.length; map.addOverlays(Portland); centerByArray(Portland, false, false); cntMarker += Portland.length; map.addOverlays(Roseburg); centerByArray(Roseburg, false, false); cntMarker += Roseburg.length; map.addOverlays(Salem); centerByArray(Salem, false, false); cntMarker += Salem.length; map.addOverlays(Scappoose); centerByArray(Scappoose, false, false); cntMarker += Scappoose.length; map.addOverlays(Sutherlin); centerByArray(Sutherlin, false, false); cntMarker += Sutherlin.length; map.addOverlays(Tangent); centerByArray(Tangent, false, false); cntMarker += Tangent.length; map.addOverlays(The_Dalles); centerByArray(The_Dalles, false, false); cntMarker += The_Dalles.length; map.addOverlays(Tillamook); centerByArray(Tillamook, false, false); cntMarker += Tillamook.length; map.addOverlays(Vale); centerByArray(Vale, false, false); cntMarker += Vale.length; map.addOverlays(Warrenton); centerByArray(Warrenton, false, false); cntMarker += Warrenton.length; map.addOverlays(Willamina); centerByArray(Willamina, false, false); cntMarker += Willamina.length; centerByArray(Baker,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///22940,22791,22699,22726,22731,22790,22777,22728,22697,22838,22857,31705,22655,22931,22941,22640,22627,22630,22940,22739,22649,22648,22783,22792,22872,22699,22769,22853,22726,22839,22731,22949,22790,22760,22762,22777,22717,22787,22793,22718,22728,22796,22697,22857,31705,22868,22925,22655,22931,22941,22942,22837,22725,/all'); //window.open('/map.php?type=2&schools=22940,22791,22699,22726,22731,22790,22777,22728,22697,22838,22857,31705,22655,22931,22941,22640,22627,22630,22940,22739,22649,22648,22783,22792,22872,22699,22769,22853,22726,22839,22731,22949,22790,22760,22762,22777,22717,22787,22793,22718,22728,22796,22697,22857,31705,22868,22925,22655,22931,22941,22942,22837,22725,&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; }