Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render signal boxes as points with text below #138

Merged
merged 1 commit into from
Nov 3, 2024

Conversation

hiddewie
Copy link
Owner

@hiddewie hiddewie commented Nov 2, 2024

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 #133

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 #133
@hiddewie
Copy link
Owner Author

hiddewie commented Nov 2, 2024

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.

@hiddewie hiddewie marked this pull request as ready for review November 3, 2024 16:14
@hiddewie hiddewie merged commit 3ffc649 into master Nov 3, 2024
6 checks passed
@hiddewie hiddewie deleted the signal-boxes-text-location branch November 3, 2024 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Signal boxes in buildings aren't rendered properly at levels <11.5
1 participant