function addMarkers(){ mySelect = document.getElementById('selection'); Tualatin = [];Happy_Valley = [];Damascus = [];Lake_Oswego = [];Milwaukie = [];West_Linn = [];Molalla = [];Oregon_City = [];Woodburn = [];Boring = [];Clackamas = [];Wilsonville = [];Govt_Camp = [];Marylhurst = [];Gladstone = [];mySelect.options[mySelect.options.length] = new Option("Boring schools",'all=Boring'); mySelect.options[mySelect.options.length] = new Option("Clackamas schools",'all=Clackamas'); mySelect.options[mySelect.options.length] = new Option("Damascus schools",'all=Damascus'); mySelect.options[mySelect.options.length] = new Option("Gladstone schools",'all=Gladstone'); mySelect.options[mySelect.options.length] = new Option("Govt Camp schools",'all=Govt_Camp'); mySelect.options[mySelect.options.length] = new Option("Happy Valley schools",'all=Happy_Valley'); mySelect.options[mySelect.options.length] = new Option("Lake Oswego schools",'all=Lake_Oswego'); mySelect.options[mySelect.options.length] = new Option("Marylhurst schools",'all=Marylhurst'); mySelect.options[mySelect.options.length] = new Option("Milwaukie schools",'all=Milwaukie'); mySelect.options[mySelect.options.length] = new Option("Molalla schools",'all=Molalla'); mySelect.options[mySelect.options.length] = new Option("Oregon City schools",'all=Oregon_City'); mySelect.options[mySelect.options.length] = new Option("Tualatin schools",'all=Tualatin'); mySelect.options[mySelect.options.length] = new Option("West Linn schools",'all=West_Linn'); mySelect.options[mySelect.options.length] = new Option("Wilsonville schools",'all=Wilsonville'); mySelect.options[mySelect.options.length] = new Option("Woodburn schools",'all=Woodburn'); mySelect.options[mySelect.options.length] = new Option("---------------------------",''); Tualatin[Tualatin.length] = createMarker(new GPoint(-122.71968900,45.37544500),"
Arbor School Of Arts & Science
4201 SW Borland Road
Tualatin, OR 97062
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Arbor School Of Arts & Science",'Tualatin=' + Tualatin.length); Happy_Valley[Happy_Valley.length] = createMarker(new GPoint(-122.56850300,45.45210000),"
Beautiful Savior Lutheran Preschool & Kdgn
9800 Se 92nd Avenue
Happy Valley, OR 97086
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Beautiful Savior Lutheran Preschool & Kdgn",'Happy_Valley=' + Happy_Valley.length); Damascus[Damascus.length] = createMarker(new GPoint(-122.49885900,45.39678400),"
Carver School
16077 SE HWY 224
Damascus, OR 97089
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Carver School",'Damascus=' + Damascus.length); Tualatin[Tualatin.length] = createMarker(new GPoint(-122.74392300,45.38052400),"
Children's Creative Learning Center
19300 Sw 65th Avenue
Tualatin, OR 97062
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Children's Creative Learning Center",'Tualatin=' + Tualatin.length); Lake_Oswego[Lake_Oswego.length] = createMarker(new GPoint(-122.74373400,45.39914100),"
The Childrens Hour Academy
17650 SW 65th Avenue
Lake Oswego, OR 97035
Co-ed school, K-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("The Childrens Hour Academy",'Lake_Oswego=' + Lake_Oswego.length); Milwaukie[Milwaukie.length] = createMarker(new GPoint(-122.58783000,45.43987500),"
Christ The King Parish School
7414 SE Michael Drive
Milwaukie, OR 97222
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Christ The King Parish School",'Milwaukie=' + Milwaukie.length); Damascus[Damascus.length] = createMarker(new GPoint(-122.47126500,45.41335100),"
Christ The Vine Early Childhood Center
18677 Se Highway 212
Damascus, OR 97089
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Christ The Vine Early Childhood Center",'Damascus=' + Damascus.length); West_Linn[West_Linn.length] = createMarker(new GPoint(-122.64076700,45.38678400),"
Columbia Academy
19200 Willamette Drive
West Linn, OR 97068
Co-ed school, PK-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Columbia Academy",'West_Linn=' + West_Linn.length); Molalla[Molalla.length] = createMarker(new GPoint(-122.51810200,45.17132500),"
Country Christian School
16975 S Highway 211
Molalla, OR 97038
school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Country Christian School",'Molalla=' + Molalla.length); Oregon_City[Oregon_City.length] = createMarker(new GPoint(-122.57080000,45.34020000),"
Crossroads Alternative School
Po Box 1480
Oregon City, OR 97045
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Crossroads Alternative School",'Oregon_City=' + Oregon_City.length); Woodburn[Woodburn.length] = createMarker(new GPoint(-122.75476100,45.13553700),"
Elliott Prairie Christian School
5383 S Schneider Road
Woodburn, OR 97071
Co-ed school, 3-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Elliott Prairie Christian School",'Woodburn=' + Woodburn.length); Lake_Oswego[Lake_Oswego.length] = createMarker(new GPoint(-122.72236300,45.42074200),"
Exploration Learning School
4515 Parkview Dr po Box 2318
Lake Oswego, OR 97035
Co-ed school, PK-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Exploration Learning School",'Lake_Oswego=' + Lake_Oswego.length); Boring[Boring.length] = createMarker(new GPoint(-122.36460700,45.44326300),"
Good Shepherd School
28986 Southeast Haley Road
Boring, OR 97009
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Good Shepherd School",'Boring=' + Boring.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); West_Linn[West_Linn.length] = createMarker(new GPoint(-122.64591500,45.39182400),"
Kinder Care #965
3020 Lazy River Dr
West Linn, OR 97068
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Kinder Care #965",'West_Linn=' + West_Linn.length); Lake_Oswego[Lake_Oswego.length] = createMarker(new GPoint(-122.71530400,45.41346300),"
Kinder-care Learning Center Inc
3700 Red Cedar Way
Lake Oswego, OR 97035
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Kinder-care Learning Center Inc",'Lake_Oswego=' + Lake_Oswego.length); Milwaukie[Milwaukie.length] = createMarker(new GPoint(-122.58561800,45.43602000),"
La Salle Catholic College Preparatory
11999 SE Fuller Road
Milwaukie, OR 97222
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("La Salle Catholic College Preparatory",'Milwaukie=' + Milwaukie.length); Lake_Oswego[Lake_Oswego.length] = createMarker(new GPoint(-122.72530000,45.41520000),"
Lake Oswego Montessori School
Po Box 1541
Lake Oswego, OR 97035
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Lake Oswego Montessori School",'Lake_Oswego=' + Lake_Oswego.length); Clackamas[Clackamas.length] = createMarker(new GPoint(-122.57659700,45.41159100),"
Life Christian School
15351 Se Johnson Rd
Clackamas, OR 97015
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Life Christian School",'Clackamas=' + Clackamas.length); Oregon_City[Oregon_City.length] = createMarker(new GPoint(-122.59943500,45.35907300),"
Marylhurst Early Childhood Center
817 12th Street
Oregon City, OR 97045
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Marylhurst Early Childhood Center",'Oregon_City=' + Oregon_City.length); Wilsonville[Wilsonville.length] = createMarker(new GPoint(-122.75926500,45.31761700),"
Mentor Graphics Cdc
8005 Sw Boeckman Road
Wilsonville, OR 97070
Co-ed school, NS-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mentor Graphics Cdc",'Wilsonville=' + Wilsonville.length); Milwaukie[Milwaukie.length] = createMarker(new GPoint(-122.59941900,45.43488300),"
Milwaukie Covenant Preschool A
12201 Se Linwood Ave
Milwaukie, OR 97222
Co-ed school, PK-PK
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Milwaukie Covenant Preschool A",'Milwaukie=' + Milwaukie.length); Govt_Camp[Govt_Camp.length] = createMarker(new GPoint(-121.75100000,45.29350000),"
Mt. Hood Academy
P.o. Box 189
Gov't Camp, OR 97028
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Mt. Hood Academy",'Govt_Camp=' + Govt_Camp.length); Oregon_City[Oregon_City.length] = createMarker(new GPoint(-122.57948500,45.32270000),"
North Clackamas Christian School
19575 Sebastian Way
Oregon City, OR 97045
Co-ed school, PK-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("North Clackamas Christian School",'Oregon_City=' + Oregon_City.length); Wilsonville[Wilsonville.length] = createMarker(new GPoint(-122.76610000,45.30670000),"
Northwest Montessori School
Po Box 961 10050 Sw Wv Road
Wilsonville, OR 97070
Co-ed school, PK-1
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Northwest Montessori School",'Wilsonville=' + Wilsonville.length); Lake_Oswego[Lake_Oswego.length] = createMarker(new GPoint(-122.65709600,45.40237500),"
Northwest Montessori School
2382 Glenmorrie Drive
Lake Oswego, OR 97034
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Northwest Montessori School",'Lake_Oswego=' + Lake_Oswego.length); Molalla[Molalla.length] = createMarker(new GPoint(-122.56841400,45.15227000),"
Oregon Outreach - Molalla Pride
357 E Francis Street
Molalla, OR 97038
Co-ed school, 10-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Oregon Outreach - Molalla Pride",'Molalla=' + Molalla.length); Lake_Oswego[Lake_Oswego.length] = createMarker(new GPoint(-122.67204600,45.42009400),"
Our Lady Of The Lake School
716 A Avenue
Lake Oswego, OR 97034
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Our Lady Of The Lake School",'Lake_Oswego=' + Lake_Oswego.length); Wilsonville[Wilsonville.length] = createMarker(new GPoint(-122.76849900,45.30688000),"
Pacific Northwest Academy
Po Box 683
Wilsonville, OR 97070
Co-ed school, K-5
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Pacific Northwest Academy",'Wilsonville=' + Wilsonville.length); Marylhurst[Marylhurst.length] = createMarker(new GPoint(-122.65173400,45.39662500),"
Park Academy
Po Box 34
Marylhurst, OR 97036
Co-ed school, 4-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Park Academy",'Marylhurst=' + Marylhurst.length); Damascus[Damascus.length] = createMarker(new GPoint(-122.42297300,45.44707600),"
Pleasant Valley Montessori School
23225 SE Borges Road
Damascus, OR 97089
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Pleasant Valley Montessori School",'Damascus=' + Damascus.length); Milwaukie[Milwaukie.length] = createMarker(new GPoint(-122.63933400,45.44617500),"
Portland Waldorf School
2300 SE Harrison St
Milwaukie, OR 97222
Co-ed school, NS-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Portland Waldorf School",'Milwaukie=' + Milwaukie.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); Oregon_City[Oregon_City.length] = createMarker(new GPoint(-122.60727400,45.35507000),"
St. John The Apostle School
516 5th Street
Oregon City, OR 97045
Co-ed school, K-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. John The Apostle School",'Oregon_City=' + Oregon_City.length); Milwaukie[Milwaukie.length] = createMarker(new GPoint(-122.63649300,45.44374700),"
St. John The Baptist School
10956 Se 25th Ave
Milwaukie, OR 97222
Co-ed school, PK-8
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("St. John The Baptist School",'Milwaukie=' + Milwaukie.length); Lake_Oswego[Lake_Oswego.length] = createMarker(new GPoint(-122.70635000,45.42887800),"
Sonshine Express Preschool
40 Mcnary Parkway
Lake Oswego, OR 97035
Co-ed school, NS-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sonshine Express Preschool",'Lake_Oswego=' + Lake_Oswego.length); West_Linn[West_Linn.length] = createMarker(new GPoint(-122.62586600,45.35896300),"
Sun Garden Montessori Center
2284 Long Street
West Linn, OR 97068
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sun Garden Montessori Center",'West_Linn=' + West_Linn.length); Happy_Valley[Happy_Valley.length] = createMarker(new GPoint(-122.54007200,45.43000600),"
Sunnyside Montessori House
12218 Se Eagle Glen Drive
Happy Valley, OR 97086
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Sunnyside Montessori House",'Happy_Valley=' + Happy_Valley.length); Lake_Oswego[Lake_Oswego.length] = createMarker(new GPoint(-122.71478900,45.42701000),"
Touchstone School
2 Touchstone
Lake Oswego, OR 97035
Co-ed school, K-6
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Touchstone School",'Lake_Oswego=' + Lake_Oswego.length); Lake_Oswego[Lake_Oswego.length] = createMarker(new GPoint(-122.74044400,45.40950500),"
West Lake Montessori School
16106 Lake Forest Blvd
Lake Oswego, OR 97035
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("West Lake Montessori School",'Lake_Oswego=' + Lake_Oswego.length); West_Linn[West_Linn.length] = createMarker(new GPoint(-122.61927300,45.36950700),"
West Linn Montessori School
21580 Willamette Drive
West Linn, OR 97068
Co-ed school, PK-K
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("West Linn Montessori School",'West_Linn=' + West_Linn.length); Lake_Oswego[Lake_Oswego.length] = createMarker(new GPoint(-122.72390300,45.41918200),"
Westside Christian High School
4565 Carman Drive
Lake Oswego, OR 97035
Co-ed school, 9-12
[ View School Profile ]
",iconGr); mySelect.options[mySelect.options.length] = new Option("Westside Christian High School",'Lake_Oswego=' + Lake_Oswego.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/////3/' + showArray); map.removeOverlays(Boring); map.removeOverlays(Clackamas); map.removeOverlays(Damascus); map.removeOverlays(Gladstone); map.removeOverlays(Govt_Camp); map.removeOverlays(Happy_Valley); map.removeOverlays(Lake_Oswego); map.removeOverlays(Marylhurst); map.removeOverlays(Milwaukie); map.removeOverlays(Molalla); map.removeOverlays(Oregon_City); map.removeOverlays(Tualatin); map.removeOverlays(West_Linn); map.removeOverlays(Wilsonville); map.removeOverlays(Woodburn); 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(Tualatin);map.removeOverlays(Boring); map.removeOverlays(Clackamas); map.removeOverlays(Damascus); map.removeOverlays(Gladstone); map.removeOverlays(Govt_Camp); map.removeOverlays(Happy_Valley); map.removeOverlays(Lake_Oswego); map.removeOverlays(Marylhurst); map.removeOverlays(Milwaukie); map.removeOverlays(Molalla); map.removeOverlays(Oregon_City); map.removeOverlays(Tualatin); map.removeOverlays(West_Linn); map.removeOverlays(Wilsonville); map.removeOverlays(Woodburn); map.addOverlays(Boring); centerByArray(Boring, false, false); cntMarker += Boring.length; map.addOverlays(Clackamas); centerByArray(Clackamas, false, false); cntMarker += Clackamas.length; map.addOverlays(Damascus); centerByArray(Damascus, false, false); cntMarker += Damascus.length; map.addOverlays(Gladstone); centerByArray(Gladstone, false, false); cntMarker += Gladstone.length; map.addOverlays(Govt_Camp); centerByArray(Govt_Camp, false, false); cntMarker += Govt_Camp.length; map.addOverlays(Happy_Valley); centerByArray(Happy_Valley, false, false); cntMarker += Happy_Valley.length; map.addOverlays(Lake_Oswego); centerByArray(Lake_Oswego, false, false); cntMarker += Lake_Oswego.length; map.addOverlays(Marylhurst); centerByArray(Marylhurst, false, false); cntMarker += Marylhurst.length; map.addOverlays(Milwaukie); centerByArray(Milwaukie, false, false); cntMarker += Milwaukie.length; map.addOverlays(Molalla); centerByArray(Molalla, false, false); cntMarker += Molalla.length; map.addOverlays(Oregon_City); centerByArray(Oregon_City, false, false); cntMarker += Oregon_City.length; map.addOverlays(Tualatin); centerByArray(Tualatin, false, false); cntMarker += Tualatin.length; map.addOverlays(West_Linn); centerByArray(West_Linn, false, false); cntMarker += West_Linn.length; map.addOverlays(Wilsonville); centerByArray(Wilsonville, false, false); cntMarker += Wilsonville.length; map.addOverlays(Woodburn); centerByArray(Woodburn, false, false); cntMarker += Woodburn.length; centerByArray(Tualatin,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=3&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; }