function loadRoadtripMap(wp) {
	if (!GBrowserIsCompatible())
		return false;
	
	
	// Instantiate map
	var map = new GMap2(document.getElementById("map"));
	var pt = wp[0].split(",");
	map.setCenter(new GLatLng(pt[0], pt[1]), 4);

	// Add map controls
	var extLargeMapControl = new ExtLargeMapControl(map);
	map.addControl(extLargeMapControl);
	map.addControl(new ExtMapTypeControl({showTraffic: true, showTrafficKey: false})); //add custom traffic overlay button
	map.addControl(new GHierarchicalMapTypeControl());  //adds normal/satellite w/ labels dropdown
	map.addMapType(G_PHYSICAL_MAP);
	var mini = new GOverviewMapControl();
	map.addControl(mini); //adds lower right hand corner overview map
	mini.hide();
	//map.enableScrollWheelZoom();
	map.enableContinuousZoom();

	// Google only allows 25 waypoints per direction object, but allows us to create
	// multiple direction objects
	var prev = 0;
	for (i = 0; i < Math.ceil(wp.length/25); ++i) {
		// Instantiate directions object
		var dir = new GDirections(map);
		dir.offset_count = prev; // record which waypoint this object starts with
		
		// create a slice of up to 25 waypoints
		var slice = wp.slice(prev, Math.min(prev+25, wp.length));
		
		// Load our waypoints
		var options = {preserveViewport: (i > 0)}; // only set viewport on first set of waypoints
		dir.loadFromWaypoints(slice, options);
		
		// Add custom icon images
		GEvent.addListener(dir, "load", function() {
			// Cycle through each route
			for (var i = 0; i <= this.getNumRoutes(); ++i) {
				this.getMarker(i).getIcon().image = "/images/roadtrips/darkgreen_Marker.png";
			}
		});
		
		// Add custom info windows when a marker is clicked
		GEvent.addListener(dir, "addoverlay", function() {
			for (var i = 0; i <= this.getNumRoutes(); ++i) {
				var offset = wp.length - this.offset_count - i - 1;
				this.getMarker(i).bindInfoWindow(document.getElementById('rti_L'+offset));
			}
		});
		
		prev += 24;
	}
	
	// Prevent memory leaks
	$(window).unload( function () { GUnload(); } ); //Removes all bound GEvents, prevents potential memory leaks
}

