Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Highway shield text is tilted #5683

Closed
1ec5 opened this issue Jul 14, 2016 · 5 comments
Closed

Highway shield text is tilted #5683

1ec5 opened this issue Jul 14, 2016 · 5 comments
Assignees
Labels
bug Core The cross-platform C++ core, aka mbgl navigation For the Mapbox Navigation SDK for Android or iOS or navigation use cases in general release blocker Blocks the next final release
Milestone

Comments

@1ec5
Copy link
Contributor

1ec5 commented Jul 14, 2016

When the map is tilted, Interstate and state route shields remain upright, as expected, but the text inside them tilts with the map:

gl-native

Reproduces in Streets, Outdoors, and Satellite Streets styles in 5fb0e87 on iOS and macOS. Does not reproduce in mapbox/mapbox-gl-js@742b46d:

gl-js

Exit shields are unaffected. The difference is likely that highway shields have line placement, whereas exit shields have point placement.

@1ec5 1ec5 added bug Core The cross-platform C++ core, aka mbgl labels Jul 14, 2016
@1ec5
Copy link
Contributor Author

1ec5 commented Jul 14, 2016

Bisect implicates ecd4aa1 (#5288).

/cc @yhahn

@1ec5 1ec5 added this to the ios-v3.4.0 milestone Jul 15, 2016
@yhahn yhahn self-assigned this Jul 19, 2016
@1ec5 1ec5 added the navigation For the Mapbox Navigation SDK for Android or iOS or navigation use cases in general label Aug 15, 2016
@boundsj boundsj added the release blocker Blocks the next final release label Aug 15, 2016
@yhahn
Copy link
Member

yhahn commented Aug 30, 2016

@1ec5 sorry for the delay -- I started digging into this yesterday and need to vet what I think is a subtle difference in behavior between the way an undefined pitch alignment value is handled in the style:

Will keep trying to get to the bottom of this today.

@1ec5
Copy link
Contributor Author

1ec5 commented Aug 31, 2016

Just a hunch, but in gl-native, if symbolPlacement is line, it doesn’t look like it’s possible for either iconRotationAlignment or textRotationAlignment to be viewport for the purpose of a textPitchAlignment fallback, even if the stylesheet sets it explicitly, because this line will read the value that was set here rather than the raw value specified by the style. The corresponding code in GL JS only defaults text-rotation-alignment to map if it isn’t specified in the stylesheet; likewise for icon-rotation-alignment.

1ec5 added a commit that referenced this issue Aug 31, 2016
When text-pitch-alignment is unspecified, only use the explicit value of text-rotation-alignment. If text-rotation-alignment is unspecified, back to the style specification default for text-pitch-alignment rather than text-rotation-alignment.

Fixes #5683.
@1ec5
Copy link
Contributor Author

1ec5 commented Aug 31, 2016

Indeed, falling back to a temporarily stored value of text-rotation-alignment does fix the immediate issue. Here’s what 1ec5-shields-upright-5683 looks like:

upright

On the other hand, it isn’t quite right because the street labels are also falling back to viewport now.

Effectively, this means that text-pitch-alignment falls back to the literal value of text-rotation-alignment but not the computed value. Is this what the style specification normally means by “matching” a property?

@boundsj
Copy link
Contributor

boundsj commented Sep 20, 2016

I think the following summarizes what is required to land the set of PRs that fix this issue:

In the future, the style spec should be updated to reflect the released versions that support auto where applicable.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Core The cross-platform C++ core, aka mbgl navigation For the Mapbox Navigation SDK for Android or iOS or navigation use cases in general release blocker Blocks the next final release
Projects
None yet
Development

No branches or pull requests

4 participants