Skip to content

Commit 109c334

Browse files
authored
Change fog and terrain types to match Mapbox types. (#2106)
1 parent 9baded6 commit 109c334

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

docs/api-reference/map.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,10 @@ The current cursor [type](https://developer.mozilla.org/en-US/docs/Web/CSS/curso
7373

7474
### Styling options
7575

76-
#### `fog`: [Fog](/docs/api-reference/types.md#fog) | null
76+
#### `fog`: [Fog](/docs/api-reference/types.md#fog)
7777

7878
The fog property of the style. Must conform to the [Fog Style Specification](https://docs.mapbox.com/mapbox-gl-js/style-spec/fog/).
79-
If `null` is provided, removes the fog from the map.
79+
If `undefined` is provided, removes the fog from the map.
8080

8181
#### `light`: [Light](/docs/api-reference/types.md#light)
8282

@@ -109,7 +109,7 @@ Enable diffing when `mapStyle` changes. If `false`, force a 'full' update, remov
109109
#### `terrain`: [TerrainSpecification](/docs/api-reference/types.md#terrainspecification)
110110

111111
Terrain property of the style. Must conform to the [Terrain Style Specification](https://docs.mapbox.com/mapbox-gl-js/style-spec/terrain/).
112-
If `null` is provided, removes terrain from the map.
112+
If `undefined` is provided, removes terrain from the map.
113113

114114

115115
### Camera options

src/mapbox/mapbox.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -257,13 +257,13 @@ export type MapboxProps = Partial<ViewState> & {
257257
*/
258258
styleDiffing?: boolean;
259259
/** The fog property of the style. Must conform to the Fog Style Specification .
260-
* If `null` is provided, removes the fog from the map. */
261-
fog?: Fog | null;
260+
* If `undefined` is provided, removes the fog from the map. */
261+
fog?: Fog;
262262
/** Light properties of the map. */
263263
light?: Light;
264264
/** Terrain property of the style. Must conform to the Terrain Style Specification .
265-
* If `null` is provided, removes terrain from the map. */
266-
terrain?: TerrainSpecification | null;
265+
* If `undefined` is provided, removes terrain from the map. */
266+
terrain?: TerrainSpecification;
267267
/** Default layers to query on pointer events */
268268
interactiveLayerIds?: string[];
269269
/** The projection the map should be rendered in

test/src/utils/mapbox-gl-mock/style.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ export default class Style {
1111

1212
this._loaded = false;
1313
this._light = null;
14-
this._fog = null;
15-
this._terrain = null;
14+
this._fog = undefined;
15+
this._terrain = undefined;
1616

1717
this._sources = {};
1818
this._layers = [];

0 commit comments

Comments
 (0)