/AWS1/IF_LOC=>GETPLACE()¶
About GetPlace¶
This operation is no longer current and may be deprecated in the future. We recommend you upgrade to the V2 This version of Version 2 of the 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. Start your version 2 API journey with the Places V2 API Reference or the Developer Guide.GetPlace operation unless you require Grab data.
GetPlace 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).GetPlace operation interoperates with the rest of the Places V2 API, while this version does not.geo-places or geo_places, not under location.
Finds a place by its unique ID. A PlaceId is returned by other search operations.
A PlaceId is valid only if all of the following are the same in the original search request and the call to GetPlace.
-
Customer Amazon Web Services account
-
Amazon Web Services Region
-
Data provider specified in the place index resource
If your Place index resource is configured with Grab as your geolocation provider and Storage as Intended use, the GetPlace operation is unavailable. For more information, see AWS service terms.
Method Signature¶
METHODS /AWS1/IF_LOC~GETPLACE
IMPORTING
!IV_INDEXNAME TYPE /AWS1/LOCRESOURCENAME OPTIONAL
!IV_PLACEID TYPE /AWS1/LOCPLACEID OPTIONAL
!IV_LANGUAGE TYPE /AWS1/LOCLANGUAGETAG OPTIONAL
!IV_KEY TYPE /AWS1/LOCAPIKEY OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_locgetplaceresponse
RAISING
/AWS1/CX_LOCACCESSDENIEDEX
/AWS1/CX_LOCINTERNALSERVEREX
/AWS1/CX_LOCRESOURCENOTFOUNDEX
/AWS1/CX_LOCTHROTTLINGEX
/AWS1/CX_LOCVALIDATIONEX
/AWS1/CX_LOCCLIENTEXC
/AWS1/CX_LOCSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_indexname TYPE /AWS1/LOCRESOURCENAME /AWS1/LOCRESOURCENAME¶
The name of the place index resource that you want to use for the search.
iv_placeid TYPE /AWS1/LOCPLACEID /AWS1/LOCPLACEID¶
The identifier of the place to find.
Optional arguments:¶
iv_language TYPE /AWS1/LOCLANGUAGETAG /AWS1/LOCLANGUAGETAG¶
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.
iv_key TYPE /AWS1/LOCAPIKEY /AWS1/LOCAPIKEY¶
The optional API key to authorize the request.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_locgetplaceresponse /AWS1/CL_LOCGETPLACERESPONSE¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->getplace(
iv_indexname = |string|
iv_key = |string|
iv_language = |string|
iv_placeid = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_place = lo_result->get_place( ).
IF lo_place IS NOT INITIAL.
lv_sensitivestring = lo_place->get_label( ).
lo_placegeometry = lo_place->get_geometry( ).
IF lo_placegeometry IS NOT INITIAL.
LOOP AT lo_placegeometry->get_point( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_double = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
ENDIF.
lv_sensitivestring = lo_place->get_addressnumber( ).
lv_sensitivestring = lo_place->get_street( ).
lv_sensitivestring = lo_place->get_neighborhood( ).
lv_sensitivestring = lo_place->get_municipality( ).
lv_sensitivestring = lo_place->get_subregion( ).
lv_sensitivestring = lo_place->get_region( ).
lv_sensitivestring = lo_place->get_country( ).
lv_sensitivestring = lo_place->get_postalcode( ).
lv_sensitiveboolean = lo_place->get_interpolated( ).
lo_timezone = lo_place->get_timezone( ).
IF lo_timezone IS NOT INITIAL.
lv_sensitivestring = lo_timezone->get_name( ).
lv_sensitiveinteger = lo_timezone->get_offset( ).
ENDIF.
lv_sensitivestring = lo_place->get_unittype( ).
lv_sensitivestring = lo_place->get_unitnumber( ).
LOOP AT lo_place->get_categories( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_placecategory = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
LOOP AT lo_place->get_supplementalcategories( ) into lo_row_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
lv_placesupplementalcatego = lo_row_5->get_value( ).
ENDIF.
ENDLOOP.
lv_sensitivestring = lo_place->get_submunicipality( ).
ENDIF.
ENDIF.