CircleManager

The circle manager allows to add circles to a map.

class CircleManager(delegateProvider: MapDelegateProvider, belowLayerId: String?, touchAreaShiftX: Int, touchAreaShiftY: Int) : AnnotationManagerImpl<Point, Circle, CircleOptions, OnCircleDragListener, OnCircleClickListener, OnCircleLongClickListener, CircleLayer>

Constructors

CircleManager
Link copied to clipboard
fun CircleManager(delegateProvider: MapDelegateProvider, belowLayerId: String?, touchAreaShiftX: Int, touchAreaShiftY: Int)

Types

Companion
Link copied to clipboard

Static variables and methods.

object Companion

Functions

addClickListener
Link copied to clipboard
open override fun addClickListener(u: OnCircleClickListener): Boolean
addDragListener
Link copied to clipboard
open override fun addDragListener(d: OnCircleDragListener): Boolean
addLongClickListener
Link copied to clipboard
open override fun addLongClickListener(v: OnCircleLongClickListener): Boolean
create
Link copied to clipboard

Create a list of circles on the map.

<p> Circles are going to be created only for features with a matching geometry. <p> All supported properties are:<br> CircleOptions.PROPERTY_CIRCLE_SORT_KEY - Double<br> CircleOptions.PROPERTY_CIRCLE_RADIUS - Double<br> CircleOptions.PROPERTY_CIRCLE_COLOR - String<br> CircleOptions.PROPERTY_CIRCLE_BLUR - Double<br> CircleOptions.PROPERTY_CIRCLE_OPACITY - Double<br> CircleOptions.PROPERTY_CIRCLE_STROKE_WIDTH - Double<br> CircleOptions.PROPERTY_CIRCLE_STROKE_COLOR - String<br> CircleOptions.PROPERTY_CIRCLE_STROKE_OPACITY - Double<br> Learn more about above properties in the <a href="https://www.mapbox.com/mapbox-gl-js/style-spec/">Style specification</a>. <p> Out of spec properties:<br> "is-draggable" - Boolean, true if the circle should be draggable, false otherwise

fun create(featureCollection: FeatureCollection): List<Circle>
fun create(json: String): List<Circle>

Create an annotation with the option

open override fun create(option: CircleOptions): Circle

Create some annotations with the options

open override fun create(options: List<CircleOptions>): List<Circle>
createLayer
Link copied to clipboard

Create the layer for managed annotations

open override fun createLayer(): CircleLayer
createSource
Link copied to clipboard

Create the source for managed annotations

open override fun createSource(): GeoJsonSource
delete
Link copied to clipboard

Delete the annotation

open override fun delete(annotation: Circle)

Delete annotations in the list

open override fun delete(annotations: List<Circle>)
deleteAll
Link copied to clipboard

Delete all the added annotations

open override fun deleteAll()
enableDataDrivenProperty
Link copied to clipboard

Enable a data-driven property

open override fun enableDataDrivenProperty(property: String)
equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
getAnnotationIdKey
Link copied to clipboard

Get the key of the id of the annotation.

open override fun getAnnotationIdKey(): String
hashCode
Link copied to clipboard
open override fun hashCode(): Int
onDestroy
Link copied to clipboard

Invoked when Mapview is destroyed

open override fun onDestroy()
onSizeChanged
Link copied to clipboard

Invoked when MapView's width and height have changed.

open override fun onSizeChanged(width: Int, height: Int)
queryMapForFeatures
Link copied to clipboard

Query the rendered annotation around the point

override fun queryMapForFeatures(point: Point, callback: QueryAnnotationCallback<Circle>)
override fun queryMapForFeatures(screenCoordinate: ScreenCoordinate, callback: QueryAnnotationCallback<Circle>)
removeClickListener
Link copied to clipboard
open override fun removeClickListener(u: OnCircleClickListener): Boolean
removeDragListener
Link copied to clipboard
open override fun removeDragListener(d: OnCircleDragListener): Boolean
removeLongClickListener
Link copied to clipboard
open override fun removeLongClickListener(v: OnCircleLongClickListener): Boolean
toString
Link copied to clipboard
open override fun toString(): String
update
Link copied to clipboard

Update the annotation

open override fun update(annotation: Circle)

Update annotations in the list

open override fun update(annotations: List<Circle>)
updateSource
Link copied to clipboard

Trigger an update to the underlying source

override fun updateSource()

Properties

annotations
Link copied to clipboard

The added annotations

open override val annotations: MutableMap<Long, Circle>
belowLayerId
Link copied to clipboard
override val belowLayerId: String?
circlePitchAlignment
Link copied to clipboard

The CirclePitchAlignment property

<p> Orientation of circle when map is pitched.

var circlePitchAlignment: CirclePitchAlignment?
circlePitchScale
Link copied to clipboard

The CirclePitchScale property

<p> Controls the scaling behavior of the circle when the map is pitched.

var circlePitchScale: CirclePitchScale?
circleTranslate
Link copied to clipboard

The CircleTranslate property

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

var circleTranslate: List<Double>?
circleTranslateAnchor
Link copied to clipboard

The CircleTranslateAnchor property

<p> Controls the frame of reference for {@link PropertyFactory#circleTranslate}.

var circleTranslateAnchor: CircleTranslateAnchor?
clickListeners
Link copied to clipboard

The Added clickListeners

open override val clickListeners: MutableList<OnCircleClickListener>
currentId
Link copied to clipboard
override var currentId: Long
delegateProvider
Link copied to clipboard

The delegateProvider

override val delegateProvider: MapDelegateProvider
draggedAnnotation
Link copied to clipboard
override var draggedAnnotation: Circle?
dragListeners
Link copied to clipboard

The added dragListensers

open override val dragListeners: MutableList<OnCircleDragListener>
gesturesPlugin
Link copied to clipboard
override var gesturesPlugin: GesturesPlugin
height
Link copied to clipboard
override var height: Int
layerFilter
Link copied to clipboard

The filter on the managed circles.

open override var layerFilter: Expression?
longClickListeners
Link copied to clipboard

The added longClickListeners

open override val longClickListeners: MutableList<OnCircleLongClickListener>
mapFeatureQueryDelegate
Link copied to clipboard
override var mapFeatureQueryDelegate: MapFeatureQueryDelegate
mapProjectionDelegate
Link copied to clipboard
override var mapProjectionDelegate: MapProjectionDelegate
styleStateDelegate
Link copied to clipboard
override var styleStateDelegate: MapStyleStateDelegate
touchAreaShiftX
Link copied to clipboard
override val touchAreaShiftX: Int
touchAreaShiftY
Link copied to clipboard
override val touchAreaShiftY: Int
width
Link copied to clipboard
override var width: Int