Atmosphere State
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
Types
Functions
Properties
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. Default value: "#ffffff".
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. Default value: "["interpolate","linear","zoom",4,0.2,7,0.1]". Value range: 0, 1
Defines the transition of horizonBlend. Default value: "["interpolate","linear","zoom",4,0.2,7,0.1]". Value range: 0, 1
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. Default value: 0.5,10. Value range: -20, 20
Defines the transition of range. Default value: 0.5,10. Value range: -20, 20
Defines the transition of spaceColor. Default value: "["interpolate","linear","zoom",4,"#010b19",7,"#367ab9"]".
Defines the transition of starIntensity. Default value: "["interpolate","linear","zoom",5,0.35,6,0]". Value range: 0, 1
Defines the transition of verticalRange. Default value: 0,0. Minimum value: 0.