Code example for PolylineOptions

Methods: add, color, width

1
        } 
		if(lat == 0 || lng ==0){
			return ; 
		} 
		Log.v("now-lat-lng", lat+"-"+lng);
		PolylineOptions rectOptions = new PolylineOptions();
		rectOptions.add(new LatLng(lat, lng));
		rectOptions.color(Color.RED);
	    rectOptions.width(5);
	    mMap.addPolyline(rectOptions);  
	    markMap(lat, lng, 3);
	} 
	//position= 1=start | 3=end |2=other 
	private void markMap(double lat, double lng, int position){
		if (mMap==null){
			return ; 
        } 
		 
		LatLng MELBOURNE = new LatLng(lat, lng);  
		BitmapDescriptor iconSet = BitmapDescriptorFactory.fromResource(R.drawable.start_position);
		Log.v("position", position+"");