MGLVectorSource

@interface MGLVectorSource : MGLSource

A vector tile source. Tiles must be in Mapbox Vector Tile format.

  • Initializes and returns a vector source from a remote URL.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithSourceIdentifier:
                                (nonnull NSString *)sourceIdentifier
                                                 URL:(nonnull NSURL *)url;

    Swift

    init(sourceIdentifier: String, url: URL)

    Parameters

    sourceIdentifier

    The source identifier.

    URL

    A remote URL holding the vector source data.

    Return Value

    An MGLVectorSource.

  • Initializes a source with the given identifier, tile size, and tile URL template set.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithSourceIdentifier:
                                (nonnull NSString *)sourceIdentifier
                                             tileSet:(nonnull MGLTileSet *)tileSet;

    Swift

    init(sourceIdentifier: String, tileSet: MGLTileSet)

    Parameters

    sourceIdentifier

    A string that uniquely identifies the source.

    tileSet

    A tile set describing where to download tiles.