Class FillManager
- java.lang.Object
-
- com.mapbox.mapboxsdk.plugins.annotation.AnnotationManager<com.mapbox.mapboxsdk.style.layers.FillLayer,Fill,FillOptions,OnFillDragListener,OnFillClickListener,OnFillLongClickListener>
-
- com.mapbox.mapboxsdk.plugins.annotation.FillManager
-
public class FillManager extends AnnotationManager<com.mapbox.mapboxsdk.style.layers.FillLayer,Fill,FillOptions,OnFillDragListener,OnFillClickListener,OnFillLongClickListener>
The fill manager allows to add fills to a map.
-
-
Field Summary
-
Fields inherited from class com.mapbox.mapboxsdk.plugins.annotation.AnnotationManager
annotations, coreElementProvider, geoJsonSource, layer, mapboxMap
-
-
Constructor Summary
Constructors Constructor Description FillManager(com.mapbox.mapboxsdk.maps.MapView mapView, com.mapbox.mapboxsdk.maps.MapboxMap mapboxMap, com.mapbox.mapboxsdk.maps.Style style)Create a fill manager, used to manage fills.FillManager(com.mapbox.mapboxsdk.maps.MapView mapView, com.mapbox.mapboxsdk.maps.MapboxMap mapboxMap, com.mapbox.mapboxsdk.maps.Style style, java.lang.String belowLayerId, java.lang.String aboveLayerId)Create a fill manager, used to manage fills.FillManager(com.mapbox.mapboxsdk.maps.MapView mapView, com.mapbox.mapboxsdk.maps.MapboxMap mapboxMap, com.mapbox.mapboxsdk.maps.Style style, java.lang.String belowLayerId, java.lang.String aboveLayerId, com.mapbox.mapboxsdk.style.sources.GeoJsonOptions geoJsonOptions)Create a fill manager, used to manage fills.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<Fill>create(com.mapbox.geojson.FeatureCollection featureCollection)Create a list of fills on the map.java.util.List<Fill>create(java.lang.String json)Create a list of fills on the map.java.lang.BooleangetFillAntialias()Get the FillAntialias propertyjava.lang.Float[]getFillTranslate()Get the FillTranslate propertyjava.lang.StringgetFillTranslateAnchor()Get the FillTranslateAnchor propertycom.mapbox.mapboxsdk.style.expressions.ExpressiongetFilter()Get filter of the managed fills.protected voidsetDataDrivenPropertyIsUsed(java.lang.String property)voidsetFillAntialias(java.lang.Boolean value)Set the FillAntialias propertyvoidsetFillTranslate(java.lang.Float[] value)Set the FillTranslate propertyvoidsetFillTranslateAnchor(java.lang.String value)Set the FillTranslateAnchor propertyvoidsetFilter(com.mapbox.mapboxsdk.style.expressions.Expression expression)Set filter on the managed fills.-
Methods inherited from class com.mapbox.mapboxsdk.plugins.annotation.AnnotationManager
addClickListener, addDragListener, addLongClickListener, create, create, delete, delete, deleteAll, getAnnotations, getLayerId, onDestroy, removeClickListener, removeDragListener, removeLongClickListener, update, update, updateSource
-
-
-
-
Constructor Detail
-
FillManager
@UiThread public FillManager(@NonNull com.mapbox.mapboxsdk.maps.MapView mapView, @NonNull com.mapbox.mapboxsdk.maps.MapboxMap mapboxMap, @NonNull com.mapbox.mapboxsdk.maps.Style style)Create a fill manager, used to manage fills.- Parameters:
mapboxMap- the map object to add fills tostyle- a valid a fully loaded style object
-
FillManager
@UiThread public FillManager(@NonNull com.mapbox.mapboxsdk.maps.MapView mapView, @NonNull com.mapbox.mapboxsdk.maps.MapboxMap mapboxMap, @NonNull com.mapbox.mapboxsdk.maps.Style style, @Nullable java.lang.String belowLayerId, @Nullable java.lang.String aboveLayerId)Create a fill manager, used to manage fills.- Parameters:
mapboxMap- the map object to add fills tostyle- a valid a fully loaded style objectbelowLayerId- the id of the layer above the fill layeraboveLayerId- the id of the layer below the fill layer
-
FillManager
@UiThread public FillManager(@NonNull com.mapbox.mapboxsdk.maps.MapView mapView, @NonNull com.mapbox.mapboxsdk.maps.MapboxMap mapboxMap, @NonNull com.mapbox.mapboxsdk.maps.Style style, @Nullable java.lang.String belowLayerId, @Nullable java.lang.String aboveLayerId, @Nullable com.mapbox.mapboxsdk.style.sources.GeoJsonOptions geoJsonOptions)Create a fill manager, used to manage fills.- Parameters:
mapboxMap- the map object to add fills tostyle- a valid a fully loaded style objectbelowLayerId- the id of the layer above the fill layeraboveLayerId- the id of the layer below the fill layergeoJsonOptions- options for the internal source
-
-
Method Detail
-
setDataDrivenPropertyIsUsed
protected void setDataDrivenPropertyIsUsed(@NonNull java.lang.String property)- Specified by:
setDataDrivenPropertyIsUsedin classAnnotationManager<com.mapbox.mapboxsdk.style.layers.FillLayer,Fill,FillOptions,OnFillDragListener,OnFillClickListener,OnFillLongClickListener>
-
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 com.mapbox.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 propertyWhether or not the fill should be antialiased.
- Returns:
- property wrapper value around Boolean
-
setFillAntialias
public void setFillAntialias(java.lang.Boolean value)
Set the FillAntialias propertyWhether or not the fill should be antialiased.
- Parameters:
value- property wrapper value around Boolean
-
getFillTranslate
public java.lang.Float[] getFillTranslate()
Get the FillTranslate propertyThe 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 propertyThe 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 propertyControls 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 propertyControls the frame of reference for
PropertyFactory.fillTranslate(java.lang.Float[]).- Parameters:
value- property wrapper value around String
-
setFilter
public void setFilter(@NonNull com.mapbox.mapboxsdk.style.expressions.Expression expression)Set filter on the managed fills.- Parameters:
expression- expression
-
getFilter
@Nullable public com.mapbox.mapboxsdk.style.expressions.Expression getFilter()
Get filter of the managed fills.- Returns:
- expression
-
-