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);
|
byte speed = Convert.ToByte(value);
|
||||||
if (speed != 255)
|
if (speed != 255)
|
||||||
ret.Add(new Tag(TagType.maxspeed, speed));
|
ret.Add(new Tag(TagType.maxspeed, speed));
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
ret.Add(new Tag(TagType.maxspeed, byte.MinValue));
|
ret.Add(new Tag(TagType.maxspeed, byte.MinValue));
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case "oneway":
|
case "oneway":
|
||||||
switch (value)
|
switch (value)
|
||||||
@ -84,7 +82,8 @@ public class Tag
|
|||||||
ret.Add(new Tag(TagType.oneway, false));
|
ret.Add(new Tag(TagType.oneway, false));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return null;
|
|
||||||
|
break;
|
||||||
case "name":
|
case "name":
|
||||||
ret.Add(new Tag(TagType.name, value));
|
ret.Add(new Tag(TagType.name, value));
|
||||||
break;
|
break;
|
||||||
|
@ -26,6 +26,7 @@ public class TagManager
|
|||||||
public void AddTag(ulong wayId, string key, string value)
|
public void AddTag(ulong wayId, string key, string value)
|
||||||
{
|
{
|
||||||
HashSet<Tag> pTags = Tag.ConvertToTags(key, value);
|
HashSet<Tag> pTags = Tag.ConvertToTags(key, value);
|
||||||
|
if(pTags.Count > 0)
|
||||||
foreach (Tag pTag in pTags)
|
foreach (Tag pTag in pTags)
|
||||||
AddTag(wayId, pTag);
|
AddTag(wayId, pTag);
|
||||||
}
|
}
|
||||||
|
@ -130,6 +130,7 @@ public class RegionConverter
|
|||||||
if (wayReader.Name == "tag")
|
if (wayReader.Name == "tag")
|
||||||
{
|
{
|
||||||
HashSet<Tag> pTags = Tag.ConvertToTags(wayReader.GetAttribute("k")!, wayReader.GetAttribute("v")!);
|
HashSet<Tag> pTags = Tag.ConvertToTags(wayReader.GetAttribute("k")!, wayReader.GetAttribute("v")!);
|
||||||
|
if(pTags.Count > 0)
|
||||||
foreach (Tag pTag in pTags)
|
foreach (Tag pTag in pTags)
|
||||||
currentTags.TryAdd(pTag.key, pTag.value);
|
currentTags.TryAdd(pTag.key, pTag.value);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user