function load() { if (GBrowserIsCompatible()) { var map = new GMap2(document.getElementById("map")); map.addControl(new GSmallMapControl()); map.addControl(new GMapTypeControl()); map.setCenter(new GLatLng(39.03,-95.80), 10);// ((Vert,Horiz),Zoom Level) // Create a base icon for all of our markers that specifies the // shadow, icon dimensions, etc. var baseIcon = new GIcon(); baseIcon.shadow = "http://www.google.com/mapfiles/shadow50.png"; baseIcon.iconSize = new GSize(20, 34); baseIcon.shadowSize = new GSize(37, 34); baseIcon.iconAnchor = new GPoint(9, 34); baseIcon.infoWindowAnchor = new GPoint(9, 2); baseIcon.infoShadowAnchor = new GPoint(18, 25); // Creates a marker whose info window displays the letter corresponding to the given index. var aHours = ""; function createMarker(point, index, name, addy1, addy2, hours, type, color) { var icon = new GIcon(baseIcon); icon.image = "/image/style/marker-"+color+".png"; var marker = new GMarker(point, icon); if(hours!=""){ aHours = 'Hours: '+hours+'
'; } GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml(''+name+'
'+addy1+'
'+addy2+'

'+aHours+'Materials Accepted: '+type+'
'); }); return marker; } /* // Add 10 markers to the map at random locations var bounds = map.getBounds(); var southWest = bounds.getSouthWest(); var northEast = bounds.getNorthEast(); var lngSpan = northEast.lng() - southWest.lng(); var latSpan = northEast.lat() - southWest.lat(); */ // RecLoc#Lat/RecLoc#Lng = Recycling Location (Position Number) Latitude/Longitude var x = 0; var NameLoc = new Array; var LocLatRec = new Array; var LocLngRec = new Array; var AddyPhys1 = new Array; var AddyPhys2 = new Array; var Hours = new Array; var TypeLoc = new Array; var TypeRec = new Array("Plastics, Office Paper, Newspaper, Metals, Glass, Cardboard, Magazines","Plastics, Newspaper, Metals, Glass, Cardboard, Magazines","Plastics, Newspapers, Metals, Cardboard, and Magazines","Plastics, Newspapers, Metals, and Cardboard","Plastics, Newspapers, Metals and Magazines","Plastics, Metals, Glass and Cardboard","Plastics, Metals, and Cardboard","Plastics, Newspapers, and Metals","","","","","",""); var TypeColor = new Array("green","green1","yellow1","orange1","orange1","orange1","orange1","red1","","","","","",""); var RecType = 0; // All Recyclables NameLoc[x] = "Dillon’s"; AddyPhys1[x] = "801 NW 25th St"; AddyPhys2[x] = "Topeka, KS 66618"; LocLatRec[x] = 39.0927; LocLngRec[x] = -95.6753; Hours[x] = ""; TypeLoc[x++] = 0; NameLoc[x] = "University of Kansas Health System St. Francis Campus"; AddyPhys1[x] = "634 SW Mulvane"; AddyPhys2[x] = "Topeka, KS 66606"; LocLatRec[x] = 39.067314; LocLngRec[x] = -95.692806; Hours[x] = ""; TypeLoc[x++] = 0; NameLoc[x] = "Wehner’s Thriftway"; AddyPhys1[x] = "551 E US Hwy 24 Traffic Way"; AddyPhys2[x] = "Rossville, KS 66533"; LocLatRec[x] = 39.138058; LocLngRec[x] = -95.955849; Hours[x] = ""; TypeLoc[x++] = 0; NameLoc[x] = "Household Hazardous Waste Facility"; AddyPhys1[x] = "131 NE 46th St"; AddyPhys2[x] = "Topeka, KS 66617"; LocLatRec[x] = 39.129328; LocLngRec[x] = -95.6589; Hours[x] = ""; TypeLoc[x++] = 0; NameLoc[x] = "Albert Neese Masonic Lodge"; AddyPhys1[x] = "5947 SE 45th St"; AddyPhys2[x] = "Tecumseh, KS 66542-9538"; LocLatRec[x] = 38.98599; LocLngRec[x] = -95.55758; Hours[x] = ""; TypeLoc[x++] = 0; NameLoc[x] = "Old Shawnee County Road Maintenance Shop"; AddyPhys1[x] = "6318 SW Auburn Rd"; AddyPhys2[x] = "Auburn, KS 66542"; LocLatRec[x] = 38.951893; LocLngRec[x] = -95.816546; Hours[x] = ""; TypeLoc[x++] = 0; var point = ''; var i = 0; for (i = 0; i < LocLatRec.length; i++) { point = new GLatLng(LocLatRec[i], LocLngRec[i]); map.addOverlay(createMarker(point, i, NameLoc[i], AddyPhys1[i], AddyPhys2[i],Hours[i], TypeRec[TypeLoc[i]], TypeColor[TypeLoc[i]])); } } } addonloadfunction(load);