Closed treestryder closed 1 year ago
I'm a bit surprised, that Math.trunc(....)
does work at all, although it seems to just return the value it got. Maybe you rather use the filter round
instead?
Like so:
{% set value = attribute(tags, 'seamark:bridge:clearance_height')|round %}
That is fine, I can change it. I guess it does not matter much how I come to an integer, as changing a thermometer icon (closest icons I found to representing spectrum of heights) is ultimately a subtle difference. I chose to truncate any real number values because I wanted the icons to say "less than 1 is as good as 0". Also, I wasn't sure the 0 icon would be used much if the height were rounded up.
The point is, that Math.trunc
does not work. Click on any building (from z15): https://openstreetbrowser.org/#categories=custom/02e01534cc22e583e80b53c037b4b267
Updated. Thanks for catching the problem early. I might not have seen that odd behavior crop up for a while. I only know of the two bridge heights, both set to "1".
Thank you.
I thank you for your contribution.
By the way - the new category/ies have not been announced on the blog yet. Do you want to come up with a text and a nice screenshot or shall I invent something?
Though I am rather shy about announcing this, I will see what I can do. But first... I would like to clean up the duplicates in the details view ( see issuecomment-1382881562 ) . Probably by embracing and adopting the default behavior.
Added basic support for the paddling hazards seamark:restricted_area:restriction (no_entry, restricted_entry) and seamark:bridge:clearance_height. Not the prettiest but wanted to get these hazards supported sooner rather than later.