PolygonAnnotationManager

The polygonAnnotation manager allows to add polygonAnnotations to a map.

Constructors

PolygonAnnotationManager
Link copied to clipboard
fun PolygonAnnotationManager(mapView: View, delegateProvider: MapDelegateProvider, annotationConfig: AnnotationConfig?)

Types

Companion
Link copied to clipboard

Static variables and methods.

object Companion

Functions

addAnnotation
Link copied to clipboard

Add an annotation to MapView.

override fun addAnnotation(annotation: PolygonAnnotation)
addClickListener
Link copied to clipboard
open override fun addClickListener(u: OnPolygonAnnotationClickListener): Boolean
addDragListener
Link copied to clipboard
open override fun addDragListener(d: OnPolygonAnnotationDragListener): Boolean
addInteractionListener
Link copied to clipboard
open override fun addInteractionListener(i: OnPolygonAnnotationInteractionListener): Boolean
addLongClickListener
Link copied to clipboard
open override fun addLongClickListener(v: OnPolygonAnnotationLongClickListener): Boolean
create
Link copied to clipboard

Create a list of polygonAnnotations on the map.

PolygonAnnotations are going to be created only for features with a matching geometry.

All supported properties are: PolygonAnnotationOptions.PROPERTY_FILL_SORT_KEY - Double PolygonAnnotationOptions.PROPERTY_FILL_COLOR - String PolygonAnnotationOptions.PROPERTY_FILL_OPACITY - Double PolygonAnnotationOptions.PROPERTY_FILL_OUTLINE_COLOR - String PolygonAnnotationOptions.PROPERTY_FILL_PATTERN - String Learn more about above properties in the )The online documentation.

Out of spec properties: "is-draggable" - Boolean, true if the polygonAnnotation should be draggable, false otherwise

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

Create an annotation with the option

open override fun create(option: PolygonAnnotationOptions): PolygonAnnotation

Create some annotations with the options

open override fun create(options: List<PolygonAnnotationOptions>): List<PolygonAnnotation>
createClusterLevelLayer
Link copied to clipboard
override fun createClusterLevelLayer(level: Int, colorLevels: List<Pair<Int, Int>>): CircleLayer
createClusterTextLayer
Link copied to clipboard
override fun createClusterTextLayer(): SymbolLayer
createDragSource
Link copied to clipboard
override fun createDragSource(): GeoJsonSource
createSource
Link copied to clipboard
override fun createSource(): GeoJsonSource
delete
Link copied to clipboard

Delete the annotation

open override fun delete(annotation: PolygonAnnotation)

Delete annotations in the list

open override fun delete(annotations: List<PolygonAnnotation>)
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
initClusterLayers
Link copied to clipboard
override fun initClusterLayers(style: StyleInterface)
onDestroy
Link copied to clipboard

Invoked when Mapview or Annotation manager 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): PolygonAnnotation?
override fun queryMapForFeatures(screenCoordinate: ScreenCoordinate): PolygonAnnotation?
removeClickListener
Link copied to clipboard
open override fun removeClickListener(u: OnPolygonAnnotationClickListener): Boolean
removeDragListener
Link copied to clipboard
open override fun removeDragListener(d: OnPolygonAnnotationDragListener): Boolean
removeInteractionListener
Link copied to clipboard
open override fun removeInteractionListener(i: OnPolygonAnnotationInteractionListener): Boolean
removeLongClickListener
Link copied to clipboard
open override fun removeLongClickListener(v: OnPolygonAnnotationLongClickListener): Boolean
selectAnnotation
Link copied to clipboard

Toggles the annotation's selection state. If the annotation is deselected, it becomes selected. If the annotation is selected, it becomes deselected.

open override fun selectAnnotation(annotation: PolygonAnnotation)
toString
Link copied to clipboard
open override fun toString(): String
update
Link copied to clipboard

Update the annotation

open override fun update(annotation: PolygonAnnotation)

Update annotations in the list

open override fun update(annotations: List<PolygonAnnotation>)
updateDragSource
Link copied to clipboard
override fun updateDragSource(style: StyleInterface)
updateSource
Link copied to clipboard

Trigger an update to the underlying source

override fun updateSource(style: StyleInterface)

Properties

annotationConfig
Link copied to clipboard
override val annotationConfig: AnnotationConfig?
annotationMap
Link copied to clipboard
override val annotationMap: ConcurrentHashMap<Long, PolygonAnnotation>
annotations
Link copied to clipboard

The added annotations

open override val annotations: List<PolygonAnnotation>
clickListeners
Link copied to clipboard

The Added clickListeners

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

The delegateProvider

override val delegateProvider: MapDelegateProvider
draggingAnnotation
Link copied to clipboard
override var draggingAnnotation: PolygonAnnotation?
dragListeners
Link copied to clipboard

The added dragListeners

open override val dragListeners: MutableList<OnPolygonAnnotationDragListener>
fillAntialias
Link copied to clipboard

The FillAntialias property

Whether or not the fill should be antialiased.

var fillAntialias: Boolean?
fillTranslate
Link copied to clipboard

The FillTranslate property

The geometry's offset. Values are x, y where negatives indicate left and up, respectively.

var fillTranslate: List<Double>?
fillTranslateAnchor
Link copied to clipboard

The FillTranslateAnchor property

Controls the frame of reference for {@link PropertyFactory#fillTranslate}.

var fillTranslateAnchor: FillTranslateAnchor?
gesturesPlugin
Link copied to clipboard
override var gesturesPlugin: GesturesPlugin
handler
Link copied to clipboard
override val handler: Handler
height
Link copied to clipboard
override var height: Int
interactionListener
Link copied to clipboard

The added interactionListener

open override val interactionListener: MutableList<OnPolygonAnnotationInteractionListener>
layerFilter
Link copied to clipboard

The filter on the managed polygonAnnotations.

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

The added longClickListeners

open override val longClickListeners: MutableList<OnPolygonAnnotationLongClickListener>
mapCameraManagerDelegate
Link copied to clipboard
override var mapCameraManagerDelegate: MapCameraManagerDelegate
mapFeatureQueryDelegate
Link copied to clipboard
override var mapFeatureQueryDelegate: MapFeatureQueryDelegate
mapListenerDelegate
Link copied to clipboard
override var mapListenerDelegate: MapListenerDelegate
styleStateDelegate
Link copied to clipboard
override var styleStateDelegate: MapStyleStateDelegate
width
Link copied to clipboard
override var width: Int