GeoCategory
public final class GeoCategory : Category
extension GeoCategory: GeoCategoryBehavior
extension GeoCategory: DefaultLogger
extension GeoCategory: Resettable
The Geo category enables you to interact with geospacial services.
-
Geo category type
Declaration
Swift
public let categoryType: CategoryType
-
Adds
pluginto the list of Plugins that implement functionality for this category.Declaration
Swift
public func add(plugin: GeoCategoryPlugin) throwsParameters
pluginThe Plugin to add
-
Returns the added plugin with the specified
keyproperty.Declaration
Swift
public func getPlugin(for key: PluginKey) throws -> GeoCategoryPluginParameters
keyThe PluginKey (String) of the plugin to retrieve
Return Value
The wrapped plugin
-
Removes the plugin registered for
keyfrom the list of Plugins that implement functionality for this category. If no plugin has been added forkey, no action is taken, making this method safe to call multiple times.Declaration
Swift
public func removePlugin(for key: PluginKey)Parameters
keyThe key used to
addthe plugin
-
search(for:Asynchronousoptions: ) Search for places or points of interest.
Throws
Geo.Error.accessDeniedif request authorization issueGeo.Error.serviceErrorif service is down/resource not found/throttling/validation errorGeo.Error.invalidConfigurationif invalid configurationGeo.Error.networkErrorif request failed or network unavailableGeo.Error.pluginErrorif encapsulated error received by a dependent pluginGeo.Error.unknownif error is unknownDeclaration
Parameters
textThe place name or address to be used in the search. (case insensitive)
optionsOptional parameters when searching for text.
Return Value
It returns a Geo.Place array.
-
search(for:Asynchronousoptions: ) Reverse geocodes a given pair of coordinates and returns a list of Places closest to the specified position.
Throws
Geo.Error.accessDeniedif request authorization issueGeo.Error.serviceErrorif service is down/resource not found/throttling/validation errorGeo.Error.invalidConfigurationif invalid configurationGeo.Error.networkErrorif request failed or network unavailableGeo.Error.pluginErrorif encapsulated error received by a dependent pluginGeo.Error.unknownif error is unknownDeclaration
Parameters
coordinatesSpecifies a coordinate for the query.
optionsOptional parameters when searching for coordinates.
Return Value
It returns a Geo.Place array.
-
availableMaps()AsynchronousRetrieves metadata for available Map resources.
Throws
Geo.Error.accessDeniedif request authorization issueGeo.Error.serviceErrorif service is down/resource not found/throttling/validation errorGeo.Error.invalidConfigurationif invalid configurationGeo.Error.networkErrorif request failed or network unavailableGeo.Error.pluginErrorif encapsulated error received by a dependent pluginGeo.Error.unknownif error is unknownDeclaration
Swift
public func availableMaps() async throws -> [Geo.MapStyle]Return Value
It returns an array of available Map resources.
-
defaultMap()AsynchronousRetrieves metadata for the default Map resource.
Throws
Geo.Error.accessDeniedif request authorization issueGeo.Error.serviceErrorif service is down/resource not found/throttling/validation errorGeo.Error.invalidConfigurationif invalid configurationGeo.Error.networkErrorif request failed or network unavailableGeo.Error.pluginErrorif encapsulated error received by a dependent pluginGeo.Error.unknownif error is unknownDeclaration
Swift
public func defaultMap() async throws -> Geo.MapStyleReturn Value
It returns the default Map resource.
-
Declaration
Swift
public static var log: Logger { get } -
Declaration
Swift
public var log: Logger { get } -
reset()AsynchronousDeclaration
Swift
public func reset() async
View on GitHub