private static string GetDesc(Relation relation) { string id = relation.Id.ToString(); string name = string.Empty; string network = string.Empty; foreach (Tag tag in relation.Tags) { if (tag.Key == "name") { name = tag.Value; } else if (tag.Key == "network") { network = tag.Value; } } return network + " - " + name + " (" + id + ") "; }
public OsmRelationLayer(OsmTree gt, Relation selectedRelation) : base(gt, string.Empty) { relation = selectedRelation; description = GetDesc(relation); }