From 6a2ddf32775616f12150f393e1777d91c8d255d1 Mon Sep 17 00:00:00 2001 From: glax Date: Fri, 31 Mar 2023 21:54:01 +0200 Subject: [PATCH] Added way to add Tags from KeyValuePair --- OSMDatastructure/TagManager.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/OSMDatastructure/TagManager.cs b/OSMDatastructure/TagManager.cs index 0c10132..91eb4c4 100644 --- a/OSMDatastructure/TagManager.cs +++ b/OSMDatastructure/TagManager.cs @@ -33,6 +33,13 @@ public class TagManager } } + public void AddTag(ulong wayId, KeyValuePair keyValuePair) + { + if(!wayTags.ContainsKey(wayId)) + wayTags.Add(wayId, new HashSet()); + wayTags[wayId].Add(new Tag(keyValuePair.Key, keyValuePair.Value)); + } + public HashSet? GetTagsForWayId(ulong wayId) { return wayTags.TryGetValue(wayId, out HashSet? value) ? value : null;