Class Light

java.lang.Object
com.trimblemaps.mapsdk.style.light.Light

@UiThread public class Light extends Object
The global light source.
  • Method Details

    • setAnchor

      public void setAnchor(String anchor)
      Set the Anchor property. Whether extruded geometries are lit relative to the map or viewport.
      Parameters:
      anchor - as String
    • getAnchor

      @NonNull public String getAnchor()
      Get the Anchor property. Whether extruded geometries are lit relative to the map or viewport.
      Returns:
      anchor as String
    • setPosition

      public void setPosition(@NonNull 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:
      position - of the light
    • getPosition

      @NonNull public Position 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

      @NonNull public TransitionOptions getPositionTransition()
      Get the Position property transition options.
      Returns:
      transition options for position
    • setPositionTransition

      public void setPositionTransition(@NonNull TransitionOptions options)
      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

      public void setColor(String color)
      Set the Color property. Color tint for lighting extruded geometries.
      Parameters:
      color - as String
    • getColor

      @NonNull public String getColor()
      Get the Color property. Color tint for lighting extruded geometries.
      Returns:
      color as String
    • getColorTransition

      @NonNull public TransitionOptions getColorTransition()
      Get the Color property transition options.
      Returns:
      transition options for color
    • setColorTransition

      public void setColorTransition(@NonNull TransitionOptions options)
      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

      @NonNull public TransitionOptions getIntensityTransition()
      Get the Intensity property transition options.
      Returns:
      transition options for intensity
    • setIntensityTransition

      public void setIntensityTransition(@NonNull TransitionOptions options)
      Set the Intensity property transition options.
      Parameters:
      options - transition options for intensity