Skip to main content

Styles

The vector tile decoder, and the style set it reads. Created with kind style.

TypeClass
"mbvt"MBVectorTileDecoder

"mbvt" — MBVectorTileDecoder​

{"type": "mbvt", "project": …}
{"type": "mbvt", "cartocss": …}
KeyTypeAlways requiredNotes
projectobject std::shared_ptr<CompiledStyleSet>noan id of kind styleset, or an inline spec
cartocssobject std::shared_ptr<CartoCSSStyleSet>noan id of kind styleset, or an inline spec
PropertyTypeAccessDescription
cartoCSSStyleobject std::shared_ptr<massif::CartoCSSStyleSet>read/writeReturns the current CartoCSS style set used by the decoder. If decoder uses non-CartoCSS style set, null is returned.
compiledStyleobject std::shared_ptr<massif::CompiledStyleSet>read/writeReturns the current compiled style set used by the decoder. If decoder uses non-compiled style set, null is returned.
featureIdOverridebooleanread/writeReturns the value of feature id override flag. This is intended for cases when feature ids in tile are not globally unique.
paramsstringread/writeReturns the value of the specified style parameter: its default, or the value last set. "table.key" returns one member of an object parameter.
styleLayerNamesstruct std::vector<std::string>read-onlyReturns the ordered style layer names as declared by the style (project JSON "layers", or Mapnik XML Layers), i.e. the draw order. CompositeVectorTileLayer places external sources by it: a source whose name is not in this list is not drawn.
styleParametersstruct std::vector<std::string>read-onlyReturns the list of all available style parameters.
tileFormatenumread/writeReturns the binary format the tiles are decoded as.

Inherited from VectorTileDecoder:

PropertyTypeAccessDescription
maxZoomintegerread-only
minZoomintegerread-only
MethodArgumentsReturns
addFallbackFontfont: handlevoid
getStyleParametername: stringstring
setStyleParametername: string, value: stringbool
setStyleParametersparams: jsonvoid

Base classes​

Not constructed directly. Their properties are reachable on every object above that derives from them.

VectorTileDecoder​

PropertyTypeAccessDescription
maxZoomintegerread-only
minZoomintegerread-only