GeoCategoryBehavior

public protocol GeoCategoryBehavior

Behavior of the Geo category that clients will use

Search

  • search(for:options:) Asynchronous

    Search for places or points of interest.

    Throws

    Geo.Error.accessDenied if request authorization issue Geo.Error.serviceError if service is down/resource not found/throttling/validation error Geo.Error.invalidConfiguration if invalid configuration Geo.Error.networkError if request failed or network unavailable Geo.Error.pluginError if encapsulated error received by a dependent plugin Geo.Error.unknown if error is unknown

    Declaration

    Swift

    func search(for text: String,
                options: Geo.SearchForTextOptions?) async throws -> [Geo.Place]

    Parameters

    text

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

    options

    Optional parameters when searching for text.

    Return Value

    It returns a Geo.Place array.

  • search(for:options:) Asynchronous

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

    Throws

    Geo.Error.accessDenied if request authorization issue Geo.Error.serviceError if service is down/resource not found/throttling/validation error Geo.Error.invalidConfiguration if invalid configuration Geo.Error.networkError if request failed or network unavailable Geo.Error.pluginError if encapsulated error received by a dependent plugin Geo.Error.unknown if error is unknown

    Declaration

    Swift

    func search(for coordinates: Geo.Coordinates,
                options: Geo.SearchForCoordinatesOptions?) async throws -> [Geo.Place]

    Parameters

    coordinates

    Specifies a coordinate for the query.

    options

    Optional parameters when searching for coordinates.

    Return Value

    It returns a Geo.Place array.

Maps

  • availableMaps() Asynchronous

    Retrieves metadata for available Map resources.

    Throws

    Geo.Error.accessDenied if request authorization issue Geo.Error.serviceError if service is down/resource not found/throttling/validation error Geo.Error.invalidConfiguration if invalid configuration Geo.Error.networkError if request failed or network unavailable Geo.Error.pluginError if encapsulated error received by a dependent plugin Geo.Error.unknown if error is unknown

    Declaration

    Swift

    func availableMaps() async throws -> [Geo.MapStyle]

    Return Value

    It returns an array of available Map resources.

  • defaultMap() Asynchronous

    Retrieves metadata for the default Map resource.

    Throws

    Geo.Error.accessDenied if request authorization issue Geo.Error.serviceError if service is down/resource not found/throttling/validation error Geo.Error.invalidConfiguration if invalid configuration Geo.Error.networkError if request failed or network unavailable Geo.Error.pluginError if encapsulated error received by a dependent plugin Geo.Error.unknown if error is unknown

    Declaration

    Swift

    func defaultMap() async throws -> Geo.MapStyle

    Return Value

    It returns the default Map resource.