Class FillBucket
Implements
Index
Constructors
Properties
Methods
Constructors
constructor
Parameters
- options: BucketParameters<FillStyleLayer>
Returns FillBucket
Properties
hasDependencies
hasDependencies: boolean
index
index: number
indexArray
indexArray2
indexBuffer
indexBuffer2
layerIds
layerIds: string[]
layers
layoutVertexArray
layoutVertexBuffer
overscaling
overscaling: number
patternFeatures
programConfigurations
segments
segments2
stateDependentLayerIds
stateDependentLayerIds: string[]
stateDependentLayers
uploaded
uploaded: boolean
zoom
zoom: number
Methods
addFeature
- addFeature(
feature: BucketFeature,
geometry: Point[][],
index: number,
canonical: CanonicalTileID,
imagePositions: { [_: string]: ImagePosition },
subdivisionGranularity: SubdivisionGranularitySetting,
): voidParameters
- feature: BucketFeature
- geometry: Point[][]
- index: number
- canonical: CanonicalTileID
- imagePositions: { [_: string]: ImagePosition }
- subdivisionGranularity: SubdivisionGranularitySetting
Returns void
addFeatures
- addFeatures(
options: PopulateParameters,
canonical: CanonicalTileID,
imagePositions: { [_: string]: ImagePosition },
): voidParameters
- options: PopulateParameters
- canonical: CanonicalTileID
- imagePositions: { [_: string]: ImagePosition }
Returns void
destroy
Release the WebGL resources associated with the buffers. Note that because buckets are shared between layers having the same layout properties, they must be destroyed in groups (all buckets for a tile, or all symbol buckets).
Returns void
isEmpty
Returns boolean
populate
- populate(
features: IndexedFeature[],
options: PopulateParameters,
canonical: CanonicalTileID,
): voidParameters
- features: IndexedFeature[]
- options: PopulateParameters
- canonical: CanonicalTileID
Returns void
update
- update(
states: FeatureStates,
vtLayer: VectorTileLayerLike,
imagePositions: { [_: string]: ImagePosition },
): voidParameters
- states: FeatureStates
- vtLayer: VectorTileLayerLike
- imagePositions: { [_: string]: ImagePosition }
Returns void
upload
Parameters
- context: Context
Returns void
uploadPending
Returns boolean
Was this helpful?
Hidden
The
Bucketinterface is the single point of knowledge about turning vector tiles into WebGL buffers.Bucketis an abstract interface. An implementation exists for each style layer type. Create a bucket via theStyleLayer.createBucketmethod.The concrete bucket types, using layout options from the style layer, transform feature geometries into vertex and index data for use by the vertex shader. They also (via
ProgramConfiguration) use feature properties and the zoom level to populate the attributes needed for data-driven styling.Buckets are designed to be built on a worker thread and then serialized and transferred back to the main thread for rendering. On the worker side, a bucket's vertex, index, and attribute data is stored in
bucket.arrays: ArrayGroup. When a bucket's data is serialized and sent back to the main thread, is gets deserialized (usingnew Bucket(serializedBucketData), with the array data now stored inbucket.buffers: BufferGroup. BufferGroups hold the same data as ArrayGroups, but are tuned for consumption by WebGL.