diff --git a/DataExtractionOSM/src/net/osmand/data/index/WikiIndexer.java b/DataExtractionOSM/src/net/osmand/data/index/WikiIndexer.java index 29757052a8..18b9d799f2 100644 --- a/DataExtractionOSM/src/net/osmand/data/index/WikiIndexer.java +++ b/DataExtractionOSM/src/net/osmand/data/index/WikiIndexer.java @@ -299,7 +299,7 @@ public class WikiIndexer { } } else if (name.equals("text")) { if(parseText) { - if(id % 100 == 0) { + if(id % 500 == 0) { log.debug("Article accepted " + cid + " " + title.toString()); } analyzeTextForGeoInfoNew(); @@ -563,7 +563,7 @@ public class WikiIndexer { private void processDescription(StringBuilder description, int start) { for (int j = start; j < text.length();) { - if (text.charAt(j) == '=' && text.charAt(j + 1) == '=') { + if (text.charAt(j) == '=' && text.charAt(j + 1) == '=' && j - start > 2048) { break; } else if (text.charAt(j) == '\n' && j - start > 2048) { break; diff --git a/OsmAnd/src/net/osmand/plus/views/ContextMenuLayer.java b/OsmAnd/src/net/osmand/plus/views/ContextMenuLayer.java index 8d844f5660..130d314fce 100644 --- a/OsmAnd/src/net/osmand/plus/views/ContextMenuLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/ContextMenuLayer.java @@ -173,12 +173,16 @@ public class ContextMenuLayer extends OsmandMapLayer { LatLon latLon = view.getLatLonFromScreenPoint(point.x, point.y); StringBuilder description = new StringBuilder(); - if(!selectedObjects.isEmpty()){ - for(Object o : selectedObjects) { - description.append(selectedContextProvider.getObjectDescription(o)); + if (!selectedObjects.isEmpty()) { + if (selectedObjects.size() > 1) { + description.append("1. "); + } + description.append(selectedContextProvider.getObjectDescription(0)); + for (int i = 1; i < selectedObjects.size(); i++) { + description.append("\n" + (i + 1) + ". ").append(selectedContextProvider.getObjectDescription(selectedObjects.get(i))); } LatLon l = selectedContextProvider.getObjectLocation(selectedObjects.get(0)); - if(l != null){ + if (l != null) { latLon = l; } } diff --git a/OsmAnd/src/net/osmand/plus/views/FavoritesLayer.java b/OsmAnd/src/net/osmand/plus/views/FavoritesLayer.java index 63d1baecbf..ae37cd1499 100644 --- a/OsmAnd/src/net/osmand/plus/views/FavoritesLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/FavoritesLayer.java @@ -110,9 +110,10 @@ public class FavoritesLayer extends OsmandMapLayer implements ContextMenuLayer.I getFavoriteFromPoint(point, favs); if(!favs.isEmpty()){ StringBuilder res = new StringBuilder(); + int i = 0; for(FavouritePoint fav : favs) { - if(favs.size() > 1) { - res.append("\n"); + if (i++ > 0) { + res.append("\n\n"); } res.append(view.getContext().getString(R.string.favorite) + " : " + fav.getName()); //$NON-NLS-1$ } diff --git a/OsmAnd/src/net/osmand/plus/views/OsmBugsLayer.java b/OsmAnd/src/net/osmand/plus/views/OsmBugsLayer.java index d2e7c4be35..29a90e7b44 100644 --- a/OsmAnd/src/net/osmand/plus/views/OsmBugsLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/OsmBugsLayer.java @@ -225,9 +225,10 @@ public class OsmBugsLayer extends OsmandMapLayer implements ContextMenuLayer.ICo getBugFromPoint(point, list); if(!list.isEmpty()){ StringBuilder res = new StringBuilder(); + int i = 0; for(OpenStreetBug o : list) { - if(list.size() > 1) { - res.append("\n"); + if (i++ > 0) { + res.append("\n\n"); } res.append(activity.getString(R.string.osb_bug_name)+ " : " + o.getName()); //$NON-NLS-1$ } diff --git a/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java b/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java index f2525dce2a..f9ae9af2b2 100644 --- a/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java @@ -8,6 +8,7 @@ import java.util.List; import net.osmand.LogUtil; import net.osmand.OsmAndFormatter; import net.osmand.data.Amenity; +import net.osmand.data.AmenityType; import net.osmand.osm.LatLon; import net.osmand.plus.PoiFilter; import net.osmand.plus.R; @@ -99,7 +100,7 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon for (int i = 0; i < MAXIMUM_SHOW_AMENITIES && i < am.size(); i++) { Amenity n = am.get(i); if (i > 0) { - res.append("\n "); + res.append("\n\n"); } String format = OsmAndFormatter.getPoiSimpleFormat(n, view.getContext(), view.getSettings().USE_ENGLISH_NAMES.get()); res.append(" " + format); @@ -109,7 +110,7 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon if (n.getPhone() != null) { res.append("\n").append(view.getContext().getString(R.string.phone)).append(" : ").append(n.getPhone()); //$NON-NLS-1$ //$NON-NLS-2$ } - if (n.getSite() != null) { + if (n.getSite() != null && n.getType() != AmenityType.OSMWIKI) { res.append("\n").append(view.getContext().getString(R.string.website)).append(" : ").append(n.getSite()); //$NON-NLS-1$ //$NON-NLS-2$ } } diff --git a/OsmAnd/src/net/osmand/plus/views/TransportStopsLayer.java b/OsmAnd/src/net/osmand/plus/views/TransportStopsLayer.java index a71eb3fe30..6204a36dc8 100644 --- a/OsmAnd/src/net/osmand/plus/views/TransportStopsLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/TransportStopsLayer.java @@ -72,9 +72,10 @@ public class TransportStopsLayer extends OsmandMapLayer implements ContextMenuLa getFromPoint(point, stops); if(stops.isEmpty()){ StringBuilder res = new StringBuilder(); + int i = 0; for (TransportStop n : stops) { - if(stops.size() > 1) { - res.append("\n"); + if (i++ > 0) { + res.append("\n\n"); } res.append(getStopDescription(n, true)); } diff --git a/build-scripts/wiki/download_coord.sh b/build-scripts/wiki/download_coord.sh index 31a33961f7..bdd7bd3c3f 100644 --- a/build-scripts/wiki/download_coord.sh +++ b/build-scripts/wiki/download_coord.sh @@ -7,7 +7,7 @@ function download_coord { gunzip -c "$1"wiki.sql.gz | mysql wiki; } -cd src_sql; +cd ~/wiki/src_sql; download_coord en; download_coord de; download_coord nl; @@ -30,4 +30,29 @@ download_coord sr; download_coord eo; download_coord ro; download_coord lt; +download_coord fa; +download_coord cs; +download_coord ms; +download_coord zh; +download_coord id; +download_coord fi; +download_coord bg; +download_coord et; +download_coord hr; +download_coord sk; +download_coord nn; +download_coord ko; +download_coord sl; +download_coord el; +download_coord he; +download_coord ar; +download_coord tr; +download_coord th; +download_coord be; +download_coord ka; +download_coord mk; +download_coord lv; +download_coord lb; +download_coord os; +download_coord gl;