FillManager

The fill manager allows to add fills to a map.

class FillManager(delegateProvider: MapDelegateProvider, belowLayerId: String?, touchAreaShiftX: Int, touchAreaShiftY: Int) : AnnotationManagerImpl<Polygon, Fill, FillOptions, OnFillDragListener, OnFillClickListener, OnFillLongClickListener, FillLayer>

Constructors

FillManager
Link copied to clipboard
fun FillManager(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: OnFillClickListener): Boolean
addDragListener
Link copied to clipboard
open override fun addDragListener(d: OnFillDragListener): Boolean
addLongClickListener
Link copied to clipboard
open override fun addLongClickListener(v: OnFillLongClickListener): Boolean
create
Link copied to clipboard

Create a list of fills on the map.

<p> Fills are going to be created only for features with a matching geometry. <p> All supported properties are:<br> FillOptions.PROPERTY_FILL_SORT_KEY - Double<br> FillOptions.PROPERTY_FILL_OPACITY - Double<br> FillOptions.PROPERTY_FILL_COLOR - String<br> FillOptions.PROPERTY_FILL_OUTLINE_COLOR - String<br> FillOptions.PROPERTY_FILL_PATTERN - String<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 fill should be draggable, false otherwise

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

Create an annotation with the option

open override fun create(option: FillOptions): Fill

Create some annotations with the options

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

Create the layer for managed annotations

open override fun createLayer(): FillLayer
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: Fill)

Delete annotations in the list

open override fun delete(annotations: List<Fill>)
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<Fill>)
override fun queryMapForFeatures(screenCoordinate: ScreenCoordinate, callback: QueryAnnotationCallback<Fill>)
removeClickListener
Link copied to clipboard
open override fun removeClickListener(u: OnFillClickListener): Boolean
removeDragListener
Link copied to clipboard
open override fun removeDragListener(d: OnFillDragListener): Boolean
removeLongClickListener
Link copied to clipboard
open override fun removeLongClickListener(v: OnFillLongClickListener): Boolean
toString
Link copied to clipboard
open override fun toString(): String
update
Link copied to clipboard

Update the annotation

open override fun update(annotation: Fill)

Update annotations in the list

open override fun update(annotations: List<Fill>)
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, Fill>
belowLayerId
Link copied to clipboard
override val belowLayerId: String?
clickListeners
Link copied to clipboard

The Added clickListeners

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

The added dragListensers

open override val dragListeners: MutableList<OnFillDragListener>
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 fills.

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

The added longClickListeners

open override val longClickListeners: MutableList<OnFillLongClickListener>
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