-
- #el1['user'] = self.user.display_name if self.user.data_public?
- el1['user'] = user_display_name_cache[self.user_id]
-
- # make sure segments are output in sequence_id order
- ordered_segments = []
- self.way_segments.each do |seg|
- if visible_segments
- # if there is a list of visible segments then use that to weed out deleted segments
- if visible_segments[seg.segment_id]
- ordered_segments[seg.sequence_id] = seg.segment_id.to_s
+
+ el1['user'] = user_display_name_cache[self.user_id] unless user_display_name_cache[self.user_id].nil?
+
+ # make sure nodes are output in sequence_id order
+ ordered_nodes = []
+ self.way_nodes.each do |nd|
+ if visible_nodes
+ # if there is a list of visible nodes then use that to weed out deleted nodes
+ if visible_nodes[nd.node_id]
+ ordered_nodes[nd.sequence_id] = nd.node_id.to_s