コード例 #1
0
ファイル: OsmRelationLayer.cs プロジェクト: rhinos07/OSMScout
        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 + ") ";
        }
コード例 #2
0
ファイル: OsmRelationLayer.cs プロジェクト: rhinos07/OSMScout
 public OsmRelationLayer(OsmTree gt, Relation selectedRelation)
     : base(gt, string.Empty)
 {
     relation = selectedRelation;
     description = GetDesc(relation);
 }