[RoutingOpt]优化代码逻辑
[RoutingOpt]优化代码逻辑
This commit is contained in:
@@ -166,10 +166,20 @@ public class RouteOverlayDrawer {
|
||||
setVisible(false);
|
||||
return;
|
||||
}
|
||||
for (int i = 0; i < routes.size(); i++) {
|
||||
MessagePad.TrajectoryPoint route = routes.get(i);
|
||||
int total = routes.size();
|
||||
for (int i = 0; i < total ; i++) {
|
||||
MessagePad.TrajectoryPoint route = null;
|
||||
try {
|
||||
route = routes.get(i);
|
||||
if (route == null) {
|
||||
continue;
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
Log.d(M_OLD_ROUTE + TAG, "render-error:" + t.getMessage());
|
||||
}
|
||||
if (route == null) {
|
||||
continue;
|
||||
//数组越界了,结束循环
|
||||
break;
|
||||
}
|
||||
MogoLatLng acquire = pools.acquire();
|
||||
double latitude = route.getLatitude();
|
||||
|
||||
Reference in New Issue
Block a user