add TrafficSearch provider
This commit is contained in:
@@ -24,6 +24,7 @@ public class MogoLocation implements Cloneable, Parcelable {
|
||||
private String aoiName = "";
|
||||
private int errCode = 0;
|
||||
private String errInfo = "";
|
||||
private String street = "";
|
||||
private String streetNum = "";
|
||||
private String description = "";
|
||||
private String buildingId = "";
|
||||
@@ -103,6 +104,14 @@ public class MogoLocation implements Cloneable, Parcelable {
|
||||
this.errInfo = errInfo;
|
||||
}
|
||||
|
||||
public String getStreet() {
|
||||
return street;
|
||||
}
|
||||
|
||||
public void setStreet(String street) {
|
||||
this.street = street;
|
||||
}
|
||||
|
||||
public String getStreetNum() {
|
||||
return streetNum;
|
||||
}
|
||||
@@ -177,6 +186,7 @@ public class MogoLocation implements Cloneable, Parcelable {
|
||||
", aoiName='" + aoiName + '\'' +
|
||||
", errCode=" + errCode +
|
||||
", errInfo='" + errInfo + '\'' +
|
||||
", street='" + street + '\'' +
|
||||
", streetNum='" + streetNum + '\'' +
|
||||
", description='" + description + '\'' +
|
||||
", buildingId='" + buildingId + '\'' +
|
||||
@@ -311,6 +321,7 @@ public class MogoLocation implements Cloneable, Parcelable {
|
||||
dest.writeString( this.aoiName );
|
||||
dest.writeInt( this.errCode );
|
||||
dest.writeString( this.errInfo );
|
||||
dest.writeString( this.street );
|
||||
dest.writeString( this.streetNum );
|
||||
dest.writeString( this.description );
|
||||
dest.writeString( this.buildingId );
|
||||
@@ -340,6 +351,7 @@ public class MogoLocation implements Cloneable, Parcelable {
|
||||
this.aoiName = in.readString();
|
||||
this.errCode = in.readInt();
|
||||
this.errInfo = in.readString();
|
||||
this.street = in.readString();
|
||||
this.streetNum = in.readString();
|
||||
this.description = in.readString();
|
||||
this.buildingId = in.readString();
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.mogo.map.search.traffic;
|
||||
|
||||
import com.mogo.map.MogoLatLng;
|
||||
|
||||
public interface IMogoTrafficSearch {
|
||||
|
||||
/**
|
||||
* 根据道路名称查询交通态势
|
||||
*
|
||||
* @param adCode 城市code
|
||||
* @param roadName 道路名称
|
||||
*/
|
||||
void searchTrafficByRoad(String adCode,String roadName);
|
||||
|
||||
/**
|
||||
* 根据圆形区域查询交通态势
|
||||
*
|
||||
* @param mogoLatLng 中心点坐标
|
||||
* @param radius 查询半径
|
||||
*/
|
||||
void searchTrafficByCircleArea(MogoLatLng mogoLatLng,int radius);
|
||||
|
||||
/**
|
||||
* 交通态势查询监听
|
||||
*
|
||||
* @param listener
|
||||
*/
|
||||
void registerTrafficSearchListener(IMogoTrafficSearchListener listener);
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.mogo.map.search.traffic;
|
||||
|
||||
public interface IMogoTrafficSearchListener {
|
||||
|
||||
void onTrafficSearchInfo(MogoTrafficResult trafficResult);
|
||||
|
||||
void onTrafficSearchError(String errorMsg);
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.mogo.map.search.traffic;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class MogoTrafficResult {
|
||||
|
||||
//路况描述信息
|
||||
private String description;
|
||||
|
||||
//路况评价信息
|
||||
private MogoTrafficStatusEvaluation evaluation;
|
||||
|
||||
//道路列表
|
||||
private List<MogoTrafficStatusInfo> trafficStatusInfos;
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public MogoTrafficStatusEvaluation getEvaluation() {
|
||||
return evaluation;
|
||||
}
|
||||
|
||||
public void setEvaluation(MogoTrafficStatusEvaluation evaluation) {
|
||||
this.evaluation = evaluation;
|
||||
}
|
||||
|
||||
public List<MogoTrafficStatusInfo> getTrafficStatusInfos() {
|
||||
return trafficStatusInfos;
|
||||
}
|
||||
|
||||
public void setTrafficStatusInfos(List<MogoTrafficStatusInfo> trafficStatusInfos) {
|
||||
this.trafficStatusInfos = trafficStatusInfos;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MogoTrafficResult{" +
|
||||
"description='" + description + '\'' +
|
||||
", evaluation=" + evaluation +
|
||||
", trafficStatusInfos=" + trafficStatusInfos +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
package com.mogo.map.search.traffic;
|
||||
|
||||
//交通态势搜索返回的路况信息
|
||||
public class MogoTrafficStatusEvaluation {
|
||||
|
||||
//拥堵所占百分比
|
||||
private String blocked;
|
||||
|
||||
//缓行所占百分比
|
||||
private String congested;
|
||||
|
||||
//路况描述
|
||||
private String description;
|
||||
|
||||
//畅通所占百分比
|
||||
private String expedite;
|
||||
|
||||
//路况状态
|
||||
private String status;
|
||||
|
||||
//未知路段所占百分比
|
||||
private String unKnown;
|
||||
|
||||
public String getBlocked() {
|
||||
return blocked;
|
||||
}
|
||||
|
||||
public void setBlocked(String blocked) {
|
||||
this.blocked = blocked;
|
||||
}
|
||||
|
||||
public String getCongested() {
|
||||
return congested;
|
||||
}
|
||||
|
||||
public void setCongested(String congested) {
|
||||
this.congested = congested;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getExpedite() {
|
||||
return expedite;
|
||||
}
|
||||
|
||||
public void setExpedite(String expedite) {
|
||||
this.expedite = expedite;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getUnKnown() {
|
||||
return unKnown;
|
||||
}
|
||||
|
||||
public void setUnKnown(String unKnown) {
|
||||
this.unKnown = unKnown;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MogoTrafficStatusEvaluation{" +
|
||||
"blocked='" + blocked + '\'' +
|
||||
", congested='" + congested + '\'' +
|
||||
", description='" + description + '\'' +
|
||||
", expedite='" + expedite + '\'' +
|
||||
", status='" + status + '\'' +
|
||||
", unKnown='" + unKnown + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
package com.mogo.map.search.traffic;
|
||||
|
||||
import com.mogo.map.MogoLatLng;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
//交通态势查询结果返回道路信息
|
||||
public class MogoTrafficStatusInfo {
|
||||
|
||||
//车行角度
|
||||
private int angle;
|
||||
|
||||
//坐标集合
|
||||
private List<MogoLatLng> mogoLatLngs;
|
||||
|
||||
//方向描述
|
||||
private String direction;
|
||||
|
||||
//方向
|
||||
private String lcodes;
|
||||
|
||||
//设置的道路名称
|
||||
private String name;
|
||||
|
||||
//路况状态
|
||||
private String status;
|
||||
|
||||
public int getAngle() {
|
||||
return angle;
|
||||
}
|
||||
|
||||
public void setAngle(int angle) {
|
||||
this.angle = angle;
|
||||
}
|
||||
|
||||
public List<MogoLatLng> getMogoLatLngs() {
|
||||
return mogoLatLngs;
|
||||
}
|
||||
|
||||
public void setMogoLatLngs(List<MogoLatLng> mogoLatLngs) {
|
||||
this.mogoLatLngs = mogoLatLngs;
|
||||
}
|
||||
|
||||
public String getDirection() {
|
||||
return direction;
|
||||
}
|
||||
|
||||
public void setDirection(String direction) {
|
||||
this.direction = direction;
|
||||
}
|
||||
|
||||
public String getLcodes() {
|
||||
return lcodes;
|
||||
}
|
||||
|
||||
public void setLcodes(String lcodes) {
|
||||
this.lcodes = lcodes;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MogoTrafficStatusInfo{" +
|
||||
"angle=" + angle +
|
||||
", mogoLatLngs=" + mogoLatLngs +
|
||||
", direction='" + direction + '\'' +
|
||||
", lcodes='" + lcodes + '\'' +
|
||||
", name='" + name + '\'' +
|
||||
", status='" + status + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user