Class MapboxVectorFeature Constructorsconstructor new Mapbox Vector Feature ( pbf , end , isS2 , extent , version , keys , values ) : MapboxVectorFeature Parameters pbf : Pbf end : number isS2 : boolean extent : number version : number keys : string [] values : Value [] AccessorshasMValues get hasMValues( ) : boolean Returns boolean
MapboxVectorTile's do not support m-values so we return false
Methodsadd Tesselation add Tesselation ( geometry , multiplier ) : void Parameters geometry : number [] multiplier : number Returns void bbox bbox ( ) : BBox | BBox3D
a default bbox. Since no bbox is present, the default is [0, 0, 0, 0]
also MapboxVectorTile's do not support 3D, so we only return a 2D bbox
load Geometry load Geometry ( ) : VectorGeometry
vector geometry relative to feature type.
load Geometry Flat load Geometry Flat ( ) : [ geometry: VectorGeometry | number [] , indices: number [] ] Returns [ geometry: VectorGeometry | number [] , indices: number [] ]
[flattened geometry & tesslation if applicable, indices]
load Points load Points ( ) : Point []
regardless of the type, we return a flattend point array
read Indices read Indices ( ) : number [] Returns number []
an array of indices for the geometry
Mapbox Vector Feature types are all bundled in one class to make it easier to read. Primarily contains an id, properties, and geometry. The now deprecated S2 model extends this class to include indices and tesselation data.