Skip to content

Commit

Permalink
Change fog and terrain types to match Mapbox types. (#2106)
Browse files Browse the repository at this point in the history
  • Loading branch information
fpsampayo authored Jan 21, 2023
1 parent 9baded6 commit 109c334
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions docs/api-reference/map.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions src/mapbox/mapbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions test/src/utils/mapbox-gl-mock/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];
Expand Down

0 comments on commit 109c334

Please sign in to comment.