private CachedDistances resetCachedDistances() {
        cachedDistances = new CachedDistances();
        cachedDistances.version = CACHED_DISTANCES_FILEVERSION;
        cachedDistances.routingMode = Settings.getRoutingMode();
        cachedDistances.distances = new HashMap<>();
        return cachedDistances;
    }
returns length in meters for the given route
main/src/main/java/cgeo/geocaching/maps/routing/RouteOptimizationHelper.java