-
public class CircleManager extends AnnotationManager<CircleLayer, Circle, CircleOptions, OnCircleDragListener, OnCircleClickListener, OnCircleLongClickListener>
The circle manager allows to add circles to a map.
-
-
Constructor Summary
Constructors Constructor Description CircleManager(MapView mapView, MapLibreMap maplibreMap, Style style)Create a circle manager, used to manage circles. CircleManager(MapView mapView, MapLibreMap maplibreMap, Style style, String belowLayerId, String aboveLayerId)Create a circle manager, used to manage circles. CircleManager(MapView mapView, MapLibreMap maplibreMap, Style style, String belowLayerId, String aboveLayerId, GeoJsonOptions geoJsonOptions)Create a circle manager, used to manage circles.
-
Method Summary
Modifier and Type Method Description List<Circle>create(@NonNull() String json)Create a list of circles on the map. List<Circle>create(@NonNull() FeatureCollection featureCollection)Create a list of circles on the map. Array<Float>getCircleTranslate()Get the CircleTranslate propertyThe geometry's offset. voidsetCircleTranslate(Array<Float> value)Set the CircleTranslate propertyThe geometry's offset. StringgetCircleTranslateAnchor()Get the CircleTranslateAnchor propertyControls the frame of reference for circleTranslate. voidsetCircleTranslateAnchor(String value)Set the CircleTranslateAnchor propertyControls the frame of reference for circleTranslate. StringgetCirclePitchScale()Get the CirclePitchScale propertyControls the scaling behavior of the circle when the map is pitched. voidsetCirclePitchScale(String value)Set the CirclePitchScale propertyControls the scaling behavior of the circle when the map is pitched. StringgetCirclePitchAlignment()Get the CirclePitchAlignment propertyOrientation of circle when map is pitched. voidsetCirclePitchAlignment(String value)Set the CirclePitchAlignment propertyOrientation of circle when map is pitched. voidsetFilter(@NonNull() Expression expression)Set filter on the managed circles. ExpressiongetFilter()Get filter of the managed circles. -
Methods inherited from class org.maplibre.android.plugins.annotation.AnnotationManager
addClickListener, addDragListener, addLongClickListener, create, create, delete, delete, deleteAll, getAboveLayerId, getAnnotations, getBelowLayerId, getLayerId, onDestroy, removeClickListener, removeDragListener, removeLongClickListener, update, update, updateSource -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
CircleManager
CircleManager(MapView mapView, MapLibreMap maplibreMap, Style style)
Create a circle manager, used to manage circles.- Parameters:
maplibreMap- the map object to add circles tostyle- a valid a fully loaded style object
-
CircleManager
CircleManager(MapView mapView, MapLibreMap maplibreMap, Style style, String belowLayerId, String aboveLayerId)
Create a circle manager, used to manage circles.- Parameters:
maplibreMap- 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
CircleManager(MapView mapView, MapLibreMap maplibreMap, Style style, String belowLayerId, String aboveLayerId, GeoJsonOptions geoJsonOptions)
Create a circle manager, used to manage circles.- Parameters:
maplibreMap- 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
-
create
@UiThread() List<Circle> create(@NonNull() 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 - FloatCircleOptions.PROPERTY_CIRCLE_COLOR - StringCircleOptions.PROPERTY_CIRCLE_BLUR - FloatCircleOptions.PROPERTY_CIRCLE_OPACITY - FloatCircleOptions.PROPERTY_CIRCLE_STROKE_WIDTH - FloatCircleOptions.PROPERTY_CIRCLE_STROKE_COLOR - StringCircleOptions.PROPERTY_CIRCLE_STROKE_OPACITY - FloatLearn 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
-
create
@UiThread() List<Circle> create(@NonNull() 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 - FloatCircleOptions.PROPERTY_CIRCLE_COLOR - StringCircleOptions.PROPERTY_CIRCLE_BLUR - FloatCircleOptions.PROPERTY_CIRCLE_OPACITY - FloatCircleOptions.PROPERTY_CIRCLE_STROKE_WIDTH - FloatCircleOptions.PROPERTY_CIRCLE_STROKE_COLOR - StringCircleOptions.PROPERTY_CIRCLE_STROKE_OPACITY - FloatLearn 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
-
getCircleTranslate
Array<Float> getCircleTranslate()
Get the CircleTranslate property
The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.
-
setCircleTranslate
void setCircleTranslate(Array<Float> value)
Set the CircleTranslate property
The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.
- Parameters:
value- property wrapper value around Float[]
-
getCircleTranslateAnchor
String getCircleTranslateAnchor()
Get the CircleTranslateAnchor property
Controls the frame of reference for circleTranslate.
-
setCircleTranslateAnchor
void setCircleTranslateAnchor(String value)
Set the CircleTranslateAnchor property
Controls the frame of reference for circleTranslate.
- Parameters:
value- property wrapper value around String
-
getCirclePitchScale
String getCirclePitchScale()
Get the CirclePitchScale property
Controls the scaling behavior of the circle when the map is pitched.
-
setCirclePitchScale
void setCirclePitchScale(String value)
Set the CirclePitchScale property
Controls the scaling behavior of the circle when the map is pitched.
- Parameters:
value- property wrapper value around String
-
getCirclePitchAlignment
String getCirclePitchAlignment()
Get the CirclePitchAlignment property
Orientation of circle when map is pitched.
-
setCirclePitchAlignment
void setCirclePitchAlignment(String value)
Set the CirclePitchAlignment property
Orientation of circle when map is pitched.
- Parameters:
value- property wrapper value around String
-
setFilter
void setFilter(@NonNull() Expression expression)
Set filter on the managed circles.
- Parameters:
expression- expression
-
-
-
-