Fixes for oneway-change
This commit is contained in:
parent
874d60992e
commit
6b496957d7
@ -62,13 +62,11 @@ public class Tag
|
||||
byte speed = Convert.ToByte(value);
|
||||
if (speed != 255)
|
||||
ret.Add(new Tag(TagType.maxspeed, speed));
|
||||
break;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
ret.Add(new Tag(TagType.maxspeed, byte.MinValue));
|
||||
}
|
||||
|
||||
break;
|
||||
case "oneway":
|
||||
switch (value)
|
||||
@ -84,7 +82,8 @@ public class Tag
|
||||
ret.Add(new Tag(TagType.oneway, false));
|
||||
break;
|
||||
}
|
||||
return null;
|
||||
|
||||
break;
|
||||
case "name":
|
||||
ret.Add(new Tag(TagType.name, value));
|
||||
break;
|
||||
|
@ -26,8 +26,9 @@ public class TagManager
|
||||
public void AddTag(ulong wayId, string key, string value)
|
||||
{
|
||||
HashSet<Tag> pTags = Tag.ConvertToTags(key, value);
|
||||
foreach (Tag pTag in pTags)
|
||||
AddTag(wayId, pTag);
|
||||
if(pTags.Count > 0)
|
||||
foreach (Tag pTag in pTags)
|
||||
AddTag(wayId, pTag);
|
||||
}
|
||||
|
||||
public void AddTag(ulong wayId, Tag tag)
|
||||
|
@ -130,8 +130,9 @@ public class RegionConverter
|
||||
if (wayReader.Name == "tag")
|
||||
{
|
||||
HashSet<Tag> pTags = Tag.ConvertToTags(wayReader.GetAttribute("k")!, wayReader.GetAttribute("v")!);
|
||||
foreach (Tag pTag in pTags)
|
||||
currentTags.TryAdd(pTag.key, pTag.value);
|
||||
if(pTags.Count > 0)
|
||||
foreach (Tag pTag in pTags)
|
||||
currentTags.TryAdd(pTag.key, pTag.value);
|
||||
}
|
||||
else if (wayReader.Name == "nd")
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user