GeoCategory

final public class GeoCategory : Category
extension GeoCategory: GeoCategoryBehavior
extension GeoCategory: DefaultLogger
extension GeoCategory: Resettable

The Geo category enables you to interact with geospacial services.

Plugin handling

  • Adds plugin to the list of Plugins that implement functionality for this category.

    Declaration

    Swift

    public func add(plugin: GeoCategoryPlugin) throws

    Parameters

    plugin

    The Plugin to add

  • Returns the added plugin with the specified key property.

    Declaration

    Swift

    public func getPlugin(for key: PluginKey) throws -> GeoCategoryPlugin

    Parameters

    key

    The PluginKey (String) of the plugin to retrieve

    Return Value

    The wrapped plugin

  • Removes the plugin registered for key from the list of Plugins that implement functionality for this category. If no plugin has been added for key, no action is taken, making this method safe to call multiple times.

    Declaration

    Swift

    public func removePlugin(for key: PluginKey)

    Parameters

    key

    The key used to add the plugin

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

    public func search(for text: String,
                       options: Geo.SearchForTextOptions? = nil) 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

    public func search(for coordinates: Geo.Coordinates,
                       options: Geo.SearchForCoordinatesOptions? = nil) 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

    public 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

    public func defaultMap() async throws -> Geo.MapStyle

    Return Value

    It returns the default Map resource.

  • log

    Declaration

    Swift

    public static var log: Logger { get }
  • log

    Declaration

    Swift

    public var log: Logger { get }
  • reset() Asynchronous

    Declaration

    Swift

    public func reset() async