[2.13.0] 轨迹计算异常修复
This commit is contained in:
@@ -27,7 +27,7 @@ public class CoordinateCalculateRouteUtil {
|
||||
|
||||
float sumLength = 0;
|
||||
|
||||
if (points.get(1) instanceof MogoLocation){
|
||||
if (points.get(0) instanceof MogoLocation){
|
||||
//计算全路径总距离
|
||||
for (int i = 0;i + 1< points.size();i++){
|
||||
MogoLocation locationPre = (MogoLocation) points.get(i);
|
||||
@@ -40,7 +40,7 @@ public class CoordinateCalculateRouteUtil {
|
||||
float length = CoordinateUtils.calculateLineDistance(laLon,laLat,preLon,preLat);
|
||||
sumLength += length;
|
||||
}
|
||||
}else if (points.get(1) instanceof Location){
|
||||
}else if (points.get(0) instanceof Location){
|
||||
//计算全路径总距离
|
||||
for (int i = 0;i + 1< points.size();i++){
|
||||
Location locationPre = (Location) points.get(i);
|
||||
@@ -53,7 +53,7 @@ public class CoordinateCalculateRouteUtil {
|
||||
float length = CoordinateUtils.calculateLineDistance(laLon,laLat,preLon,preLat);
|
||||
sumLength += length;
|
||||
}
|
||||
}else if (points.get(1) instanceof LatLng){
|
||||
}else if (points.get(0) instanceof LatLng){
|
||||
for (int i = 0;i + 1< points.size();i++){
|
||||
LatLng locationPre = (LatLng) points.get(i);
|
||||
LatLng location = (LatLng) points.get(i+1);
|
||||
|
||||
Reference in New Issue
Block a user