update travelobfhelper

This commit is contained in:
simon 2020-12-15 15:45:23 +02:00
parent 29a57dc562
commit 2b439a4c80

View file

@ -801,9 +801,21 @@ public class ResourceManager {
return warnings; return warnings;
} }
private void collectTravelFiles(BinaryMapIndexReader mapReader, BinaryMapReaderResource resource) { private List<BinaryMapIndexReader> getTravelRepositories() {
BinaryMapIndexReader index = mapReader; List<String> fileNames = new ArrayList<>(travelRepositories.keySet());
for (BinaryIndexPart p : index.getPoiIndexes()) { Collections.sort(fileNames, Algorithms.getStringVersionComparator());
List<BinaryMapIndexReader> res = new ArrayList<>();
for (String fileName : fileNames) {
BinaryMapReaderResource r = travelRepositories.get(fileName);
if (r != null) {
res.add(r.getReader(BinaryMapReaderResourceType.POI));
}
}
return res;
}
private void collectTravelFiles(BinaryMapReaderResource resource) {
for (BinaryMapIndexReader index : getTravelRepositories()){
travelRepositories.put(index.getFile().getName(), resource); travelRepositories.put(index.getFile().getName(), resource);
} }
} }