search_place_index_for_position
async
¶
search_place_index_for_position(
index_name: ResourceName,
position: Position,
*,
config_overrides: Optional[AsyncLocationClientConfig] = None,
max_results: Optional[PlaceIndexSearchResultLimit] = None,
language: Optional[LanguageTag] = None,
key: Optional[ApiKey] = None,
) -> SearchPlaceIndexForPositionResponse
This operation is no longer current and may be deprecated in the future. We recommend you upgrade to The version 2 If you are using an Amazon Web Services SDK or the Amazon Web Services CLI, note that the Places API version 2 is found under Since Grab is not yet fully supported in Places API version 2, we recommend you continue using API version 1 when using Grab.ReverseGeocode or SearchNearby unless you require Grab data.
SearchPlaceIndexForPosition is part of a previous Amazon Location Service Places API (version 1) which has been superseded by a more intuitive, powerful, and complete API (version 2).ReverseGeocode operation gives better results in the address reverse-geocoding use case, while the version 2 SearchNearby operation gives better results when searching for businesses and points of interest near a specific location.geo-places or geo_places, not under location.
Reverse geocodes a given coordinate and returns a legible address. Allows you to search for Places or points of interest near a given position.
Parameters:
-
index_name(ResourceName) –The name of the place index resource you want to use for the search.
-
position(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.1174and latitude49.2847. -
max_results(Optional[PlaceIndexSearchResultLimit], default:None) –An optional parameter. The maximum number of results returned per request.
Default value:
50 -
language(Optional[LanguageTag], default:None) –The preferred language used to return results. The value must be a valid BCP 47 language tag, for example,
enfor 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
languageparameter set toen. Thecityin the results will most likely be returned asAthens.If you set the
languageparameter toel, for Greek, then thecityin 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.
-
key(Optional[ApiKey], default:None) –The optional API key to authorize the request.
Raises:
-
AccessDeniedException–The request was denied because of insufficient access or permissions. Check with an administrator to verify your permissions.
-
InternalServerException–The request has failed to process because of an unknown server error, exception, or failure.
-
ResourceNotFoundException–The resource that you've entered was not found in your AWS account.
-
ThrottlingException–The request was denied because of request throttling.
-
ValidationException–The input failed to meet the constraints specified by the AWS service.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_location/_services/async_location.py
3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 | |