From 642d445a148cd38d3958d33a63a4bc836e6e2c46 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Sat, 4 Dec 2010 10:14:11 +0000 Subject: [PATCH] fix issue 235, 215 git-svn-id: https://osmand.googlecode.com/svn/trunk@753 e29c36b1-1cfa-d876-8d93-3434fc2bb7b8 --- DataExtractionOSM/src/net/osmand/data/Amenity.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/DataExtractionOSM/src/net/osmand/data/Amenity.java b/DataExtractionOSM/src/net/osmand/data/Amenity.java index 05cb07958f..9656d5290e 100644 --- a/DataExtractionOSM/src/net/osmand/data/Amenity.java +++ b/DataExtractionOSM/src/net/osmand/data/Amenity.java @@ -21,8 +21,6 @@ public class Amenity extends MapObject { public Amenity(Entity entity, AmenityType type, String subtype){ super(entity); - // manipulate with id to distinguish way and nodes - this.id = entity.getId() << 1 + ((entity instanceof Node)? 0 : 1); this.type = type; this.subType = subtype; this.openingHours = entity.getTag(OSMTagKey.OPENING_HOURS); @@ -50,6 +48,13 @@ public class Amenity extends MapObject { } } } + + @Override + public void setEntity(Entity e) { + super.setEntity(e); + // manipulate with id to distinguish way and nodes + this.id = (e.getId() << 1) + ((e instanceof Node)? 0 : 1); + } public Amenity(){ }