Styles
The vector tile decoder, and the style set it reads. Created with kind style.
| Type | Class |
|---|---|
"mbvt" | MBVectorTileDecoder |
"mbvt" — MBVectorTileDecoder
{"type": "mbvt", "project": …}
{"type": "mbvt", "cartocss": …}
| Key | Type | Always required | Notes |
|---|---|---|---|
project | object std::shared_ptr<CompiledStyleSet> | no | an id of kind styleset, or an inline spec |
cartocss | object std::shared_ptr<CartoCSSStyleSet> | no | an id of kind styleset, or an inline spec |
| Property | Type | Access | Description |
|---|---|---|---|
cartoCSSStyle | object std::shared_ptr<massif::CartoCSSStyleSet> | read/write | Returns the current CartoCSS style set used by the decoder. If decoder uses non-CartoCSS style set, null is returned. |
compiledStyle | object std::shared_ptr<massif::CompiledStyleSet> | read/write | Returns the current compiled style set used by the decoder. If decoder uses non-compiled style set, null is returned. |
featureIdOverride | boolean | read/write | Returns the value of feature id override flag. This is intended for cases when feature ids in tile are not globally unique. |
params | string | read/write | Returns the value of the specified style parameter. The style parameter must be declared in the current style. |
styleLayerNames | struct std::vector<std::string> | read-only | Returns 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. |
styleParameters | struct std::vector<std::string> | read-only | Returns the list of all available style parameters. |
tileFormat | enum | read/write | Returns the binary format the tiles are decoded as. |
Inherited from VectorTileDecoder:
| Property | Type | Access | Description |
|---|---|---|---|
maxZoom | integer | read-only | |
minZoom | integer | read-only |
| Method | Arguments | Returns |
|---|---|---|
getStyleParameter | name: string | string |
setStyleParameter | name: string, value: string | bool |
setStyleParameters | params: json | void |
Base classes
Not constructed directly. Their properties are reachable on every object above that derives from them.
VectorTileDecoder
| Property | Type | Access | Description |
|---|---|---|---|
maxZoom | integer | read-only | |
minZoom | integer | read-only |