Skip to content

Latest commit

 

History

History
259 lines (165 loc) · 5.82 KB

SkyLayer.md

File metadata and controls

259 lines (165 loc) · 5.82 KB

<MapboxGL.SkyLayer />

SkyLayer is a spherical dome around the map that is always rendered behind all other layers

props

Prop Type Default Required Description
id string none true A string that uniquely identifies the source in the style to which it is added.
sourceID string MapboxGL.StyleSource.DefaultSourceID false The source from which to obtain the data to style.
If the source has not yet been added to the current style, the behavior is undefined.
aboveLayerID string none false Inserts a layer above aboveLayerID.
belowLayerID string none false Inserts a layer below belowLayerID
layerIndex number none false Inserts a layer at a specified index
filter array none false Filter only the features in the source layer that satisfy a condition that you define
style union none false Customizable style attributes

styles


visibility

Name: visibility

Description

Whether this layer is displayed.

Type

enum

Default Value

visible

Supported Values

visible - The layer is shown.
none - The layer is not shown.


skyType

Name: skyType

Description

The type of the sky

Type

enum

Default Value

atmosphere

Supported Values

gradient - Renders the sky with a gradient that can be configured with sky-gradient-radius and sky-gradient.
atmosphere - Renders the sky with a simulated atmospheric scattering algorithm, the sun direction can be attached to the light position or explicitly set through sky-atmosphere-sun.

Expression

Parameters: zoom


skyAtmosphereSun

Name: skyAtmosphereSun

Description

Position of the sun center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the sun relative to 0° north, where degrees proceed clockwise. The polar angle indicates the height of the sun, where 0° is directly above, at zenith, and 90° at the horizon. When this property is ommitted, the sun center is directly inherited from the light position.

Type

array<number>

Units

degrees

Minimum

0,0

Maximum

360,180

Expression

Parameters: zoom


skyAtmosphereSunIntensity

Name: skyAtmosphereSunIntensity

Description

Intensity of the sun as a light source in the atmosphere (on a scale from 0 to a 100). Setting higher values will brighten up the sky.

Type

number

Default Value

10

Minimum

0

Maximum

100


skyGradientCenter

Name: skyGradientCenter

Description

Position of the gradient center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the gradient center relative to 0° north, where degrees proceed clockwise. The polar angle indicates the height of the gradient center, where 0° is directly above, at zenith, and 90° at the horizon.

Type

array<number>

Default Value

[0,0]

Units

degrees

Minimum

0,0

Maximum

360,180

Expression

Parameters: zoom


skyGradientRadius

Name: skyGradientRadius

Description

The angular distance (measured in degrees) from skyGradientCenter up to which the gradient extends. A value of 180 causes the gradient to wrap around to the opposite direction from skyGradientCenter.

Type

number

Default Value

90

Minimum

0

Maximum

180

Expression

Parameters: zoom


skyGradient

Name: skyGradient

Description

Defines a radial color gradient with which to color the sky. The color values can be interpolated with an expression using skyRadialProgress. The range [0, 1] for the interpolant covers a radial distance (in degrees) of [0, skyGradientRadius] centered at the position specified by skyGradientCenter.

Type

color

Default Value

interpolate,linear,sky-radial-progress,0.8,#87ceeb,1,white

Expression

Parameters: sky-radial-progress


skyAtmosphereHaloColor

Name: skyAtmosphereHaloColor

Description

A color applied to the atmosphere sun halo. The alpha channel describes how strongly the sun halo is represented in an atmosphere sky layer.

Type

color

Default Value

white


skyAtmosphereColor

Name: skyAtmosphereColor

Description

A color used to tweak the main atmospheric scattering coefficients. Using white applies the default coefficients giving the natural blue color to the atmosphere. This color affects how heavily the corresponding wavelength is represented during scattering. The alpha channel describes the density of the atmosphere, with 1 maximum density and 0 no density.

Type

color

Default Value

white


skyOpacity

Name: skyOpacity

Description

The opacity of the entire sky layer.

Type

number

Default Value

1

Minimum

0

Maximum

1

Expression

Parameters: zoom


Name

skyOpacityTransition

Description

The transition affecting any changes to this layer’s skyOpacity propery.

Type

{ duration, delay }

Units

milliseconds

Default Value

{duration: 300, delay: 0}