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

Use the new keepUpright parameter in OpenLayers #1208

Merged
merged 2 commits into from
Nov 12, 2024

Conversation

leyan
Copy link
Contributor

@leyan leyan commented Oct 20, 2024

Until now, the text-keep-upright parameter in the Mapbox Style specification was ignored, as OpenLayers was automatically keeping the labels upright and did not expose an option to control it. Now that the keepUpright parameter is available on ol/style/Text, this PR uses it to cover text-keep-upright.

This is a follow-up to #1206 now that the cleaner solution is available.

src/stylefunction.js Outdated Show resolved Hide resolved
@leyan leyan marked this pull request as draft October 21, 2024 10:21
@leyan leyan marked this pull request as ready for review October 24, 2024 21:48
@leyan
Copy link
Contributor Author

leyan commented Oct 24, 2024

@ahocevar Should I create a test for this parameter? if so, how should I go about it? I saw there are quite a lot of tests but I am not sure about how to add one.

@leyan leyan requested a review from ahocevar November 12, 2024 21:20
Copy link
Member

@ahocevar ahocevar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @leyan

@ahocevar ahocevar merged commit 9c56e14 into openlayers:main Nov 12, 2024
1 check passed
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.

2 participants