-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Align Standard migration guide language with GL JS (#1812)
- Loading branch information
1 parent
64bcf02
commit fba4504
Showing
1 changed file
with
9 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,27 +51,31 @@ Property | Type | Description | |
`lightPreset` | `String` | Switches between 4 time-of-day states: `dusk`, `dawn`, `day`, and `night`. | ||
`font` | `Array` | Defines font family for the style from predefined options. | ||
|
||
In addition, Mapbox Standard makes adding your own data layers easier with the new concept of `slot`s. `Slot`s are pre-specified locations in the imported style where your custom layer will be added to (see the below section on Style Importing for more information). Standard has 3 carefully designed slots that you can leverage to place your custom layer within the Standard style's layer stack. Just set the preferred `slot` on the `Layer` object before adding it to your map and your layer will be appropriately placed. | ||
Mapbox Standard is making adding your own data layers easier for you through the concept of `slot`s. `Slot`s are pre-specified locations in the style where your layer will be added to (such as on top of existing land layers, but below all labels). To do this, we've added a new `slot` property to each `Layer`. This property allows you to identify which `slot` in the Mapbox Standard your new layer should be placed in. To add custom layers in the appropriate location in the Standard style layer stack, we added 3 carefully designed slots that you can leverage to place your layer. These slots will remain stable, so you can be sure that your own map won't break even as the basemap evolves automatically. | ||
|
||
Slot | Description | ||
--- | --- | ||
`bottom` | Above polygons (land, landuse, water, etc.) | ||
`middle` | Above lines (roads, etc.) and behind 3D buildings | ||
`none` | If you add no identifier, your custom layer will be placed on top of everything | ||
`top` | Above all existing layers in the style | ||
|
||
```swift | ||
var layer = LineLayer(id: "line-layer", source: "line-source") | ||
layer.slot = "middle" | ||
mapView.mapboxMap.addLayer(layer) | ||
``` | ||
|
||
- Important: For the new Standard style, you can only add layers to these three slots (`bottom`, `middle`, `none`) within the Standard style basemap. | ||
- Important: For the new Standard style, you can only add layers to these three slots (`bottom`, `middle`, `top`) within the Standard style basemap. | ||
|
||
Similar to the classic Mapbox styles, you can still use the layer position in ``StyleManager/addLayer(_:layerPosition:)`` method when importing the Standard Style. However, this method is only applicable to custom layers you have added yourself. If you add two layers to the same slot with a specified layer position the latter will define the order of the layers in that slot. | ||
|
||
When using the Standard style, you get the latest basemap rendering features, map styling trends and data layers as soon as they are available, without requiring any manual migration/integration. On top of this, you'll still have the ability to introduce your own data to the map and control your user's experience. If you have feedback or questions about the Standard beta style please reach out to: `[email protected]`. | ||
Standard is aware of the map lighting configuration using the `measure-light` expression, which returns you an aggregated value of your light settings. This returns a value which ranges from 0 (darkest) to 1 (brightest). In darker lights, you make the individual layers light up by using the new `*-emissive-stength` expressions, which allow you to add emissive light to different layer types and for example keep texts legible in all light settings. If your custom layers seem too dark, try adjusting the emissive strength of these layers. | ||
|
||
Our existing, classic Mapbox styles (such as [Mapbox Streets](https://www.mapbox.com/maps/streets), [Mapbox Light](https://www.mapbox.com/maps/light), and [Mapbox Satellite Streets](https://www.mapbox.com/maps/satellite)) and any custom styles you have built in Mapbox Studio will still work just like they do in v10, so no changes are required. | ||
### Customizing Standard | ||
|
||
The underlying design paradigm to the Standard style is different from what you know from the classic core styles. Mapbox manages the basemap experience and surfaces key global styling configurations - in return, you get a cohesive visual experience and an evergreen map, always featuring the latest data, styling and rendering features compatible with your SDK. The configuration options make interactions with the basemap simpler than before. During the beta phase, we are piloting these configurations - we welcome feedback on the beta configurations. If you have feedback or questions about the Standard beta style reach out to: [[email protected]](mailto:[email protected]). | ||
|
||
You can customize the overall color of your Standard experience easily by adjusting the 3D light settings. Individual basemap layers and/or color values can’t be adjusted, but all the flexibility offered by the style specification can be applied to custom layers while keeping interaction with the basemap simple through `slot`s. | ||
|
||
#### 2.1.1 Style Imports | ||
|
||
|