public List <DisplayNode> TranslateTrail(Trail trail) { displayNodes = new List <DisplayNode> (); List <OSMNode> nodes = trail.GetNodeList(); for (int i = 0; i < nodes.Count - 1; i++) { OSMNode node = nodes[i]; OSMNode nextNode = nodes[i + 1]; AddDisplayNode(node); AddDisplayNode(node, nextNode); } OSMNode lastNode = nodes[nodes.Count - 1]; AddDisplayNode(lastNode); return(displayNodes); }