Skip to content

Commit

Permalink
Merge pull request #1208 from leyan/text-keep-upright
Browse files Browse the repository at this point in the history
Use the new keepUpright parameter in OpenLayers
  • Loading branch information
ahocevar authored Nov 12, 2024
2 parents d46eff4 + c04889c commit 9c56e14
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/stylefunction.js
Original file line number Diff line number Diff line change
Expand Up @@ -1402,6 +1402,18 @@ export function stylefunction(
),
),
);
if (typeof text.setKeepUpright === 'function') {
const keepUpright = getValue(
layer,
'layout',
'text-keep-upright',
zoom,
f,
functionCache,
featureState,
);
text.setKeepUpright(keepUpright);
}
const textAnchor = getValue(
layer,
'layout',
Expand Down

0 comments on commit 9c56e14

Please sign in to comment.