SkyLayer

fun SkyLayer(layerId: String = remember { generateRandomLayerId("sky") }, skyAtmosphereColor: SkyAtmosphereColor = SkyAtmosphereColor.default, skyAtmosphereHaloColor: SkyAtmosphereHaloColor = SkyAtmosphereHaloColor.default, skyAtmosphereSun: SkyAtmosphereSun = SkyAtmosphereSun.default, skyAtmosphereSunIntensity: SkyAtmosphereSunIntensity = SkyAtmosphereSunIntensity.default, skyGradient: SkyGradient = SkyGradient.default, skyGradientCenter: SkyGradientCenter = SkyGradientCenter.default, skyGradientRadius: SkyGradientRadius = SkyGradientRadius.default, skyOpacity: SkyOpacity = SkyOpacity.default, skyOpacityTransition: Transition = Transition.default, skyType: SkyType = SkyType.default, visibility: Visibility = Visibility.default, minZoom: MinZoom = MinZoom.default, maxZoom: MaxZoom = MaxZoom.default, sourceLayer: SourceLayer = SourceLayer.default, filter: Filter = Filter.default)

A spherical dome around the map that is always rendered behind all other layers.

Warning: As of v10.6.0, Atmosphere is the preferred method for atmospheric styling. Sky layer is not supported by the globe projection, and will be phased out in future major release.

See also

Parameters

layerId

the ID of the layer, by default, a random id will be generated with UUID.

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.

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.

skyAtmosphereSun

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

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.

skyGradient

Defines a radial color gradient with which to color the sky. The color values can be interpolated with an expression using sky-radial-progress. The range 0, 1 for the interpolant covers a radial distance (in degrees) of 0, `sky-gradient-radius` centered at the position specified by sky-gradient-center.

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 degree north, where degrees proceed clockwise. The polar angle indicates the height of the gradient center, where 0 degree is directly above, at zenith, and 90 degree at the horizon.

skyGradientRadius

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

skyOpacity

The opacity of the entire sky layer.

skyType

The type of the sky

visibility

Whether this layer is displayed.

minZoom

The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden.

maxZoom

The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden.

sourceLayer

Layer to use from a vector tile source. Required for vector tile sources; prohibited for all other source types, including GeoJSON sources.

filter

An expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The ["feature-state", ...] expression is not supported in filter expressions. The ["pitch"] and ["distance-from-center"] expressions are supported only for filter expressions on the symbol layer.