SearchTileStore
public class SearchTileStore
Simple wrapper for MapboxCommon.TileStore.
This instance provides basicTileStore` functionality for a rare case when
someone using Offline search without other Mapbox frameworks.
Use commonTileStore property to access underlaying MapboxCommon.TileStore
-
Default API Url used for
Searchtile data domain.Declaration
Swift
public let defaultEndPoint: String -
Underlaying TileStore from MapboxCommon framework for use across Mapbox frameworks.
Declaration
Swift
public private(set) var commonTileStore: MapboxCommon.TileStore { get } -
Creates with shared
MapboxCommon.TileStoreinstance at the default location. Creates a newMapboxCommon.TileStoreif one doesn’t yet exist.Declaration
Swift
public init() -
Creates with custom CommonTileStore.
Declaration
Swift
public init(commonTileStore: MapboxCommon.TileStore)Parameters
commonTileStoreSearchEngine will start using provided TileStore
-
Creates with shared
MapboxCommon.TileStoreinstance for the given storage path. Creates a newMapboxCommon.TileStoreif one doesn’t yet exist. If the given path is empty, the tile store at the default location is returned.Declaration
Swift
public init(path: String)Parameters
pathThe path on disk where tiles and metadata will be stored.
-
Loads a new tile region or updates the existing one.
Declaration
Swift
public func loadTileRegion(id: String, options: MapboxCommon.TileRegionLoadOptions)Parameters
idThe tile region identifier.
optionsThe tile region load options.
-
Loads a new tile region or updates the existing one.
Declaration
Swift
public func loadTileRegion( id: String, options: MapboxCommon.TileRegionLoadOptions, progress: MapboxCommon.TileRegionLoadProgressCallback? = nil, completion: ((Result<MapboxCommon.TileRegion, TileRegionError>) -> Void)? ) -> SearchCancelableParameters
idThe tile region identifier.
optionsThe tile region load options.
progressInvoked multiple times to report progress of the loading operation. Optional, default is nil.
completionInvoked only once upon success, failure, or cancelation of the loading operation. Any
Resulterror could be of typeTileRegionError.Return Value
A
Cancelableobject to cancel the load request -
Removes a tile region.
Removes a tile region from the existing packages list. The actual resources eviction might be deferred. All pending loading operations for the tile region with the given id will fail with Canceled error.
Declaration
Swift
public func removeTileRegion(id: String)Parameters
idThe tile region identifier.
-
Removes a tile region.
Removes a tile region from the existing packages list. The actual resources eviction might be deferred. All pending loading operations for the tile region with the given id will fail with Canceled error.
Declaration
Swift
public func removeTileRegion( id: String, completion: ((Result<MapboxCommon.TileRegion, TileRegionError>) -> Void)? )Parameters
idThe tile region identifier.
completionCompletion with
Result, error could be of typeTileRegionError.
SearchTileStore Class Reference