Class MapboxVectorFeature Constructorsconstructor new MapboxVectorFeature ( pbf : PbfReader , end : number , isS2 : boolean , extent : number , version : number , keys : string [] , values : Value [] , ) : MapboxVectorFeature Parameters pbf : PbfReader 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 addTesselation ( geometry : number [] , multiplier : number ) : 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
is Lines isLines () : boolean Returns boolean
true if the type of the feature is lines
is Lines3D isLines3D () : boolean Returns boolean
true if the type of the feature is lines 3D
is Points isPoints () : boolean Returns boolean
true if the type of the feature is points
is Points3D isPoints3D () : boolean Returns boolean
true if the type of the feature is points 3D
is Polygons isPolygons () : boolean Returns boolean
true if the type of the feature is polygons
is Polygons3D isPolygons3D () : boolean Returns boolean
true if the type of the feature is polygons 3D
load Geometry loadGeometry () : VectorGeometry
vector geometry relative to feature type.
load Geometry Flat loadGeometryFlat () : [ geometry: number [] , indices: number [] ] Returns [ geometry: number [] , indices: number [] ]
[flattened geometry & tesslation if applicable, indices]
load Points loadPoints () : Point []
regardless of the type, we return a flattend point array
read Indices readIndices () : 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.