PolylineAnnotationManager

The polylineAnnotation manager allows to add polylineAnnotations to a map.

Constructors

PolylineAnnotationManager
Link copied to clipboard
fun PolylineAnnotationManager(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: OnPolylineAnnotationClickListener): Boolean
addDragListener
Link copied to clipboard
open override fun addDragListener(d: OnPolylineAnnotationDragListener): Boolean
addLongClickListener
Link copied to clipboard
open override fun addLongClickListener(v: OnPolylineAnnotationLongClickListener): Boolean
create
Link copied to clipboard

Create a list of polylineAnnotations on the map.

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

All supported properties are: PolylineAnnotationOptions.PROPERTY_LINE_JOIN - LineJoin * PolylineAnnotationOptions.PROPERTY_LINE_SORT_KEY - Double * PolylineAnnotationOptions.PROPERTY_LINE_BLUR - Double * PolylineAnnotationOptions.PROPERTY_LINE_COLOR - String * PolylineAnnotationOptions.PROPERTY_LINE_GAP_WIDTH - Double * PolylineAnnotationOptions.PROPERTY_LINE_OFFSET - Double * PolylineAnnotationOptions.PROPERTY_LINE_OPACITY - Double * PolylineAnnotationOptions.PROPERTY_LINE_PATTERN - String * PolylineAnnotationOptions.PROPERTY_LINE_WIDTH - Double * Learn more about above properties in the )The online documentation.

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

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

Create an annotation with the option

open override fun create(option: PolylineAnnotationOptions): PolylineAnnotation

Create some annotations with the options

open override fun create(options: List<PolylineAnnotationOptions>): List<PolylineAnnotation>
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: PolylineAnnotation)

Delete annotations in the list

open override fun delete(annotations: List<PolylineAnnotation>)
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: StyleInterface)
queryMapForFeatures
Link copied to clipboard

Query the rendered annotation around the point

override fun queryMapForFeatures(point: Point, callback: QueryAnnotationCallback<PolylineAnnotation>)
override fun queryMapForFeatures(screenCoordinate: ScreenCoordinate, callback: QueryAnnotationCallback<PolylineAnnotation>)
removeClickListener
Link copied to clipboard
open override fun removeClickListener(u: OnPolylineAnnotationClickListener): Boolean
removeDragListener
Link copied to clipboard
open override fun removeDragListener(d: OnPolylineAnnotationDragListener): Boolean
removeLongClickListener
Link copied to clipboard
open override fun removeLongClickListener(v: OnPolylineAnnotationLongClickListener): Boolean
toString
Link copied to clipboard
open override fun toString(): String
update
Link copied to clipboard

Update the annotation

open override fun update(annotation: PolylineAnnotation)

Update annotations in the list

open override fun update(annotations: List<PolylineAnnotation>)
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, PolylineAnnotation>
annotations
Link copied to clipboard

The added annotations

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

The Added clickListeners

open override val clickListeners: MutableList<OnPolylineAnnotationClickListener>
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: PolylineAnnotation?
dragListeners
Link copied to clipboard

The added dragListeners

open override val dragListeners: MutableList<OnPolylineAnnotationDragListener>
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 polylineAnnotations.

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

The LineCap property

The display of line endings.

var lineCap: LineCap?
lineDasharray
Link copied to clipboard

The LineDasharray property

Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to density-independent pixels, multiply the length by the current line width. Note that GeoJSON sources with lineMetrics: true specified won't render dashed lines to the expected scale. Also note that zoom-dependent expressions will be evaluated only at integer zoom levels.

var lineDasharray: List<Double>?
lineMiterLimit
Link copied to clipboard

The LineMiterLimit property

Used to automatically convert miter joins to bevel joins for sharp angles.

var lineMiterLimit: Double?
lineRoundLimit
Link copied to clipboard

The LineRoundLimit property

Used to automatically convert round joins to miter joins for shallow angles.

var lineRoundLimit: Double?
lineTranslate
Link copied to clipboard

The LineTranslate property

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

var lineTranslate: List<Double>?
lineTranslateAnchor
Link copied to clipboard

The LineTranslateAnchor property

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

var lineTranslateAnchor: LineTranslateAnchor?
longClickListeners
Link copied to clipboard

The added longClickListeners

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