Add BinaryMapIndexReader.EMPTY_SEARCH_POI_TYPE_FILTER

This commit is contained in:
Roman Inflianskas 2016-05-28 00:26:20 +03:00
parent 2755fe880a
commit a2984f5c7c
2 changed files with 14 additions and 24 deletions

View file

@ -1068,18 +1068,7 @@ public class BinaryInspector {
MapUtils.get31TileNumberY(verbose.lattop),
MapUtils.get31TileNumberY(verbose.latbottom),
verbose.getZoom(),
new SearchPoiTypeFilter() {
@Override
public boolean accept(PoiCategory type, String subcategory) {
return true;
}
@Override
public boolean isEmpty() {
return false;
}
},
BinaryMapIndexReader.EMPTY_SEARCH_POI_TYPE_FILTER,
new ResultMatcher<Amenity>() {
@Override
public boolean publish(Amenity object) {

View file

@ -1557,6 +1557,18 @@ public class BinaryMapIndexReader {
public boolean isEmpty();
}
public static final SearchPoiTypeFilter EMPTY_SEARCH_POI_TYPE_FILTER = new SearchPoiTypeFilter() {
@Override
public boolean accept(PoiCategory type, String subcategory) {
return true;
}
@Override
public boolean isEmpty() {
return false;
}
};
public static class MapObjectStat {
public int lastStringNamesSize;
public int lastObjectIdSize;
@ -2147,18 +2159,7 @@ public class BinaryMapIndexReader {
println(" " + poiRegion.subcategories.get(i));
}
SearchRequest<Amenity> req = buildSearchPoiRequest(sleft, sright, stop, sbottom, -1, new SearchPoiTypeFilter() {
@Override
public boolean accept(PoiCategory type, String subcategory) {
return true;
}
@Override
public boolean isEmpty() {
return false;
}
}, null);
SearchRequest<Amenity> req = buildSearchPoiRequest(sleft, sright, stop, sbottom, -1, EMPTY_SEARCH_POI_TYPE_FILTER, null);
List<Amenity> results = reader.searchPoi(req);
for (Amenity a : results) {
println(a.getType() + " " + a.getSubType() + " " + a.getName() + " " + a.getLocation());