Fix #1885
This commit is contained in:
parent
4934413ac6
commit
87ddee7c84
4 changed files with 12 additions and 9 deletions
|
@ -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",
|
||||
|
|
|
@ -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()) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue