function addMarkers(){ mySelect = document.getElementById('selection'); Vashon = [];Vancouver = [];Veradale = [];mySelect.options[mySelect.options.length] = new Option("Vancouver schools",'all=Vancouver'); mySelect.options[mySelect.options.length] = new Option("Vashon schools",'all=Vashon'); mySelect.options[mySelect.options.length] = new Option("Veradale schools",'all=Veradale'); Vashon[Vashon.length] = createMarker(new GPoint(-122.46590000,47.41890000),"
Carpe Diem Primary School Inc
Po Box 141
Vashon, WA 98070
Co-ed school, K-3
[ View School Profile ]
",iconGr); Vancouver[Vancouver.length] = createMarker(new GPoint(-122.56388300,45.63203700),"
Cascadia School
10606 Ne 14th Street
Vancouver, WA 98664
Co-ed school, 1-8
[ View School Profile ]
",iconGr); Vancouver[Vancouver.length] = createMarker(new GPoint(-122.65876200,45.67845000),"
Childrens Village Dc-hd
1307b Ne 78th Street Suite 9
Vancouver, WA 98665
Co-ed school, PK-K
[ View School Profile ]
",iconGr); Vancouver[Vancouver.length] = createMarker(new GPoint(-122.59707500,45.64303900),"
Childrens Village Dcc Burton
2904 Ne Burton Road
Vancouver, WA 98662
Co-ed school, PK-6
[ View School Profile ]
",iconGr); Veradale[Veradale.length] = createMarker(new GPoint(-117.20165600,47.62765000),"
Christ Beginnings Child Center
15112 E 32nd Avenue
Veradale, WA 99037
Co-ed school, PK-K
[ View School Profile ]
",iconGr); Vancouver[Vancouver.length] = createMarker(new GPoint(-122.57091900,45.61773500),"
Columbia Ridge Baptist Academy
9914 SE Sixth Street
Vancouver, WA 98664
Co-ed school, 1-12
[ View School Profile ]
",iconGr); Vancouver[Vancouver.length] = createMarker(new GPoint(-122.59427600,45.67903100),"
Cornerstone Christian School
7708 NE 78th Street
Vancouver, WA 98662
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Veradale[Veradale.length] = createMarker(new GPoint(-117.20036800,47.64260000),"
Cornerstone Montessori
15205 East 16th Avenue
Veradale, WA 99037
Co-ed school, PK-1
[ View School Profile ]
",iconGr); Vancouver[Vancouver.length] = createMarker(new GPoint(-122.62031300,45.74035600),"
The Gardner School
16413 NE 50th Ave
Vancouver, WA 98686
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Veradale[Veradale.length] = createMarker(new GPoint(-117.19535100,47.63523700),"
Grace Early Learning Center
Po Box 531
Veradale, WA 99037
Co-ed school, PK-K
[ View School Profile ]
",iconGr); Vashon[Vashon.length] = createMarker(new GPoint(-122.46795800,47.42045100),"
The Harbor School
Po Box 1912
Vashon, WA 98070
Co-ed school, 4-8
[ View School Profile ]
",iconGr); Vancouver[Vancouver.length] = createMarker(new GPoint(-122.66810800,45.67464400),"
Hazel Dell Montessori School
7207 Ne Hazel Dell Ave
Vancouver, WA 98665
Co-ed school, PK-K
[ View School Profile ]
",iconGr); Vancouver[Vancouver.length] = createMarker(new GPoint(-122.63705000,45.65150500),"
Hosanna Christian School
4120 Ne St Johns Road
Vancouver, WA 98661
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Veradale[Veradale.length] = createMarker(new GPoint(-117.19648200,47.65434700),"
Kindercare 863
205 S Sullivan Road
Veradale, WA 99037
Co-ed school, PK-K
[ View School Profile ]
",iconGr); Vancouver[Vancouver.length] = createMarker(new GPoint(-122.55072400,45.67847200),"
Kindercare Learning Center
7715 Ne 119th Place
Vancouver, WA 98682
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); Vancouver[Vancouver.length] = createMarker(new GPoint(-122.49895200,45.60569400),"
Kindercare Learning Center #1526
16808 Se Mcgillivray Blvd
Vancouver, WA 98683
Co-ed school, NS-K
[ View School Profile ]
",iconGr); Vancouver[Vancouver.length] = createMarker(new GPoint(-122.65936100,45.71763700),"
Kindercare Learning Center #1610
13315 Ne 12th Avenue
Vancouver, WA 98685
Co-ed school, PK-K
[ View School Profile ]
",iconGr); Vancouver[Vancouver.length] = createMarker(new GPoint(-122.63618300,45.67883700),"
Kings Way Christian School
3300 Ne 78th Street
Vancouver, WA 98665
Co-ed school, K-9
[ View School Profile ]
",iconGr); Vancouver[Vancouver.length] = createMarker(new GPoint(-122.50570100,45.59988700),"
Knowledge Beginnings Dcc
2907 Se 162nd Avenue
Vancouver, WA 98683
Co-ed school, NS-PK
[ View School Profile ]
",iconGr); Veradale[Veradale.length] = createMarker(new GPoint(-117.19884400,47.66725100),"
Little Learner Child Developme
E. 15321 Mission Ave.
Veradale, WA 99037
Co-ed school, KG-KG
[ View School Profile ]
",iconGr); Vashon[Vashon.length] = createMarker(new GPoint(-122.46795800,47.42045100),"
Madrona Primary School
Po Box 98
Vashon, WA 98070
Co-ed school, K-3
[ View School Profile ]
",iconGr); Vancouver[Vancouver.length] = createMarker(new GPoint(-122.56182400,45.67793700),"
New Generation Christian School
Po Box 820289
Vancouver, WA 98682
Co-ed school, PK-11
[ View School Profile ]
",iconGr); Vancouver[Vancouver.length] = createMarker(new GPoint(-122.67710300,45.65616200),"
Our Lady Of Lourdes School
4701 Nw Franklin Street
Vancouver, WA 98663
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Veradale[Veradale.length] = createMarker(new GPoint(-117.19639500,47.66250600),"
Pioneer School
618 North Sullivan Road
Veradale, WA 99037
Co-ed school, K-4
[ View School Profile ]
",iconGr); Vancouver[Vancouver.length] = createMarker(new GPoint(-122.59199300,45.64013400),"
Portland Christian Schools
7915 Ne Burton Road
Vancouver, WA 98662
Co-ed school, PK-5
[ View School Profile ]
",iconGr); Veradale[Veradale.length] = createMarker(new GPoint(-117.18271500,47.63884000),"
Prism School: Child Centered Learning
1912 S Conklin Road
Veradale, WA 99037
Co-ed school, K-3
[ View School Profile ]
",iconGr); Vancouver[Vancouver.length] = createMarker(new GPoint(-122.60488200,45.61792800),"
St. Joseph Catholic School
6500 Highland Drive
Vancouver, WA 98661
Co-ed school, PK-8
[ View School Profile ]
",iconGr); Vancouver[Vancouver.length] = createMarker(new GPoint(-122.60440300,45.65840200),"
Skinner Montessori School
5001 Ne 66th Avenue
Vancouver, WA 98661
Co-ed school, 5-8
[ View School Profile ]
",iconGr); Vancouver[Vancouver.length] = createMarker(new GPoint(-122.58825800,45.64886700),"
Vancouver Christian High School
8205 NE Fourth Plain Blvd.
Vancouver, WA 98662
Co-ed school, 9-12
[ View School Profile ]
",iconGr); Vancouver[Vancouver.length] = createMarker(new GPoint(-122.56664000,45.63203700),"
Vancouver Montessori School
10316 Ne 14th Street
Vancouver, WA 98664
Co-ed school, PK-K
[ View School Profile ]
",iconGr); } // 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(Vancouver); map.removeOverlays(Vashon); map.removeOverlays(Veradale); 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(Vashon);map.removeOverlays(Vancouver); map.removeOverlays(Vashon); map.removeOverlays(Veradale); map.addOverlays(Vancouver); centerByArray(Vancouver, false, false); cntMarker += Vancouver.length; map.addOverlays(Vashon); centerByArray(Vashon, false, false); cntMarker += Vashon.length; map.addOverlays(Veradale); centerByArray(Veradale, false, false); cntMarker += Veradale.length; centerByArray(Vashon,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=&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; }