Atmosphere

A global effect that fades layers and markers based on their distance to the camera. The fog can be used to approximate the effect of atmosphere on distant objects and enhance the depth perception of the map when used with terrain or 3D features. Note: fog is renamed to atmosphere in the Android and iOS SDKs and planned to be changed in GL-JS v.3.0.0.

See also

Constructors

Link copied to clipboard

Functions

Link copied to clipboard
open override fun bindTo(delegate: MapboxStyleManager)

Bind atmosphere to the map controller.

Link copied to clipboard
open override fun color(color: Expression): Atmosphere
open override fun color(@ColorInt color: Int): Atmosphere
open override fun color(color: String): Atmosphere

The color of the atmosphere region immediately below the horizon and within the range and above the horizon and within horizon-blend. Using opacity is recommended only for smoothly transitioning fog on/off as anything less than 100% opacity results in more tiles loaded and drawn.

Link copied to clipboard
open override fun colorTransition(options: StyleTransition): Atmosphere

Set the Color property transition options.

open override fun colorTransition(block: StyleTransition.Builder.() -> Unit): Atmosphere
Link copied to clipboard
open override fun highColor(highColor: Expression): Atmosphere
open override fun highColor(@ColorInt highColor: Int): Atmosphere
open override fun highColor(highColor: String): Atmosphere

The color of the atmosphere region above the horizon, high-color extends further above the horizon than the color property and its spread can be controlled with horizon-blend. The opacity can be set to 0 to remove the high atmosphere color contribution.

Link copied to clipboard
open override fun highColorTransition(options: StyleTransition): Atmosphere

Set the HighColor property transition options.

Link copied to clipboard
open override fun horizonBlend(horizonBlend: Expression): Atmosphere
open override fun horizonBlend(horizonBlend: Double): Atmosphere

Horizon blend applies a smooth fade from the color of the atmosphere to the color of space. A value of zero leaves a sharp transition from atmosphere to space. Increasing the value blends the color of atmosphere into increasingly high angles of the sky.

Link copied to clipboard

Set the HorizonBlend property transition options.

Link copied to clipboard
open override fun range(range: Expression): Atmosphere
open override fun range(range: List<Double>): Atmosphere

The start and end distance range in which fog fades from fully transparent to fully opaque. The distance to the point at the center of the map is defined as zero, so that negative range values are closer to the camera, and positive values are farther away.

Link copied to clipboard
open override fun rangeTransition(options: StyleTransition): Atmosphere

Set the Range property transition options.

open override fun rangeTransition(block: StyleTransition.Builder.() -> Unit): Atmosphere
Link copied to clipboard
open override fun spaceColor(spaceColor: Expression): Atmosphere
open override fun spaceColor(@ColorInt spaceColor: Int): Atmosphere
open override fun spaceColor(spaceColor: String): Atmosphere

The color of the region above the horizon and after the end of the horizon-blend contribution. The opacity can be set to 0 to have a transparent background.

Link copied to clipboard
open override fun spaceColorTransition(options: StyleTransition): Atmosphere

Set the SpaceColor property transition options.

Link copied to clipboard
open override fun starIntensity(starIntensity: Expression): Atmosphere
open override fun starIntensity(starIntensity: Double): Atmosphere

A value controlling the star intensity where 0 will show no stars and 1 will show stars at their maximum intensity.

Link copied to clipboard

Set the StarIntensity property transition options.

Link copied to clipboard
open override fun verticalRange(verticalRange: Expression): Atmosphere
open override fun verticalRange(verticalRange: List<Double>): Atmosphere

An array of two number values, specifying the vertical range, measured in meters, over which the fog should gradually fade out. When both parameters are set to zero, the fog will be rendered without any vertical constraints.

Link copied to clipboard

Set the VerticalRange property transition options.

Properties

Link copied to clipboard

The color of the atmosphere region immediately below the horizon and within the range and above the horizon and within horizon-blend. Using opacity is recommended only for smoothly transitioning fog on/off as anything less than 100% opacity results in more tiles loaded and drawn.

Link copied to clipboard

The color of the atmosphere region immediately below the horizon and within the range and above the horizon and within horizon-blend. Using opacity is recommended only for smoothly transitioning fog on/off as anything less than 100% opacity results in more tiles loaded and drawn.

Link copied to clipboard

The color of the atmosphere region immediately below the horizon and within the range and above the horizon and within horizon-blend. Using opacity is recommended only for smoothly transitioning fog on/off as anything less than 100% opacity results in more tiles loaded and drawn.

Link copied to clipboard

Color property transition options.

Link copied to clipboard

The color of the atmosphere region above the horizon, high-color extends further above the horizon than the color property and its spread can be controlled with horizon-blend. The opacity can be set to 0 to remove the high atmosphere color contribution.

Link copied to clipboard

The color of the atmosphere region above the horizon, high-color extends further above the horizon than the color property and its spread can be controlled with horizon-blend. The opacity can be set to 0 to remove the high atmosphere color contribution.

Link copied to clipboard

The color of the atmosphere region above the horizon, high-color extends further above the horizon than the color property and its spread can be controlled with horizon-blend. The opacity can be set to 0 to remove the high atmosphere color contribution.

Link copied to clipboard

HighColor property transition options.

Link copied to clipboard

Horizon blend applies a smooth fade from the color of the atmosphere to the color of space. A value of zero leaves a sharp transition from atmosphere to space. Increasing the value blends the color of atmosphere into increasingly high angles of the sky.

Link copied to clipboard

Horizon blend applies a smooth fade from the color of the atmosphere to the color of space. A value of zero leaves a sharp transition from atmosphere to space. Increasing the value blends the color of atmosphere into increasingly high angles of the sky.

Link copied to clipboard

HorizonBlend property transition options.

Link copied to clipboard

The start and end distance range in which fog fades from fully transparent to fully opaque. The distance to the point at the center of the map is defined as zero, so that negative range values are closer to the camera, and positive values are farther away.

Link copied to clipboard

The start and end distance range in which fog fades from fully transparent to fully opaque. The distance to the point at the center of the map is defined as zero, so that negative range values are closer to the camera, and positive values are farther away.

Link copied to clipboard

Range property transition options.

Link copied to clipboard

The color of the region above the horizon and after the end of the horizon-blend contribution. The opacity can be set to 0 to have a transparent background.

Link copied to clipboard

The color of the region above the horizon and after the end of the horizon-blend contribution. The opacity can be set to 0 to have a transparent background.

Link copied to clipboard

The color of the region above the horizon and after the end of the horizon-blend contribution. The opacity can be set to 0 to have a transparent background.

Link copied to clipboard

SpaceColor property transition options.

Link copied to clipboard

A value controlling the star intensity where 0 will show no stars and 1 will show stars at their maximum intensity.

Link copied to clipboard

A value controlling the star intensity where 0 will show no stars and 1 will show stars at their maximum intensity.

Link copied to clipboard

StarIntensity property transition options.

Link copied to clipboard

An array of two number values, specifying the vertical range, measured in meters, over which the fog should gradually fade out. When both parameters are set to zero, the fog will be rendered without any vertical constraints.

Link copied to clipboard

An array of two number values, specifying the vertical range, measured in meters, over which the fog should gradually fade out. When both parameters are set to zero, the fog will be rendered without any vertical constraints.

Link copied to clipboard

VerticalRange property transition options.