Class Light
java.lang.Object
com.trimblemaps.mapsdk.style.light.Light
The global light source.
-
Method Summary
Modifier and TypeMethodDescriptionGet the Anchor property.getColor()Get the Color property.Get the Color property transition options.floatGet the Intensity property.Get the Intensity property transition options.Get the Position property.Get the Position property transition options.voidSet the Anchor property.voidsetColor(int color) Set the Color property.voidSet the Color property.voidsetColorTransition(TransitionOptions options) Set the Color property transition options.voidsetIntensity(float intensity) Set the Intensity property.voidsetIntensityTransition(TransitionOptions options) Set the Intensity property transition options.voidsetPosition(Position position) Set the Position property.voidsetPositionTransition(TransitionOptions options) Set the Position property transition options.
-
Method Details
-
setAnchor
Set the Anchor property. Whether extruded geometries are lit relative to the map or viewport.- Parameters:
anchor- as String
-
getAnchor
Get the Anchor property. Whether extruded geometries are lit relative to the map or viewport.- Returns:
- anchor as String
-
setPosition
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:
position- of the light
-
getPosition
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).- Returns:
- position as Position
-
getPositionTransition
Get the Position property transition options.- Returns:
- transition options for position
-
setPositionTransition
Set the Position property transition options.- Parameters:
options- transition options for position
-
setColor
public void setColor(@ColorInt int color) Set the Color property. Color tint for lighting extruded geometries.- Parameters:
color- as int
-
setColor
Set the Color property. Color tint for lighting extruded geometries.- Parameters:
color- as String
-
getColor
Get the Color property. Color tint for lighting extruded geometries.- Returns:
- color as String
-
getColorTransition
Get the Color property transition options.- Returns:
- transition options for color
-
setColorTransition
Set the Color property transition options.- Parameters:
options- transition options for color
-
setIntensity
public void setIntensity(float intensity) Set the Intensity property. Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.- Parameters:
intensity- as Float
-
getIntensity
@NonNull public float getIntensity()Get the Intensity property. Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.- Returns:
- intensity as Float
-
getIntensityTransition
Get the Intensity property transition options.- Returns:
- transition options for intensity
-
setIntensityTransition
Set the Intensity property transition options.- Parameters:
options- transition options for intensity
-