This commit is contained in:
Victor Shcherb 2015-11-25 16:49:28 +01:00
parent 4934413ac6
commit 87ddee7c84
4 changed files with 12 additions and 9 deletions

View file

@ -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",

View file

@ -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<Amenity> req = buildSearchPoiRequest(0, 0, "кие",
SearchRequest<Amenity> req = buildSearchPoiRequest(0, 0, "aBS",
0, Integer.MAX_VALUE, 0, Integer.MAX_VALUE, null);
reader.searchPoiByName(req);
for (Amenity a : req.getSearchResults()) {

View file

@ -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<String, String> lt = am.getAdditionalInfo();
for (Entry<String, String> e : lt.entrySet()) {
matches = matcher.matches(e.getValue());
if (matches) {
break;
}
}
}
if(matches) {
req.publish(am);

View file

@ -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;