pR fixes
This commit is contained in:
parent
a3d66bedd7
commit
ddfbc7855e
2 changed files with 12 additions and 11 deletions
|
@ -13,8 +13,6 @@ import org.apache.commons.logging.Log;
|
||||||
|
|
||||||
public class TransliterationHelper {
|
public class TransliterationHelper {
|
||||||
|
|
||||||
private static TransliterationHelper instance;
|
|
||||||
|
|
||||||
public final static Log LOG = PlatformUtil.getLog(TransliterationHelper.class);
|
public final static Log LOG = PlatformUtil.getLog(TransliterationHelper.class);
|
||||||
public final static String DEFAULT = "default";
|
public final static String DEFAULT = "default";
|
||||||
public final static String JAPAN = "Japan";
|
public final static String JAPAN = "Japan";
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
package net.osmand.plus.render;
|
package net.osmand.plus.render;
|
||||||
|
|
||||||
|
|
||||||
import static net.osmand.util.TransliterationHelper.setCountryName;
|
|
||||||
|
|
||||||
import gnu.trove.iterator.TIntObjectIterator;
|
import gnu.trove.iterator.TIntObjectIterator;
|
||||||
import gnu.trove.list.TLongList;
|
import gnu.trove.list.TLongList;
|
||||||
import gnu.trove.list.array.TIntArrayList;
|
import gnu.trove.list.array.TIntArrayList;
|
||||||
|
@ -303,7 +300,7 @@ public class MapRenderRepositories {
|
||||||
if(library == null) {
|
if(library == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
String countryInView = "";
|
boolean containsJapanMapData = false;
|
||||||
boolean useLive = context.getSettings().USE_OSM_LIVE_FOR_ROUTING.get();
|
boolean useLive = context.getSettings().USE_OSM_LIVE_FOR_ROUTING.get();
|
||||||
for (String mapName : files.keySet()) {
|
for (String mapName : files.keySet()) {
|
||||||
BinaryMapIndexReader fr = files.get(mapName);
|
BinaryMapIndexReader fr = files.get(mapName);
|
||||||
|
@ -318,11 +315,14 @@ public class MapRenderRepositories {
|
||||||
log.debug("Native resource " + mapName + " initialized " + (System.currentTimeMillis() - time) + " ms"); //$NON-NLS-1$ //$NON-NLS-2$
|
log.debug("Native resource " + mapName + " initialized " + (System.currentTimeMillis() - time) + " ms"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
}
|
}
|
||||||
if (fr.getCountryName().equals("Japan")) {
|
if (fr.getCountryName().equals("Japan")) {
|
||||||
countryInView = fr.getCountryName();
|
containsJapanMapData = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setCountryName(countryInView);
|
if (containsJapanMapData) {
|
||||||
|
TransliterationHelper.setCountryName("Japan");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -539,7 +539,7 @@ public class MapRenderRepositories {
|
||||||
}
|
}
|
||||||
MapIndex mi = null;
|
MapIndex mi = null;
|
||||||
searchRequest = BinaryMapIndexReader.buildSearchRequest(leftX, rightX, topY, bottomY, zoom, searchFilter);
|
searchRequest = BinaryMapIndexReader.buildSearchRequest(leftX, rightX, topY, bottomY, zoom, searchFilter);
|
||||||
String countryInView = "";
|
boolean containsJapanMapData = false;
|
||||||
for (BinaryMapIndexReader c : files.values()) {
|
for (BinaryMapIndexReader c : files.values()) {
|
||||||
boolean basemap = c.isBasemap();
|
boolean basemap = c.isBasemap();
|
||||||
searchRequest.clearSearchResults();
|
searchRequest.clearSearchResults();
|
||||||
|
@ -557,7 +557,7 @@ public class MapRenderRepositories {
|
||||||
renderedState |= 2;
|
renderedState |= 2;
|
||||||
}
|
}
|
||||||
if (c.getCountryName().equals("Japan")) {
|
if (c.getCountryName().equals("Japan")) {
|
||||||
countryInView = c.getCountryName();
|
containsJapanMapData = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (BinaryMapDataObject r : res) {
|
for (BinaryMapDataObject r : res) {
|
||||||
|
@ -598,7 +598,10 @@ public class MapRenderRepositories {
|
||||||
land[0] = true;
|
land[0] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setCountryName(countryInView);
|
if (containsJapanMapData) {
|
||||||
|
TransliterationHelper.setCountryName("Japan");
|
||||||
|
}
|
||||||
|
|
||||||
return mi;
|
return mi;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue