GeoCategoryBehavior
public protocol GeoCategoryBehavior
Behavior of the Geo category that clients will use
-
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
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
func defaultMap() async throws -> Geo.MapStyleReturn Value
It returns the default Map resource.
View on GitHub