plepe / openstreetbrowser-categories-main

Styles of the "Main" category of OpenStreetBrowser
5 stars 11 forks source link

Render level numbers and height in buildings #63

Closed IgorEliezer closed 9 months ago

IgorEliezer commented 1 year ago

Currently the building height is color coded. In areas where most buildings range from 1 to 3 levels, it's hard to distinguish a single-story building from 2 or 3-story buildings, since the color variation between buildings is subtle.

What if the buildings rendered their level numbers and height?

image https://www.openstreetbrowser.org/#map=20/-23.05079/-47.83707&categories=buildings-height

plepe commented 1 year ago

Like this? https://www.openstreetbrowser.org/#categories=custom/8218ef93700724461a0ebd1964dd2633

I guess, I should only render it from a zoom level of 18 or 19 ...

IgorEliezer commented 1 year ago

Very good!

I guess, I should only render it from a zoom level of 18 or 19 ...

I agree.

EDIT: for simplicity, I don't think it's necessary to show the level/height values in the left panel.

plepe commented 1 year ago

Here you are: https://www.openstreetbrowser.org/#categories=custom/d45da1e79bb3c617e7f31ef9717de58a

There's a technical problem though: The "markerSign" is not updated, so when zooming out, the labels of the shown items do not vanish and when zooming the labels do not appear. I have to update the code.

And "listMarkerSign" doesn't work either ...

IgorEliezer commented 1 year ago

A test in a really very dense area, level 18: https://www.openstreetbrowser.org/#map=18/-23.55027/-46.63328&categories=custom/d45da1e79bb3c617e7f31ef9717de58a

Perhaps using small font for the numbers and line breaking like {building:levels} \n ({height}) instead of {building:levels} ({height}) might help too.

plepe commented 9 months ago

Implemented in 245e773638488945079f1f6581be441c0d418a81 . I hope, you like it!

IgorEliezer commented 9 months ago

I hope, you like it!

I sure did. :)