hiddewie / OpenRailwayMap-vector

OpenRailwayMap vector tiles
https://openrailwaymap.fly.dev
GNU General Public License v3.0
8 stars 1 forks source link

Render signal boxes as points with text below #138

Closed hiddewie closed 1 week ago

hiddewie commented 1 week ago

This requires a different rendering for polygons as for points, because the polygons need to have their center rendered for the lower zoom levels.

The center can only be calculated in the backend, not during rendering in MapLibre GL JS.

The center is stored along with the full geometry, such that polygon signal boxes can be rendered as such for high zoom levels.

The signals_signal_boxes tile source is converted to a function to ensure it can take the zoom level into account to determine which geometry to return to the client.

Fixes https://github.com/hiddewie/OpenRailwayMap-vector/issues/133

hiddewie commented 1 week ago

Zoom 10: image

Zoom 11: image

Zoom 12: image

Zoom 13: image

The signal boxes are better, but there is much to be improved for the signal rendering in zoom levels <16.