maplibre / maplibre-style-spec

MapLibre Style Specification & Utilities
https://maplibre.org/maplibre-style-spec/
Other
75 stars 62 forks source link

Token strings undocumented #772

Open louwers opened 1 month ago

louwers commented 1 month ago
                "text-field": "{name:latin} {name:nonlatin}\n{ele} m\n▲",

I can't find anything about 'token strings' in the documentation.

~Also I wonder if {name:latin} and {name:nonlatin} is MapLibre Native specific.~

HarelM commented 1 month ago

Can you add a style that has this and displays something? I believe a render test can easily check for parity in this case.

louwers commented 1 month ago

@HarelM The :latin and :nonlatin is just part of that schema.

image
1ec5 commented 1 month ago

The token string syntax is obsolete. It was removed from the style specification in mapbox/mapbox-gl-js#6216, prior to the fork. Before that, mapbox/mapbox-gl-js#5600 mapbox/mapbox-gl-native#11509 made it incompatible with expressions. As a result, mapbox-gl-language v1.0.0 dropped support for it as well, making any use of token strings an internationalization problem.

If you do document this syntax, please make sure the developer comes away with the understanding that it’s even more archaic than style functions.

/ref https://github.com/maplibre/maplibre-style-spec/issues/188#issuecomment-1588141137

HarelM commented 1 month ago

We have a page about deprecations, we can include that there I guess. Feel free to open a PR.