OfflineSearchFactory
public enum OfflineSearchFactory
Factory for accessing the implementations for the Offline Search APIs provided via the Search
protocol.
The Offline Search API allows developers to search using an offline map.
An example usage:
// Create and store an Offline Search instance
self.search = try OfflineSearchFactory.create(store: store)
// so later it's possible to search using it.
let options = SearchOptions(query: "pizza")
search.search(options) { result in /* Here you do processing */ }
Note
for more details, see theSearch
documentation.
Important
This is a Public Preview API. It may be changed or removed at any time.-
Creates an instance conforming to the
Search
protocol.Throws
An error ifNDSStore
is invalid.Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public static func create( store: NDSStore, customPOIProviders: [CustomPOIProvider] = [] ) throws -> Search
Parameters
store
a
NDSStore
providing access to the offline map.customPOIProviders
Custom data providers for injecting external POI data into the search engine.
Return Value
An instance conforming to the
Search
protocol.