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

Atmosphere
Link copied to clipboard
fun Atmosphere()

Functions

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

Bind atmosphere to the map controller.

color
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.

colorTransition
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
highColor
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.

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

Set the HighColor property transition options.

open override fun highColorTransition(block: StyleTransition.Builder.() -> Unit): Atmosphere
horizonBlend
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.

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

Set the HorizonBlend property transition options.

open override fun horizonBlendTransition(block: StyleTransition.Builder.() -> Unit): Atmosphere
range
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.

rangeTransition
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
spaceColor
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.

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

Set the SpaceColor property transition options.

open override fun spaceColorTransition(block: StyleTransition.Builder.() -> Unit): Atmosphere
starIntensity
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.

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

Set the StarIntensity property transition options.

open override fun starIntensityTransition(block: StyleTransition.Builder.() -> Unit): Atmosphere

Properties

color
Link copied to clipboard
val color: String?

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.

colorAsColorInt
Link copied to clipboard
val colorAsColorInt: Int?

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.

colorAsExpression
Link copied to clipboard
val colorAsExpression: Expression?

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.

colorTransition
Link copied to clipboard
val colorTransition: StyleTransition?

Color property transition options.

highColor
Link copied to clipboard
val highColor: String?

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.

highColorAsColorInt
Link copied to clipboard
val highColorAsColorInt: Int?

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.

highColorAsExpression
Link copied to clipboard
val highColorAsExpression: Expression?

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.

highColorTransition
Link copied to clipboard
val highColorTransition: StyleTransition?

HighColor property transition options.

horizonBlend
Link copied to clipboard
val horizonBlend: Double?

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.

horizonBlendAsExpression
Link copied to clipboard
val horizonBlendAsExpression: Expression?

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.

horizonBlendTransition
Link copied to clipboard
val horizonBlendTransition: StyleTransition?

HorizonBlend property transition options.

range
Link copied to clipboard
val range: List<Double>?

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.

rangeAsExpression
Link copied to clipboard
val rangeAsExpression: Expression?

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.

rangeTransition
Link copied to clipboard
val rangeTransition: StyleTransition?

Range property transition options.

spaceColor
Link copied to clipboard
val spaceColor: String?

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.

spaceColorAsColorInt
Link copied to clipboard
val spaceColorAsColorInt: Int?

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.

spaceColorAsExpression
Link copied to clipboard
val spaceColorAsExpression: Expression?

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.

spaceColorTransition
Link copied to clipboard
val spaceColorTransition: StyleTransition?

SpaceColor property transition options.

starIntensity
Link copied to clipboard
val starIntensity: Double?

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

starIntensityAsExpression
Link copied to clipboard
val starIntensityAsExpression: Expression?

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

starIntensityTransition
Link copied to clipboard
val starIntensityTransition: StyleTransition?

StarIntensity property transition options.