GeoCategory

final public class GeoCategory : Category
extension GeoCategory: GeoCategoryBehavior
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 places or points of interest.

    Declaration

    Swift

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

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

    Parameters

    coordinates

    Specifies a coordinate for the query.

    options

    Optional parameters when searching for coorinates.

    completionHandler

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

Maps

  • Retrieves metadata for available Map resources.

    Declaration

    Swift

    public 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 the default Map resource.

    Declaration

    Swift

    public 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.

  • Declaration

    Swift

    public func reset(onComplete: @escaping BasicClosure)