udpate poi category
This commit is contained in:
parent
06d2758999
commit
09bbd17e02
2 changed files with 18 additions and 0 deletions
|
@ -388,6 +388,9 @@ public class MapPoiTypes {
|
|||
}
|
||||
allTypes.put(tp.getKeyName(), tp);
|
||||
lastCategory.addPoiType(tp);
|
||||
if("true".equals(parser.getAttributeValue("", "basemap"))) {
|
||||
lastCategory.addBasemapPoi(tp);
|
||||
}
|
||||
return tp;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,14 +1,17 @@
|
|||
package net.osmand.osm;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
|
||||
public class PoiCategory extends PoiFilter {
|
||||
|
||||
private List<PoiFilter> poiFilters = new ArrayList<PoiFilter>();
|
||||
private Set<PoiType> basemapPoi = null;
|
||||
private int regId;
|
||||
private String defaultTag;
|
||||
|
||||
|
@ -54,5 +57,17 @@ public class PoiCategory extends PoiFilter {
|
|||
}
|
||||
|
||||
|
||||
|
||||
public void addBasemapPoi(PoiType pt) {
|
||||
if(basemapPoi == null) {
|
||||
basemapPoi = new HashSet<PoiType>();
|
||||
}
|
||||
basemapPoi.add(pt);
|
||||
}
|
||||
|
||||
public boolean containsBasemapPoi(PoiType pt) {
|
||||
if(basemapPoi == null) {
|
||||
return false;
|
||||
}
|
||||
return basemapPoi.contains(pt);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue