private void PaintWay(System.Drawing.Graphics g, Way w) { Node firstNode = null; foreach (WayNode wnd in w.Nodes) { Node secondNode = GetNode(wnd.Reference); if (secondNode != null) { if (firstNode != null) { PaintLine(g, firstNode, secondNode); } firstNode = secondNode; } } }
private Way GetWay(int id) { Way way = new Way(); way.Id = id; int index = Array.BinarySearch(osmTree.Ways,way); if (index >= 0) { way = osmTree.Ways[index]; } else { way = null; } return way; }