MSFVectorTileLayer

Objective-C


@interface MSFVectorTileLayer : MSFTileLayer

Swift

class MSFVectorTileLayer : MSFTileLayer

A tile layer where each tile is a bitmap. Should be used together with corresponding data source.

  • Constructs a VectorTileLayer object from a data source and tile decoder.

    Declaration

    Objective-C

    - (id)initWithDataSource:(MSFTileDataSource *)dataSource
                     decoder:(MSFVectorTileDecoder *)decoder;

    Swift

    init!(dataSource: MSFTileDataSource!, decoder: MSFVectorTileDecoder!)

    Parameters

    dataSource

    The data source from which this layer loads data.

    decoder

    The tile decoder that decoder loaded tiles and applies styles.

  • Returns the tile decoder assigned to this layer.

    Declaration

    Objective-C

    - (MSFVectorTileDecoder *)getTileDecoder;

    Swift

    func getTileDecoder() -> MSFVectorTileDecoder!

    Return Value

    The tile decoder assigned to this layer.

  • Returns the tile cache capacity.

    Declaration

    Objective-C

    - (unsigned long)getTileCacheCapacity;

    Swift

    func getTileCacheCapacity() -> UInt

    Return Value

    The tile cache capacity in bytes.

  • Sets the vector tile cache capacity. Tile cache is the primary storage for vector data, all tiles contained within the cache are stored as uncompressed vertex buffers and can immediately be drawn to the screen. Setting the cache size too small may cause artifacts, such as disappearing tiles. The more tiles are visible on the screen, the larger this cache should be. The default is 10MB, which should be enough for most use cases with preloading enabled. If preloading is disabled, the cache size should be reduced by the user to conserve memory.

    Declaration

    Objective-C

    - (void)setTileCacheCapacity:(unsigned long)capacityInBytes;

    Swift

    func setTileCacheCapacity(_ capacityInBytes: UInt)

    Parameters

    capacityInBytes

    The new tile bitmap cache capacity in bytes.

  • Returns the current display order of the labels.

    Declaration

    Objective-C

    - (enum MSFVectorTileRenderOrder)getLabelRenderOrder;

    Swift

    func getLabelRenderOrder() -> MSFVectorTileRenderOrder

    Return Value

    The display order of the labels. Default is VECTOR_TILE_RENDER_ORDER_LAYER.

  • Sets the current display order of the labels.

    Declaration

    Objective-C

    - (void)setLabelRenderOrder:(enum MSFVectorTileRenderOrder)renderOrder;

    Swift

    func setLabel(_ renderOrder: MSFVectorTileRenderOrder)

    Parameters

    renderOrder

    The new display order of the labels.

  • Returns the current display order of the buildings.

    LAST draws over the flat labels too, so a label that must clear a building is a BILLBOARD one - that pass runs after the buildings, and moving this order is not the mechanism.

    Declaration

    Objective-C

    - (enum MSFVectorTileRenderOrder)getBuildingRenderOrder;

    Swift

    func getBuildingRenderOrder() -> MSFVectorTileRenderOrder

    Return Value

    The display order of the buildings. Default is VECTOR_TILE_RENDER_ORDER_LAST.

  • Sets the current display order of the buildings.

    Declaration

    Objective-C

    - (void)setBuildingRenderOrder:(enum MSFVectorTileRenderOrder)renderOrder;

    Swift

    func setBuilding(_ renderOrder: MSFVectorTileRenderOrder)

    Parameters

    renderOrder

    The new display order of the labels.

  • Returns the click radius of vector tile features. Units are screen density independent pixels (DP or DIP).

    Declaration

    Objective-C

    - (float)getClickRadius;

    Swift

    func getClickRadius() -> Float

    Return Value

    The click radius of vector tile features.

  • Sets the click radius of vector tile features. The click radius is applied as an extra buffer to the vector tile features to make clicking on small features less sensitive. Units are screen density independent pixels (DP or DIP).

    Declaration

    Objective-C

    - (void)setClickRadius:(float)radius;

    Swift

    func setClickRadius(_ radius: Float)

    Parameters

    radius

    The new click radius of vector tile features. The default value is 4.

  • Returns the current relative layer blending speed.

    Declaration

    Objective-C

    - (float)getLayerBlendingSpeed;

    Swift

    func getBlendingSpeed() -> Float

    Return Value

    The current relative layer blending speed. Default is 0.0 (no blending).

  • Sets the relative layer blending speed.

    The default is 0 - a tile’s geometry appears, as maplibre and mapbox-gl do it; they fade rasters only. A cased road cross-fades badly, because its fill is usually near the background colour: for the length of the fade only the casing reads and the road looks like an outline waiting to be filled. Set 1 for the fade this SDK used to do.

    Declaration

    Objective-C

    - (void)setLayerBlendingSpeed:(float)speed;

    Swift

    func setLayerBlendingSpeed(_ speed: Float)

    Parameters

    speed

    The new relative speed value. Use zero or negative values to disable blending.

  • Returns the current relative label blending speed.

    Declaration

    Objective-C

    - (float)getLabelBlendingSpeed;

    Swift

    func getLabelBlendingSpeed() -> Float

    Return Value

    The current relative label blending speed. Default is 1.0.

  • Sets the relative label blending speed.

    Declaration

    Objective-C

    - (void)setLabelBlendingSpeed:(float)speed;

    Swift

    func setLabelBlendingSpeed(_ speed: Float)

    Parameters

    speed

    The new relative speed value. Default is 1.0. Use zero or negative values to disable blending.

  • Returns how much of the perspective divide a label keeps as it recedes from the camera.

    Declaration

    Objective-C

    - (float)getLabelPerspectiveScaling;

    Swift

    func getLabelPerspectiveScaling() -> Float

    Return Value

    The label perspective scaling, 0 to 1. Default is 0.5.

  • Sets how much of the perspective divide a label keeps as it recedes from the camera. At 0 a label holds a constant on-screen size at any distance. At 0.5, mapbox’s and maplibre’s own value, a distant label shrinks at half the rate the projection would shrink it. At 1 it shrinks with the map. Callout labels always hold their size.

    Declaration

    Objective-C

    - (void)setLabelPerspectiveScaling:(float)scaling;

    Swift

    func setLabelPerspectiveScaling(_ scaling: Float)

    Parameters

    scaling

    The new scaling, clamped to 0 to 1. Default is 0.5.

  • Returns the renderer layer filter. The filter is given as ECMA regular expression that is applied to qualified layer names.

    Declaration

    Objective-C

    - (NSString *)getRendererLayerFilter;

    Swift

    func getRendererLayerFilter() -> String!

    Return Value

    The renderer layer filter. Default is empty string, which means no filter is used.

  • Sets the renderer layer filter. The filter is given as ECMA regular expression that is applied to qualified layer names. If non-empty, then only layers that pass the filter are rendered.

    Declaration

    Objective-C

    - (void)setRendererLayerFilter:(NSString *)filter;

    Swift

    func setRendererLayerFilter(_ filter: String!)

    Parameters

    filter

    The new renderer layer filter. @throws NSException If the filter expression is not valid.

  • Returns the click handler layer filter. The filter is given as ECMA regular expression that is applied to qualified layer names.

    Declaration

    Objective-C

    - (NSString *)getClickHandlerLayerFilter;

    Swift

    func getClickHandlerLayerFilter() -> String!

    Return Value

    The click handler layer filter. Default is empty string, which means no filter is used.

  • Sets the click handler layer filter. The filter is given as ECMA regular expression that is applied to qualified layer names. If non-empty, then only layers that pass the filter are tested when handling clicks.

    Declaration

    Objective-C

    - (void)setClickHandlerLayerFilter:(NSString *)filter;

    Swift

    func setClickHandlerLayerFilter(_ filter: String!)

    Parameters

    filter

    The new click handler layer filter. @throws NSException If the filter expression is not valid.

  • Returns the vector tile event listener.

    Declaration

    Objective-C

    - (MSFVectorTileEventListener *)getVectorTileEventListener;

    Swift

    func getVectorTileEventListener() -> MSFVectorTileEventListener!

    Return Value

    The vector tile event listener.

  • Sets the vector tile event listener.

    Declaration

    Objective-C

    - (void)setVectorTileEventListener:(MSFVectorTileEventListener *)eventListener;

    Swift

    func setVectorTileEventListener(_ eventListener: MSFVectorTileEventListener!)

    Parameters

    eventListener

    The vector tile event listener.

  • Undocumented

    Declaration

    Objective-C

    -(void)dealloc;

    Swift

    func dealloc()