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.
-
Geo category type
Declaration
Swift
public let categoryType: CategoryType
-
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 forkey
, 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(for:
Asynchronousoptions: ) Search for places or points of interest.
Throws
Geo.Error.accessDenied
if request authorization issueGeo.Error.serviceError
if service is down/resource not found/throttling/validation errorGeo.Error.invalidConfiguration
if invalid configurationGeo.Error.networkError
if request failed or network unavailableGeo.Error.pluginError
if encapsulated error received by a dependent pluginGeo.Error.unknown
if error is unknownDeclaration
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:
Asynchronousoptions: ) 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 issueGeo.Error.serviceError
if service is down/resource not found/throttling/validation errorGeo.Error.invalidConfiguration
if invalid configurationGeo.Error.networkError
if request failed or network unavailableGeo.Error.pluginError
if encapsulated error received by a dependent pluginGeo.Error.unknown
if error is unknownDeclaration
Parameters
coordinates
Specifies a coordinate for the query.
options
Optional parameters when searching for coordinates.
Return Value
It returns a Geo.Place array.
-
availableMaps()
AsynchronousRetrieves metadata for available Map resources.
Throws
Geo.Error.accessDenied
if request authorization issueGeo.Error.serviceError
if service is down/resource not found/throttling/validation errorGeo.Error.invalidConfiguration
if invalid configurationGeo.Error.networkError
if request failed or network unavailableGeo.Error.pluginError
if encapsulated error received by a dependent pluginGeo.Error.unknown
if 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.accessDenied
if request authorization issueGeo.Error.serviceError
if service is down/resource not found/throttling/validation errorGeo.Error.invalidConfiguration
if invalid configurationGeo.Error.networkError
if request failed or network unavailableGeo.Error.pluginError
if encapsulated error received by a dependent pluginGeo.Error.unknown
if error is unknownDeclaration
Swift
public func defaultMap() async throws -> Geo.MapStyle
Return 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