Package com.mapbox.mapboxsdk.style.light
Contains the Mapbox Maps Android Style Light API classes.
Types
Name | Summary |
---|---|
Light | @UiThread() open class Light The global light source. |
Position | open class Position Position of the light source relative to lit (extruded) geometries. |
Light
@UiThread()
open class Light
The global light source.
See also
Name | Summary |
---|---|
The online documentation | The online documentation |
Constructors
Name | Summary |
---|---|
Light | open fun Light(nativePtr: Long)Creates a Light. |
Functions
Name | Summary |
---|---|
getAnchor | @NonNull() open fun getAnchor(): String Get the Anchor property. |
getColor | @NonNull() open fun getColor(): String Get the Color property. |
getColorTransition | @NonNull() open fun getColorTransition(): TransitionOptions Get the Color property transition options. |
getIntensity | @NonNull() open fun getIntensity(): Float Get the Intensity property. |
getIntensityTransition | @NonNull() open fun getIntensityTransition(): TransitionOptions Get the Intensity property transition options. |
getPosition | @NonNull() open fun getPosition(): Position Get the Position property. |
getPositionTransition | @NonNull() open fun getPositionTransition(): TransitionOptions Get the Position property transition options. |
setAnchor | open fun setAnchor(anchor: String) Set the Anchor property. |
setColor | open fun setColor(color: Int) open fun setColor(color: String) Set the Color property. |
setColorTransition | open fun setColorTransition(options: TransitionOptions) Set the Color property transition options. |
setIntensity | open fun setIntensity(intensity: Float) Set the Intensity property. |
setIntensityTransition | open fun setIntensityTransition(options: TransitionOptions) Set the Intensity property transition options. |
setPosition | open fun setPosition(position: Position) Set the Position property. |
setPositionTransition | open fun setPositionTransition(options: TransitionOptions) Set the Position property transition options. |
getAnchor
@NonNull()
open fun getAnchor(): String
Get the Anchor property. Whether extruded geometries are lit relative to the map or viewport.
Return
anchor as String
getColorTransition
@NonNull()
open fun getColorTransition(): TransitionOptions
Get the Color property transition options.
Return
transition options for color
getColor
@NonNull()
open fun getColor(): String
Get the Color property. Color tint for lighting extruded geometries.
Return
color as String
getIntensityTransition
@NonNull()
open fun getIntensityTransition(): TransitionOptions
Get the Intensity property transition options.
Return
transition options for intensity
getIntensity
@NonNull()
open fun getIntensity(): Float
Get the Intensity property. Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.
Return
intensity as Float
getPositionTransition
@NonNull()
open fun getPositionTransition(): TransitionOptions
Get the Position property transition options.
Return
transition options for position
getPosition
@NonNull()
open fun getPosition(): Position
Get 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° (0° when light.anchor
is set to viewport
corresponds to the top of the viewport, or 0° 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°, directly above, to 180°, directly below).
Return
position as Position
setAnchor
open fun setAnchor(anchor: String)
Set the Anchor property. Whether extruded geometries are lit relative to the map or viewport.
Parameters
Name | Summary |
---|---|
anchor | as String |
setColorTransition
open fun setColorTransition(options: TransitionOptions)
Set the Color property transition options.
Parameters
Name | Summary |
---|---|
options | transition options for color |
setColor
open fun setColor(color: Int)
Set the Color property. Color tint for lighting extruded geometries.
Parameters
Name | Summary |
---|---|
color | as int |
open fun setColor(color: String)
Set the Color property. Color tint for lighting extruded geometries.
Parameters
Name | Summary |
---|---|
color | as String |
setIntensityTransition
open fun setIntensityTransition(options: TransitionOptions)
Set the Intensity property transition options.
Parameters
Name | Summary |
---|---|
options | transition options for intensity |
setIntensity
open fun setIntensity(intensity: Float)
Set the Intensity property. Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.
Parameters
Name | Summary |
---|---|
intensity | as Float |
setPositionTransition
open fun setPositionTransition(options: TransitionOptions)
Set the Position property transition options.
Parameters
Name | Summary |
---|---|
options | transition options for position |
setPosition
open fun setPosition(position: Position)
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° (0° when light.anchor
is set to viewport
corresponds to the top of the viewport, or 0° 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°, directly above, to 180°, directly below).
Parameters
Name | Summary |
---|---|
position | of the light |
Position
open class Position
Position of the light source relative to lit (extruded) geometries.
The position is constructed out of a radial coordinate, an azimuthal angle and a polar angle. where the radial coordinate indicates the distance from the center of the base of an object to its light, the azimuthal angle indicates the position of the light relative to 0° (0° when com.mapbox.mapboxsdk.style.layers.Property.ANCHOR is set to viewport corresponds to the top of the viewport, or 0° when com.mapbox.mapboxsdk.style.layers.Property.ANCHOR is set to map corresponds to due north, and degrees proceed clockwise), and polar indicates the height of the light (from 0°, directly above, to 180°, directly below).
Constructors
Name | Summary |
---|---|
Position | open fun Position(radialCoordinate: Float, azimuthalAngle: Float, polarAngle: Float)Creates a Position from a radial coordinate, an azimuthal angle and a polar angle. |
Functions
Name | Summary |
---|---|
equals | open fun equals(o: Any): Boolean |
fromPosition | open fun fromPosition(radialCoordinate: Float, azimuthalAngle: Float, polarAngle: Float): Position Returns a Position from a radial coordinate, an azimuthal angle and a polar angle |
hashCode | open fun hashCode(): Int |
toString | @NonNull() open fun toString(): String |
equals
open fun equals(o: Any): Boolean
fromPosition
open fun fromPosition(radialCoordinate: Float, azimuthalAngle: Float, polarAngle: Float): Position
Returns a Position from a radial coordinate, an azimuthal angle and a polar angle
Return
the created Position object
Parameters
Name | Summary |
---|---|
radialCoordinate | the radial coordinate |
azimuthalAngle | the azimuthal angle |
polarAngle | the polar angle |
hashCode
open fun hashCode(): Int
toString
@NonNull()
open fun toString(): String
Android SDK
SDK JS Reference
- Root
- attribution
- camera
- constants
- exceptions
- geometry
- http
- location
- location.engine
- location.modes
- location.permissions
- log
- maps
- maps.renderer
- maps.renderer.egl
- maps.renderer.glsurfaceview
- maps.renderer.textureview
- maps.widgets
- module.http
- module.loader
- net
- offline
- snapshotter
- storage
- style.expressions
- style.layers
- style.light
- style.sources
- style.types
- text
- utils