maplibre-style-spec icon indicating copy to clipboard operation
maplibre-style-spec copied to clipboard

Token strings undocumented

Open louwers opened this issue 1 year ago • 4 comments
trafficstars

                "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.~

louwers avatar Aug 05 '24 14:08 louwers

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

HarelM avatar Aug 05 '24 20:08 HarelM

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

image

louwers avatar Aug 06 '24 09:08 louwers

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

1ec5 avatar Aug 10 '24 22:08 1ec5

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

HarelM avatar Aug 11 '24 04:08 HarelM