amazonka-location-2.0: Amazon Location Service SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.Location.SearchPlaceIndexForPosition

Description

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

Creating a Request

data SearchPlaceIndexForPosition Source #

See: newSearchPlaceIndexForPosition smart constructor.

Constructors

SearchPlaceIndexForPosition' 

Fields

  • language :: Maybe Text

    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.

  • maxResults :: Maybe Natural

    An optional parameter. The maximum number of results returned per request.

    Default value: 50

  • indexName :: Text

    The name of the place index resource you want to use for the search.

  • position :: Sensitive (NonEmpty Double)

    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.

Instances

Instances details
ToJSON SearchPlaceIndexForPosition Source # 
Instance details

Defined in Amazonka.Location.SearchPlaceIndexForPosition

ToHeaders SearchPlaceIndexForPosition Source # 
Instance details

Defined in Amazonka.Location.SearchPlaceIndexForPosition

ToPath SearchPlaceIndexForPosition Source # 
Instance details

Defined in Amazonka.Location.SearchPlaceIndexForPosition

ToQuery SearchPlaceIndexForPosition Source # 
Instance details

Defined in Amazonka.Location.SearchPlaceIndexForPosition

AWSRequest SearchPlaceIndexForPosition Source # 
Instance details

Defined in Amazonka.Location.SearchPlaceIndexForPosition

Generic SearchPlaceIndexForPosition Source # 
Instance details

Defined in Amazonka.Location.SearchPlaceIndexForPosition

Associated Types

type Rep SearchPlaceIndexForPosition :: Type -> Type #

Show SearchPlaceIndexForPosition Source # 
Instance details

Defined in Amazonka.Location.SearchPlaceIndexForPosition

NFData SearchPlaceIndexForPosition Source # 
Instance details

Defined in Amazonka.Location.SearchPlaceIndexForPosition

Eq SearchPlaceIndexForPosition Source # 
Instance details

Defined in Amazonka.Location.SearchPlaceIndexForPosition

Hashable SearchPlaceIndexForPosition Source # 
Instance details

Defined in Amazonka.Location.SearchPlaceIndexForPosition

type AWSResponse SearchPlaceIndexForPosition Source # 
Instance details

Defined in Amazonka.Location.SearchPlaceIndexForPosition

type Rep SearchPlaceIndexForPosition Source # 
Instance details

Defined in Amazonka.Location.SearchPlaceIndexForPosition

type Rep SearchPlaceIndexForPosition = D1 ('MetaData "SearchPlaceIndexForPosition" "Amazonka.Location.SearchPlaceIndexForPosition" "amazonka-location-2.0-4NLaYgEbMXwF6j2j7LAFNb" 'False) (C1 ('MetaCons "SearchPlaceIndexForPosition'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "language") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "maxResults") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Natural))) :*: (S1 ('MetaSel ('Just "indexName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "position") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Sensitive (NonEmpty Double))))))

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 #

Constructors

SearchPlaceIndexForPositionResponse' 

Fields

Instances

Instances details
Generic SearchPlaceIndexForPositionResponse Source # 
Instance details

Defined in Amazonka.Location.SearchPlaceIndexForPosition

Show SearchPlaceIndexForPositionResponse Source # 
Instance details

Defined in Amazonka.Location.SearchPlaceIndexForPosition

NFData SearchPlaceIndexForPositionResponse Source # 
Instance details

Defined in Amazonka.Location.SearchPlaceIndexForPosition

Eq SearchPlaceIndexForPositionResponse Source # 
Instance details

Defined in Amazonka.Location.SearchPlaceIndexForPosition

type Rep SearchPlaceIndexForPositionResponse Source # 
Instance details

Defined in Amazonka.Location.SearchPlaceIndexForPosition

type Rep SearchPlaceIndexForPositionResponse = D1 ('MetaData "SearchPlaceIndexForPositionResponse" "Amazonka.Location.SearchPlaceIndexForPosition" "amazonka-location-2.0-4NLaYgEbMXwF6j2j7LAFNb" 'False) (C1 ('MetaCons "SearchPlaceIndexForPositionResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: (S1 ('MetaSel ('Just "results") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [SearchForPositionResult]) :*: S1 ('MetaSel ('Just "summary") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SearchPlaceIndexForPositionSummary))))

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_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.