Fix osm changes
This commit is contained in:
parent
aca1fa0674
commit
03a84af467
2 changed files with 6 additions and 1 deletions
|
@ -152,6 +152,7 @@ public class MapRenderRepositories {
|
||||||
if (lib != null) {
|
if (lib != null) {
|
||||||
lib.closeMapFile(bmir != null ? bmir.getFile().getAbsolutePath() : file);
|
lib.closeMapFile(bmir != null ? bmir.getFile().getAbsolutePath() : file);
|
||||||
nativeFiles.remove(file);
|
nativeFiles.remove(file);
|
||||||
|
clearCache();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (bmir != null) {
|
if (bmir != null) {
|
||||||
|
|
|
@ -13,6 +13,7 @@ import java.util.Set;
|
||||||
import java.util.TreeMap;
|
import java.util.TreeMap;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
|
import net.osmand.IndexConstants;
|
||||||
import net.osmand.PlatformUtil;
|
import net.osmand.PlatformUtil;
|
||||||
import net.osmand.binary.BinaryMapIndexReader;
|
import net.osmand.binary.BinaryMapIndexReader;
|
||||||
import net.osmand.osm.io.NetworkUtils;
|
import net.osmand.osm.io.NetworkUtils;
|
||||||
|
@ -42,8 +43,11 @@ public class IncrementalChangesManager {
|
||||||
}
|
}
|
||||||
Set<String> existingFiles = new HashSet<String>();
|
Set<String> existingFiles = new HashSet<String>();
|
||||||
for (File f : files) {
|
for (File f : files) {
|
||||||
|
if(!f.getName().endsWith(IndexConstants.BINARY_WIKI_MAP_INDEX_EXT) &&
|
||||||
|
!f.getName().endsWith(IndexConstants.BINARY_SRTM_MAP_INDEX_EXT)) {
|
||||||
existingFiles.add(Algorithms.getFileNameWithoutExtension(f));
|
existingFiles.add(Algorithms.getFileNameWithoutExtension(f));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
for (File f : lf) {
|
for (File f : lf) {
|
||||||
if (f.getName().endsWith(ext)) {
|
if (f.getName().endsWith(ext)) {
|
||||||
String index = Algorithms.getFileNameWithoutExtension(f);
|
String index = Algorithms.getFileNameWithoutExtension(f);
|
||||||
|
|
Loading…
Reference in a new issue