Update poi type filters
This commit is contained in:
parent
1b165d9853
commit
8edc7cd006
3 changed files with 12 additions and 7 deletions
|
@ -65,15 +65,15 @@ public class BinaryInspector {
|
|||
// test cases show info
|
||||
if(args.length == 1 && "test".equals(args[0])) {
|
||||
in.inspector(new String[]{
|
||||
// "-vpoi",
|
||||
"-vmap",// "-vmapobjects",
|
||||
"-vpoi",
|
||||
// "-vmap",// "-vmapobjects",
|
||||
// "-vrouting",
|
||||
// "-vaddress", "-vcities","-vstreetgroups",
|
||||
// "-vstreets", "-vbuildings", "-vintersections",
|
||||
"-zoom=16",
|
||||
// "-bbox=1.74,51.17,1.75,51.16",
|
||||
"-vstats",
|
||||
"/Users/victorshcherb/osmand/maps/Netherlands_europe_2.obf"
|
||||
// "-vstats",
|
||||
// "/Users/victorshcherb/osmand/maps/Netherlands_europe_2.obf"
|
||||
// "/Users/victorshcherb/osmand/maps/World_basemap_2.obf"
|
||||
});
|
||||
} else {
|
||||
|
@ -1047,7 +1047,7 @@ public class BinaryInspector {
|
|||
PoiSubType st = p.subTypes.get(i);
|
||||
println("\t\t\t" + st.name + " " + (st.text ? "text":(" encoded " + st.possibleValues.size())));
|
||||
}
|
||||
req.poiTypeFilter = null;//for test only
|
||||
// req.poiTypeFilter = null;//for test only
|
||||
index.searchPoi(p, req);
|
||||
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ import java.util.Collection;
|
|||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import net.osmand.Location;
|
||||
import net.osmand.ResultMatcher;
|
||||
|
@ -345,8 +346,12 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa
|
|||
addFilter(optionsMenu, "24/7");
|
||||
Map<String, PoiType> poiAdditionals = f.getPoiAdditionals();
|
||||
if(poiAdditionals != null) {
|
||||
TreeMap<String, PoiType> adds = new TreeMap<String, PoiType>();
|
||||
for(PoiType vtype : poiAdditionals.values()) {
|
||||
addFilter(optionsMenu, vtype.getTranslation().replace(' ', ':').toLowerCase());
|
||||
adds.put(vtype.getTranslation().replace(' ', ':').toLowerCase(), vtype);
|
||||
}
|
||||
for(String vtype : adds.keySet()) {
|
||||
addFilter(optionsMenu, vtype);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -443,7 +443,7 @@ public class PoiLegacyFilter implements SearchPoiTypeFilter {
|
|||
poiAdditionals.put(add.getKeyName().replace('_', ':').replace(' ', ':'), add);
|
||||
poiAdditionals.put(add.getTranslation().replace(' ', ':').toLowerCase(), add);
|
||||
}
|
||||
if(pt instanceof PoiFilter) {
|
||||
if(pt instanceof PoiFilter && !(pt instanceof PoiCategory)) {
|
||||
for(PoiType ps : ((PoiFilter) pt).getPoiTypes()) {
|
||||
fillPoiAdditionals(ps);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue