Code example for PolylineOptions

Methods: addAll, color, width

0
package dat255.group5.chalmersonthego; 
 
import java.io.BufferedReader; 
import java.io.IOException; 
import java.io.InputStream; 
import java.io.InputStreamReader; 
import java.net.HttpURLConnection; 
import java.net.URL; 
import java.util.ArrayList; 
import java.util.HashMap; 
import java.util.List; 
import org.json.JSONObject; 
 
import android.app.Activity; 
import android.graphics.Color; 
import android.os.AsyncTask; 
import android.util.Log; 
import android.widget.TextView; 
 
import com.example.chalmersonthego.R; 
import com.google.android.gms.maps.GoogleMap; 
import com.google.android.gms.maps.model.LatLng; 
import com.google.android.gms.maps.model.MarkerOptions; 
import com.google.android.gms.maps.model.PolylineOptions; 
 
/** 
 * Handles navigation on the map. Like drawing the route etc. 
 *  
 * @author Anders Nordin 
 */ 
public class NavigationManager { 
	private GoogleMap map;
	TextView tvDistanceDuration;
	// Constans 
	final int LINE_COLOR = Color.RED;
	final int LINE_WIDTH = 4;
 
	/** 
	 * Constructor 
	 *  
	 * @param googleMap 
	 *            , instance of the google map 
	 * @param owningActivity 
	 *            , which GUI to be modified 
	 */ 
	public NavigationManager(GoogleMap googleMap, Activity owningActivity) {
		this.map = googleMap;
		tvDistanceDuration = (TextView) owningActivity
				.findViewById(R.id.tv_distance_time);
	} 
 
	/** 
	 * Draw a straight line between given points 
	 *  
	 * @param markerPoints 
	 *            , list with all points 
	 * @param start 
	 *            , starting point