Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanhamley committed Feb 16, 2021
1 parent 4bc5612 commit c31a5c2
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,18 @@ Create a new [Mapbox GL JS plugin](https://www.mapbox.com/blog/build-mapbox-gl-j
modifies the layers of the map style to use the `text-field` that matches the browser language.

As of Mapbox GL Language v1.0.0, this plugin no longer supports token values (e.g. `{name}`). v1.0+ expects the `text-field`
property of a style to use an expression of the form `['get', 'name_en']` or `['get', 'name']`; these expressions can be nested.
property of a style to use an [expression](https://docs.mapbox.com/mapbox-gl-js/style-spec/expressions/) of the form `['get', 'name_en']` or `['get', 'name']`; these expressions can be nested. Note that `get` expressions used as inputs to other expressions may not be handled by this plugin. For example:
```
["match",
["get", "name"],
"Canada",
"America's Hat",
["coalesce",
["get", "name_en"],
["get", "name"]
]
]
```
Only styles based on [Mapbox v8 styles](https://docs.mapbox.com/help/troubleshooting/streets-v8-migration-guide/) are supported.

#### Parameters
Expand Down

0 comments on commit c31a5c2

Please sign in to comment.