Light

The global light source.

class Light : LightDslReceiver, StyleContract.StyleLightExtension

See also

<a href="https://www.mapbox.com/mapbox-gl-style-spec/#light">The online documentation</a>

Constructors

Light
Link copied to clipboard
fun Light()

Types

Companion
Link copied to clipboard

Static variables and methods.

object Companion

Functions

anchor
Link copied to clipboard

Set the Anchor property

open override fun anchor(anchor: Expression): Light

Set the Anchor property.

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

open override fun anchor(anchor: Anchor): Light
bindTo
Link copied to clipboard

Bind the light to the map controller.

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

Set the Color property

open override fun color(color: Expression): Light

Set the Color property.

open override fun color(color: Int): Light

Set the Color property.

Color tint for lighting extruded geometries.

open override fun color(color: String): Light
colorTransition
Link copied to clipboard

Set the Color property transition options.

open override fun colorTransition(options: StyleTransition): Light
open override fun colorTransition(block: StyleTransition.Builder.() -> Unit): Light
equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
open override fun hashCode(): Int
intensity
Link copied to clipboard

Set the Intensity property

open override fun intensity(intensity: Expression): Light

Set the Intensity property.

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

open override fun intensity(intensity: Double): Light
intensityTransition
Link copied to clipboard

Set the Intensity property transition options.

open override fun intensityTransition(options: StyleTransition): Light
open override fun intensityTransition(block: StyleTransition.Builder.() -> Unit): Light
position
Link copied to clipboard

Set the Position property

open override fun position(position: Expression): Light

Set the Position property.

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&#xB0; (0&#xB0; when light.anchor is set to viewport corresponds to the top of the viewport, or 0&#xB0; 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&#xB0;, directly above, to 180&#xB0;, directly below).

open override fun position(position: LightPosition): Light

DSL for setting LightPosition.

open override fun position(radialCoordinate: Double, azimuthalAngle: Double, polarAngle: Double): Light
positionTransition
Link copied to clipboard

Set the Position property transition options.

open override fun positionTransition(options: StyleTransition): Light
open override fun positionTransition(block: StyleTransition.Builder.() -> Unit): Light
toString
Link copied to clipboard
open override fun toString(): String

Properties

anchor
Link copied to clipboard

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

val anchor: Anchor?
anchorAsExpression
Link copied to clipboard

This is an Expression representation of "anchor".

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

val anchorAsExpression: Expression?
color
Link copied to clipboard

Color tint for lighting extruded geometries.

val color: String?
colorAsColorInt
Link copied to clipboard

Color tint for lighting extruded geometries.

val colorAsColorInt: Int?
colorAsExpression
Link copied to clipboard

This is an Expression representation of "color".

Color tint for lighting extruded geometries.

val colorAsExpression: Expression?
colorTransition
Link copied to clipboard

Color property transition options.

val colorTransition: StyleTransition?
intensity
Link copied to clipboard

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

val intensity: Double?
intensityAsExpression
Link copied to clipboard

This is an Expression representation of "intensity".

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

val intensityAsExpression: Expression?
intensityTransition
Link copied to clipboard

Intensity property transition options.

val intensityTransition: StyleTransition?
position
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&#xB0; (0&#xB0; when light.anchor is set to viewport corresponds to the top of the viewport, or 0&#xB0; 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&#xB0;, directly above, to 180&#xB0;, directly below).

val position: LightPosition?
positionAsExpression
Link copied to clipboard

This is an Expression representation of "position".

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&#xB0; (0&#xB0; when light.anchor is set to viewport corresponds to the top of the viewport, or 0&#xB0; 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&#xB0;, directly above, to 180&#xB0;, directly below).

val positionAsExpression: Expression?
positionTransition
Link copied to clipboard

Position property transition options.

val positionTransition: StyleTransition?