Class HeatmapLayer

java.lang.Object
com.trimblemaps.mapsdk.style.layers.Layer
com.trimblemaps.mapsdk.style.layers.HeatmapLayer

@UiThread public class HeatmapLayer extends Layer
A heatmap.
  • Constructor Details

    • HeatmapLayer

      public HeatmapLayer(String layerId, String sourceId)
      Creates a HeatmapLayer.
      Parameters:
      layerId - the id of the layer
      sourceId - the id of the source
  • Method Details

    • initialize

      protected void initialize(String layerId, String sourceId)
    • setSourceLayer

      public void setSourceLayer(String sourceLayer)
      Set the source layer.
      Parameters:
      sourceLayer - the source layer to set
    • withSourceLayer

      @NonNull public HeatmapLayer withSourceLayer(String sourceLayer)
      Set the source Layer.
      Parameters:
      sourceLayer - the source layer to set
      Returns:
      This
    • getSourceId

      @NonNull public String getSourceId()
      Get the source id.
      Returns:
      id of the source
    • getSourceLayer

      @NonNull public String getSourceLayer()
      Get the source layer.
      Returns:
      sourceLayer the source layer to get
    • setFilter

      public void setFilter(@NonNull Expression filter)
      Set a single expression filter.
      Parameters:
      filter - the expression filter to set
    • withFilter

      @NonNull public HeatmapLayer withFilter(@NonNull Expression filter)
      Set a single expression filter.
      Parameters:
      filter - the expression filter to set
      Returns:
      This
    • getFilter

      @Nullable public Expression getFilter()
      Get a single expression filter.
      Returns:
      the expression filter to get
    • withProperties

      @NonNull public HeatmapLayer withProperties(@NonNull PropertyValue<?>... properties)
      Set a property or properties.
      Parameters:
      properties - the var-args properties
      Returns:
      This
    • getHeatmapRadius

      @NonNull public PropertyValue<Float> getHeatmapRadius()
      Get the HeatmapRadius property
      Returns:
      property wrapper value around Float
    • getHeatmapRadiusTransition

      @NonNull public TransitionOptions getHeatmapRadiusTransition()
      Get the HeatmapRadius property transition options
      Returns:
      transition options for Float
    • setHeatmapRadiusTransition

      public void setHeatmapRadiusTransition(@NonNull TransitionOptions options)
      Set the HeatmapRadius property transition options
      Parameters:
      options - transition options for Float
    • getHeatmapWeight

      @NonNull public PropertyValue<Float> getHeatmapWeight()
      Get the HeatmapWeight property
      Returns:
      property wrapper value around Float
    • getHeatmapIntensity

      @NonNull public PropertyValue<Float> getHeatmapIntensity()
      Get the HeatmapIntensity property
      Returns:
      property wrapper value around Float
    • getHeatmapIntensityTransition

      @NonNull public TransitionOptions getHeatmapIntensityTransition()
      Get the HeatmapIntensity property transition options
      Returns:
      transition options for Float
    • setHeatmapIntensityTransition

      public void setHeatmapIntensityTransition(@NonNull TransitionOptions options)
      Set the HeatmapIntensity property transition options
      Parameters:
      options - transition options for Float
    • getHeatmapColor

      @NonNull public PropertyValue<String> getHeatmapColor()
      Get the HeatmapColor property
      Returns:
      property wrapper value around String
    • getHeatmapColorAsInt

      @ColorInt public int getHeatmapColorAsInt()
      Defines the color of each pixel based on its density value in a heatmap. Should be an expression that uses `["heatmap-density"]` as input.
      Returns:
      int representation of a rgba string color
      Throws:
      RuntimeException - thrown if property isn't a value
    • getHeatmapOpacity

      @NonNull public PropertyValue<Float> getHeatmapOpacity()
      Get the HeatmapOpacity property
      Returns:
      property wrapper value around Float
    • getHeatmapOpacityTransition

      @NonNull public TransitionOptions getHeatmapOpacityTransition()
      Get the HeatmapOpacity property transition options
      Returns:
      transition options for Float
    • setHeatmapOpacityTransition

      public void setHeatmapOpacityTransition(@NonNull TransitionOptions options)
      Set the HeatmapOpacity property transition options
      Parameters:
      options - transition options for Float
    • finalize

      protected void finalize() throws Throwable
      Overrides:
      finalize in class Layer
      Throws:
      Throwable