MapDisplayDataProvider

public protocol MapDisplayDataProvider

The MapDisplayDataProvider protocol that can be used to add custom data providers. FileOutput - Default logger output - prints logs using Swift.print

Important

This API has to be implemented in a thread-safe way.

Important

This is a Public Preview API. It may be changed or removed at any time.
  • Registers interest in a resource.

    Declaration

    Swift

    func registerInterestInResource(
        urlString: String,
        allowsCaching: Bool,
        completion: @escaping (Result<Data, Error>) -> ()
    ) -> MapDisplayDataRequestToken?

    Return Value

    The MapDisplayDataRequestToken for successful requests. Otherwise returns nil.

  • Should return true if the provider can handle the URL.

    Declaration

    Swift

    func accepts(urlString: String) -> Bool
  • isOfflineTileDataProvider Extension method

    Is true if MapDisplayDataProvider is handling offline map tile requests.

    Important

    This is a Public Preview API. It may be changed or removed at any time.

    Declaration

    Swift

    public var isOfflineTileDataProvider: Bool { get }