Class FillManager

    • Constructor Detail

      • FillManager

        @UiThread
        public FillManager​(@NonNull
                           org.maplibre.android.maps.MapView mapView,
                           @NonNull
                           org.maplibre.android.maps.MapLibreMap maplibreMap,
                           @NonNull
                           org.maplibre.android.maps.Style style)
        Create a fill manager, used to manage fills.
        Parameters:
        maplibreMap - the map object to add fills to
        style - a valid a fully loaded style object
      • FillManager

        @UiThread
        public FillManager​(@NonNull
                           org.maplibre.android.maps.MapView mapView,
                           @NonNull
                           org.maplibre.android.maps.MapLibreMap maplibreMap,
                           @NonNull
                           org.maplibre.android.maps.Style style,
                           @Nullable
                           java.lang.String belowLayerId,
                           @Nullable
                           java.lang.String aboveLayerId)
        Create a fill manager, used to manage fills.
        Parameters:
        maplibreMap - the map object to add fills to
        style - a valid a fully loaded style object
        belowLayerId - the id of the layer above the fill layer
        aboveLayerId - the id of the layer below the fill layer
      • FillManager

        @UiThread
        public FillManager​(@NonNull
                           org.maplibre.android.maps.MapView mapView,
                           @NonNull
                           org.maplibre.android.maps.MapLibreMap maplibreMap,
                           @NonNull
                           org.maplibre.android.maps.Style style,
                           @Nullable
                           java.lang.String belowLayerId,
                           @Nullable
                           java.lang.String aboveLayerId,
                           @Nullable
                           org.maplibre.android.style.sources.GeoJsonOptions geoJsonOptions)
        Create a fill manager, used to manage fills.
        Parameters:
        maplibreMap - the map object to add fills to
        style - a valid a fully loaded style object
        belowLayerId - the id of the layer above the fill layer
        aboveLayerId - the id of the layer below the fill layer
        geoJsonOptions - options for the internal source
    • Method Detail

      • create

        @UiThread
        public java.util.List<Fill> create​(@NonNull
                                           java.lang.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
        Learn more about above properties in the Style specification.

        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 java.util.List<Fill> create​(@NonNull
                                           org.maplibre.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
        Learn more about above properties in the Style specification.

        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 java.lang.Boolean getFillAntialias()
        Get the FillAntialias property

        Whether or not the fill should be antialiased.

        Returns:
        property wrapper value around Boolean
      • setFillAntialias

        public void setFillAntialias​(java.lang.Boolean value)
        Set the FillAntialias property

        Whether or not the fill should be antialiased.

        Parameters:
        value - property wrapper value around Boolean
      • getFillTranslate

        public java.lang.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​(java.lang.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 java.lang.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​(java.lang.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
                              org.maplibre.android.style.expressions.Expression expression)
        Set filter on the managed fills.
        Parameters:
        expression - expression
      • getFilter

        @Nullable
        public org.maplibre.android.style.expressions.Expression getFilter()
        Get filter of the managed fills.
        Returns:
        expression