diff --git a/OsmAnd-java/src/main/java/net/osmand/search/core/SearchPhrase.java b/OsmAnd-java/src/main/java/net/osmand/search/core/SearchPhrase.java index dde22fdc65..7a8e506647 100644 --- a/OsmAnd-java/src/main/java/net/osmand/search/core/SearchPhrase.java +++ b/OsmAnd-java/src/main/java/net/osmand/search/core/SearchPhrase.java @@ -747,12 +747,20 @@ public class SearchPhrase { } } + public int getRadiusSearch(int meters, int radiusLevel) { + int res = meters; + for(int k = 0; k < radiusLevel; k++) { + res = res * (k % 2 == 0 ? 2 : 3); + } + return res; + } + public int getRadiusSearch(int meters) { - return (1 << (getRadiusLevel() - 1)) * meters; + return getRadiusSearch(meters, getRadiusLevel() - 1); } public int getNextRadiusSearch(int meters) { - return (1 << (getRadiusLevel())) * meters; + return getRadiusSearch(meters, getRadiusLevel()); } public static int icompare(int x, int y) {