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

addClickListener
Link copied to clipboard
open override fun addClickListener(u: OnPolygonAnnotationClickListener): Boolean
addDragListener
Link copied to clipboard
open override fun addDragListener(d: OnPolygonAnnotationDragListener): 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.

<p> PolygonAnnotations are going to be created only for features with a matching geometry. <p> All supported properties are:<br> PolygonAnnotationOptions.PROPERTY_FILL_SORT_KEY - Double<br> PolygonAnnotationOptions.PROPERTY_FILL_COLOR - String<br> PolygonAnnotationOptions.PROPERTY_FILL_OPACITY - Double<br> PolygonAnnotationOptions.PROPERTY_FILL_OUTLINE_COLOR - String<br> PolygonAnnotationOptions.PROPERTY_FILL_PATTERN - String<br> Learn more about above properties in the )[The online documentation](https://www.mapbox.com/mapbox-gl-js/style-spec/). <p> Out of spec properties:<br> "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
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()
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)
onStyleLoaded
Link copied to clipboard

Invoked when the style is loaded

open override fun onStyleLoaded(styleDelegate: StyleManagerInterface)
queryMapForFeatures
Link copied to clipboard

Query the rendered annotation around the point

override fun queryMapForFeatures(point: Point, callback: QueryAnnotationCallback<PolygonAnnotation>)
override fun queryMapForFeatures(screenCoordinate: ScreenCoordinate, callback: QueryAnnotationCallback<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
removeLongClickListener
Link copied to clipboard
open override fun removeLongClickListener(v: OnPolygonAnnotationLongClickListener): Boolean
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>)
updateSource
Link copied to clipboard

Trigger an update to the underlying source

override fun updateSource()

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
draggedAnnotation
Link copied to clipboard
override var draggedAnnotation: PolygonAnnotation?
dragListeners
Link copied to clipboard

The added dragListeners

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

The FillAntialias property

<p> Whether or not the fill should be antialiased.

var fillAntialias: Boolean?
fillTranslate
Link copied to clipboard

The FillTranslate property

<p> 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

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

var fillTranslateAnchor: FillTranslateAnchor?
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 polygonAnnotations.

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

The added longClickListeners

open override val longClickListeners: MutableList<OnPolygonAnnotationLongClickListener>
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
width
Link copied to clipboard
override var width: Int