SearchOfflineManager

public class SearchOfflineManager

OfflineManager handles TileStores and responsible for creating Search TilsetDescriptors

  • TileStore for offline tiles management. Use setTileStore method to change current tileStore.

    Declaration

    Swift

    public private(set) var tileStore: SearchTileStore { get }
  • Sets custom tile store. You can provide MapboxCommon.TileStore by wrapping it into MapboxSearch.SearchTileStore init(commonTileStore: CommonTileStore)

    Declaration

    Swift

    public func setTileStore(_ tileStore: SearchTileStore, completion: (() -> Void)? = nil)

    Parameters

    tileStore

    TileStore to set into SearchEngine

    completion

    this completion called right after SearchEngine finished consuming data from provided TileStore. One can start using offline search after that.

  • Sets custom tile store.

    Declaration

    Swift

    public func setTileStore(
        _ tileStore: MapboxCommon.TileStore,
        accessToken: String,
        completion: (() -> Void)? = nil
    )

    Parameters

    tileStore

    TileStore to set into SearchEngine.

    accessToken

    Mapbox Access Token.

    completion

    this completion called right after SearchEngine finished consuming data from provided TileStore. One can start using offline search after that.

  • Creates TilesetDescriptor for offline search index data with provided dataset name and version.

    Declaration

    Swift

    public static func createTilesetDescriptor(dataset: String, version: String? = nil) -> MapboxCommon
    .TilesetDescriptor

    Parameters

    dataset

    dataset name

    version

    dataset version

    Return Value

    TilesetDescriptor for TileStore

  • Creates TilesetDescriptor for offline search boundaries with provided dataset name and version.

    Declaration

    Swift

    public static func createPlacesTilesetDescriptor(dataset: String, version: String? = nil) -> MapboxCommon
    .TilesetDescriptor

    Parameters

    dataset

    dataset name

    version

    dataset version

    Return Value

    TilesetDescriptor for TileStore

  • Creates TilesetDescriptor for offline search index data using default dataset name.

    Declaration

    Swift

    public static func createDefaultTilesetDescriptor() -> MapboxCommon.TilesetDescriptor

    Return Value

    TilesetDescriptor for TileStore

  • Creates TilesetDescriptor for offline search boundaries using default dataset name.

    Declaration

    Swift

    public static func createDefaultPlacesTilesetDescriptor() -> MapboxCommon.TilesetDescriptor

    Return Value

    TilesetDescriptor for TileStore