Class CircleManager
- java.lang.Object
-
- com.mapbox.mapboxsdk.plugins.annotation.AnnotationManager<com.mapbox.mapboxsdk.style.layers.CircleLayer,Circle,CircleOptions,OnCircleDragListener,OnCircleClickListener,OnCircleLongClickListener>
-
- com.mapbox.mapboxsdk.plugins.annotation.CircleManager
-
public class CircleManager extends AnnotationManager<com.mapbox.mapboxsdk.style.layers.CircleLayer,Circle,CircleOptions,OnCircleDragListener,OnCircleClickListener,OnCircleLongClickListener>
The circle manager allows to add circles 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 CircleManager(com.mapbox.mapboxsdk.maps.MapView mapView, com.mapbox.mapboxsdk.maps.MapboxMap mapboxMap, com.mapbox.mapboxsdk.maps.Style style)Create a circle manager, used to manage circles.CircleManager(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 circle manager, used to manage circles.CircleManager(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 circle manager, used to manage circles.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<Circle>create(com.mapbox.geojson.FeatureCollection featureCollection)Create a list of circles on the map.java.util.List<Circle>create(java.lang.String json)Create a list of circles on the map.java.lang.StringgetCirclePitchAlignment()Get the CirclePitchAlignment propertyjava.lang.StringgetCirclePitchScale()Get the CirclePitchScale propertyjava.lang.Float[]getCircleTranslate()Get the CircleTranslate propertyjava.lang.StringgetCircleTranslateAnchor()Get the CircleTranslateAnchor propertycom.mapbox.mapboxsdk.style.expressions.ExpressiongetFilter()Get filter of the managed circles.voidsetCirclePitchAlignment(java.lang.String value)Set the CirclePitchAlignment propertyvoidsetCirclePitchScale(java.lang.String value)Set the CirclePitchScale propertyvoidsetCircleTranslate(java.lang.Float[] value)Set the CircleTranslate propertyvoidsetCircleTranslateAnchor(java.lang.String value)Set the CircleTranslateAnchor propertyprotected voidsetDataDrivenPropertyIsUsed(java.lang.String property)voidsetFilter(com.mapbox.mapboxsdk.style.expressions.Expression expression)Set filter on the managed circles.-
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
-
CircleManager
@UiThread public CircleManager(@NonNull com.mapbox.mapboxsdk.maps.MapView mapView, @NonNull com.mapbox.mapboxsdk.maps.MapboxMap mapboxMap, @NonNull com.mapbox.mapboxsdk.maps.Style style)Create a circle manager, used to manage circles.- Parameters:
mapboxMap- the map object to add circles tostyle- a valid a fully loaded style object
-
CircleManager
@UiThread public CircleManager(@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 circle manager, used to manage circles.- Parameters:
mapboxMap- the map object to add circles tostyle- a valid a fully loaded style objectbelowLayerId- the id of the layer above the circle layeraboveLayerId- the id of the layer below the circle layer
-
CircleManager
@UiThread public CircleManager(@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 circle manager, used to manage circles.- Parameters:
mapboxMap- the map object to add circles tostyle- a valid a fully loaded style objectbelowLayerId- the id of the layer above the circle layeraboveLayerId- the id of the layer below the circle 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.CircleLayer,Circle,CircleOptions,OnCircleDragListener,OnCircleClickListener,OnCircleLongClickListener>
-
create
@UiThread public java.util.List<Circle> create(@NonNull java.lang.String json)
Create a list of circles on the map.Circles are going to be created only for features with a matching geometry.
All supported properties are:
CircleOptions.PROPERTY_CIRCLE_RADIUS - Float
CircleOptions.PROPERTY_CIRCLE_COLOR - String
CircleOptions.PROPERTY_CIRCLE_BLUR - Float
CircleOptions.PROPERTY_CIRCLE_OPACITY - Float
CircleOptions.PROPERTY_CIRCLE_STROKE_WIDTH - Float
CircleOptions.PROPERTY_CIRCLE_STROKE_COLOR - String
CircleOptions.PROPERTY_CIRCLE_STROKE_OPACITY - Float
Learn more about above properties in the Style specification.Out of spec properties:
"is-draggable" - Boolean, true if the circle should be draggable, false otherwise- Parameters:
json- the GeoJSON defining the list of circles to build- Returns:
- the list of built circles
-
create
@UiThread public java.util.List<Circle> create(@NonNull com.mapbox.geojson.FeatureCollection featureCollection)
Create a list of circles on the map.Circles are going to be created only for features with a matching geometry.
All supported properties are:
CircleOptions.PROPERTY_CIRCLE_RADIUS - Float
CircleOptions.PROPERTY_CIRCLE_COLOR - String
CircleOptions.PROPERTY_CIRCLE_BLUR - Float
CircleOptions.PROPERTY_CIRCLE_OPACITY - Float
CircleOptions.PROPERTY_CIRCLE_STROKE_WIDTH - Float
CircleOptions.PROPERTY_CIRCLE_STROKE_COLOR - String
CircleOptions.PROPERTY_CIRCLE_STROKE_OPACITY - Float
Learn more about above properties in the Style specification.Out of spec properties:
"is-draggable" - Boolean, true if the circle should be draggable, false otherwise- Parameters:
featureCollection- the featureCollection defining the list of circles to build- Returns:
- the list of built circles
-
getCircleTranslate
public java.lang.Float[] getCircleTranslate()
Get the CircleTranslate propertyThe geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.
- Returns:
- property wrapper value around Float[]
-
setCircleTranslate
public void setCircleTranslate(java.lang.Float[] value)
Set the CircleTranslate propertyThe geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.
- Parameters:
value- property wrapper value around Float[]
-
getCircleTranslateAnchor
public java.lang.String getCircleTranslateAnchor()
Get the CircleTranslateAnchor propertyControls the frame of reference for
PropertyFactory.circleTranslate(java.lang.Float[]).- Returns:
- property wrapper value around String
-
setCircleTranslateAnchor
public void setCircleTranslateAnchor(java.lang.String value)
Set the CircleTranslateAnchor propertyControls the frame of reference for
PropertyFactory.circleTranslate(java.lang.Float[]).- Parameters:
value- property wrapper value around String
-
getCirclePitchScale
public java.lang.String getCirclePitchScale()
Get the CirclePitchScale propertyControls the scaling behavior of the circle when the map is pitched.
- Returns:
- property wrapper value around String
-
setCirclePitchScale
public void setCirclePitchScale(java.lang.String value)
Set the CirclePitchScale propertyControls the scaling behavior of the circle when the map is pitched.
- Parameters:
value- property wrapper value around String
-
getCirclePitchAlignment
public java.lang.String getCirclePitchAlignment()
Get the CirclePitchAlignment propertyOrientation of circle when map is pitched.
- Returns:
- property wrapper value around String
-
setCirclePitchAlignment
public void setCirclePitchAlignment(java.lang.String value)
Set the CirclePitchAlignment propertyOrientation of circle when map is pitched.
- Parameters:
value- property wrapper value around String
-
setFilter
public void setFilter(@NonNull com.mapbox.mapboxsdk.style.expressions.Expression expression)Set filter on the managed circles.- Parameters:
expression- expression
-
getFilter
@Nullable public com.mapbox.mapboxsdk.style.expressions.Expression getFilter()
Get filter of the managed circles.- Returns:
- expression
-
-