diff --git a/OsmAnd-java/src/net/osmand/binary/BinaryInspector.java b/OsmAnd-java/src/net/osmand/binary/BinaryInspector.java index c14c61b8f4..7c57533581 100644 --- a/OsmAnd-java/src/net/osmand/binary/BinaryInspector.java +++ b/OsmAnd-java/src/net/osmand/binary/BinaryInspector.java @@ -68,7 +68,7 @@ public class BinaryInspector { in.inspector(new String[]{ // "-vpoi", "-vmap","-vmapobjects", // "-vmapcoordinates", -// "-vrouting", + "-vrouting", // "-vaddress", "-vcities",//"-vstreetgroups", // "-vstreets", "-vbuildings", "-vintersections", // "-zoom=15", diff --git a/OsmAnd-java/src/net/osmand/binary/BinaryMapIndexReader.java b/OsmAnd-java/src/net/osmand/binary/BinaryMapIndexReader.java index 84861f1537..31ad40ec61 100644 --- a/OsmAnd-java/src/net/osmand/binary/BinaryMapIndexReader.java +++ b/OsmAnd-java/src/net/osmand/binary/BinaryMapIndexReader.java @@ -1950,7 +1950,7 @@ public class BinaryMapIndexReader { private static boolean testMapSearch = false; - private static boolean testAddressSearch = true; + private static boolean testAddressSearch = false; private static boolean testPoiSearch = true; private static boolean testPoiSearchOnPath = false; private static boolean testTransportSearch = false; @@ -1965,7 +1965,7 @@ public class BinaryMapIndexReader { } public static void main(String[] args) throws IOException { - File fl = new File("/Users/victorshcherb/osmand/osm-gen/map.obf"); + File fl = new File("/Users/victorshcherb/osmand/maps/Synthetic_test_rendering.obf"); RandomAccessFile raf = new RandomAccessFile(fl, "r"); BinaryMapIndexReader reader = new BinaryMapIndexReader(raf, fl); @@ -2109,7 +2109,7 @@ public class BinaryMapIndexReader { private static void testPoiSearchByName(BinaryMapIndexReader reader) throws IOException { println("Searching by name..."); - SearchRequest req = buildSearchPoiRequest(0, 0, "кие", + SearchRequest req = buildSearchPoiRequest(0, 0, "aBS", 0, Integer.MAX_VALUE, 0, Integer.MAX_VALUE, null); reader.searchPoiByName(req); for (Amenity a : req.getSearchResults()) { diff --git a/OsmAnd-java/src/net/osmand/binary/BinaryMapPoiReaderAdapter.java b/OsmAnd-java/src/net/osmand/binary/BinaryMapPoiReaderAdapter.java index 3927203d29..9c0d2886f6 100644 --- a/OsmAnd-java/src/net/osmand/binary/BinaryMapPoiReaderAdapter.java +++ b/OsmAnd-java/src/net/osmand/binary/BinaryMapPoiReaderAdapter.java @@ -9,9 +9,9 @@ import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; -import java.util.Iterator; import java.util.LinkedList; import java.util.List; +import java.util.Map; import java.util.Map.Entry; import net.osmand.Collator; @@ -26,9 +26,7 @@ import net.osmand.data.Amenity.AmenityRoutePoint; import net.osmand.data.LatLon; import net.osmand.osm.MapPoiTypes; import net.osmand.osm.PoiCategory; -import net.osmand.util.Algorithms; import net.osmand.util.MapUtils; -import net.sf.junidecode.Junidecode; import org.apache.commons.logging.Log; @@ -553,6 +551,13 @@ public class BinaryMapPoiReaderAdapter { break; } } + Map lt = am.getAdditionalInfo(); + for (Entry e : lt.entrySet()) { + matches = matcher.matches(e.getValue()); + if (matches) { + break; + } + } } if(matches) { req.publish(am); diff --git a/OsmAnd-java/src/net/osmand/data/MapObject.java b/OsmAnd-java/src/net/osmand/data/MapObject.java index 59c382a890..f118987be4 100644 --- a/OsmAnd-java/src/net/osmand/data/MapObject.java +++ b/OsmAnd-java/src/net/osmand/data/MapObject.java @@ -1,13 +1,11 @@ package net.osmand.data; -import java.io.Serializable; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.HashMap; import java.util.Iterator; -import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry;