MapzenSearch

public class MapzenSearch : NSObject

Main entry point for interacting with Mapzen Search.

  • Returns the shared ‘MapzenSearch’ instance.

    Declaration

    Swift

    public static let sharedInstance = MapzenSearch()
  • Delay in seconds that the manager should wait between keystrokes to fire a new autocomplete request. Default is 0.3

    Declaration

    Swift

    public var autocompleteTimeDelay: Double
  • Base url to execute requests against. Default value is https://search.mapzen.com.

    Declaration

    Swift

    public var baseUrl: URL
  • The query items that should be applied to every request (such as an api key).

    Declaration

    Swift

    public var urlQueryItems: [URLQueryItem]?
  • Perform an asyncronous search request given parameters defined by the search config. Returns the queued operation.

    Declaration

    Swift

    public func search(_ config: SearchConfig) -> Operation

    Parameters

    config

    Object holding search request parameter information.

  • Perform an asyncronous reverse geocode request given parameters defined by the config. Returns the queued operation.

    Declaration

    Swift

    public func reverseGeocode(_ config: ReverseConfig) -> Operation

    Parameters

    config

    Object holding reverse geo request parameter information.

  • Perform an asyncronous autocomplete request given parameters defined by the config. Returns the queued operation.

    Declaration

    Swift

    public func autocompleteQuery(_ config: AutocompleteConfig) -> Operation

    Parameters

    config

    Object holding autocomplete request parameter information.

  • Perform an asyncronous place request given parameters defined by the search config. Returns the queued operation.

    Declaration

    Swift

    public func placeQuery(_ config: PlaceConfig) -> Operation

    Parameters

    config

    Object holding place request parameter information.

  • Cancel all requests

    Declaration

    Swift

    public func cancelOperations()