This seems non-trivial, but a very cool effect. Roads and contours have dynamic text-rotate
, so I'm certain its possible. In Javascript you would need a way to determine the angle of the lake (some centroid method??). Seems like a lot of work.
I've had to do a similar workaround, where I added my own points of interest that required custom text-label properties. This resulted in the POIs as a custom layer so I could adjust the text. I had about 10 POIs that all needed the same formatting.
Clearly, this would be unwieldy for you, as each Lake label would have to be uploaded as its own GeoJson file, then brought into the style as its own layer, just so you could customize the rotation (which you still would need to calculate).
E.g.,
- Layer that is only the label for Medicine L., then you adjust the
text-rotate
- ... same for each lake.
This is what my solution looked like on Android, custom POIs that were uploaded as .geojson, then styled as their own label in Mapbox Studio.