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.
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