FlatLight

A global directional light source which is only applied on 3D and hillshade layers. Using this type disables other light sources.

Check the online documentation.

Functions

Link copied to clipboard
open override fun anchor(anchor: Expression): FlatLight
open override fun anchor(anchor: Anchor): FlatLight

Whether extruded geometries are lit relative to the map or viewport.

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

Bind the light to the Style.

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

Color tint for lighting extruded geometries.

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

Set the Color property transition options.

open override fun colorTransition(block: StyleTransition.Builder.() -> Unit): FlatLight
Link copied to clipboard
open override fun intensity(intensity: Expression): FlatLight
open override fun intensity(intensity: Double): FlatLight

Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.

Link copied to clipboard
open override fun intensityTransition(options: StyleTransition): FlatLight

Set the Intensity property transition options.

Link copied to clipboard
open override fun position(position: Expression): FlatLight
open override fun position(position: LightPosition): FlatLight
open override fun position(radialCoordinate: Double, azimuthalAngle: Double, polarAngle: Double): FlatLight

Position of the light source relative to lit (extruded) geometries, in r radial coordinate, a azimuthal angle, p polar angle where r indicates the distance from the center of the base of an object to its light, a indicates the position of the light relative to 0 degree (0 degree when light.anchor is set to viewport corresponds to the top of the viewport, or 0 degree when light.anchor is set to map corresponds to due north, and degrees proceed clockwise), and p indicates the height of the light (from 0 degree, directly above, to 180 degree, directly below).

Link copied to clipboard
open override fun positionTransition(options: StyleTransition): FlatLight

Set the Position property transition options.

open override fun positionTransition(block: StyleTransition.Builder.() -> Unit): FlatLight

Properties

Link copied to clipboard

Whether extruded geometries are lit relative to the map or viewport.

Link copied to clipboard

Whether extruded geometries are lit relative to the map or viewport.

Link copied to clipboard

Color tint for lighting extruded geometries.

Link copied to clipboard

Color tint for lighting extruded geometries.

Link copied to clipboard

Color tint for lighting extruded geometries.

Link copied to clipboard

Color property transition options.

Link copied to clipboard

Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.

Link copied to clipboard

Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.

Link copied to clipboard

Intensity property transition options.

Link copied to clipboard
open override val lightId: String

The ID of the Light.

Link copied to clipboard

Position of the light source relative to lit (extruded) geometries, in r radial coordinate, a azimuthal angle, p polar angle where r indicates the distance from the center of the base of an object to its light, a indicates the position of the light relative to 0 degree (0 degree when light.anchor is set to viewport corresponds to the top of the viewport, or 0 degree when light.anchor is set to map corresponds to due north, and degrees proceed clockwise), and p indicates the height of the light (from 0 degree, directly above, to 180 degree, directly below).

Link copied to clipboard

Position of the light source relative to lit (extruded) geometries, in r radial coordinate, a azimuthal angle, p polar angle where r indicates the distance from the center of the base of an object to its light, a indicates the position of the light relative to 0 degree (0 degree when light.anchor is set to viewport corresponds to the top of the viewport, or 0 degree when light.anchor is set to map corresponds to due north, and degrees proceed clockwise), and p indicates the height of the light (from 0 degree, directly above, to 180 degree, directly below).

Link copied to clipboard

Position property transition options.