[2.13.0] taxi/bus onLocationChanged location null
This commit is contained in:
@@ -297,6 +297,7 @@ public class BusPassengerModel {
|
||||
private final IMoGoMapLocationListener mMapLocationListener = new IMoGoMapLocationListener() {
|
||||
@Override
|
||||
public void onLocationChanged(@Nullable MogoLocation location, int from, boolean isGps) {
|
||||
if (null == location) return;
|
||||
mLocation = location;
|
||||
for (IBusPassengerControllerStatusCallback callback :mControllerStatusCallbackMap.values()){
|
||||
callback.onCarLocationChanged(location);
|
||||
|
||||
@@ -382,6 +382,7 @@ public class BusOrderModel {
|
||||
private final IMoGoMapLocationListener mMapLocationListener = new IMoGoMapLocationListener() {
|
||||
@Override
|
||||
public void onLocationChanged(@Nullable MogoLocation location, int from, boolean isGps) {
|
||||
if (null == location) return;
|
||||
mLongitude = location.getLongitude();
|
||||
mLatitude = location.getLatitude();
|
||||
if (mControllerStatusCallback != null) {
|
||||
|
||||
@@ -289,6 +289,7 @@ public class SweeperOrderModel {
|
||||
private final IMoGoMapLocationListener mMapLocationListener = new IMoGoMapLocationListener() {
|
||||
@Override
|
||||
public void onLocationChanged(@Nullable MogoLocation location, int from, boolean isGps) {
|
||||
if (null == location) return;
|
||||
mLongitude = location.getLongitude();
|
||||
mLatitude = location.getLatitude();
|
||||
if (mControllerStatusCallback != null) {
|
||||
|
||||
@@ -452,7 +452,8 @@ public class TaxiPassengerModel implements IOCHTaxiPassengerNaviChangedCallback
|
||||
@Override
|
||||
public void onLocationChanged(@Nullable MogoLocation location, int from, boolean isGps) {
|
||||
//位置变化时,通过围栏判断是否到达x点
|
||||
if (location != null && checkCurrentOCHOrder()) {
|
||||
if (null == location) return;
|
||||
if (checkCurrentOCHOrder()) {
|
||||
if (getCurOrderStatus() == TaxiPassengerOrderStatusEnum.OnTheWayToEnd) {
|
||||
calculateTravelDistance(location);
|
||||
}
|
||||
|
||||
@@ -1056,7 +1056,8 @@ public class TaxiModel {
|
||||
@Override
|
||||
public void onLocationChanged(@Nullable MogoLocation location, int from, boolean isGps) {
|
||||
//位置变化时,通过围栏判断是否到达x点
|
||||
if (location != null && checkCurrentOCHOrder()) {
|
||||
if (null == location) return;
|
||||
if (checkCurrentOCHOrder()) {
|
||||
if (getCurOrderStatus() == TaxiOrderStatusEnum.OnTheWayToStart) {
|
||||
judgeStartStation(location);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user