LightDslReceiver

interface LightDslReceiver

This Interface contains all the functions that will be exposed to Koltin DSL.

Separated the DSL receiver class to this interface to avoid IDE code suggestion for property getters.

Functions

anchor
Link copied to clipboard
abstract fun anchor(anchor: Expression): Light
abstract fun anchor(anchor: Anchor = Anchor.VIEWPORT): Light

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

color
Link copied to clipboard
abstract fun color(color: Expression): Light
abstract fun color(@ColorInt color: Int): Light
abstract fun color(color: String = "#ffffff"): Light

Color tint for lighting extruded geometries.

colorTransition
Link copied to clipboard
abstract fun colorTransition(options: StyleTransition): Light

Set the Color property transition options.

abstract fun colorTransition(block: StyleTransition.Builder.() -> Unit): Light
intensity
Link copied to clipboard
abstract fun intensity(intensity: Expression): Light
abstract fun intensity(intensity: Double = 0.5): Light

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

intensityTransition
Link copied to clipboard
abstract fun intensityTransition(options: StyleTransition): Light

Set the Intensity property transition options.

abstract fun intensityTransition(block: StyleTransition.Builder.() -> Unit): Light
position
Link copied to clipboard
abstract fun position(position: Expression): Light
abstract fun position(position: LightPosition = LightPosition(1.15, 210.0, 30.0)): Light
abstract fun position(radialCoordinate: Double, azimuthalAngle: Double, polarAngle: Double): Light

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

positionTransition
Link copied to clipboard
abstract fun positionTransition(options: StyleTransition): Light

Set the Position property transition options.

abstract fun positionTransition(block: StyleTransition.Builder.() -> Unit): Light

Inheritors

Light
Link copied to clipboard