Merge branch 'master' of ssh://github.com/osmandapp/Osmand

This commit is contained in:
Victor Shcherb 2014-07-11 18:48:14 +02:00
commit 93a5b4cc5e
2 changed files with 15 additions and 2 deletions

View file

@ -1879,4 +1879,16 @@ La llista de països inclosos (bàsicament tot el món!): Afganistan, Albània,
<string name="osmo_group_information">Si us plau, llegiu abans de crear un grup!</string> <string name="osmo_group_information">Si us plau, llegiu abans de crear un grup!</string>
<string name="osmo_auth_error_short">Autorització fallida</string> <string name="osmo_auth_error_short">Autorització fallida</string>
<string name="osmo_auth_error">Trobat error OsMo d\'autorització : %1$s.\n Podria ser una caiguda temporal del servei o l\'expiració del teu usuari.\n Vols procedir a crear un nou usuari?</string> <string name="osmo_auth_error">Trobat error OsMo d\'autorització : %1$s.\n Podria ser una caiguda temporal del servei o l\'expiració del teu usuari.\n Vols procedir a crear un nou usuari?</string>
<string name="rendering_attr_hideBuildings_name">Amaga edificis</string>
<string name="rendering_attr_hideNonVehicleHighways_name">Amaga vies sense circulació de vehicles</string>
<string name="rendering_attr_hideText_name">Amaga text</string>
<string name="rendering_attr_hideWoodScrubs_name">Amaga tipus de vegetació</string>
<string name="rendering_attr_buildings15zoom_name">Representació d\'edificis al detall 15 de zoom</string>
<string name="rendering_attr_moreDetailed_name">Més detallat</string>
<string name="rendering_attr_lessDetailed_name">Menys detallat</string>
<string name="rendering_attr_hideAccess_name">Amaga el tipus d\'accés</string>
<string name="rendering_attr_showAccess_name">Mostra el tipus d\'accés</string>
<string name="rendering_attr_showSurfaceGrade_name">Mostrar la qualitat de les carreteres</string>
<string name="rendering_attr_showSurfaces_name">Indica el tipus de superfície de les vies</string>
<string name="rendering_attr_cycleRoutes_name">Mostra rutes de ciclista</string>
</resources> </resources>

View file

@ -24,6 +24,7 @@ import net.osmand.util.MapUtils;
import android.content.Context; import android.content.Context;
public class RouteCalculationResult { public class RouteCalculationResult {
private static double distanceClosestToIntermediate = 400;
// could not be null and immodifiable! // could not be null and immodifiable!
private final List<Location> locations; private final List<Location> locations;
private final List<RouteDirectionInfo> directions; private final List<RouteDirectionInfo> directions;
@ -152,7 +153,7 @@ public class RouteCalculationResult {
while((currentIntermediate < intermediates.size() || prevDistance > distanceThreshold) while((currentIntermediate < intermediates.size() || prevDistance > distanceThreshold)
&& currentLocation < locations.size()){ && currentLocation < locations.size()){
if(currentIntermediate < intermediates.size() && if(currentIntermediate < intermediates.size() &&
getDistanceToLocation(locations, intermediates.get(currentIntermediate), currentLocation) < 50) { getDistanceToLocation(locations, intermediates.get(currentIntermediate), currentLocation) < distanceClosestToIntermediate) {
prevDistance = getDistanceToLocation(locations, intermediates.get(currentIntermediate), currentLocation); prevDistance = getDistanceToLocation(locations, intermediates.get(currentIntermediate), currentLocation);
interLocations[currentIntermediate] = currentLocation; interLocations[currentIntermediate] = currentLocation;
currentIntermediate++; currentIntermediate++;