GeoCategoryBehavior

public protocol GeoCategoryBehavior

Behavior of the Geo category that clients will use

Search

  • Search for places or points of interest.

    Declaration

    Swift

    func search(for text: String,
                options: Geo.SearchForTextOptions?,
                completionHandler: @escaping Geo.ResultsHandler<[Geo.Place]>)

    Parameters

    text

    The place name or address to be used in the search. (case insensitive)

    options

    Optional parameters when searching for text.

    completionHandler

    The completion handler receives a Response object. The success case provides a Place array.

  • Reverse geocodes a given pair of coordinates and returns a list of Places closest to the specified position.

    Declaration

    Swift

    func search(for coordinates: Geo.Coordinates,
                options: Geo.SearchForCoordinatesOptions?,
                completionHandler: @escaping Geo.ResultsHandler<[Geo.Place]>)

    Parameters

    coordinates

    Specifies a coordinate for the query.

    options

    Optional parameters when searching for coordinates.

    completionHandler

    The completion handler receives a Response object. The success case provides a Place array.

Maps

  • Retrieves metadata for available Map resources.

    Declaration

    Swift

    func availableMaps(completionHandler: @escaping Geo.ResultsHandler<[Geo.MapStyle]>)

    Parameters

    completionHandler

    The completion handler receives a Response object. The success case provides an array of available Map resources.

  • Retrieves metadata for the default Map resource.

    Declaration

    Swift

    func defaultMap(completionHandler: @escaping Geo.ResultsHandler<Geo.MapStyle>)

    Parameters

    completionHandler

    The completion handler receives a Response object. The success case provides the default Map resource.