search_place_index_for_position
¶
search_place_index_for_position(
index_name: ResourceName,
position: Position,
*,
config_overrides: Optional[LocationClientConfig] = 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/location.py
3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 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 | |