Closed jfirebaugh closed 8 years ago
Similarly for text-rotation-alignment
:
In combination with
symbol-placement
, determines the rotation behavior of the individual glyphs forming the text. The valueviewport
produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value ofsymbol-placement
. Whensymbol-placement
is set topoint
, the valuemap
produces glyphs whose x-axes are aligned east-west, and the valueauto
is equivalent toviewport
. Whensymbol-placement
is set toline
, the valuemap
produces glyphs whose x-axes are aligned with the line at the point where each glyph is placed, and the valueauto
is equivalent tomap
.
This documentation for text-rotation-alignment
is ambiguous about whether, when combined with symbol-placement: line
, text-rotation-alignment: viewport
produces what it actually does, versus a layout
--l h--i--s.-
\ /
i t
\ /
k--e
Thanks, this is definitely an improvement. It’s a bit more technical than I would’ve written, but I think developers can still follow along.
For what it’s worth, in mapbox/mapbox-gl-native#5245, which is for symbol-placed annotation views (but same idea), this is how I described a flag that is unset for icon-rotation-alignment: viewport
and set for icon-rotation-alignment: map
:
If this option is unset, the annotation view remains unchanged as the map is rotated. If this option is set, the annotation view rotates as the map rotates.
For example, you would set this option if the annotation view should be aligned with a street, regardless of the direction from which the user views the street.
I suppose describing use cases is beyond the scope of the documentation in this repository, so this is a 👍.
Wrapped preview:
cc @1ec5