Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2015-07-15 09:11:12 +02:00
commit b9a5ad6b7b
2 changed files with 18 additions and 0 deletions

View file

@ -388,6 +388,9 @@ public class MapPoiTypes {
} }
allTypes.put(tp.getKeyName(), tp); allTypes.put(tp.getKeyName(), tp);
lastCategory.addPoiType(tp); lastCategory.addPoiType(tp);
if("true".equals(parser.getAttributeValue("", "basemap"))) {
lastCategory.addBasemapPoi(tp);
}
return tp; return tp;
} }

View file

@ -1,14 +1,17 @@
package net.osmand.osm; package net.osmand.osm;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashSet;
import java.util.LinkedHashSet; import java.util.LinkedHashSet;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Set;
public class PoiCategory extends PoiFilter { public class PoiCategory extends PoiFilter {
private List<PoiFilter> poiFilters = new ArrayList<PoiFilter>(); private List<PoiFilter> poiFilters = new ArrayList<PoiFilter>();
private Set<PoiType> basemapPoi = null;
private int regId; private int regId;
private String defaultTag; 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);
}
} }