Method: geocode.location.geocodeLocationQuery
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
השיטה הזו מבצעת קידוד גיאוגרפי של מיקום, שממפה LatLng לכתובת. הוא גם מספק מידע מובנה על הכתובת.
בקשת HTTP
GET https://geocode.googleapis.com/v4beta/geocode/location/{locationQuery}
כתובת ה-URL משתמשת בתחביר של gRPC Transcoding.
פרמטרים של נתיב
פרמטרים |
פרמטר של איחוד location_input . המיקום להמרה לקואורדינטות. הערך location_input יכול להיות רק אחד מהבאים: |
locationQuery |
string
המיקום בפורמט של מחרוזת 'lat,lng'. לדוגמה, "64.7611872,-18.4705364".
|
פרמטרים של שאילתה
פרמטרים |
languageCode |
string
אופציונלי. השפה שבה התוצאות צריכות להיות מוצגות.
|
regionCode |
string
אופציונלי. קוד אזור. קוד האזור, שמוגדר כערך של שני תווים של ccTLD (דומיין ברמה העליונה). הפרמטר משפיע על התוצאות בהתאם לדין החל.
|
types[] |
string
אופציונלי. קבוצה של תגי סוג להגבלת התוצאות. תוצאות שלא כוללות אף אחד מהסוגים שצוינו יוסרו. רשימה מלאה של הערכים האפשריים מופיעה בטבלה א' ובטבלה ב' בכתובת https://developers.google.com/maps/documentation/places/web-service/place-types.
|
granularity[] |
enum (GeocodeResult.Granularity )
אופציונלי. מסנן של ספירה אחת או יותר של רמת פירוט של מיקום.
|
פרמטר של איחוד location_input . המיקום להמרה לקואורדינטות. הערך location_input יכול להיות רק אחד מהבאים: |
location |
object (LatLng )
המיקום בפורמט המובנה.
|
גוף הבקשה
גוף הבקשה צריך להיות ריק.
גוף התשובה
אם הפעולה בוצעה ללא שגיאות, גוף התגובה יכיל מופע של GeocodeLocationResponse
.
היקפי הרשאה
נדרש אחד מהיקפי ההרשאות הבאים של OAuth:
https://www.googleapis.com/auth/cloud-platform
https://www.googleapis.com/auth/maps-platform.geocode
https://www.googleapis.com/auth/maps-platform.geocode.location
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-08-31 (שעון UTC).
[null,null,["עדכון אחרון: 2025-08-31 (שעון UTC)."],[],[],null,["# Method: geocode.location.geocodeLocationQuery\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n\nThis method performs a location geocode, which maps a LatLng to an address. It also provides structured information about the address.\n\n### HTTP request\n\n`GET https://geocode.googleapis.com/v4beta/geocode/location/{locationQuery}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|-----------------|-------------------------------------------------------------------------------------------------|\n| Union parameter `location_input`. The location to geocode. `location_input` can be only one of the following: ||\n| `locationQuery` | `string` The location in the format of \"lat,lng\" string. For example, \"64.7611872,-18.4705364\". |\n\n### Query parameters\n\n| Parameters ||\n|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `languageCode` | `string` Optional. Language in which the results should be returned. |\n| `regionCode` | `string` Optional. Region code. The region code, specified as a ccTLD (\"top-level domain\") two-character value. The parameter affects results based on applicable law. |\n| `types[]` | `string` Optional. A set of type tags to restrict the results. Results that do not have any of the specified types are removed. For the complete list of possible values, see Table A and Table B at \u003chttps://developers.google.com/maps/documentation/places/web-service/place-types\u003e. |\n| `granularity[]` | `enum (`[GeocodeResult.Granularity](/maps/documentation/geocoding/reference/rest/v4beta/GeocodeResult.Granularity)`)` Optional. A filter of one or more location granularity enums. |\n| Union parameter `location_input`. The location to geocode. `location_input` can be only one of the following: ||\n| `location` | `object (`[LatLng](/maps/documentation/geocoding/reference/rest/Shared.Types/LatLng)`)` The location in the structured format. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains an instance of [GeocodeLocationResponse](/maps/documentation/geocoding/reference/rest/v4beta/GeocodeLocationResponse).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n- `\n https://www.googleapis.com/auth/maps-platform.geocode`\n- `\n https://www.googleapis.com/auth/maps-platform.geocode.location`"]]