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.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
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
func defaultMap() async throws -> Geo.MapStyle
Return Value
It returns the default Map resource.