diff --git a/OsmAnd-java/src/main/java/net/osmand/map/OsmandRegions.java b/OsmAnd-java/src/main/java/net/osmand/map/OsmandRegions.java index f55e2b795d..c49a6fe17c 100644 --- a/OsmAnd-java/src/main/java/net/osmand/map/OsmandRegions.java +++ b/OsmAnd-java/src/main/java/net/osmand/map/OsmandRegions.java @@ -780,14 +780,17 @@ public class OsmandRegions { - public List getRegions(double lat, double lon, List keyNames) throws IOException { + public List getRegionsToDownload(double lat, double lon, List keyNames) throws IOException { keyNames.clear(); int x31 = MapUtils.get31TileNumberX(lon); int y31 = MapUtils.get31TileNumberY(lat); List cs = query(x31, y31); for (BinaryMapDataObject b : cs) { if (contain(b, x31, y31)) { - keyNames.add(getDownloadName(b)); + String downloadName = getDownloadName(b); + if(!Algorithms.isEmpty(downloadName)) { + keyNames.add(downloadName); + } } } return keyNames;