mirror of
https://github.com/enzet/map-machine.git
synced 2025-05-11 08:06:49 +02:00
Fix level parsing.
This commit is contained in:
parent
e8486ee0b8
commit
ddcad423c4
1 changed files with 5 additions and 2 deletions
|
@ -208,8 +208,11 @@ class Constructor:
|
|||
if "layer" in tags:
|
||||
layer = get_float(tags["layer"])
|
||||
if "level" in tags:
|
||||
levels = list(map(lambda x: float(x), tags["level"].split(";")))
|
||||
level = sum(levels) / len(levels)
|
||||
try:
|
||||
levels = list(map(lambda x: float(x), tags["level"].split(";")))
|
||||
level = sum(levels) / len(levels)
|
||||
except ValueError:
|
||||
pass
|
||||
|
||||
layer = 100 * level + 0.01 * layer
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue