MSFMBVectorTileDecoder

Objective-C


@interface MSFMBVectorTileDecoder : MSFVectorTileDecoder

Swift

class MSFMBVectorTileDecoder : MSFVectorTileDecoder

Decoder for vector tiles in MapBox format.

  • Constructs a decoder for MapBox vector tiles based on specified compiled style set.

    Declaration

    Objective-C

    - (id)initWithCompiledStyleSet:(MSFCompiledStyleSet *)compiledStyleSet;

    Swift

    init!(compiledStyleSet: MSFCompiledStyleSet!)

    Parameters

    compiledStyleSet

    The compiled style set for the tiles. @throws NSException If the decoder could not be created or there are issues with the style set.

  • Constructs a decoder for MapBox vector tiles based on specified CartoCSS style set.

    Declaration

    Objective-C

    - (id)initWithCartoCSSStyleSet:(MSFCartoCSSStyleSet *)cartoCSSStyleSet;

    Swift

    init!(cartoCSSStyleSet: MSFCartoCSSStyleSet!)

    Parameters

    cartoCSSStyleSet

    The CartoCSS style set for the tiles. @throws NSException If the decoder could not be created or there are issues with the style set.

  • Returns the current compiled style set used by the decoder. If decoder uses non-compiled style set, null is returned.

    Declaration

    Objective-C

    - (MSFCompiledStyleSet *)getCompiledStyleSet;

    Swift

    func getCompiledStyleSet() -> MSFCompiledStyleSet!

    Return Value

    The current style set.

  • Sets the current compiled style set used by the decoder.

    Declaration

    Objective-C

    - (void)setCompiledStyleSet:(MSFCompiledStyleSet *)styleSet;

    Swift

    func setCompiledStyleSet(_ styleSet: MSFCompiledStyleSet!)

    Parameters

    styleSet

    The new style set to use. @throws NSException If the decoder could not be updated or there are issues with the style set.

  • Returns the current CartoCSS style set used by the decoder. If decoder uses non-CartoCSS style set, null is returned.

    Declaration

    Objective-C

    - (MSFCartoCSSStyleSet *)getCartoCSSStyleSet;

    Swift

    func getCartoCSSStyleSet() -> MSFCartoCSSStyleSet!

    Return Value

    The current style set.

  • Sets the current CartoCSS style set used by the decoder.

    Declaration

    Objective-C

    - (void)setCartoCSSStyleSet:(MSFCartoCSSStyleSet *)styleSet;

    Swift

    func setCartoCSSStyleSet(_ styleSet: MSFCartoCSSStyleSet!)

    Parameters

    styleSet

    The new style set to use. @throws NSException If the decoder could not be updated or there are issues with the style set.

  • Returns the list of all available style parameters.

    Declaration

    Objective-C

    - (MSFStringVector *)getStyleParameters;

    Swift

    func getStyleParameters() -> MSFStringVector!

    Return Value

    The list of all available style parameters.

  • Returns the value of the specified style parameter: its default, or the value last set. “table.key” returns one member of an object parameter.

    Declaration

    Objective-C

    - (NSString *)getStyleParameter:(NSString *)param;

    Swift

    func getStyleParameter(_ param: String!) -> String!

    Parameters

    param

    The parameter to return.

    Return Value

    The value of the parameter. @throws NSException If the style parameter is neither declared nor set.

  • Sets the value of the specified parameter. A parameter the style does not declare is read as JSON, else as text, and kept across style changes. “table.key” sets one member of a declared object parameter and keeps the others.

    Declaration

    Objective-C

    - (BOOL)setStyleParameter:(NSString *)param value:(NSString *)value;

    Swift

    func setStyleParameter(_ param: String!, value: String!) -> Bool

    Parameters

    param

    The parameter to set.

    value

    The value for the parameter.

    Return Value

    True if the parameter was set. False if the value does not fit the declared type.

  • Sets the values of the specified parameters, as setStyleParameter does.

    Declaration

    Objective-C

    - (void)setStyleParameters:(MSFStringMap *)params;

    Swift

    func setStyleParameters(_ params: MSFStringMap!)

    Parameters

    params

    The getStyleParameters to set.

  • Sets the values of the specified parameters, as setStyleParameter does.

    Declaration

    Objective-C

    - (void)setJSONStyleParameters:(NSString *)params;

    Swift

    func setJSONStyleParameters(_ params: String!)

    Parameters

    params

    The getStyleParameters to set.

  • Resolves a legend spec against the current style and style parameter values: every item is a synthetic feature, and comes back as the swatch the style draws it with (lines, fill, icon, plate, text). See the Legends feature page for the spec and the result.

    Declaration

    Objective-C

    - (NSString *)getLegend:(NSString *)spec;

    Swift

    func getLegend(_ spec: String!) -> String!

    Parameters

    spec

    The legend spec as JSON. Empty means the legend.json beside the style project.

    Return Value

    The legend as JSON, without the items the style does not draw; empty if the style ships no legend. @throws NSException If the spec is malformed.

  • Returns 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.

    Declaration

    Objective-C

    - (MSFStringVector *)getStyleLayerNames;

    Swift

    func getStyleLayerNames() -> MSFStringVector!

    Return Value

    The ordered style layer names.

  • Returns the value of feature id override flag. This is intended for cases when feature ids in tile are not globally unique.

    Declaration

    Objective-C

    - (BOOL)isFeatureIdOverride;

    Swift

    func isFeatureIdOverride() -> Bool

    Return Value

    The value of feature id override flag.

  • Sets the value of feature id override flag. This is intended for cases when feature ids in tile are not globally unique.

    Declaration

    Objective-C

    - (void)setFeatureIdOverride:(BOOL)idOverride;

    Swift

    func setFeatureIdOverride(_ idOverride: Bool)

    Parameters

    idOverride

    The value of the flag.

  • Returns the binary format the tiles are decoded as.

    Declaration

    Objective-C

    - (enum MSFTileFormat)getTileFormat;

    Swift

    func getTileFormat() -> MSFTileFormat

    Return Value

    The tile format. Default is TILE_FORMAT_AUTO.

  • Sets the binary format the tiles are decoded as. TILE_FORMAT_AUTO detects it per tile.

    Declaration

    Objective-C

    - (void)setTileFormat:(enum MSFTileFormat)format;

    Swift

    func setTileFormat(_ format: MSFTileFormat)

    Parameters

    format

    The tile format.

  • Maps a container’s declared format or encoding (MBTiles/PMTiles metadata, TileJSON media type) onto a tile format, case-insensitively by substring. ‘pbf’ is inconclusive, not MVT: MapLibre tilesets keep format ‘pbf’ and declare MLT through encoding.

    Declaration

    Objective-C

    + (enum MSFTileFormat)parseTileFormat:(NSString *)format;

    Swift

    class func parseTileFormat(_ format: String!) -> MSFTileFormat

    Parameters

    format

    The declared format or encoding string.

    Return Value

    The tile format, or TILE_FORMAT_AUTO when the string says nothing conclusive.

  • Undocumented

    Declaration

    Objective-C

    - (void)addFallbackFont:(MSFBinaryData *)fontData;

    Swift

    func addFallbackFont(_ fontData: MSFBinaryData!)
  • Undocumented

    Declaration

    Objective-C

    - (int)getMinZoom;

    Swift

    func getMinZoom() -> Int32
  • Undocumented

    Declaration

    Objective-C

    - (int)getMaxZoom;

    Swift

    func getMaxZoom() -> Int32
  • Undocumented

    Declaration

    Objective-C

    -(void)dealloc;

    Swift

    func dealloc()