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 |
- visibility
- skyType
- skyAtmosphereSun
- skyAtmosphereSunIntensity
- skyGradientCenter
- skyGradientRadius
- skyGradient
- skyAtmosphereHaloColor
- skyAtmosphereColor
- skyOpacity
Name: visibility
Whether this layer is displayed.
enum
visible
visible - The layer is shown.
none - The layer is not shown.
Name: skyType
The type of the sky
enum
atmosphere
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
.
Parameters: zoom
Name: skyAtmosphereSun
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.
array<number>
degrees
0,0
360,180
Parameters: zoom
Name: skyAtmosphereSunIntensity
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.
number
10
0
100
Name: skyGradientCenter
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.
array<number>
[0,0]
degrees
0,0
360,180
Parameters: zoom
Name: skyGradientRadius
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
.
number
90
0
180
Parameters: zoom
Name: skyGradient
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
.
color
interpolate,linear,sky-radial-progress,0.8,#87ceeb,1,white
Parameters: sky-radial-progress
Name: skyAtmosphereHaloColor
A color applied to the atmosphere sun halo. The alpha channel describes how strongly the sun halo is represented in an atmosphere sky layer.
color
white
Name: skyAtmosphereColor
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.
color
white
Name: skyOpacity
The opacity of the entire sky layer.
number
1
0
1
Parameters: zoom
skyOpacityTransition
The transition affecting any changes to this layer’s skyOpacity propery.
{ duration, delay }
milliseconds
{duration: 300, delay: 0}