Search in sources :

Example 1 with RouteCalculationResult

use of net.osmand.plus.routing.RouteCalculationResult in project Osmand by osmandapp.

the class RouteLayer method drawLocations.

public void drawLocations(RotatedTileBox tb, Canvas canvas, double topLatitude, double leftLongitude, double bottomLatitude, double rightLongitude) {
    RouteCalculationResult route = helper.getRoute();
    routeGeometry.updateRoute(tb, route);
    routeGeometry.drawSegments(tb, canvas, topLatitude, leftLongitude, bottomLatitude, rightLongitude, helper.getLastProjection(), route == null ? 0 : route.getCurrentRoute());
    List<RouteDirectionInfo> rd = helper.getRouteDirections();
    Iterator<RouteDirectionInfo> it = rd.iterator();
    if (tb.getZoom() >= 14) {
        List<Location> actionPoints = calculateActionPoints(topLatitude, leftLongitude, bottomLatitude, rightLongitude, helper.getLastProjection(), helper.getRoute().getRouteLocations(), helper.getRoute().getCurrentRoute(), it, tb.getZoom());
        drawAction(tb, canvas, actionPoints);
    }
}
Also used : RouteCalculationResult(net.osmand.plus.routing.RouteCalculationResult) RouteDirectionInfo(net.osmand.plus.routing.RouteDirectionInfo) Location(net.osmand.Location)

Aggregations

Location (net.osmand.Location)1 RouteCalculationResult (net.osmand.plus.routing.RouteCalculationResult)1 RouteDirectionInfo (net.osmand.plus.routing.RouteDirectionInfo)1