Change fog and terrain types to match Mapbox types. (#2106)

This commit is contained in:
Francisco Pérez Sampayo 2023-01-21 23:46:36 +01:00 committed by GitHub
parent 9baded6e51
commit 109c334bdf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 9 deletions

View File

@ -73,10 +73,10 @@ The current cursor [type](https://developer.mozilla.org/en-US/docs/Web/CSS/curso
### Styling options
#### `fog`: [Fog](/docs/api-reference/types.md#fog) | null
#### `fog`: [Fog](/docs/api-reference/types.md#fog)
The fog property of the style. Must conform to the [Fog Style Specification](https://docs.mapbox.com/mapbox-gl-js/style-spec/fog/).
If `null` is provided, removes the fog from the map.
If `undefined` is provided, removes the fog from the map.
#### `light`: [Light](/docs/api-reference/types.md#light)
@ -109,7 +109,7 @@ Enable diffing when `mapStyle` changes. If `false`, force a 'full' update, remov
#### `terrain`: [TerrainSpecification](/docs/api-reference/types.md#terrainspecification)
Terrain property of the style. Must conform to the [Terrain Style Specification](https://docs.mapbox.com/mapbox-gl-js/style-spec/terrain/).
If `null` is provided, removes terrain from the map.
If `undefined` is provided, removes terrain from the map.
### Camera options

View File

@ -257,13 +257,13 @@ export type MapboxProps = Partial<ViewState> & {
*/
styleDiffing?: boolean;
/** The fog property of the style. Must conform to the Fog Style Specification .
* If `null` is provided, removes the fog from the map. */
fog?: Fog | null;
* If `undefined` is provided, removes the fog from the map. */
fog?: Fog;
/** Light properties of the map. */
light?: Light;
/** Terrain property of the style. Must conform to the Terrain Style Specification .
* If `null` is provided, removes terrain from the map. */
terrain?: TerrainSpecification | null;
* If `undefined` is provided, removes terrain from the map. */
terrain?: TerrainSpecification;
/** Default layers to query on pointer events */
interactiveLayerIds?: string[];
/** The projection the map should be rendered in

View File

@ -11,8 +11,8 @@ export default class Style {
this._loaded = false;
this._light = null;
this._fog = null;
this._terrain = null;
this._fog = undefined;
this._terrain = undefined;
this._sources = {};
this._layers = [];