MapTileDataSource

public class MapTileDataSource : TileSource
extension MapTileDataSource: NativeBase
extension MapTileDataSource: Hashable

A tile data source that exposes geometry data for map features.

Note: This is a beta release of this feature and may contain bugs or exhibit unexpected behaviour. Related APIs are subject to change without a deprecation process.

  • Receives loaded tile data.

    Declaration

    Swift

    public typealias LoadTileCompletionHandler = (_ tileKey: TileKey, _ mapFeatureData: MapTileGeometryData?) -> Void

    Parameters

    tileKey

    Tile key of the loaded data.

    mapFeatureData

    Geometry data for the loaded tile, or nil if operation failed.

  • The tiling scheme used by this source.

    Declaration

    Swift

    public var tilingScheme: TilingScheme { get }
  • The storage levels available for this data source. At least one level must be available for this to be used as a source of data. Supported range [0, 31].

    Declaration

    Swift

    public var storageLevels: [Int32] { get }
  • Gets the current data version of a tile.

    Declaration

    Swift

    public func getDataVersion(tileKey: TileKey) -> TileSourceDataVersion

    Parameters

    tileKey

    Key of the tile for which to retrieve the version.

    Return Value

    Data version for a tile.

  • Adds a delegate for receiving state notifications.

    Declaration

    Swift

    public func addDelegate(_ delegate: TileSourceDelegate)

    Parameters

    delegate

    The delegate

  • Removes a delegate from receiving state notifications.

    Declaration

    Swift

    public func removeDelegate(_ delegate: TileSourceDelegate)

    Parameters

    delegate

    Delegate to be removed from receiving state notifications.

  • Load data for a specified tile.

    Declaration

    Swift

    public func loadTile(tileKey: TileKey, completion: @escaping MapTileDataSource.LoadTileCompletionHandler) -> TileSourceLoadTileRequestHandle

    Parameters

    tileKey

    Key of the tile to load data for.

    completion

    Load result handler that receives the loaded data.

    Return Value

    A handle to the created load request.