Skip to content

Commit

Permalink
Update MIGRATION_GUIDE_v3.md
Browse files Browse the repository at this point in the history
Wrap `setConfigProperty` calls in `map.on('style.load')` handlers
  • Loading branch information
stepankuzmin authored Aug 9, 2023
1 parent 6e0cb4a commit 87472fe
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions MIGRATION_GUIDE_v3.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,19 @@ With Mapbox Standard, we are also introducing a new paradigm for how to interact
* The Mapbox Standard style features 4 light presets: "Day", "Dusk", "Dawn", and "Night". The style light preset can be changed from the default, "Day", to another preset with a single line of code:

```js
map.setConfigProperty('basemap', 'lightPreset', 'dusk');
map.on('style.load', () => {
map.setConfigProperty('basemap', 'lightPreset', 'dusk');
});
```

Changing the light preset will alter the colors and shadows on your map to reflect the time of day. For more information, refer to the [Lighting API](#lighting-api) section.

Similarly, you can set other configuration properties on the Standard style such as showing POIs, place labels, or specific fonts:

```js
map.setConfigProperty('basemap', 'showPointOfInterestLabels', false);
map.on('style.load', () => {
map.setConfigProperty('basemap', 'showPointOfInterestLabels', false);
});
```

The Standard style offers 6 configuration properties for developers to change when they import it into their own style:
Expand Down

0 comments on commit 87472fe

Please sign in to comment.