commit
0202c22c1e
5 changed files with 26 additions and 10 deletions
|
@ -183,7 +183,7 @@ public class OsmBaseStorage {
|
||||||
protected static final int moduleProgress = 1 << 10;
|
protected static final int moduleProgress = 1 << 10;
|
||||||
|
|
||||||
public void startElement(XmlPullParser parser, String name) {
|
public void startElement(XmlPullParser parser, String name) {
|
||||||
if(!parseStarted){
|
if (!parseStarted) {
|
||||||
initRootElement(parser, name);
|
initRootElement(parser, name);
|
||||||
}
|
}
|
||||||
if (ELEM_MODIFY.equals(name) ) {
|
if (ELEM_MODIFY.equals(name) ) {
|
||||||
|
@ -283,13 +283,14 @@ public class OsmBaseStorage {
|
||||||
if (type != null) {
|
if (type != null) {
|
||||||
if(currentParsedEntity != null){
|
if(currentParsedEntity != null){
|
||||||
EntityId entityId = new EntityId(type, currentParsedEntity.getId());
|
EntityId entityId = new EntityId(type, currentParsedEntity.getId());
|
||||||
if(acceptEntityToLoad(entityId, currentParsedEntity)){
|
if (acceptEntityToLoad(entityId, currentParsedEntity)) {
|
||||||
Entity oldEntity = entities.put(entityId, currentParsedEntity);
|
Entity oldEntity = entities.put(entityId, currentParsedEntity);
|
||||||
if(parseEntityInfo && currentParsedEntityInfo != null){
|
if (parseEntityInfo && currentParsedEntityInfo != null) {
|
||||||
entityInfo.put(entityId, currentParsedEntityInfo);
|
entityInfo.put(entityId, currentParsedEntityInfo);
|
||||||
}
|
}
|
||||||
if(!supressWarnings && oldEntity!= null){
|
if (!supressWarnings && oldEntity != null) {
|
||||||
throw new UnsupportedOperationException("Entity with id=" + oldEntity.getId() +" is duplicated in osm map"); //$NON-NLS-1$ //$NON-NLS-2$
|
throw new UnsupportedOperationException(
|
||||||
|
"Entity with id=" + oldEntity.getId() + " is duplicated in osm map"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// System.gc();
|
// System.gc();
|
||||||
|
@ -308,8 +309,8 @@ public class OsmBaseStorage {
|
||||||
|
|
||||||
|
|
||||||
protected boolean acceptEntityToLoad(EntityId entityId, Entity entity) {
|
protected boolean acceptEntityToLoad(EntityId entityId, Entity entity) {
|
||||||
for(IOsmStorageFilter f : filters){
|
for (IOsmStorageFilter f : filters) {
|
||||||
if(!f.acceptEntityToLoad(this, entityId, entity)){
|
if (!f.acceptEntityToLoad(this, entityId, entity)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -106,6 +106,14 @@ android {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
clean.doFirst {
|
||||||
|
delete fileTree('assets') {
|
||||||
|
include '*.obf'
|
||||||
|
include 'fonts/**'
|
||||||
|
include 'feature_articles/**'
|
||||||
|
include 'voice/**'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
task validateTranslate {
|
task validateTranslate {
|
||||||
println "Validating translations"
|
println "Validating translations"
|
||||||
|
@ -126,9 +134,15 @@ task validateTranslate {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
task downloadDefaultWikivoyage {
|
||||||
|
doLast {
|
||||||
|
ant.get(src: 'https://builder.osmand.net/wikivoyage-gen/sqlite/Default_wikivoyage_2.travel.obf', dest: 'assets/Default_wikivoyage.travel.obf', skipexisting: 'true')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
task downloadWorldMiniBasemap {
|
task downloadWorldMiniBasemap {
|
||||||
doLast {
|
doLast {
|
||||||
ant.get(src: 'http://builder.osmand.net/basemap/World_basemap_mini_2.obf', dest: 'assets/World_basemap_mini.obf', skipexisting: 'true')
|
ant.get(src: 'https://builder.osmand.net/basemap/World_basemap_mini_2.obf', dest: 'assets/World_basemap_mini.obf', skipexisting: 'true')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -254,7 +268,8 @@ task collectExternalResources {
|
||||||
copyWidgetIconsHdpi,
|
copyWidgetIconsHdpi,
|
||||||
copyWidgetIconsXhdpi,
|
copyWidgetIconsXhdpi,
|
||||||
copyPoiCategories,
|
copyPoiCategories,
|
||||||
downloadWorldMiniBasemap
|
downloadWorldMiniBasemap,
|
||||||
|
downloadDefaultWikivoyage
|
||||||
}
|
}
|
||||||
|
|
||||||
// Legacy core build
|
// Legacy core build
|
||||||
|
|
|
@ -100,7 +100,7 @@
|
||||||
android:paddingRight="@dimen/bottom_sheet_exit_button_margin"
|
android:paddingRight="@dimen/bottom_sheet_exit_button_margin"
|
||||||
android:text="@string/buy"
|
android:text="@string/buy"
|
||||||
android:textColor="@color/text_color_tab_active_light"
|
android:textColor="@color/text_color_tab_active_light"
|
||||||
android:visibility="visible" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue