Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Reverse geocodes a given coordinate and returns a legible address. Allows you to search for Places or points of interest near a given position.
Synopsis
- data SearchPlaceIndexForPosition = SearchPlaceIndexForPosition' {}
- newSearchPlaceIndexForPosition :: Text -> NonEmpty Double -> SearchPlaceIndexForPosition
- searchPlaceIndexForPosition_language :: Lens' SearchPlaceIndexForPosition (Maybe Text)
- searchPlaceIndexForPosition_maxResults :: Lens' SearchPlaceIndexForPosition (Maybe Natural)
- searchPlaceIndexForPosition_indexName :: Lens' SearchPlaceIndexForPosition Text
- searchPlaceIndexForPosition_position :: Lens' SearchPlaceIndexForPosition (NonEmpty Double)
- data SearchPlaceIndexForPositionResponse = SearchPlaceIndexForPositionResponse' {}
- newSearchPlaceIndexForPositionResponse :: Int -> SearchPlaceIndexForPositionSummary -> SearchPlaceIndexForPositionResponse
- searchPlaceIndexForPositionResponse_httpStatus :: Lens' SearchPlaceIndexForPositionResponse Int
- searchPlaceIndexForPositionResponse_results :: Lens' SearchPlaceIndexForPositionResponse [SearchForPositionResult]
- searchPlaceIndexForPositionResponse_summary :: Lens' SearchPlaceIndexForPositionResponse SearchPlaceIndexForPositionSummary
Creating a Request
data SearchPlaceIndexForPosition Source #
See: newSearchPlaceIndexForPosition
smart constructor.
SearchPlaceIndexForPosition' | |
|
Instances
newSearchPlaceIndexForPosition Source #
Create a value of SearchPlaceIndexForPosition
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
SearchPlaceIndexForPosition
, searchPlaceIndexForPosition_language
- The preferred language used to return results. The value must be a valid
BCP 47 language tag, for example,
en
for English.
This setting affects the languages used in the results, but not the results themselves. If no language is specified, or not supported for a particular result, the partner automatically chooses a language for the result.
For an example, we'll use the Greek language. You search for a location
around Athens, Greece, with the language
parameter set to en
. The
city
in the results will most likely be returned as Athens
.
If you set the language
parameter to el
, for Greek, then the city
in the results will more likely be returned as Αθήνα
.
If the data provider does not have a value for Greek, the result will be in a language that the provider does support.
SearchPlaceIndexForPosition
, searchPlaceIndexForPosition_maxResults
- An optional parameter. The maximum number of results returned per
request.
Default value: 50
SearchPlaceIndexForPosition
, searchPlaceIndexForPosition_indexName
- The name of the place index resource you want to use for the search.
SearchPlaceIndexForPosition
, searchPlaceIndexForPosition_position
- Specifies the longitude and latitude of the position to query.
This parameter must contain a pair of numbers. The first number represents the X coordinate, or longitude; the second number represents the Y coordinate, or latitude.
For example, [-123.1174, 49.2847]
represents a position with longitude
-123.1174
and latitude 49.2847
.
Request Lenses
searchPlaceIndexForPosition_language :: Lens' SearchPlaceIndexForPosition (Maybe Text) Source #
The preferred language used to return results. The value must be a valid
BCP 47 language tag, for example,
en
for English.
This setting affects the languages used in the results, but not the results themselves. If no language is specified, or not supported for a particular result, the partner automatically chooses a language for the result.
For an example, we'll use the Greek language. You search for a location
around Athens, Greece, with the language
parameter set to en
. The
city
in the results will most likely be returned as Athens
.
If you set the language
parameter to el
, for Greek, then the city
in the results will more likely be returned as Αθήνα
.
If the data provider does not have a value for Greek, the result will be in a language that the provider does support.
searchPlaceIndexForPosition_maxResults :: Lens' SearchPlaceIndexForPosition (Maybe Natural) Source #
An optional parameter. The maximum number of results returned per request.
Default value: 50
searchPlaceIndexForPosition_indexName :: Lens' SearchPlaceIndexForPosition Text Source #
The name of the place index resource you want to use for the search.
searchPlaceIndexForPosition_position :: Lens' SearchPlaceIndexForPosition (NonEmpty Double) Source #
Specifies the longitude and latitude of the position to query.
This parameter must contain a pair of numbers. The first number represents the X coordinate, or longitude; the second number represents the Y coordinate, or latitude.
For example, [-123.1174, 49.2847]
represents a position with longitude
-123.1174
and latitude 49.2847
.
Destructuring the Response
data SearchPlaceIndexForPositionResponse Source #
See: newSearchPlaceIndexForPositionResponse
smart constructor.
SearchPlaceIndexForPositionResponse' | |
|
Instances
newSearchPlaceIndexForPositionResponse Source #
Create a value of SearchPlaceIndexForPositionResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:httpStatus:SearchPlaceIndexForPositionResponse'
, searchPlaceIndexForPositionResponse_httpStatus
- The response's http status code.
$sel:results:SearchPlaceIndexForPositionResponse'
, searchPlaceIndexForPositionResponse_results
- Returns a list of Places closest to the specified position. Each result
contains additional information about the Places returned.
$sel:summary:SearchPlaceIndexForPositionResponse'
, searchPlaceIndexForPositionResponse_summary
- Contains a summary of the request. Echoes the input values for
Position
, Language
, MaxResults
, and the DataSource
of the place
index.
Response Lenses
searchPlaceIndexForPositionResponse_httpStatus :: Lens' SearchPlaceIndexForPositionResponse Int Source #
The response's http status code.
searchPlaceIndexForPositionResponse_results :: Lens' SearchPlaceIndexForPositionResponse [SearchForPositionResult] Source #
Returns a list of Places closest to the specified position. Each result contains additional information about the Places returned.
searchPlaceIndexForPositionResponse_summary :: Lens' SearchPlaceIndexForPositionResponse SearchPlaceIndexForPositionSummary Source #
Contains a summary of the request. Echoes the input values for
Position
, Language
, MaxResults
, and the DataSource
of the place
index.