From 755b56a97ba064401c0961e9145f23b3ab3fbcd7 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Mon, 26 Jan 2015 21:45:07 +0100 Subject: [PATCH] Fix map creator --- OsmAnd-java/src/net/osmand/osm/MapRenderingTypes.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/OsmAnd-java/src/net/osmand/osm/MapRenderingTypes.java b/OsmAnd-java/src/net/osmand/osm/MapRenderingTypes.java index 512760c414..2b4495b9fd 100644 --- a/OsmAnd-java/src/net/osmand/osm/MapRenderingTypes.java +++ b/OsmAnd-java/src/net/osmand/osm/MapRenderingTypes.java @@ -620,16 +620,17 @@ public class MapRenderingTypes { if (!Algorithms.isEmpty(parser.getAttributeValue("", "order"))) { rtype.order = Integer.parseInt(parser.getAttributeValue("", "order")); } - if (poiTag != null && poiCategory != null && poiCategory.length() > 0) { + if (poiCategory != null && poiCategory.length() > 0) { rtype.poiCategory = AmenityType.getAndRegisterType(parser.getAttributeValue("", "poi_category")); rtype.poiSpecified = true; rtype.relation = Boolean.parseBoolean(parser.getAttributeValue("", "relation")); rtype.poiWithNameOnly = Boolean.parseBoolean(parser.getAttributeValue("", "poi_with_name")); rtype.poiPrefix = parser.getAttributeValue("", "poi_prefix"); rtype.onlyPoi = true; - - rtype.tagValuePattern = new TagValuePattern(poiTag, null); - return registerRuleType(rtype); + if (poiTag != null) { + rtype.tagValuePattern = new TagValuePattern(poiTag, null); + return registerRuleType(rtype); + } } return rtype; }