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. The style parameter must be declared in the current style.
styleLayerNamesstruct std::vector<std::string>read-onlyReturns the ordered list of style layer names as declared by the style (the project JSON "layers" array, or the Layer elements of a Mapnik XML style). This defines both the draw order and which layers exist. CompositeVectorTileLayer uses it to place external data sources in the layer order: a source whose name is not in this list has no slot in the style and is not drawn, so this is the way to check a style before wiring sources into it.
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
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