Class FillManager

java.lang.Object
com.trimblemaps.mapsdk.plugins.annotation.AnnotationManager<com.trimblemaps.mapsdk.style.layers.FillLayer,Fill,FillOptions,OnFillDragListener,OnFillClickListener,OnFillLongClickListener>
com.trimblemaps.mapsdk.plugins.annotation.FillManager

public class FillManager extends AnnotationManager<com.trimblemaps.mapsdk.style.layers.FillLayer,Fill,FillOptions,OnFillDragListener,OnFillClickListener,OnFillLongClickListener>
The fill manager allows to add fills to a map.
  • Constructor Details

    • FillManager

      @UiThread public FillManager(@NonNull com.trimblemaps.mapsdk.maps.MapView mapView, @NonNull com.trimblemaps.mapsdk.maps.TrimbleMapsMap trimbleMapsMap, @NonNull com.trimblemaps.mapsdk.maps.Style style)
      Create a fill manager, used to manage fills.
      Parameters:
      trimbleMapsMap - the map object to add fills to
      style - a valid a fully loaded style object
    • FillManager

      @UiThread public FillManager(@NonNull com.trimblemaps.mapsdk.maps.MapView mapView, @NonNull com.trimblemaps.mapsdk.maps.TrimbleMapsMap trimbleMapsMap, @NonNull com.trimblemaps.mapsdk.maps.Style style, @Nullable String belowLayerId)
      Create a fill manager, used to manage fills.
      Parameters:
      trimbleMapsMap - the map object to add fills to
      style - a valid a fully loaded style object
      belowLayerId - the id of the layer above the circle layer
    • FillManager

      @UiThread public FillManager(@NonNull com.trimblemaps.mapsdk.maps.MapView mapView, @NonNull com.trimblemaps.mapsdk.maps.TrimbleMapsMap trimbleMapsMap, @NonNull com.trimblemaps.mapsdk.maps.Style style, @Nullable String belowLayerId, @Nullable com.trimblemaps.mapsdk.style.sources.GeoJsonOptions geoJsonOptions)
      Create a fill manager, used to manage fills.
      Parameters:
      trimbleMapsMap - the map object to add fills to
      style - a valid a fully loaded style object
      belowLayerId - the id of the layer above the circle layer
      geoJsonOptions - options for the internal source
  • Method Details

    • setDataDrivenPropertyIsUsed

      protected void setDataDrivenPropertyIsUsed(@NonNull String property)
      Specified by:
      setDataDrivenPropertyIsUsed in class AnnotationManager<com.trimblemaps.mapsdk.style.layers.FillLayer,Fill,FillOptions,OnFillDragListener,OnFillClickListener,OnFillLongClickListener>
    • create

      @UiThread public List<Fill> create(@NonNull String json)
      Create a list of fills on the map.

      Fills are going to be created only for features with a matching geometry.

      All supported properties are:
      FillOptions.PROPERTY_FILL_OPACITY - Float
      FillOptions.PROPERTY_FILL_COLOR - String
      FillOptions.PROPERTY_FILL_OUTLINE_COLOR - String
      FillOptions.PROPERTY_FILL_PATTERN - String

      Out of spec properties:
      "is-draggable" - Boolean, true if the fill should be draggable, false otherwise

      Parameters:
      json - the GeoJSON defining the list of fills to build
      Returns:
      the list of built fills
    • create

      @UiThread public List<Fill> create(@NonNull com.trimblemaps.geojson.FeatureCollection featureCollection)
      Create a list of fills on the map.

      Fills are going to be created only for features with a matching geometry.

      All supported properties are:
      FillOptions.PROPERTY_FILL_OPACITY - Float
      FillOptions.PROPERTY_FILL_COLOR - String
      FillOptions.PROPERTY_FILL_OUTLINE_COLOR - String
      FillOptions.PROPERTY_FILL_PATTERN - String

      Out of spec properties:
      "is-draggable" - Boolean, true if the fill should be draggable, false otherwise

      Parameters:
      featureCollection - the featureCollection defining the list of fills to build
      Returns:
      the list of built fills
    • getFillAntialias

      public Boolean getFillAntialias()
      Get the FillAntialias property

      Whether or not the fill should be antialiased.

      Returns:
      property wrapper value around Boolean
    • setFillAntialias

      public void setFillAntialias(Boolean value)
      Set the FillAntialias property

      Whether or not the fill should be antialiased.

      Parameters:
      value - property wrapper value around Boolean
    • getFillTranslate

      public Float[] getFillTranslate()
      Get the FillTranslate property

      The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.

      Returns:
      property wrapper value around Float[]
    • setFillTranslate

      public void setFillTranslate(Float[] value)
      Set the FillTranslate property

      The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.

      Parameters:
      value - property wrapper value around Float[]
    • getFillTranslateAnchor

      public String getFillTranslateAnchor()
      Get the FillTranslateAnchor property

      Controls the frame of reference for PropertyFactory.fillTranslate(java.lang.Float[]).

      Returns:
      property wrapper value around String
    • setFillTranslateAnchor

      public void setFillTranslateAnchor(String value)
      Set the FillTranslateAnchor property

      Controls the frame of reference for PropertyFactory.fillTranslate(java.lang.Float[]).

      Parameters:
      value - property wrapper value around String
    • setFilter

      public void setFilter(@NonNull com.trimblemaps.mapsdk.style.expressions.Expression expression)
      Set filter on the managed fills.
      Parameters:
      expression - expression
    • getFilter

      @Nullable public com.trimblemaps.mapsdk.style.expressions.Expression getFilter()
      Get filter of the managed fills.
      Returns:
      expression