Fix exception traces
This commit is contained in:
parent
c515f2cbc2
commit
a5747c8e91
2 changed files with 6 additions and 4 deletions
|
@ -282,7 +282,7 @@ public class MapViewTrackingUtilities implements OsmAndLocationListener, IMapLoc
|
||||||
@Override
|
@Override
|
||||||
public void newRouteIsCalculated(boolean newRoute) {
|
public void newRouteIsCalculated(boolean newRoute) {
|
||||||
RoutingHelper rh = app.getRoutingHelper();
|
RoutingHelper rh = app.getRoutingHelper();
|
||||||
if(newRoute && rh.isRoutePlanningMode()) {
|
if(newRoute && rh.isRoutePlanningMode() && mapView != null) {
|
||||||
RotatedTileBox rt = mapView.getCurrentRotatedTileBox();
|
RotatedTileBox rt = mapView.getCurrentRotatedTileBox();
|
||||||
Location lt = rh.getLastProjection();
|
Location lt = rh.getLastProjection();
|
||||||
if(lt != null) {
|
if(lt != null) {
|
||||||
|
|
|
@ -336,13 +336,15 @@ public class RouteProvider {
|
||||||
List<RouteDirectionInfo> dt = newRes.getDirections();
|
List<RouteDirectionInfo> dt = newRes.getDirections();
|
||||||
List<RouteDirectionInfo> gpxRouteDirections = rParams.gpxRoute.directions;
|
List<RouteDirectionInfo> gpxRouteDirections = rParams.gpxRoute.directions;
|
||||||
rParams.gpxRoute.points.addAll(0, loct);
|
rParams.gpxRoute.points.addAll(0, loct);
|
||||||
|
if (gpxRouteDirections != null) {
|
||||||
gpxRouteDirections.addAll(0, dt);
|
gpxRouteDirections.addAll(0, dt);
|
||||||
for(int i = dt.size() ; i < gpxRouteDirections.size(); i++ ) {
|
for (int i = dt.size(); i < gpxRouteDirections.size(); i++) {
|
||||||
gpxRouteDirections.get(i).routePointOffset += loct.size();
|
gpxRouteDirections.get(i).routePointOffset += loct.size();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
RouteCalculationResult res;
|
RouteCalculationResult res;
|
||||||
// get the closest point to start and to end
|
// get the closest point to start and to end
|
||||||
GPXRouteParams params = rParams.gpxRoute;
|
GPXRouteParams params = rParams.gpxRoute;
|
||||||
|
|
Loading…
Reference in a new issue