方法 | 说明 |
setTaxiInfoCallback(AMapTaxiInfoCallback callback) | 设置打车信息回调 |
示例代码
package com.amap.llm.agent.api;
/**
* TaxiInfo数据结构类,用于管理出租车订单相关信息
* 根据截图优化后的版本,对应taxiinfo字段
*/
public class TaxiInfo
{
/**
* 打车状态
* 101 正在派单
* 102 超时无应答
* 103 司机接单
* 104 司机到达
* 105 行程中
* 106 行程结束(待支付)
* 107 司机取消
* 108 订单改派
* 109 乘客取消
* 110 订单被运营公司取消
* 111 乘客取消,且有取消费用
* 112 行程结束(支付完成)
* 113 行程关单(客服)
*/
private int state;
/**
* 标题信息,打车业务拼接好消息
*/
private String title;
/**
* 副标题信息,打车业务拼接好消息
*/
private String subTitle;
/**
* 车辆品牌和型号,如:宝马520Li
*/
private String carType;
/**
* 车辆颜色
*/
private String carColor;
/**
* 预计到达时间,剩余距离
*/
private String eta;
/**
* 目的地名字
*/
private String destPoi;
/**
* 构造函数,初始化所有字段默认值
*/
public TaxiInfo()
{
this.state = 0;
this.title = "";
this.subTitle = "";
this.carType = "";
this.carColor = "";
this.eta = "";
this.destPoi = "";
}
/**
* getter和setter方法,提供字段访问接口
*/
/**
* 获取打车状态
*
* @return 打车状态字符串
*/
public int getState()
{
return state;
}
/**
* 设置打车状态
*
* @param state 打车状态字符串
*/
public void setState(int state)
{
this.state = state;
}
/**
* 获取标题信息
*
* @return 标题字符串
*/
public String getTitle()
{
return title;
}
/**
* 设置标题信息
*
* @param title 标题字符串
*/
public void setTitle(String title)
{
this.title = title;
}
/**
* 获取副标题信息
*
* @return 副标题字符串
*/
public String getSubTitle()
{
return subTitle;
}
/**
* 设置副标题信息
*
* @param subTitle 副标题字符串
*/
public void setSubTitle(String subTitle)
{
this.subTitle = subTitle;
}
/**
* 获取车辆型号信息
*
* @return 车辆型号字符串
*/
public String getCarType()
{
return carType;
}
/**
* 设置车辆型号信息
*
* @param carType 车辆型号字符串
*/
public void setCarType(String carType)
{
this.carType = carType;
}
/**
* 获取车辆颜色信息
*
* @return 车辆颜色字符串
*/
public String getCarColor()
{
return carColor;
}
/**
* 设置车辆颜色信息
*
* @param carColor 车辆颜色字符串
*/
public void setCarColor(String carColor)
{
this.carColor = carColor;
}
/**
* 获取预计到达时间信息
*
* @return 预计到达时间字符串
*/
public String getEta()
{
return eta;
}
/**
* 设置预计到达时间信息
*
* @param eta 预计到达时间字符串
*/
public void setEta(String eta)
{
this.eta = eta;
}
/**
* 获取目的地信息
*
* @return 目的地字符串
*/
public String getDestPoi()
{
return destPoi;
}
/**
* 设置目的地信息
*
* @param destPoi 目的地字符串
*/
public void setDestPoi(String destPoi)
{
this.destPoi = destPoi;
}
/**
* 重写toString方法,提供对象字符串表示
*
* @return 包含对象字段信息的字符串
*/
@Override
public String
toString()
{
return "TaxiInfo{" +
"state=" + state +
", title='" + title + '\'' +
", subTitle='" + subTitle + '\'' +
", carType='" + carType + '\'' +
", carColor='" + carColor + '\'' +
", eta='" + eta + '\'' +
", destPoi='" + destPoi + '\'' +
'}';
}
}