public void reRoute(Bundle bundle) {
if (null != bundle) {
mPoiStart = bundle.getParcelable("start");
mPoiEnd = bundle.getParcelable("end");
}
if (null == mPoiStart) {
mPoiStart = BApp.MY_LOCATION;
}
if (null != BApp.MY_LOCATION && "我的位置".equals(mPoiStart.getName())) {
mPoiStart = BApp.MY_LOCATION;
}
if (null != mPoiStart && null != mPoiEnd) {
PlanNode stNode = PlanNode.withLocation(new LatLng(mPoiStart.getLatitude(), mPoiStart.getLongitude()));
PlanNode enNode = PlanNode.withLocation(new LatLng(mPoiEnd.getLatitude(), mPoiEnd.getLongitude()));
RoutePlanSearch planSearch = RoutePlanSearch.newInstance();
planSearch.setOnGetRoutePlanResultListener(this);
planSearch.masstransitSearch(new MassTransitRoutePlanOption().from(stNode).to(enNode));
}
}
public void reRoute(Bundle bundle) {
if (null != bundle) {
mPoiStart = bundle.getParcelable("start");
mPoiEnd = bundle.getParcelable("end");
}
if (null == mPoiStart) {
mPoiStart = BApp.MY_LOCATION;
}
if (null != BApp.MY_LOCATION && "我的位置".equals(mPoiStart.getName())) {
mPoiStart = BApp.MY_LOCATION;
}
if (null != mPoiStart && null != mPoiEnd) {
PlanNode stNode = PlanNode.withLocation(new LatLng(mPoiStart.getLatitude(), mPoiStart.getLongitude()));
PlanNode enNode = PlanNode.withLocation(new LatLng(mPoiEnd.getLatitude(), mPoiEnd.getLongitude()));
RoutePlanSearch planSearch = RoutePlanSearch.newInstance();
planSearch.setOnGetRoutePlanResultListener(this);
planSearch.masstransitSearch(new MassTransitRoutePlanOption().from(stNode).to(enNode));
}
}